浏览代码

add Select, Where and Hover test Sample

/siyaoH-1.17-PlatformMessage
Shiyun Wen 4 年前
当前提交
b61d2918
共有 41 个文件被更改,包括 401 次插入202 次删除
  1. 88
      Samples/UIWidgetsSamples_2019_4/Assets/Script/TextTest.cs
  2. 3
      Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/gallery/demos.cs
  3. 6
      Samples/UIWidgetsSamples_2019_4/Assets/WidgetsSample/ToDoAppSample.cs
  4. 13
      com.unity.uiwidgets/Runtime/cupertino/date_picker.cs
  5. 4
      com.unity.uiwidgets/Runtime/engine/DisplayMetrics.cs
  6. 6
      com.unity.uiwidgets/Runtime/engine/UIWidgetsMessageManager.cs
  7. 93
      com.unity.uiwidgets/Runtime/external/SplayTree.cs
  8. 2
      com.unity.uiwidgets/Runtime/external/simplejson/SimpleJSON.cs
  9. 8
      com.unity.uiwidgets/Runtime/foundation/assertions.cs
  10. 4
      com.unity.uiwidgets/Runtime/foundation/collections.cs
  11. 19
      com.unity.uiwidgets/Runtime/foundation/diagnostics.cs
  12. 5
      com.unity.uiwidgets/Runtime/gestures/hit_test.cs
  13. 3
      com.unity.uiwidgets/Runtime/material/bottom_navigation_bar.cs
  14. 7
      com.unity.uiwidgets/Runtime/material/button_bar.cs
  15. 26
      com.unity.uiwidgets/Runtime/material/data_table.cs
  16. 13
      com.unity.uiwidgets/Runtime/material/dropdown.cs
  17. 21
      com.unity.uiwidgets/Runtime/material/navigation_rail.cs
  18. 47
      com.unity.uiwidgets/Runtime/material/paginated_data_table.cs
  19. 9
      com.unity.uiwidgets/Runtime/material/range_slider.cs
  20. 3
      com.unity.uiwidgets/Runtime/material/text_selection.cs
  21. 7
      com.unity.uiwidgets/Runtime/painting/borders.cs
  22. 10
      com.unity.uiwidgets/Runtime/painting/gradient.cs
  23. 11
      com.unity.uiwidgets/Runtime/painting/image_stream.cs
  24. 19
      com.unity.uiwidgets/Runtime/painting/text_span.cs
  25. 9
      com.unity.uiwidgets/Runtime/rendering/sliver_multi_box_adaptor.cs
  26. 3
      com.unity.uiwidgets/Runtime/ui2/painting.cs
  27. 5
      com.unity.uiwidgets/Runtime/widgets/DiagnosticableTree.mixin.gen.cs
  28. 21
      com.unity.uiwidgets/Runtime/widgets/DirectionalFocusTraversalPolicy.mixin.gen.cs
  29. 11
      com.unity.uiwidgets/Runtime/widgets/basic.cs
  30. 21
      com.unity.uiwidgets/Runtime/widgets/focus_manager.cs
  31. 17
      com.unity.uiwidgets/Runtime/widgets/focus_traversal.cs
  32. 19
      com.unity.uiwidgets/Runtime/widgets/framework.cs
  33. 5
      com.unity.uiwidgets/Runtime/widgets/gesture_detector.cs
  34. 5
      com.unity.uiwidgets/Runtime/widgets/heroes.cs
  35. 4
      com.unity.uiwidgets/Runtime/widgets/localizations.cs
  36. 16
      com.unity.uiwidgets/Runtime/widgets/navigator.cs
  37. 3
      com.unity.uiwidgets/Runtime/widgets/page_storage.cs
  38. 3
      com.unity.uiwidgets/Runtime/widgets/shortcuts.cs
  39. 4
      com.unity.uiwidgets/Runtime/widgets/sliver.cs
  40. 7
      com.unity.uiwidgets/Runtime/widgets/viewport.cs
  41. 23
      com.unity.uiwidgets/Runtime/widgets/widget_inspector.cs

88
Samples/UIWidgetsSamples_2019_4/Assets/Script/TextTest.cs


using Brightness = Unity.UIWidgets.ui.Brightness;
using UnityEngine;
using System;
using uiwidgets;
using Unity.UIWidgets.gestures;
using Unity.UIWidgets.material;
using UnityEngine.Networking;
using Transform = Unity.UIWidgets.widgets.Transform;
namespace UIWidgetsSample
{

{
ui_.runApp(new MyApp());
}
class MyApp : StatelessWidget {
public override Widget build(BuildContext context) {
return new MaterialApp(
debugShowCheckedModeBanner: false,
title: "Flutter Demo",
home: new Scaffold(
appBar: new AppBar(title: new Text("good")),
body: new Center(
child: new MyStatefulWidget()
)
)
);
}
}
class MyStatefulWidget : StatefulWidget {
public MyStatefulWidget(Key key = null) : base(key: key)
{
}
class MyApp : StatelessWidget
{
public override Widget build(BuildContext context)
{
return new CupertinoApp(
home: new HomeScreen() //new DetailScreen1("ok")
//color: Color.white
);
}
public override State createState() => new _MyStatefulWidgetState();
class _MyStatefulWidgetState : State<MyStatefulWidget> {
Color textColor = Colors.blue;
int _enterCounter = 0;
int _exitCounter = 0;
float x = 0.0f;
float y = 0.0f;
void _incrementEnter(PointerEvent details) {
UnityEngine.Debug.Log("enter");
setState(() =>{
_enterCounter++;
});
}
void _incrementExit(PointerEvent details) {
setState(() =>{
textColor = Colors.blue;
_exitCounter++;
});
}
void _updateLocation(PointerEvent details) {
setState(() =>{
textColor = Colors.red;
x = details.position.dx;
y = details.position.dy;
});
}
public override Widget build(BuildContext context) {
return new MouseRegion(
onEnter: _incrementEnter,
onHover: _updateLocation,
onExit: _incrementExit,
child: new FlatButton(
color: Colors.white,
textColor: Colors.teal[700], //when hovered text color change
shape: new RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5),
side: new BorderSide(
color: Colors.teal[700]
)
),
onPressed: () => { },
child: new Text("Log in", style: new TextStyle(color: textColor))
)
);
}
}
class HomeScreen : StatelessWidget
{

3
Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/gallery/demos.cs


using System.Linq;
using UIWidgetsGallery.demo;
using UIWidgetsGallery.demo.material;
using Unity.UIWidgets.external;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.material;
using Unity.UIWidgets.widgets;

foreach (var category in kAllGalleryDemoCategories)
result.Add(category,
kAllGalleryDemos.Where((GalleryDemo demo) => { return demo.category == category; }).ToList());
ExternalUtils<GalleryDemo>.WhereList(kAllGalleryDemos,((GalleryDemo demo) => { return demo.category == category; })));
return result;
}

6
Samples/UIWidgetsSamples_2019_4/Assets/WidgetsSample/ToDoAppSample.cs


using Unity.UIWidgets.rendering;
using Unity.UIWidgets.ui;
using Unity.UIWidgets.widgets;
using Unity.UIWidgets.external;
using UnityEngine;
using Color = Unity.UIWidgets.ui.Color;
using TextStyle = Unity.UIWidgets.painting.TextStyle;

Widget contents()
{
var children = this.items.Select((item) =>
ExternalUtils<Widget,ToDoItem>.CreateItem createItem = (ToDoItem item) =>
{
return (Widget) new Text(
item.content, style: new TextStyle(

);
});
};
var children = ExternalUtils<Widget,ToDoItem>.SelectList(this.items, createItem);
return new Flexible(
child: new ListView(
physics: new AlwaysScrollableScrollPhysics(),

13
com.unity.uiwidgets/Runtime/cupertino/date_picker.cs


using System.Globalization;
using System.Linq;
using Unity.UIWidgets.animation;
using Unity.UIWidgets.external;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.painting;
using Unity.UIWidgets.rendering;

};
break;
}
CupertinoThemeData themeData = CupertinoTheme.of(context);
CupertinoThemeData themeData = CupertinoTheme.of(context);
ExternalUtils<Widget>.CreateItem createItem = (Widget child) => {
var result = new Expanded(child: child);
return (Widget) result;
};
return new MediaQuery(
// The native iOS picker's text scaling is fixed, so we will also fix it
// as well in our picker.

style: _textStyleFrom(context),
child: new Row(
children:
columns.Select((Widget child) => {
var result = new Expanded(child: child);
return (Widget) result;
}).ToList()
)
ExternalUtils<Widget>.SelectList(columns,createItem))
)
)
)

4
com.unity.uiwidgets/Runtime/engine/DisplayMetrics.cs


}
#if UNITY_ANDROID
this._devicePixelRatio = AndroidDevicePixelRatio();
_devicePixelRatio = AndroidDevicePixelRatio();
#endif
#if UNITY_WEBGL

float padding_left = metrics.Get<float>("padding_left");
float padding_right = metrics.Get<float>("padding_right");
this._viewMetrics = new viewMetrics {
_viewMetrics = new viewMetrics {
insets_bottom = insets_bottom,
insets_left = insets_left,
insets_right = insets_right,

6
com.unity.uiwidgets/Runtime/engine/UIWidgetsMessageManager.cs


void UpdateNameIfNeed() {
#if UNITY_IOS || UNITY_ANDROID || UNITY_WEBGL
var name = this.gameObject.name;
if (name != this._lastObjectName) {
var name = gameObject.name;
if (name != _lastObjectName) {
this._lastObjectName = name;
_lastObjectName = name;
}
#endif
}

93
com.unity.uiwidgets/Runtime/external/SplayTree.cs


using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace Unity.UIWidgets.external
{ class SplayTree<TKey, TValue> : IDictionary<TKey, TValue> where TKey : IComparable<TKey> {
namespace Unity.UIWidgets.external {
class SplayTree<TKey, TValue> : IDictionary<TKey, TValue> where TKey : IComparable<TKey> {
SplayTreeNode root;
int count;
int version = 0;

IEnumerator IEnumerable.GetEnumerator() {
return GetEnumerator();
}
}
}
public class ExternalUtils<T,S>
{
public delegate T CreateItem(S item);
public delegate bool FilterDict(S value);
public static List<T> SelectList(IEnumerable<S> items,CreateItem createItem)
{
if (items == null)
return null;
List<T> results = new List<T>();
foreach (var item in items)
{
results.Add(createItem(item));
}
return results;
}
public static T[] SelectArray(List<S> items,CreateItem createItem)
{
if (items == null)
return null;
T[] results = new T[items.Count()];
foreach (var item in items)
{
int i = items.IndexOf(item);
results[i] = createItem(item);
}
return results;
}
public static Dictionary<T,S> SelectDictionary(IEnumerable<S> items,CreateItem createItem)
{
if (items == null)
return null;
Dictionary<T,S> results = new Dictionary<T,S>();
foreach (var item in items)
{
results.Add(createItem(item),item);
}
return results;
}
public static Dictionary<T,S> WhereDictionary(Dictionary<T,S> items,FilterDict filterDict)
{
if (items == null)
return null;
Dictionary<T,S> results = new Dictionary<T,S>();
foreach (var item in items)
{
if(filterDict(item.Value))
results.Add(item.Key,item.Value);
}
return results;
}
}
public class ExternalUtils<T>
{
public delegate T CreateItem(T item);
public delegate bool FilterItem(T item);
public static List<T> SelectList(IEnumerable<T> items,CreateItem createItem)
{
if (items == null)
return null;
List<T> results = new List<T>();
foreach (var item in items)
{
results.Add(createItem(item));
}
return results;
}
public static List<T> WhereList(IEnumerable<T> items,FilterItem filterItem)
{
if (items == null)
return null;
List<T> results = new List<T>();
foreach (var item in items)
{
if(filterItem(item))
results.Add(item);
}
return results;
}
}
}

2
com.unity.uiwidgets/Runtime/external/simplejson/SimpleJSON.cs


{
try
{
var item = m_Dict.Where(k => k.Value == aNode).First();
var item = ExternalUtils<string, JSONNode>.WhereDictionary(m_Dict,(k => k.Value == aNode)).First();
m_Dict.Remove(item.Key);
return aNode;
}

8
com.unity.uiwidgets/Runtime/foundation/assertions.cs


using System.Collections.Generic;
using System.Linq;
using System.Text;
using Unity.UIWidgets.external;
using UnityEngine;
namespace Unity.UIWidgets.foundation {

D.assert(() => {
IEnumerable<DiagnosticsNode> summaries =
diagnostics.Where((DiagnosticsNode node) => node.level == DiagnosticLevel.summary);
ExternalUtils<DiagnosticsNode>.WhereList(diagnostics,((DiagnosticsNode node) => node.level == DiagnosticLevel.summary));
if (summaries.Count() > 1) {
return false;
}

diagnostics.Where((DiagnosticsNode node) => node.level == DiagnosticLevel.summary);
ExternalUtils<DiagnosticsNode>.WhereList(diagnostics,((DiagnosticsNode node) => node.level == DiagnosticLevel.summary));
List<DiagnosticsNode> message = new List<DiagnosticsNode>() {
new ErrorSummary("UIWidgetsError contained multiple error summaries."),
new ErrorDescription(

public override string ToString() {
TextTreeRenderer renderer = new TextTreeRenderer(wrapWidth: 400000000);
return string.Join("\n", diagnostics.Select((DiagnosticsNode node) => renderer.render(node).TrimEnd()));
var values = ExternalUtils<string,DiagnosticsNode>.SelectList(diagnostics,((DiagnosticsNode node) => renderer.render(node).TrimEnd()));
return string.Join("\n",values );
}
public static void reportError(UIWidgetsErrorDetails details) {

4
com.unity.uiwidgets/Runtime/foundation/collections.cs


using System;
using System.Collections.Generic;
using System.Linq;
using Unity.UIWidgets.external;
using Unity.UIWidgets.InternalBridge;
namespace Unity.UIWidgets.foundation {

if (it == null) {
return null;
}
return "{ " + string.Join(", ", it.Select(item => item.ToString())) + " }";
return "{ " + string.Join(", ", ExternalUtils<string,T>.SelectList(it,(item => item.ToString()))) + " }";
}
public static void reset<T>(this List<T> list, int size) {

19
com.unity.uiwidgets/Runtime/foundation/diagnostics.cs


using System.Collections.Generic;
using System.Linq;
using System.Text;
using Unity.UIWidgets.external;
using Unity.UIWidgets.ui;
using UnityEngine;

builder.writeStretched(config.suffixLineOne, builder.wrapWidth.Value);
}
IEnumerable<DiagnosticsNode> propertiesIterable = node.getProperties().Where(
IEnumerable<DiagnosticsNode> propertiesIterable = ExternalUtils<DiagnosticsNode>.WhereList(node.getProperties(),(
);
));
List<DiagnosticsNode> properties;
if (_maxDescendentsTruncatableNode >= 0 && node.allowTruncate) {
if (propertiesIterable.Count() < _maxDescendentsTruncatableNode) {

}
if (parentConfiguration != null && !parentConfiguration.lineBreakProperties) {
return string.Join(", ", value.Select(v => v.ToString()).ToArray());
return string.Join(", ", ExternalUtils<string,T>.SelectList(value,(v => v.ToString())));
return string.Join(style == DiagnosticsTreeStyle.singleLine ? ", " : "\n",
value.Select(v => v.ToString()).ToArray());
return string.Join(style == DiagnosticsTreeStyle.singleLine ? ", " : "\n", ExternalUtils<string,T>.SelectList(value,(v => v.ToString())));
}
public override DiagnosticLevel level {

public override Dictionary<string, object> toJsonMap(DiagnosticsSerializationDelegate Delegate) {
var json = base.toJsonMap(Delegate);
if (value != null) {
json["values"] = value.Select(v => v.ToString()).ToList();
json["values"] = ExternalUtils<string, T>.SelectList(value,(v => v.ToString()));
}
return json;

result.Append(joiner);
DiagnosticPropertiesBuilder builder = new DiagnosticPropertiesBuilder();
debugFillProperties(builder);
result.Append(string.Join(joiner,
builder.properties.Where(n => !n.isFiltered(minLevel)).Select(n => n.ToString()).ToArray())
var property =
ExternalUtils<DiagnosticsNode>.WhereList(builder.properties, (n => !n.isFiltered(minLevel)));
result.Append(string.Join(joiner,ExternalUtils<string,DiagnosticsNode>.SelectList(property,(n => n.ToString())))
);
shallowString = result.ToString();
return true;

5
com.unity.uiwidgets/Runtime/gestures/hit_test.cs


using System.Collections.Generic;
using System.Linq;
using Unity.UIWidgets.external;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.rendering;
using Unity.UIWidgets.ui;

public override string ToString() {
return
$"HitTestResult({(_path.isEmpty() ? "<empty path>" : string.Join(", ", _path.Select(x => x.ToString()).ToArray()))})";
}
$"HitTestResult({(_path.isEmpty() ? "<empty path>" : string.Join(", ", ExternalUtils<string,HitTestEntry>.SelectList(_path,(x => x.ToString())) ))})";
}
}
}

3
com.unity.uiwidgets/Runtime/material/bottom_navigation_bar.cs


using System.Linq;
using uiwidgets;
using Unity.UIWidgets.animation;
using Unity.UIWidgets.external;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.gestures;
using Unity.UIWidgets.painting;

public float horizontalLeadingOffset {
get {
float weightSum(IEnumerable<Animation<float>> animations) {
return animations.Select(state._evaluateFlex).Sum();
return ExternalUtils<float,Animation<float>>.SelectList(animations, state._evaluateFlex).Sum();
}
float allWeights = weightSum(state._animations);

7
com.unity.uiwidgets/Runtime/material/button_bar.cs


using System.Collections.Generic;
using System.Linq;
using Unity.UIWidgets.external;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.painting;
using Unity.UIWidgets.rendering;

mainAxisAlignment: alignment ?? barTheme?.alignment ?? MainAxisAlignment.end,
mainAxisSize: mainAxisSize ?? barTheme?.mainAxisSize ?? MainAxisSize.max,
overflowDirection: overflowDirection ?? barTheme?.overflowDirection ?? VerticalDirection.down,
children: children.Select((Widget childWidget) => {
children:
ExternalUtils<Widget>.SelectList(children,((Widget childWidget) => {
}).ToList(),
})),
overflowButtonSpacing: overflowButtonSpacing
)
);

26
com.unity.uiwidgets/Runtime/material/data_table.cs


using System.Linq;
using uiwidgets;
using Unity.UIWidgets.animation;
using Unity.UIWidgets.external;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.gestures;
using Unity.UIWidgets.painting;

List<TableColumnWidth> tableColumns =
new List<TableColumnWidth>(new TableColumnWidth[columns.Count + (displayCheckboxColumn ? 1 : 0)]);
List<TableRow> tableRows = Enumerable.Range(0, rows.Count + 1).Select((index) => {
return new TableRow(
key: index == 0 ? _headingRowKey : rows[index - 1].key,
decoration: index > 0 && rows[index - 1].selected
? _kSelectedDecoration
: _kUnselectedDecoration,
children: new List<Widget>(new Widget[tableColumns.Count])
);
}).ToList();
List<TableRow> tableRows =
ExternalUtils<TableRow,int>.SelectList(Enumerable.Range(0, rows.Count + 1),
(index) => {
return new TableRow(
key: index == 0 ? _headingRowKey : rows[index - 1].key,
decoration: index > 0 && rows[index - 1].selected
? _kSelectedDecoration
: _kUnselectedDecoration,
children: new List<Widget>(new Widget[tableColumns.Count])
);
});
int rowIndex;

displayColumnIndex += 1;
}
var columnWidth = ExternalUtils<int, TableColumnWidth>.SelectDictionary(tableColumns, ((TableColumnWidth x) => tableColumns.IndexOf(x)));
columnWidths: tableColumns.Select((x, i) => new {x, i})
.ToDictionary(a => a.i, a => a.x),
columnWidths: columnWidth,
children: tableRows
);
}

13
com.unity.uiwidgets/Runtime/material/dropdown.cs


using uiwidgets;
using Unity.UIWidgets.animation;
using Unity.UIWidgets.async2;
using Unity.UIWidgets.external;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.gestures;
using Unity.UIWidgets.material;

) :
base(key: key) {
D.assert(items == null || items.isEmpty() || value == null ||
items.Where((DropdownMenuItem<T> item) => { return item.value.Equals(value); }).Count() == 1,
ExternalUtils<DropdownMenuItem<T>>.WhereList(items,((DropdownMenuItem<T> item) => { return item.value.Equals(value); })).Count() == 1,
() => "There should be exactly one item with [DropdownButton]'s value: " +
$"{value}. \n" +
"Either zero or 2 or more [DropdownMenuItem]s were detected " +

}
D.assert(widget.value == null ||
widget.items.Where((DropdownMenuItem<T> item) => item.value.Equals(widget.value))
.ToList().Count == 1);
ExternalUtils<DropdownMenuItem<T>>.WhereList(widget.items,((DropdownMenuItem<T> item) => item.value.Equals(widget.value))
).Count == 1);
_selectedIndex = null;
for (int itemIndex = 0; itemIndex < widget.items.Count; itemIndex++) {
if (widget.items[itemIndex].value.Equals(widget.value)) {

alignment: AlignmentDirectional.centerStart,
children: widget.isDense
? items
: items.Select((Widget item) => {
: ExternalUtils<Widget>.SelectList(items,(Widget item) => {
}).ToList()
);
}));
}
Icon defaultIcon = new Icon(Icons.arrow_drop_down);

21
com.unity.uiwidgets/Runtime/material/navigation_rail.cs


using System.Collections.Generic;
using System.Linq;
using Unity.UIWidgets.animation;
using Unity.UIWidgets.external;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.painting;
using Unity.UIWidgets.rendering;

}
void _initControllers() {
_destinationControllers = widget.destinations.Select((destination, i) => {
var result = new AnimationController(
duration: ThemeUtils.kThemeAnimationDuration,
vsync: this
);
result.addListener(_rebuild);
return result;
}).ToList();
_destinationAnimations = _destinationControllers.Select((AnimationController controller) => controller.view)
.ToList();
_destinationControllers = ExternalUtils<AnimationController, NavigationRailDestination>.SelectList(widget.destinations,
((destination) => {
var result = new AnimationController(
duration: ThemeUtils.kThemeAnimationDuration,
vsync: this
);
result.addListener(_rebuild);
return result;
}));
_destinationAnimations = ExternalUtils<Animation<float>, AnimationController>.SelectList(_destinationControllers,((AnimationController controller) => controller.view));
_destinationControllers[widget.selectedIndex ?? 0].setValue(1.0f);
_extendedController = new AnimationController(
duration: ThemeUtils.kThemeAnimationDuration,

47
com.unity.uiwidgets/Runtime/material/paginated_data_table.cs


using System.Collections.Generic;
using System.Linq;
using Unity.UIWidgets.external;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.gestures;
using Unity.UIWidgets.material;

DataRow _getBlankRowFor(int index) {
return DataRow.byIndex(
index: index,
cells: widget.columns.Select((DataColumn column) => DataCell.empty).ToList()
);
cells: ExternalUtils<DataCell,DataColumn>.SelectList(widget.columns,((DataColumn column) => DataCell.empty))
);
List<DataCell> cells = widget.columns.Select((DataColumn column) => {
if (!column.numeric) {
haveProgressIndicator = true;
return new DataCell(new CircularProgressIndicator());
}
return DataCell.empty;
}).ToList();
List<DataCell> cells = ExternalUtils<DataCell, DataColumn>.SelectList(
widget.columns,((DataColumn column) => {
if (!column.numeric) {
haveProgressIndicator = true;
return new DataCell(new CircularProgressIndicator());
}
return DataCell.empty;
}));
if (!haveProgressIndicator) {
haveProgressIndicator = true;
cells[0] = new DataCell(new CircularProgressIndicator());

}
if (widget.actions != null) {
headerWidgets.AddRange(
widget.actions.Select((Widget action) => {
return new Padding(
padding: EdgeInsetsDirectional.only(
start: 24.0f - 8.0f * 2.0f),
child: action
);
}).ToList()
);
var headerWidget = ExternalUtils<Widget>.SelectList(widget.actions, ((Widget action) => {
return new Padding(
padding: EdgeInsetsDirectional.only(
start: 24.0f - 8.0f * 2.0f),
child: action
);
}));
headerWidgets.AddRange(headerWidget);
List<Widget> availableRowsPerPage = widget.availableRowsPerPage
.Where((int value) => value <= _rowCount || value == widget.rowsPerPage)
.Select((int value) => {
List<int> availableRowsPerPageInts = ExternalUtils<int>.WhereList(widget.availableRowsPerPage,
((int value) => value <= _rowCount || value == widget.rowsPerPage));
List<Widget> availableRowsPerPage = ExternalUtils<Widget,int>.SelectList(availableRowsPerPageInts,
(int value) => {
}).ToList();
});
footerWidgets.AddRange(new List<Widget>() {
new Container(width: 14.0f), // to match trailing padding in case we overflow and end up scrolling
new Text(localizations.rowsPerPageTitle),

9
com.unity.uiwidgets/Runtime/material/range_slider.cs


using System.Linq;
using Unity.UIWidgets.animation;
using Unity.UIWidgets.async2;
using Unity.UIWidgets.external;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.gestures;
using Unity.UIWidgets.painting;

const float _minPreferredTrackWidth = 144.0f;
float _maxSliderPartWidth {
get { return Mathf.Max(_sliderPartSizes.Select((Size size) => size.width).ToArray()); }
get {
return Mathf.Max(ExternalUtils<float,Size>.SelectList(_sliderPartSizes,((Size size) => size.width)).ToArray());
}
get { return Mathf.Max(_sliderPartSizes.Select((Size size) => size.height).ToArray()); }
get {
return Mathf.Max(ExternalUtils<float,Size>.SelectList(_sliderPartSizes,((Size size) => size.height)).ToArray());
}
}
List<Size> _sliderPartSizes {

3
com.unity.uiwidgets/Runtime/material/text_selection.cs


using System;
using System.Collections.Generic;
using System.Linq;
using Unity.UIWidgets.external;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.rendering;
using Unity.UIWidgets.service;

}
public override void debugVisitOnstageChildren(ElementVisitor visitor) {
foreach (var child in children.Where(_shouldPaint)) {
foreach (var child in ExternalUtils<Element>.WhereList(children,(_shouldPaint))) {
visitor(child);
}
}

7
com.unity.uiwidgets/Runtime/painting/borders.cs


using System;
using System.Collections.Generic;
using System.Linq;
using Unity.UIWidgets.external;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.ui;
using UnityEngine;

public override ShapeBorder scale(float t) {
return new _CompoundBorder(
borders.Select(border => border.scale(t)).ToList()
ExternalUtils<ShapeBorder>.SelectList(borders,(border => border.scale(t)))
);
}

public override string ToString() {
return string.Join(" + ",
((IList<ShapeBorder>) borders).Reverse().Select((border) => border.ToString()));
(
ExternalUtils<string,ShapeBorder>.SelectList(((IList<ShapeBorder>)borders).Reverse(),((border) => border.ToString())))
);
}
}

10
com.unity.uiwidgets/Runtime/painting/gradient.cs


using System;
using System.Collections.Generic;
using System.Linq;
using Unity.UIWidgets.animation;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.external;
using Unity.UIWidgets.ui;

D.assert(colors.Count >= 2, () => "colors list must have at least two colors");
float separation = 1.0f / (colors.Count - 1);
return Enumerable.Range(0, colors.Count).Select(i => i * separation).ToList();
return ExternalUtils<float, int>.SelectList(Enumerable.Range(0, colors.Count), (i => i * separation));
}
public abstract Shader createShader(Rect rect, TextDirection? textDirection = null);

return new LinearGradient(
begin: begin,
end: end,
colors: colors.Select(color => Color.lerp(null, color, factor)).ToList(),
colors: ExternalUtils<Color>.SelectList(colors,(color => Color.lerp(null, color, factor))),
stops: stops,
tileMode: tileMode
);

return new RadialGradient(
center: center,
radius: radius,
colors: colors.Select(color => Color.lerp(null, color, factor)).ToList(),
colors: ExternalUtils<Color>.SelectList(colors,(color => Color.lerp(null, color, factor))),
stops: stops,
tileMode: tileMode
);

center: center,
startAngle: startAngle,
endAngle: endAngle,
colors: colors.Select(color => Color.lerp(null, color, factor)).ToList(),
colors: ExternalUtils<Color>.SelectList(colors,(color => Color.lerp(null, color, factor))),
stops: stops,
tileMode: tileMode
);

11
com.unity.uiwidgets/Runtime/painting/image_stream.cs


using System.Collections.Generic;
using System.Linq;
using Unity.UIWidgets.async2;
using Unity.UIWidgets.external;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.scheduler2;
using Unity.UIWidgets.ui;

return;
}
var localListeners = _listeners.Select(l => l).ToList();
var localListeners = ExternalUtils<ImageStreamListener>.SelectList(_listeners,(l => l));
foreach (var listener in localListeners) {
try {
listener.onImage(image, false);

silent: silent
);
var localErrorListeners = _listeners
.Select(l => l.onError)
.Where(l => l != null)
.ToList();
var localErrorListeners = ExternalUtils<ImageErrorListener,ImageStreamListener>.SelectList(_listeners, (l => l.onError));
localErrorListeners = ExternalUtils<ImageErrorListener>.WhereList(localErrorListeners,(l => l != null));
if (localErrorListeners.isEmpty()) {
UIWidgetsError.reportError(_currentError);
}

19
com.unity.uiwidgets/Runtime/painting/text_span.cs


using System.Collections.Generic;
using System.Linq;
using System.Text;
using Unity.UIWidgets.external;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.gestures;
using Unity.UIWidgets.ui;

if (children == null) {
return new List<DiagnosticsNode>();
}
return children.Select((child) => {
if (child != null) {
return child.toDiagnosticsNode();
}
else {
return DiagnosticsNode.message("<null child>");
}
}).ToList();
return ExternalUtils<DiagnosticsNode, InlineSpan>.SelectList(children,(
(child) => {
if (child != null) {
return child.toDiagnosticsNode();
}
else {
return DiagnosticsNode.message("<null child>");
}
}));
}

9
com.unity.uiwidgets/Runtime/rendering/sliver_multi_box_adaptor.cs


using System.Collections.Generic;
using System.Linq;
using Unity.UIWidgets.external;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.gestures;
using Unity.UIWidgets.painting;

trailingGarbage -= 1;
}
_keepAliveBucket.Values.Where(child => {
ExternalUtils<RenderBox>.WhereList(_keepAliveBucket.Values,(child => {
}).ToList().ForEach(_childManager.removeChild);
})).ForEach(_childManager.removeChild);
D.assert(_keepAliveBucket.Values.Where(child => {
D.assert(ExternalUtils<RenderBox>.WhereList(_keepAliveBucket.Values,(child => {
}).ToList().isEmpty());
})).isEmpty());
});
}

3
com.unity.uiwidgets/Runtime/ui2/painting.cs


using AOT;
using Unity.UIWidgets.animation;
using Unity.UIWidgets.async2;
using Unity.UIWidgets.external;
using Unity.UIWidgets.foundation;
using UnityEngine;
using Unity.UIWidgets.ui;

? PaintingUtils._encodeColorList(colors)
: null;
ushort[] encodedIndices = indices != null
? indices.Select(i => (ushort) i).ToArray()
? ExternalUtils<ushort,int>.SelectArray(indices,(i => (ushort) i))
: null;
fixed (float* encodedPositionsPtr = encodedPositions, encodedTextureCoordinatesPtr =

5
com.unity.uiwidgets/Runtime/widgets/DiagnosticableTree.mixin.gen.cs


using System.Collections.Generic;
using System.Linq;
using System.Text;
using Unity.UIWidgets.external;
namespace Unity.UIWidgets.foundation {
public class DiagnosticableTreeMixinChangeNotifier : ChangeNotifier, DiagnosticableTreeMixin {

result.Append(joiner);
DiagnosticPropertiesBuilder builder = new DiagnosticPropertiesBuilder();
debugFillProperties(builder);
var property = ExternalUtils<DiagnosticsNode>.WhereList(builder.properties, (n => !n.isFiltered(minLevel)));
builder.properties.Where(n => !n.isFiltered(minLevel)).Select(n => n.ToString()).ToArray())
ExternalUtils<string,DiagnosticsNode>.SelectList(property,(n => n.ToString()))
)
);
shallowString = result.ToString();
return true;

21
com.unity.uiwidgets/Runtime/widgets/DirectionalFocusTraversalPolicy.mixin.gen.cs


using System.Collections.Generic;
using System.Linq;
using Unity.UIWidgets.external;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.ui;

public override void changedScope(FocusNode node = null, FocusScopeNode oldScope = null) {
base.changedScope(node: node, oldScope: oldScope);
if (oldScope != null) {
var delEntries = _policyData[oldScope]?.history?.Where((_DirectionalPolicyDataEntry entry)=> {
var delEntries = ExternalUtils<_DirectionalPolicyDataEntry>.WhereList( _policyData[oldScope]?.history , ((_DirectionalPolicyDataEntry entry)=> {
});
}));
foreach (var delEntry in delEntries) {
_policyData[oldScope]?.history?.Remove(delEntry);
}

IEnumerable<FocusNode> result = new List<FocusNode>();
switch (direction) {
case TraversalDirection.left:
result = sorted.Where((FocusNode node) => node.rect != target && node.rect.center.dx <= target.left);
result = ExternalUtils<FocusNode>.WhereList(sorted,((FocusNode node) => node.rect != target && node.rect.center.dx <= target.left));
result = sorted.Where((FocusNode node) => node.rect != target && node.rect.center.dx >= target.right);
result = ExternalUtils<FocusNode>.WhereList(sorted,((FocusNode node) => node.rect != target && node.rect.center.dx >= target.right));
break;
case TraversalDirection.up:
case TraversalDirection.down:

FocusTravesalUtils.mergeSort<FocusNode>(sorted, compare: (FocusNode a, FocusNode b) => a.rect.center.dy.CompareTo(b.rect.center.dy));
switch (direction) {
case TraversalDirection.up:
return sorted.Where((FocusNode node) => node.rect != target && node.rect.center.dy <= target.top);
return ExternalUtils<FocusNode>.WhereList(sorted,((FocusNode node) => node.rect != target && node.rect.center.dy <= target.top));
return sorted.Where((FocusNode node) => node.rect != target && node.rect.center.dy >= target.bottom);
return ExternalUtils<FocusNode>.WhereList(sorted,((FocusNode node) => node.rect != target && node.rect.center.dy >= target.bottom));
case TraversalDirection.left:
case TraversalDirection.right:
break;

nearestScope.traversalDescendants
);
if (focusedScrollable != null && !focusedScrollable.position.atEdge()) {
IEnumerable<FocusNode> filteredEligibleNodes = eligibleNodes.Where((FocusNode node) => Scrollable.of(node.context) == focusedScrollable);
IEnumerable<FocusNode> filteredEligibleNodes = ExternalUtils<FocusNode>.WhereList(eligibleNodes,((FocusNode node) => Scrollable.of(node.context) == focusedScrollable));
if (filteredEligibleNodes.Count() !=0) {
eligibleNodes = filteredEligibleNodes;
}

sorted = sorted.ToList();
}
Rect band = Rect.fromLTRB(focusedChild.rect.left, float.NegativeInfinity, focusedChild.rect.right, float.PositiveInfinity);
IEnumerable<FocusNode> inBand = sorted.Where((FocusNode node) => !node.rect.intersect(band).isEmpty);
IEnumerable<FocusNode> inBand = ExternalUtils<FocusNode>.WhereList(sorted,((FocusNode node) => !node.rect.intersect(band).isEmpty));
if (inBand.Count() !=0) {
found = inBand.First();
break;

case TraversalDirection.left:
eligibleNodes = _sortAndFilterHorizontally(direction, focusedChild.rect, nearestScope);
if (focusedScrollable != null && !focusedScrollable.position.atEdge()) {
IEnumerable<FocusNode> filteredEligibleNodes = eligibleNodes.Where((FocusNode node) => Scrollable.of(node.context) == focusedScrollable);
IEnumerable<FocusNode> filteredEligibleNodes = ExternalUtils<FocusNode>.WhereList(eligibleNodes,((FocusNode node) => Scrollable.of(node.context) == focusedScrollable));
if (filteredEligibleNodes.Count()!=0) {
eligibleNodes = filteredEligibleNodes;
}

//sorted = sorted.reversed.toList();
}
band = Rect.fromLTRB(float.NegativeInfinity, focusedChild.rect.top, float.PositiveInfinity, focusedChild.rect.bottom);
inBand = sorted.Where((FocusNode node) => !node.rect.intersect(band).isEmpty);
inBand = ExternalUtils<FocusNode>.WhereList(sorted,((FocusNode node) => !node.rect.intersect(band).isEmpty));
if (inBand.Count()!=0) {
found = inBand.First();
break;

11
com.unity.uiwidgets/Runtime/widgets/basic.cs


);
}
void updateRenderObject(BuildContext context, RenderMouseRegion renderObject) {
public override void updateRenderObject(BuildContext context, RenderObject renderObject) {
RenderMouseRegion _renderObject = (RenderMouseRegion) renderObject;
renderObject.onEnter = widget.onEnter;
renderObject.onHover = widget.onHover;
renderObject.onExit = owner.getHandleExit();
renderObject.opaque = widget.opaque;
_renderObject.onEnter = widget.onEnter;
_renderObject.onHover = widget.onHover;
_renderObject.onExit = owner.getHandleExit();
_renderObject.opaque = widget.opaque;
}
}

21
com.unity.uiwidgets/Runtime/widgets/focus_manager.cs


using System.Linq;
using Unity.UIWidgets.async2;
using Unity.UIWidgets.cupertino;
using Unity.UIWidgets.external;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.gestures;
using Unity.UIWidgets.painting;

public override List<DiagnosticsNode> debugDescribeChildren() {
int count = 1;
return _children.Select((FocusNode child)=> {
return child.toDiagnosticsNode(name: $"Child {count++}");
}).ToList();
return ExternalUtils<DiagnosticsNode, FocusNode>.SelectList(_children, (FocusNode child) => {
return child.toDiagnosticsNode(name: $"Child {count++}");
});
}
public override string toStringShort() {//override

}
List<string> childList = new List<string>();
_focusedChildren.Reverse();
childList = _focusedChildren.Select((FocusNode child)=> {
return child.toStringShort();
}).ToList();
childList = ExternalUtils<string,FocusNode>.SelectList(_focusedChildren, (FocusNode child) => {
return child.toStringShort();
});
properties.add(new EnumerableProperty<string>("focusedChildren", childList, defaultValue: new List<string>()));
}
}

_dirtyNodes.Add(_primaryFocus);
}
}
D.assert(FocusManagerUtils._focusDebug($"Notifying {_dirtyNodes.Count} dirty nodes:",
_dirtyNodes.ToList().Select((FocusNode node) => {
D.assert(FocusManagerUtils._focusDebug($"Notifying {_dirtyNodes.Count} dirty nodes:",
ExternalUtils<string,FocusNode>.SelectList(_dirtyNodes,((FocusNode node) => {
}).ToList()));
}))
));
foreach ( FocusNode node in _dirtyNodes) {
node._notify();
}

17
com.unity.uiwidgets/Runtime/widgets/focus_traversal.cs


using System;
using System.Collections.Generic;
using System.Linq;
using Unity.UIWidgets.external;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.ui;
using Unity.UIWidgets.widgets;

public static TextDirection _findDirectionality(BuildContext context) {
return (context.getElementForInheritedWidgetOfExactType<Directionality>().widget as Directionality).textDirection;
}
public static TextDirection commonDirectionalityOf(List<_ReadingOrderSortData> list) {
IEnumerable<HashSet<Directionality>> allAncestors = list.Select((_ReadingOrderSortData member) => new HashSet<Directionality>(member.directionalAncestors));
public static TextDirection commonDirectionalityOf(List<_ReadingOrderSortData> list) {
IEnumerable<HashSet<Directionality>> allAncestors = ExternalUtils<HashSet<Directionality>, _ReadingOrderSortData>.SelectList(list,
((_ReadingOrderSortData member) => new HashSet<Directionality>(member.directionalAncestors)));
HashSet<Directionality> common = null;
foreach ( HashSet<Directionality> ancestorSet in allAncestors) {
common = common ?? ancestorSet;

Rect _rect;
Rect rect {
get {if (_rect == null) {
foreach(Rect rect in members.Select(
(_ReadingOrderSortData data) => data.rect)){
foreach(Rect rect in ExternalUtils<Rect,_ReadingOrderSortData>.SelectList(members,((_ReadingOrderSortData data) => data.rect))
)
{
_rect = _rect ?? rect;
_rect = _rect.expandToInclude(rect);
}

List<_ReadingOrderSortData> inBand(_ReadingOrderSortData current, IEnumerable<_ReadingOrderSortData> _candidates) {
Rect band = Rect.fromLTRB(float.NegativeInfinity, current.rect.top, float.PositiveInfinity, current.rect.bottom);
return _candidates.Where((_ReadingOrderSortData item)=> {
return ExternalUtils<_ReadingOrderSortData>.WhereList(_candidates,((_ReadingOrderSortData item)=> {
}).ToList();
}));
}
List<_ReadingOrderSortData> inBandOfTop = inBand(topmost, candidates);
D.assert(topmost.rect.isEmpty || inBandOfTop.isNotEmpty());

);
return a.order.CompareTo(b.order);
});
return ordered.Select((_OrderedFocusInfo info) => info.node).Concat(unordered);
return ExternalUtils<FocusNode,_OrderedFocusInfo>.SelectList(ordered,((_OrderedFocusInfo info) => info.node)).Concat(unordered);
}
}

19
com.unity.uiwidgets/Runtime/widgets/framework.cs


using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using Unity.UIWidgets.external;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.rendering;
using Unity.UIWidgets.ui;

if (keys.isNotEmpty()) {
var keyStringCount = new Dictionary<string, int>();
foreach (string key in keys.Select(key => key.ToString())) {
foreach (string key in ExternalUtils<string,GlobalKey>.SelectList(keys,(key => key.ToString()))) {
if (keyStringCount.ContainsKey(key)) {
keyStringCount[key] += 1;
}

var elements = _debugElementsThatWillNeedToBeRebuiltDueToGlobalKeyShenanigans.Keys;
var elementStringCount = new Dictionary<string, int>();
foreach (string element in elements.Select(element => element.ToString())) {
foreach (string element in ExternalUtils<string,Element>.SelectList(elements,(element => element.ToString()))) {
if (elementStringCount.ContainsKey(element)) {
elementStringCount[element] += 1;
}

public static DiagnosticsNode describeElements(string name, IEnumerable<Element> elements) {
return new DiagnosticsBlock(
name: name,
children: elements.Select((Element element) => new DiagnosticsProperty<Element>("", element))
.ToList<DiagnosticsNode>(),
children: ExternalUtils<DiagnosticsNode,Element>.SelectList(elements,((Element element) => new DiagnosticsProperty<Element>("", element))),
allowTruncate: true
);
}

properties.add(new FlagProperty("dirty", value: dirty, ifTrue: "dirty"));
if (_dependencies != null && _dependencies.isNotEmpty()) {
List<DiagnosticsNode> diagnosticsDependencies = _dependencies
.Select((InheritedElement element) =>
element.widget.toDiagnosticsNode(style: DiagnosticsTreeStyle.sparse))
.ToList();
List<DiagnosticsNode> diagnosticsDependencies = ExternalUtils<DiagnosticsNode,InheritedElement>.SelectList(_dependencies,
((InheritedElement element) =>
element.widget.toDiagnosticsNode(style: DiagnosticsTreeStyle.sparse)));
properties.add(new DiagnosticsProperty<List<DiagnosticsNode>>("dependencies", diagnosticsDependencies));
}
}

}
protected IEnumerable<Element> children {
get { return _children.Where((child) => !_forgottenChildren.Contains(child)); }
get {
return ExternalUtils<Element>.WhereList(_children,((child) => !_forgottenChildren.Contains(child)));
}
}
List<Element> _children;

5
com.unity.uiwidgets/Runtime/widgets/gesture_detector.cs


using System;
using System.Collections.Generic;
using System.Linq;
using Unity.UIWidgets.external;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.gestures;
using Unity.UIWidgets.rendering;

properties.add(DiagnosticsNode.message("DISPOSED"));
}
else {
List<string> gestures = _recognizers.Values.Select(recognizer => recognizer.debugDescription)
.ToList();
List<string> gestures = ExternalUtils<string, GestureRecognizer>.SelectList(_recognizers.Values,
(recognizer => recognizer.debugDescription));
properties.add(new EnumerableProperty<string>("gestures", gestures, ifEmpty: "<none>"));
properties.add(new EnumerableProperty<GestureRecognizer>("recognizers", _recognizers.Values,
level: DiagnosticLevel.fine));

5
com.unity.uiwidgets/Runtime/widgets/heroes.cs


using System.Collections.Generic;
using System.Linq;
using Unity.UIWidgets.animation;
using Unity.UIWidgets.external;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.painting;
using Unity.UIWidgets.rendering;

&& flight._proxyAnimation.isDismissed;
}
List<_HeroFlight> invalidFlights = _flights.Values
.Where(isInvalidFlight)
.ToList();
List<_HeroFlight> invalidFlights = ExternalUtils<_HeroFlight>.WhereList(_flights.Values,isInvalidFlight);
foreach ( _HeroFlight flight in invalidFlights) {
flight._handleAnimationUpdate(AnimationStatus.dismissed);
}

4
com.unity.uiwidgets/Runtime/widgets/localizations.cs


using System.Collections.Generic;
using System.Linq;
using Unity.UIWidgets.async2;
using Unity.UIWidgets.external;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.rendering;
using Unity.UIWidgets.ui;

if (pendingList == null) {
return Future.value(output).to<Dictionary<Type, object>>();
}
return Future.wait<object>(pendingList.Select(p => p.futureValue))
return Future.wait<object>(ExternalUtils<Future<object>,_Pending>.SelectList( pendingList,(p => p.futureValue)))
.then(values => {
var list = (List<object>)values;

16
com.unity.uiwidgets/Runtime/widgets/navigator.cs


using System.Collections.Generic;
using System.Linq;
using Unity.UIWidgets.async2;
using Unity.UIWidgets.external;
using Unity.UIWidgets.external.simplejson;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.gestures;

}
if (initialRoute != null) {
_history.AddRange(
var routes =
).Select((Route route) =>
new _RouteEntry(
route,
initialState: _RouteLifecycle.add
)
)
);
);
_history.AddRange(ExternalUtils<_RouteEntry,Route>.SelectList(routes, ((Route route) =>
new _RouteEntry(route, initialState: _RouteLifecycle.add))));
}
D.assert(!_debugLocked);
D.assert(() => {

public Future<bool> maybePop<T>(T result = default(T)) {
///asyn
_RouteEntry lastEntry = null; //_history.Where(_RouteEntry.isPresentPredicate);
_RouteEntry lastEntry = null;
foreach (_RouteEntry routeEntry in _history) {
if (_RouteEntry.isPresentPredicate(routeEntry)) {
lastEntry = routeEntry;

3
com.unity.uiwidgets/Runtime/widgets/page_storage.cs


using System;
using System.Collections.Generic;
using System.Linq;
using Unity.UIWidgets.external;
using Unity.UIWidgets.foundation;
namespace Unity.UIWidgets.widgets {

}
public override string ToString() {
return $"StorageEntryIdentifier({string.Join(":", keys.Select(x => x.ToString()).ToArray())})";
return $"StorageEntryIdentifier({string.Join(":", ExternalUtils<string,PageStorageKey>.SelectList(keys,(x => x.ToString())))})";
}
public bool Equals(_StorageEntryIdentifier other) {

3
com.unity.uiwidgets/Runtime/widgets/shortcuts.cs


using System;
using System.Collections.Generic;
using System.Linq;
using Unity.UIWidgets.external;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.service;
using Unity.UIWidgets.services;

return a.debugName.CompareTo(strB: b.debugName);
}
);
var results = sortedKeys.Select(key => key.debugName);
var results = ExternalUtils<string, LogicalKeyboardKey>.SelectList(sortedKeys, (key => key.debugName));
return string.Join(" + ", values: results);
}

4
com.unity.uiwidgets/Runtime/widgets/sliver.cs


}
public override void debugVisitOnstageChildren(ElementVisitor visitor) {
_childElements.Values.Where(child => {
ExternalUtils<Element>.WhereList(_childElements.Values,(child => {
SliverMultiBoxAdaptorParentData parentData =
(SliverMultiBoxAdaptorParentData) child.renderObject.parentData;
float itemExtent = 0;

parentData.layoutOffset < renderObject.constraints.scrollOffset + renderObject.constraints.remainingPaintExtent &&
parentData.layoutOffset + itemExtent > renderObject.constraints.scrollOffset;
}).ToList().ForEach(e => visitor(e));
})).ForEach(e => visitor(e));
}
}

7
com.unity.uiwidgets/Runtime/widgets/viewport.cs


using System;
using System.Collections.Generic;
using System.Linq;
using Unity.UIWidgets.external;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.painting;
using Unity.UIWidgets.rendering;

) : base(key: key, children: slivers) {
D.assert(offset != null);
D.assert(slivers != null);
D.assert(center == null || slivers.Where((Widget child) => child.key == center).Count() == 1);
D.assert(center == null || ExternalUtils<Widget>.WhereList(slivers,((Widget child) => child.key == center)).Count() == 1);
D.assert(cacheExtentStyle != null);
D.assert(cacheExtentStyle != CacheExtentStyle.viewport || cacheExtent != null);
this.axisDirection = axisDirection;

}
public override void debugVisitOnstageChildren(ElementVisitor visitor) {
children.Where(e => {
ExternalUtils<Element>.WhereList(children,(e => {
}).ToList().ForEach(e => visitor(e));
})).ForEach(e => visitor(e));
}
}

23
com.unity.uiwidgets/Runtime/widgets/widget_inspector.cs


using System.Linq;
using System.Runtime.CompilerServices;
using Unity.UIWidgets.async2;
using Unity.UIWidgets.external;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.gestures;
using Unity.UIWidgets.painting;

path = _getElementParentChain((Element)value, groupName);
else
throw new UIWidgetsError(new List<DiagnosticsNode>{new ErrorSummary($"Cannot get parent chain for node of type {value.GetType()}")});
return path.Select(
(_DiagnosticsPathNode node) =>
return ExternalUtils<Dictionary<string, object>, _DiagnosticsPathNode>.SelectList(
path,((_DiagnosticsPathNode node) =>
).ToList();
));
}
Dictionary<string, object> _pathNodeToJson(_DiagnosticsPathNode pathNode, InspectorSerializationDelegate _delegate) {
if (pathNode == null)

}
}
if (isElement && isWidgetCreationTracked()) {
List<DiagnosticsNode> localNodes = nodes.Where((DiagnosticsNode node) =>
_isValueCreatedByLocalProject(node.value)).ToList();
List<DiagnosticsNode> localNodes = ExternalUtils<DiagnosticsNode>.WhereList(nodes,(DiagnosticsNode node) =>
_isValueCreatedByLocalProject(node.value));
//return nodes.take(maxDescendentsTruncatableNode).toList();
List<DiagnosticsNode> results = new List<DiagnosticsNode>();
for (int i = 0; i < maxDescendentsTruncatableNode; i++) {

}
public override List<DiagnosticsNode> filterProperties(List<DiagnosticsNode> properties, DiagnosticsNode owner) {
bool createdByLocalProject = _nodesCreatedByLocalProject.Contains(owner);
return properties.Where((DiagnosticsNode node)=>{
return ExternalUtils<DiagnosticsNode>.WhereList(properties,(DiagnosticsNode node)=>{
}).ToList();
});
}
public override List<DiagnosticsNode> truncateNodesList(List<DiagnosticsNode> nodes, DiagnosticsNode owner) {
if (maxDescendentsTruncatableNode >= 0 &&

}
if (parameterLocations != null) {
json["parameterLocations"] = parameterLocations.Select(
(_Location location) => location.toJsonMap()).ToList();
json["parameterLocations"] =
ExternalUtils<object, _Location>.SelectList(
parameterLocations,((_Location location) => location.toJsonMap()));
}
return json;

正在加载...
取消
保存