浏览代码

Merge pull request #293 from Unity-Technologies/zxw/refine_codegen

Resolve all warnings
/main
GitHub 3 年前
当前提交
73e31786
共有 161 个文件被更改,包括 591 次插入723 次删除
  1. 5
      Samples/UIWidgetsSamples_2019_4/Assets/CountDemo.cs
  2. 1
      Samples/UIWidgetsSamples_2019_4/Assets/MaterialSample/DividerAndButton.cs
  3. 6
      Samples/UIWidgetsSamples_2019_4/Assets/MaterialSample/MaterialThemeSample.cs
  4. 10
      Samples/UIWidgetsSamples_2019_4/Assets/MaterialSample/HoverSample.cs
  5. 49
      Samples/UIWidgetsSamples_2019_4/Assets/Scene/GalleryTest.unity
  6. 5
      Samples/UIWidgetsSamples_2019_4/Assets/Script/TextFieldTest.cs
  7. 22
      Samples/UIWidgetsSamples_2019_4/Assets/Script/TextTest.cs
  8. 8
      Samples/UIWidgetsSamples_2019_4/Assets/Script/ImageTest.cs
  9. 5
      Samples/UIWidgetsSamples_2019_4/Assets/Script/StreamTest.cs
  10. 2
      Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/search_demo.cs
  11. 4
      Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/grid_list_demo.cs
  12. 2
      Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/scrollable_tabs_demo.cs
  13. 8
      Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/slider_demo.cs
  14. 6
      Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/shrine/supplemental/cut_corners_border.cs
  15. 4
      Samples/UIWidgetsSamples_2019_4/Assets/WidgetsSample/BackdropFilterSample.cs
  16. 1
      Samples/UIWidgetsSamples_2019_4/Assets/WidgetsSample/ExpansionPanelSample.cs
  17. 1
      Samples/UIWidgetsSamples_2019_4/Assets/WidgetsSample/HttpRequestSample.cs
  18. 1
      Samples/UIWidgetsSamples_2019_4/Assets/WidgetsSample/UIWidgetsSamplePanel.cs
  19. 18
      com.unity.uiwidgets/Editor/third_parties/editor_coroutines/EditorCoroutines.cs
  20. 3
      com.unity.uiwidgets/Editor/gesture/editor_mouse_tracking.cs
  21. 4
      com.unity.uiwidgets/Editor/widgets/unity_object_detector.cs
  22. 6
      com.unity.uiwidgets/Runtime/animation/tween_sequence.cs
  23. 2
      com.unity.uiwidgets/Runtime/async/async_cast.cs
  24. 4
      com.unity.uiwidgets/Runtime/async/stopwatch.cs
  25. 10
      com.unity.uiwidgets/Runtime/async/stream.cs
  26. 1
      com.unity.uiwidgets/Runtime/async/stream_controller.cs
  27. 9
      com.unity.uiwidgets/Runtime/cupertino/colors.cs
  28. 2
      com.unity.uiwidgets/Runtime/cupertino/text_theme.cs
  29. 1
      com.unity.uiwidgets/Runtime/cupertino/theme.cs
  30. 6
      com.unity.uiwidgets/Runtime/cupertino/nav_bar.cs
  31. 7
      com.unity.uiwidgets/Runtime/cupertino/scrollbar.cs
  32. 2
      com.unity.uiwidgets/Runtime/cupertino/switch.cs
  33. 8
      com.unity.uiwidgets/Runtime/cupertino/tab_scaffold.cs
  34. 17
      com.unity.uiwidgets/Runtime/cupertino/text_selection.cs
  35. 8
      com.unity.uiwidgets/Runtime/cupertino/activity_indicator.cs
  36. 10
      com.unity.uiwidgets/Runtime/cupertino/button.cs
  37. 2
      com.unity.uiwidgets/Runtime/cupertino/slider.cs
  38. 45
      com.unity.uiwidgets/Runtime/cupertino/context_menu.cs
  39. 4
      com.unity.uiwidgets/Runtime/cupertino/interface_level.cs
  40. 23
      com.unity.uiwidgets/Runtime/cupertino/refresh.cs
  41. 15
      com.unity.uiwidgets/Runtime/cupertino/sliding_segmented_control.cs
  42. 10
      com.unity.uiwidgets/Runtime/cupertino/route.cs
  43. 4
      com.unity.uiwidgets/Runtime/foundation/assertions.cs
  44. 106
      com.unity.uiwidgets/Runtime/foundation/diagnostics.cs
  45. 16
      com.unity.uiwidgets/Runtime/gestures/multidrag.cs
  46. 2
      com.unity.uiwidgets/Runtime/gestures/scale.cs
  47. 2
      com.unity.uiwidgets/Runtime/gestures/monodrag.cs
  48. 4
      com.unity.uiwidgets/Runtime/gestures/multitap.cs
  49. 14
      com.unity.uiwidgets/Runtime/gestures/recognizer.cs
  50. 10
      com.unity.uiwidgets/Runtime/gestures/tap.cs
  51. 11
      com.unity.uiwidgets/Runtime/gestures/force_press.cs
  52. 2
      com.unity.uiwidgets/Runtime/gestures/converter.cs
  53. 4
      com.unity.uiwidgets/Runtime/material/about.cs
  54. 8
      com.unity.uiwidgets/Runtime/material/app_bar.cs
  55. 2
      com.unity.uiwidgets/Runtime/material/bottom_sheet.cs
  56. 6
      com.unity.uiwidgets/Runtime/material/button.cs
  57. 1
      com.unity.uiwidgets/Runtime/material/button_sheet_theme.cs
  58. 2
      com.unity.uiwidgets/Runtime/material/button_theme.cs
  59. 2
      com.unity.uiwidgets/Runtime/material/chip.cs
  60. 1
      com.unity.uiwidgets/Runtime/material/data_table.cs
  61. 2
      com.unity.uiwidgets/Runtime/material/dialog.cs
  62. 2
      com.unity.uiwidgets/Runtime/material/dropdown.cs
  63. 1
      com.unity.uiwidgets/Runtime/material/list_tile.cs
  64. 28
      com.unity.uiwidgets/Runtime/material/material_state.cs
  65. 4
      com.unity.uiwidgets/Runtime/material/outline_button.cs
  66. 4
      com.unity.uiwidgets/Runtime/material/pickers/date_picker_dialog.cs
  67. 17
      com.unity.uiwidgets/Runtime/material/pickers/calendar_date_picker.cs
  68. 2
      com.unity.uiwidgets/Runtime/material/popup_menu.cs
  69. 4
      com.unity.uiwidgets/Runtime/material/range_slider.cs
  70. 1
      com.unity.uiwidgets/Runtime/material/scaffold.cs
  71. 345
      com.unity.uiwidgets/Runtime/material/selectable_text.cs
  72. 2
      com.unity.uiwidgets/Runtime/material/slider_theme.cs
  73. 8
      com.unity.uiwidgets/Runtime/material/theme_data.cs
  74. 8
      com.unity.uiwidgets/Runtime/material/toggle_buttons.cs
  75. 2
      com.unity.uiwidgets/Runtime/painting/binding.cs
  76. 41
      com.unity.uiwidgets/Runtime/painting/box_border.cs
  77. 62
      com.unity.uiwidgets/Runtime/painting/edge_insets.cs
  78. 3
      com.unity.uiwidgets/Runtime/painting/alignment.cs
  79. 21
      com.unity.uiwidgets/Runtime/painting/image_provider.cs
  80. 12
      com.unity.uiwidgets/Runtime/painting/image_resolution.cs
  81. 5
      com.unity.uiwidgets/Runtime/painting/image_cache.cs
  82. 21
      com.unity.uiwidgets/Runtime/painting/basic_types.cs
  83. 2
      com.unity.uiwidgets/Runtime/painting/decoration_image.cs
  84. 15
      com.unity.uiwidgets/Runtime/painting/text_painter.cs
  85. 2
      com.unity.uiwidgets/Runtime/painting/matrix_utils.cs
  86. 6
      com.unity.uiwidgets/Runtime/painting/inline_span.cs
  87. 4
      com.unity.uiwidgets/Runtime/painting/placeholder_span.cs
  88. 12
      com.unity.uiwidgets/Runtime/painting/colors.cs
  89. 16
      com.unity.uiwidgets/Runtime/rendering/object.mixin.njk
  90. 20
      com.unity.uiwidgets/Runtime/rendering/object.mixin.gen.cs
  91. 2
      com.unity.uiwidgets/Runtime/rendering/error.cs
  92. 2
      com.unity.uiwidgets/Runtime/rendering/image.cs
  93. 2
      com.unity.uiwidgets/Runtime/rendering/object.cs
  94. 2
      com.unity.uiwidgets/Runtime/rendering/performance_overlay.cs
  95. 1
      com.unity.uiwidgets/Runtime/rendering/binding.cs
  96. 19
      com.unity.uiwidgets/Runtime/rendering/editable.cs
  97. 13
      com.unity.uiwidgets/Runtime/rendering/box.cs
  98. 32
      com.unity.uiwidgets/Runtime/rendering/flex.cs
  99. 13
      com.unity.uiwidgets/Runtime/rendering/layer.cs
  100. 2
      com.unity.uiwidgets/Runtime/rendering/list_body.cs

5
Samples/UIWidgetsSamples_2019_4/Assets/CountDemo.cs


{
public class CountDemo : UIWidgetsPanel
{
protected void OnEnable()
{
base.OnEnable();
}
protected override void main()
{
ui_.runApp(new MyApp());

1
Samples/UIWidgetsSamples_2019_4/Assets/MaterialSample/DividerAndButton.cs


using System.Collections.Generic;
using uiwidgets;
using Unity.UIWidgets.engine;
using Unity.UIWidgets.engine;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.material;
using Unity.UIWidgets.painting;

6
Samples/UIWidgetsSamples_2019_4/Assets/MaterialSample/MaterialThemeSample.cs


using System.Collections.Generic;
using uiwidgets;
using Unity.UIWidgets.animation;
using Unity.UIWidgets.engine;
using Unity.UIWidgets.service;
using Unity.UIWidgets.ui;
using UnityEngine;
using Image = Unity.UIWidgets.widgets.Image;
using ui_ = Unity.UIWidgets.widgets.ui_;
namespace UIWidgetsSample {

10
Samples/UIWidgetsSamples_2019_4/Assets/MaterialSample/HoverSample.cs


namespace UIWidgetsSample
{
/**
*
* STILL NOT WORKING, THERE SHOULD BE A BUG. FIX IT !!!!
*
*/
protected void OnEnable()
{
base.OnEnable();
}
protected override void main()
{
ui_.runApp(new MyApp());

49
Samples/UIWidgetsSamples_2019_4/Assets/Scene/GalleryTest.unity


m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
m_IndirectSpecularColor: {r: 0.44657874, g: 0.49641275, b: 0.5748172, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:

m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Texture: {fileID: 0}
m_Texture: {fileID: 1690112868}
m_UVRect:
serializedVersion: 2
x: 0

devicePixelRatioEditorOnlyOverride: 0
fonts:
- family: Material Icons
fonts:

fonts:
- asset: gallery/GalleryIcons.ttf
weight: 0
devicePixelRatioOverride: 1
hardwareAntiAliasing: 0
--- !u!222 &847097471
CanvasRenderer:
m_ObjectHideFlags: 0

m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 90, y: 180, z: 0}
--- !u!28 &1690112868
Texture2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
serializedVersion: 2
m_Width: 0
m_Height: 0
m_CompleteImageSize: 0
m_TextureFormat: 0
m_MipCount: 1
m_IsReadable: 1
m_IgnoreMasterTextureLimit: 0
m_IsPreProcessed: 0
m_StreamingMipmaps: 0
m_StreamingMipmapsPriority: 0
m_AlphaIsTransparency: 0
m_ImageCount: 0
m_TextureDimension: 2
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 1
m_MipBias: 0
m_WrapU: 0
m_WrapV: 0
m_WrapW: 0
m_LightmapFormat: 0
m_ColorSpace: 0
image data: 0
_typelessdata:
m_StreamData:
offset: 0
size: 0
path:
--- !u!1 &1900497009
GameObject:
m_ObjectHideFlags: 0

5
Samples/UIWidgetsSamples_2019_4/Assets/Script/TextFieldTest.cs


{
public class TextFieldTest : UIWidgetsPanel
{
protected void OnEnable()
{
base.OnEnable();
}
protected override void main()
{
ui_.runApp(new MyApp());

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


using System.Collections.Generic;
using Unity.UIWidgets.animation;
using Unity.UIWidgets.engine;
using Unity.UIWidgets.engine;
//using Unity.UIWidgets.material;
using Unity.UIWidgets.ui;
using FontStyle = Unity.UIWidgets.ui.FontStyle;
using Image = Unity.UIWidgets.widgets.Image;
using Unity.UIWidgets.rendering;
//using UIWidgetsGallery.gallery;
using Unity.UIWidgets.service;
using Brightness = Unity.UIWidgets.ui.Brightness;
using UnityEngine;
using System;
using UnityEngine.Networking;
using Random = UnityEngine.Random;
using Transform = Unity.UIWidgets.widgets.Transform;
protected void OnEnable()
{
base.OnEnable();
}
protected override void main()
{
ui_.runApp(new MyApp());

8
Samples/UIWidgetsSamples_2019_4/Assets/Script/ImageTest.cs


using System.Collections.Generic;
using Unity.UIWidgets.animation;
using FontStyle = Unity.UIWidgets.ui.FontStyle;
using TextStyle = Unity.UIWidgets.painting.TextStyle;
using ui_ = Unity.UIWidgets.widgets.ui_;
namespace UIWidgetsSample

protected void OnEnable()
{
base.OnEnable();
}
protected override void main()
{
ui_.runApp(new MyApp());

5
Samples/UIWidgetsSamples_2019_4/Assets/Script/StreamTest.cs


}
public class StreamTest : UIWidgetsPanel
{
protected void OnEnable()
{
base.OnEnable();
}
protected override void main()
{
ui_.runApp(new MyApp());

2
Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/search_demo.cs


context: context,
del: this._delegate
).then_((selected) => {
if (selected != null && (int) selected != this._lastIntegerSelected) {
if (selected != this._lastIntegerSelected) {
this.setState(() => { this._lastIntegerSelected = (int) selected; });
}
});

4
Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/grid_list_demo.cs


internal bool isFavorite;
internal string tag => assetName; // Assuming that all asset names are unique.
internal bool isValid => assetName != null && title != null && caption != null && isFavorite != null;
internal bool isValid => assetName != null && title != null && caption != null;
}
internal class GridPhotoViewer : StatefulWidget

child: image
);
}
D.assert(tileStyle != null);
return null;
}
}

2
Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/scrollable_tabs_demo.cs


indicator: getIndicator(),
tabs: _Page._allPages.Select<_Page, Widget>((_Page page) =>
{
D.assert(_demoStyle != null);
switch (_demoStyle)
{
case TabsDemoStyle.iconsAndText:

case TabsDemoStyle.textOnly:
return new Tab(text: page.text);
}
return null;
}).ToList()
)

8
Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/slider_demo.cs


textAlign: TextAlign.center,
onSubmitted: (string value) =>
{
float.TryParse(value, out float newValue);
float? newValue = null;
if (float.TryParse(value, out float convertValue))
{
newValue = convertValue;
}
setState(() => { _continuousValue = newValue.clamp(0.0f, 100.0f); });
setState(() => { _continuousValue = newValue.Value.clamp(0.0f, 100.0f); });
},
keyboardType: TextInputType.number,
controller: new TextEditingController(

6
Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/shrine/supplemental/cut_corners_border.cs


public void paint(
Canvas canvas,
Rect rect,
float gapStart,
float? gapStart = null,
float gapExtent = 0.0f,
float gapPercentage = 0.0f,
TextDirection? textDirection = null

float extent = lerpFloat(0.0f, gapExtent + gapPadding * 2.0f, gapPercentage)?? 0.0f;
switch (textDirection) {
case TextDirection.rtl: {
Path path = _notchedCornerPath(outer.middleRect, gapStart + gapPadding - extent, extent);
Path path = _notchedCornerPath(outer.middleRect, gapStart.Value + gapPadding - extent, extent);
Path path = _notchedCornerPath(outer.middleRect, gapStart - gapPadding, extent);
Path path = _notchedCornerPath(outer.middleRect, gapStart.Value - gapPadding, extent);
canvas.drawPath(path, paint);
break;
}

4
Samples/UIWidgetsSamples_2019_4/Assets/WidgetsSample/BackdropFilterSample.cs


}
}
class BackdropFilterApp : StatefulWidget {
public class BackdropFilterApp : StatefulWidget {
public BackdropFilterApp(Key key = null) : base(key) {
}

}
class BackdropFilterAppState : State<BackdropFilterApp> {
public class BackdropFilterAppState : State<BackdropFilterApp> {
public override Widget build(BuildContext context)
{
var item = new Container(

1
Samples/UIWidgetsSamples_2019_4/Assets/WidgetsSample/ExpansionPanelSample.cs


using System.Collections.Generic;
using uiwidgets;
using Unity.UIWidgets.engine;
using Unity.UIWidgets.engine;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.material;
using Unity.UIWidgets.rendering;

1
Samples/UIWidgetsSamples_2019_4/Assets/WidgetsSample/HttpRequestSample.cs


using System;
using System.Collections.Generic;
using Unity.UIWidgets.engine;
using Unity.UIWidgets.engine;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.material;
using Unity.UIWidgets.rendering;

1
Samples/UIWidgetsSamples_2019_4/Assets/WidgetsSample/UIWidgetsSamplePanel.cs


using Unity.UIWidgets.animation;
using Unity.UIWidgets.engine;
using Unity.UIWidgets.engine;
using Unity.UIWidgets.widgets;
namespace UIWidgetsSample {

18
com.unity.uiwidgets/Editor/third_parties/editor_coroutines/EditorCoroutines.cs


}
}
struct YieldWWW : ICoroutineYield
{
public WWW Www;
public bool IsDone(float deltaTime)
{
return Www.isDone;
}
}
struct YieldAsync : ICoroutineYield
struct YieldAsync : ICoroutineYield
{
public AsyncOperation asyncOperation;

customYield = current as CustomYieldInstruction
};
}
else if (current is WWW)
{
coroutine.currentYield = new YieldWWW {Www = (WWW) current};
}
else if (current is WaitForFixedUpdate || current is WaitForEndOfFrame)
else if (current is WaitForFixedUpdate || current is WaitForEndOfFrame)
{
coroutine.currentYield = new YieldDefault();
}

3
com.unity.uiwidgets/Editor/gesture/editor_mouse_tracking.cs


_EditorTrackedAnnotation hitAnnotation = _findAnnotation(hit);
// While acrossing two areas, set the flag to true to prevent setting the Pointer Copy VisualMode to None
bool enterFlag = false;
enterFlag = true;
// Both onRelease or onEnter event will enable Copy VisualMode
if (hitAnnotation.annotation?.onDragFromEditorRelease != null ||
hitAnnotation.annotation?.onDragFromEditorEnter != null) {

4
com.unity.uiwidgets/Editor/widgets/unity_object_detector.cs


HitTestBehavior _defaultBehavior {
get { return widget.child == null ? HitTestBehavior.translucent : HitTestBehavior.deferToChild; }
}
private bool isActivated = false;
private Object[] objectReferences;
private string[] paths;

6
com.unity.uiwidgets/Runtime/animation/tween_sequence.cs


public TweenSequenceItem(
Animatable<T> tween = null,
float weight = 0.0f
float? weight = 0.0f
this.tween = tween;
this.weight = weight;
this.tween = tween;
this.weight = weight.Value;
}
public readonly Animatable<T> tween;

2
com.unity.uiwidgets/Runtime/async/async_cast.cs


return result;
}
Stream<R> cast<R>() => new CastStream<S, R>(_source);
public override Stream<R> cast<R>() => new CastStream<S, R>(_source);
}

4
com.unity.uiwidgets/Runtime/async/stopwatch.cs


namespace Unity.UIWidgets.core {
public class Stopwatch {
static int _frequency;
static int? _frequency;
// The _start and _stop fields capture the time when [start] and [stop]
// are called respectively.

if (_frequency == null) _initTicker();
}
public int frequency {
public int? frequency {
get { return _frequency; }
}

10
com.unity.uiwidgets/Runtime/async/stream.cs


return new _BoundSinkStream<T, T>(source, mapSink);
}
static Stream<T> castFrom<S, T>(Stream<S> source) =>
new CastStream<S, T>(source);
static Stream<U> castFrom<S, U>(Stream<S> source) =>
new CastStream<S, U>(source);
public virtual bool isBroadcast {
get { return false; }

}
}
public Stream<R> cast<R>() => Stream<T>.castFrom<T, R>(this);
public virtual Stream<R> cast<R>() => Stream<T>.castFrom<T, R>(this);
public Future<List<T>> toList() {
List<T> result = new List<T>();

public abstract class StreamTransformer<S, T> {
// c# does not support change constructor
public static StreamTransformer<S, T> create<S, T>(_async._SubscriptionTransformer<S, T> onListen)
public static StreamTransformer<U, V> create<U, V>(_async._SubscriptionTransformer<U, V> onListen)
return new _StreamSubscriptionTransformer<S, T>(onListen);
return new _StreamSubscriptionTransformer<U, V>(onListen);
}

1
com.unity.uiwidgets/Runtime/async/stream_controller.cs


//
abstract class _SyncStreamControllerDispatch<T>
: _StreamController<T>, SynchronousStreamController<T> {
internal virtual int _state { get; set; }
public override void _sendData(T data) {
_subscription._add(data);

9
com.unity.uiwidgets/Runtime/cupertino/colors.cs


if (resolvable == null)
return null;
D.assert(context != null);
//var resolveColor = (resolvable is CupertinoDynamicColor) ? ((CupertinoDynamicColor)resolvable).resolveFrom(context, nullOk: nullOk) : resolvable;
int i = 0;
int j = 0;
return resolveColor;
}

public override int GetHashCode() {
unchecked {
var hashCode = (value != null ? value.GetHashCode() : 0);
var hashCode = (value.GetHashCode());
hashCode = (hashCode * 397) ^(color != null ? color.GetHashCode() : 0);
hashCode = (hashCode * 397) ^ (darkColor != null ? darkColor.GetHashCode() : 0);
hashCode = (hashCode * 397) ^ (highContrastColor != null ? highContrastColor.GetHashCode() : 0);

2
com.unity.uiwidgets/Runtime/cupertino/text_theme.cs


}
public new CupertinoTextThemeData copyWith(
public CupertinoTextThemeData copyWith(
Color primaryColor = null,
TextStyle textStyle = null,
TextStyle actionTextStyle = null,

1
com.unity.uiwidgets/Runtime/cupertino/theme.cs


public _CupertinoTextThemeDefaults textThemeDefaults;
public _CupertinoThemeDefaults resolveFrom(BuildContext context, bool resolveTextTheme, bool nullOk = false) {
D.assert(nullOk != null);
Color convertColor(Color color) => CupertinoDynamicColor.resolve(color, context, nullOk: nullOk);
return new _CupertinoThemeDefaults(

6
com.unity.uiwidgets/Runtime/cupertino/nav_bar.cs


class _PersistentNavigationBar : StatelessWidget {
public readonly _NavigationBarStaticComponents components;
public readonly bool middleVisible;
public readonly bool? middleVisible;
public readonly EdgeInsetsDirectional padding;
public _PersistentNavigationBar(

) : base(key: key) {
this.components = components;
this.padding = padding;
this.middleVisible = middleVisible ?? true;
this.middleVisible = middleVisible;
}
public override Widget build(BuildContext context) {

middle = middleVisible == null
? middle
: new AnimatedOpacity(
opacity: middleVisible ? 1.0f : 0.0f,
opacity: middleVisible.Value ? 1.0f : 0.0f,
duration: NavBarUtils._kNavBarTitleFadeDuration,
child: middle
);

7
com.unity.uiwidgets/Runtime/cupertino/scrollbar.cs


Animation<float> _fadeoutOpacityAnimation;
AnimationController _thicknessAnimationController;
float _dragScrollbarPositionY;
float? _dragScrollbarPositionY;
Timer _fadeoutTimer;
Drag _drag;

if (!_checkVertical()) {
return;
}
_dragScrollbar(details.localPosition.dy - _dragScrollbarPositionY);
D.assert(_dragScrollbarPositionY != null);
_dragScrollbar(details.localPosition.dy - _dragScrollbarPositionY.Value);
_dragScrollbarPositionY = details.localPosition.dy;
}

void _handleDragScrollEnd(float trackVelocityY) {
_startFadeoutTimer();
_thicknessAnimationController.reverse();
_dragScrollbarPositionY = 0.0f;
_dragScrollbarPositionY = null;
float scrollVelocityY = _painter.getTrackToScroll(trackVelocityY);
_drag?.end(new DragEndDetails(
primaryVelocity: -scrollVelocityY,

2
com.unity.uiwidgets/Runtime/cupertino/switch.cs


public bool value {
get { return _value; }
set {
D.assert(value != null);
//markNeedsSemanticsUpdate();
}
}

8
com.unity.uiwidgets/Runtime/cupertino/tab_scaffold.cs


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

namespace Unity.UIWidgets.cupertino {
public class CupertinoTabController : ChangeNotifier {
public CupertinoTabController(int initialIndex = 0) {
public CupertinoTabController(int? initialIndex = 0) {
_index = initialIndex;
_index = initialIndex.Value;
}
public bool _isDisposed = false;

set {
D.assert(value != null);
D.assert(value >= 0);
if (_index == value) {
return;

D.assert(
controller == null || controller.index < tabBar.items.Count, () =>
$"The CupertinoTabController's current index {controller.index} is " +
$"out of bounds for the tab bar with {tabBar.items.Count} tabs"
$"out2 of bounds for the tab bar with {tabBar.items.Count} tabs"
);
this.tabBar = tabBar;
this.controller = controller;

17
com.unity.uiwidgets/Runtime/cupertino/text_selection.cs


oldPainter = (_TextSelectionHandlePainter)oldPainter;
return color != ((_TextSelectionHandlePainter)oldPainter).color;
}
public bool? hitTest(Offset position) {
return null;
}
public void addListener(VoidCallback listener) {
base.addListener(listener);
}
public void removeListener(VoidCallback listener) {
base.removeListener(listener);
}
}
public delegate bool Predicate(TextSelectionDelegate _delegate);

);
case TextSelectionHandleType.collapsed:
return new SizedBox();
}
D.assert(type != null);
return null;
}
return null;
}
public override Offset getHandleAnchor(TextSelectionHandleType type, float textLineHeight) {
Size handleSize = getHandleSize(textLineHeight);

8
com.unity.uiwidgets/Runtime/cupertino/activity_indicator.cs


public class CupertinoActivityIndicator : StatefulWidget {
public CupertinoActivityIndicator(
Key key = null,
bool animating = true,
float radius = CupertinoActivityIndicatorUtils._kDefaultIndicatorRadius
bool? animating = true,
float? radius = CupertinoActivityIndicatorUtils._kDefaultIndicatorRadius
this.animating = animating;
this.radius = radius;
this.animating = animating.Value;
this.radius = radius.Value;
}
public readonly bool animating;

10
com.unity.uiwidgets/Runtime/cupertino/button.cs


EdgeInsetsGeometry padding = null,
Color color = null,
Color disabledColor = null,
float minSize = 44.0f,
float? minSize = 44.0f,
float pressedOpacity = 0.4f,
BorderRadius borderRadius = null,
VoidCallback onPressed = null

Widget child = null,
EdgeInsetsGeometry padding = null,
Color disabledColor = null,
float minSize = 44.0f,
float? minSize = 44.0f,
float pressedOpacity = 0.4f,
BorderRadius borderRadius = null,
VoidCallback onPressed = null

public readonly VoidCallback onPressed;
public readonly float minSize;
public readonly float? minSize;
public readonly float pressedOpacity;

constraints: widget.minSize == null
? new BoxConstraints() :
new BoxConstraints(
minWidth: widget.minSize,
minHeight: widget.minSize
minWidth: widget.minSize.Value,
minHeight: widget.minSize.Value
),
child: new FadeTransition(
opacity: _opacityAnimation,

2
com.unity.uiwidgets/Runtime/cupertino/slider.cs


TextDirection? textDirection = null
) : base(additionalConstraints: BoxConstraints.tightFor(width: SliderUtils._kSliderWidth,
height: SliderUtils._kSliderHeight)) {
D.assert(value >= 0.0f && value <= 1.0f && value != null) ;
D.assert(value >= 0.0f && value <= 1.0f);
_value = value;
_divisions = divisions;
_activeColor = activeColor;

45
com.unity.uiwidgets/Runtime/cupertino/context_menu.cs


}
public delegate void _DismissCallback(
BuildContext context,
float scale,
float? scale,
float opacity
);

public class _ContextMenuRoute : PopupRoute {
public _ContextMenuRoute(
List<Widget> actions = null,
_ContextMenuLocation contextMenuLocation = default,
_ContextMenuLocation? contextMenuLocation = null,
string barrierLabel = null,
_ContextMenuPreviewBuilderChildless builder = null,
ImageFilter filter = null,

this.barrierLabel = barrierLabel;
_actions = actions;
_builder = builder;
_contextMenuLocation = contextMenuLocation;
_contextMenuLocation = contextMenuLocation.Value;
public readonly static Color _kModalBarrierColor = new Color(0x6604040F);
public readonly TimeSpan _kModalPopupTransitionDuration =new TimeSpan(0, 0, 0, 0, 335);
public readonly List<Widget> _actions;

public bool _internalOffstage = false;
public Orientation _lastOrientation;
public readonly Rect _previousChildRect;
public float _scale = 1.0f;
public float? _scale = 1.0f;
public readonly static CurveTween _curve = new CurveTween(
public static readonly CurveTween _curve = new CurveTween(
public readonly static CurveTween _curveReverse = new CurveTween(
public static readonly CurveTween _curveReverse = new CurveTween(
public readonly static RectTween _rectTween = new RectTween();
public readonly static Animatable<Rect> _rectAnimatable = _rectTween.chain(_curve);
public readonly static RectTween _rectTweenReverse = new RectTween();
public readonly static Animatable<Rect> _rectAnimatableReverse = _rectTweenReverse.chain(_curveReverse);
public static readonly RectTween _rectTween = new RectTween();
public static readonly Animatable<Rect> _rectAnimatable = _rectTween.chain(_curve);
public static readonly RectTween _rectTweenReverse = new RectTween();
public static readonly Animatable<Rect> _rectAnimatableReverse = _rectTweenReverse.chain(_curveReverse);
public readonly static RectTween _sheetRectTween = new RectTween();
public static readonly RectTween _sheetRectTween = new RectTween();
public readonly static Tween< float> _sheetScaleTween = new FloatTween(0.0f,0.0f);
public readonly static Animatable< float> _sheetScaleAnimatable = _sheetScaleTween.chain(_curve);
public readonly static Animatable< float> _sheetScaleAnimatableReverse = _sheetScaleTween.chain(_curveReverse);
public static readonly Tween<float?> _sheetScaleTween = new NullableFloatTween(0.0f,0.0f);
public static readonly Animatable<float?> _sheetScaleAnimatable = _sheetScaleTween.chain(_curve);
public static readonly Animatable<float?> _sheetScaleAnimatableReverse = _sheetScaleTween.chain(_curveReverse);
public readonly Tween< float> _opacityTween = new FloatTween(begin: 0.0f, end: 1.0f);
public Animation< float> _sheetOpacity;

return target3 & sheetRect.size;
}
}
public void _onDismiss(BuildContext context, float scale, float opacity) {
public void _onDismiss(BuildContext context, float? scale, float opacity) {
_scale = scale;
_opacityTween.end = opacity;
_sheetOpacity = _opacityTween.animate(

public void _updateTweenRects() {
Rect childRect = _scale == null
? CupertinoContextMenuUtils._getRect(_childGlobalKey)
: _getScaledRect(_childGlobalKey, _scale);
: _getScaledRect(_childGlobalKey, _scale.Value);
_rectTween.begin = _previousChildRect;
_rectTween.end = childRect;
Rect childRectOriginal = CupertinoContextMenuUtils.fromCenter(

Rect sheetRect = reverse
? _sheetRectAnimatableReverse.evaluate(animation)
: _sheetRectAnimatable.evaluate(animation);
float sheetScale = reverse
float? sheetScale = reverse
? _sheetScaleAnimatableReverse.evaluate(animation)
: _sheetScaleAnimatable.evaluate(animation);
List<Widget> widgets = new List<Widget>();

opacity: _sheetOpacity.value,
child: Transform.scale(
alignment: getSheetAlignment(_contextMenuLocation),
scale: sheetScale,
scale: sheetScale ?? 1.0f,
child: new _ContextMenuSheet(
key: _sheetGlobalKey,
actions: _actions,

public _ContextMenuSheet(
Key key = null,
List<Widget> actions = null,
_ContextMenuLocation contextMenuLocation = default,
Orientation orientation = default
_ContextMenuLocation? contextMenuLocation = null,
Orientation? orientation = null
_contextMenuLocation = contextMenuLocation;
_orientation = orientation;
_contextMenuLocation = contextMenuLocation.Value;
_orientation = orientation.Value;
this.actions = actions;
}
public readonly List<Widget> actions;

4
com.unity.uiwidgets/Runtime/cupertino/interface_level.cs


public CupertinoUserInterfaceLevel(
Key key = null,
CupertinoUserInterfaceLevelData data = default,
CupertinoUserInterfaceLevelData? data = null,
_data = data;
_data = data.Value;
}
public CupertinoUserInterfaceLevelData _data;

23
com.unity.uiwidgets/Runtime/cupertino/refresh.cs


using System.Collections.Generic;
using Unity.UIWidgets.animation;
using Unity.UIWidgets.async;
using Unity.UIWidgets.foundation;

using Unity.UIWidgets.ui;
using Unity.UIWidgets.widgets;
using UnityEngine;
using Color = Unity.UIWidgets.ui.Color;
float refreshIndicatorLayoutExtent = 0.0f,
bool hasLayoutExtent = false,
float? refreshIndicatorLayoutExtent = 0.0f,
bool? hasLayoutExtent = false,
this.refreshIndicatorLayoutExtent = refreshIndicatorLayoutExtent;
this.hasLayoutExtent = hasLayoutExtent;
this.refreshIndicatorLayoutExtent = refreshIndicatorLayoutExtent.Value;
this.hasLayoutExtent = hasLayoutExtent.Value;
}
public readonly float refreshIndicatorLayoutExtent;
public readonly bool hasLayoutExtent;

public float refreshIndicatorLayoutExtent {
get { return _refreshIndicatorExtent; }
set {
D.assert(value != null);
D.assert(value >= 0.0);
if (value == _refreshIndicatorExtent)
return;

public bool hasLayoutExtent {
get { return _hasLayoutExtent; }
set {
D.assert(value != null);
if (value == _hasLayoutExtent)
return;
_hasLayoutExtent = value;

public class CupertinoSliverRefreshControl : StatefulWidget {
public CupertinoSliverRefreshControl(
Key key = null,
float refreshTriggerPullDistance = _defaultRefreshTriggerPullDistance,
float refreshIndicatorExtent = _defaultRefreshIndicatorExtent,
float? refreshTriggerPullDistance = _defaultRefreshTriggerPullDistance,
float? refreshIndicatorExtent = _defaultRefreshIndicatorExtent,
RefreshControlIndicatorBuilder builder = null,
RefreshCallback onRefresh = null
) : base(key: key) {

"The refresh indicator cannot take more space in its final state " +
"than the amount initially created by overscrolling."
);
this.refreshIndicatorExtent = refreshIndicatorExtent;
this.refreshTriggerPullDistance = refreshTriggerPullDistance;
this.refreshIndicatorExtent = refreshIndicatorExtent.Value;
this.refreshTriggerPullDistance = refreshTriggerPullDistance.Value;
this.builder = builder ?? buildSimpleRefreshIndicator;
this.onRefresh = onRefresh;

}
return RefreshIndicatorMode.armed;
}
break;
case RefreshIndicatorMode.armed:
if (refreshState == RefreshIndicatorMode.armed && refreshTask == null) {
goToDone();

15
com.unity.uiwidgets/Runtime/cupertino/sliding_segmented_control.cs


return;
AnimationController controller = _highlightControllers[at];
D.assert(!forward || controller != null);
controller?.animateTo(forward ? 1 : 0, duration: CupertinoSlidingSegmentedControlsUtils._kHighlightAnimationDuration, curve: Curves.ease);
controller?.animateTo(forward ? 1 : 0, duration: CupertinoSlidingSegmentedControlsUtils._kHighlightAnimationDuration, curve: Curves.ease);
}
T _highlighted;
public T highlighted{

widget.onValueChanged(_highlighted);
}
public T indexToKey(int index) {
return index == null ? default : keys[index];
public T indexToKey(int? index) {
return index == null ? default : keys[index.Value];
}
public override Widget build(BuildContext context) {

public class _ChildAnimationManifest {
public _ChildAnimationManifest(
float opacity = 1f,
float separatorOpacity = 0f) {
D.assert(separatorOpacity != null);
D.assert(opacity != null);
float separatorOpacity = 0f
){
float opacity;
Tween<float> opacityTween;
public float separatorOpacity;

}
void _playThumbScaleAnimation(bool isExpanding = false) {
D.assert(isExpanding != null);
_thumbScaleTween = new FloatTween(begin: currentThumbScale, end: isExpanding ? 1 : CupertinoSlidingSegmentedControlsUtils._kMinThumbScale);
_thumbScaleTween = new FloatTween(begin: currentThumbScale, end: isExpanding ? 1 : CupertinoSlidingSegmentedControlsUtils._kMinThumbScale);
state.thumbScaleController.animateWith(CupertinoSlidingSegmentedControlsUtils._kThumbSpringAnimationSimulation);
}

10
com.unity.uiwidgets/Runtime/cupertino/route.cs


public static Future<T> showCupertinoDialog<T>(
BuildContext context = null,
WidgetBuilder builder =null,
bool useRootNavigator = true,
bool? useRootNavigator = true,
RouteSettings routeSettings = null
) {
D.assert(builder != null);

return builder(context1);
},
transitionBuilder: _buildCupertinoDialogTransitions,
useRootNavigator: useRootNavigator,
useRootNavigator: useRootNavigator.Value,
routeSettings: routeSettings
);
}

ImageFilter filter = null,
bool useRootNavigator = true,
bool? semanticsDismissible =null
bool? useRootNavigator = true
return Navigator.of(context, rootNavigator: useRootNavigator).push(
return Navigator.of(context, rootNavigator: useRootNavigator.Value).push(
new _CupertinoModalPopupRoute(
barrierColor: CupertinoDynamicColor.resolve(_kModalBarrierColor, context),
barrierLabel: "Dismiss",

return;
}
TextDirection textDirection = configuration.textDirection;
D.assert(textDirection != null);
float deltaX = 0.0f;
switch (textDirection) {
case TextDirection.rtl:

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


}
protected override string valueToString(TextTreeConfiguration parentConfiguration = null) {
return string.Join("", value);
return string.Join("", valueT);
}
}

details.toDiagnosticsNode(style: DiagnosticsTreeStyle.error)).TrimEnd(), details.exception);
}
D.logError($"Another exception was thrown: ${details.summary}", details.exception);
D.logError($"Another exception was thrown: {details.summary}", details.exception);
_errorCount += 1;
}

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


}
int startForLengthCalculations = -startOffset;
bool addPrefix = false;
int index = 0;
_WordWrapParseMode mode = _WordWrapParseMode.inSpace;
int? lastWordStart = null;

if ((index - startForLengthCalculations <= width) || (lastWordEnd == null)) {
lastWordEnd = index;
}
string line = message.Substring(start, lastWordEnd.Value - start);
string line = message.Substring(start, lastWordEnd.Value);
addPrefix = true;
if (lastWordEnd.Value >= message.Length) {
yield break;
}

public readonly bool showSeparator;
public object value { get; }
public virtual object value { get; }
public bool isFiltered(DiagnosticLevel minLevel) {
return foundation_.kReleaseMode || level < minLevel;

readonly DiagnosticsTreeStyle? _style;
public bool allowWrap {
public virtual bool allowWrap {
public bool allowNameWrap {
public virtual bool allowNameWrap {
public bool allowTruncate {
public virtual bool allowTruncate {
get { return false; }
}

}
protected override string valueToString(TextTreeConfiguration parentConfiguration = null) {
string text = _description ?? value;
string text = _description ?? valueT;
if (parentConfiguration != null &&
!parentConfiguration.lineBreakProperties &&
text != null) {

protected override string numberToString() {
if (value != null) {
return value.Value.ToString("F1");
return valueT.Value.ToString("F1");
}
return "null";

return "null";
}
return value.Value.ToString();
return valueT.Value.ToString();
}
}

return "null";
}
return (value.Value.clamp(0.0f, 1.0f) * 100).ToString("F1") + "%";
return (valueT.Value.clamp(0.0f, 1.0f) * 100).ToString("F1") + "%";
}
}

public readonly string ifFalse;
protected override string valueToString(TextTreeConfiguration parentConfiguration = null) {
if (value == true) {
if (valueT == true) {
else if (value == false) {
else if (valueT == false) {
if (ifFalse != null) {
return ifFalse;
}

public override bool showName {
get {
if (value == null || value == true && ifTrue == null ||
value == false && ifFalse == null) {
if (value == null || valueT == true && ifTrue == null ||
valueT == false && ifFalse == null) {
return true;
}

public override DiagnosticLevel level {
get {
if (value == true) {
if (valueT == true) {
if (value == false) {
if (valueT == false) {
if (ifFalse == null) {
return DiagnosticLevel.hidden;
}

return "null";
}
if (!value.Any()) {
if (!valueT.Any()) {
return string.Join(", ", LinqUtils<string, T>.SelectList(value, (v => v.ToString())));
return string.Join(", ", LinqUtils<string, T>.SelectList(valueT, (v => v.ToString())));
LinqUtils<string, T>.SelectList(value, (v => v.ToString())));
LinqUtils<string, T>.SelectList(valueT, (v => v.ToString())));
value != null && !value.Any()
value != null && !valueT.Any()
&& base.level != DiagnosticLevel.hidden) {
return DiagnosticLevel.fine;
}

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

}
DiagnosticLevel level {
public override DiagnosticLevel level {
get {
if (!_hasNonNullEntry() && ifEmpty == null) {
return DiagnosticLevel.hidden;

public override Dictionary<string, object> toJsonMap(DiagnosticsSerializationDelegate Delegate) {
Dictionary<string, object> json = base.toJsonMap(Delegate);
if (value.isNotEmpty()) {
if (valueT.isNotEmpty()) {
json["values"] = _formattedValues().ToList();
}

bool _hasNonNullEntry() {
return value.Values.ToList().Any((T o) => o != null);
return valueT.Values.ToList().Any((T o) => o != null);
foreach (string entry in value.Keys) {
if (value[entry] != null) {
foreach (string entry in valueT.Keys) {
if (valueT[entry] != null) {
results.Add(entry);
}
}

public readonly bool expandableValue;
public readonly bool allowWrap;
public override bool allowWrap { get; }
public readonly bool allowNameWrap;
public override bool allowNameWrap { get; }
T v = value;
T v = valueT;
List<Dictionary<string, object>> properties = new List<Dictionary<string, object>>();
if (Delegate.expandPropertyValues && Delegate.includeProperties && v is Diagnosticable vDiagnosticable &&
getProperties().isEmpty()) {

get { return value; }
}
public T value {
public override object value {
}
}
public T valueT {
get {
return (T) value;
}
}

public override List<DiagnosticsNode> getProperties() {
if (expandableValue) {
T obj = value;
T obj = valueT;
if (obj is DiagnosticsNode) {
return (obj as DiagnosticsNode).getProperties();
}

public override List<DiagnosticsNode> getChildren() {
if (expandableValue) {
T obj = value;
T obj = valueT;
if (obj is DiagnosticsNode) {
return (obj as DiagnosticsNode).getChildren();
}

get { return value; }
}
public T value {
public override object value {
public T valueT {
get { return (T) value; }
}
readonly T _value;
DiagnosticPropertiesBuilder _cachedBuilder;

public override List<DiagnosticsNode> getChildren() {
if (value != null) {
return value.debugDescribeChildren();
return valueT.debugDescribeChildren();
}
return new List<DiagnosticsNode>();

public interface IDiagnosticable {
string toStringShort();
string toString(DiagnosticLevel minLevel = DiagnosticLevel.debug);
string toString(DiagnosticLevel minLevel = DiagnosticLevel.info);
DiagnosticsNode toDiagnosticsNode(
string name = null,
DiagnosticsTreeStyle style = DiagnosticsTreeStyle.sparse);

}
public interface DiagnosticableTreeMixin : IDiagnosticable{
string toString(DiagnosticLevel minLevel = DiagnosticLevel.info);
public interface DiagnosticableTreeMixin : IDiagnosticable {
string toStringShallow(
string joiner = ", ",
DiagnosticLevel minLevel = DiagnosticLevel.debug

string prefixLineOne = "",
string prefixOtherLines = null,
DiagnosticLevel minLevel = DiagnosticLevel.debug);
string toStringShort();
DiagnosticsNode toDiagnosticsNode(string name = null, DiagnosticsTreeStyle style = DiagnosticsTreeStyle.sparse);
void debugFillProperties(DiagnosticPropertiesBuilder properties);
}
public abstract class DiagnosticableTree : Diagnosticable,DiagnosticableTreeMixin {

public override object valueObject { get; }
public readonly bool allowTruncate;
public override bool allowTruncate { get; }
public override List<DiagnosticsNode> getChildren() {
return _children;

public abstract DiagnosticsSerializationDelegate delegateForNode(DiagnosticsNode node);
public int subtreeDepth { get; }
public virtual int subtreeDepth { get; }
public bool includeProperties { get; }
public virtual bool includeProperties { get; }
public bool expandPropertyValues { get; }
public virtual bool expandPropertyValues { get; }
public abstract DiagnosticsSerializationDelegate copyWith(
int? subtreeDepth = null,

return subtreeDepth > 0 ? copyWith(subtreeDepth: subtreeDepth - 1) : this;
}
new bool expandPropertyValues {
public override bool expandPropertyValues {
get { return false; }
}

return nodes;
}
public new readonly bool includeProperties;
public override bool includeProperties { get; }
public new readonly int subtreeDepth;
public override int subtreeDepth { get; }
public override List<DiagnosticsNode> truncateNodesList(List<DiagnosticsNode> nodes, DiagnosticsNode owner) {
return nodes;

16
com.unity.uiwidgets/Runtime/gestures/multidrag.cs


Dictionary<int, T> _pointers = new Dictionary<int, T>();
public override void addAllowedPointer(PointerDownEvent pEvent) {
public override void addAllowedPointer(PointerEvent pEvent) {
var _pEvent = (PointerDownEvent) pEvent;
D.assert(_pEvent != null);
D.assert(pEvent.position != null);
D.assert(!_pointers.ContainsKey(pEvent.pointer));
D.assert(_pEvent.position != null);
D.assert(!_pointers.ContainsKey(_pEvent.pointer));
T state = createNewPointerState(pEvent);
_pointers[pEvent.pointer] = state;
GestureBinding.instance.pointerRouter.addRoute(pEvent.pointer, _handleEvent);
state._setArenaEntry(GestureBinding.instance.gestureArena.add(pEvent.pointer, this));
T state = createNewPointerState(_pEvent);
_pointers[_pEvent.pointer] = state;
GestureBinding.instance.pointerRouter.addRoute(_pEvent.pointer, _handleEvent);
state._setArenaEntry(GestureBinding.instance.gestureArena.add(_pEvent.pointer, this));
}
public abstract T createNewPointerState(PointerDownEvent pEvent);

2
com.unity.uiwidgets/Runtime/gestures/scale.cs


return angle2 - angle1;
}
public override void addAllowedPointer(PointerDownEvent evt) {
public override void addAllowedPointer(PointerEvent evt) {
startTrackingPointer(evt.pointer, evt.transform);
_velocityTrackers[evt.pointer] = new VelocityTracker();
if (_state == _ScaleState.ready) {

2
com.unity.uiwidgets/Runtime/gestures/monodrag.cs


}
}
public override void addAllowedPointer(PointerDownEvent evt) {
public override void addAllowedPointer(PointerEvent evt) {
startTrackingPointer(evt.pointer, evt.transform);
_velocityTrackers[evt.pointer] = new VelocityTracker();
if (_state == _DragState.ready) {

4
com.unity.uiwidgets/Runtime/gestures/multitap.cs


_TapTracker _firstTap;
readonly Dictionary<int, _TapTracker> _trackers = new Dictionary<int, _TapTracker>();
public override void addAllowedPointer(PointerDownEvent evt) {
public override void addAllowedPointer(PointerEvent evt) {
if (_firstTap != null) {
if (!_firstTap.isWithinGlobalTolerance(evt, Constants.kDoubleTapSlop)) {
// Ignore out-of-bounds second taps.

readonly Dictionary<int, _TapGesture> _gestureMap = new Dictionary<int, _TapGesture>();
public override void addAllowedPointer(PointerDownEvent evt) {
public override void addAllowedPointer(PointerEvent evt) {
D.assert(!_gestureMap.ContainsKey(evt.pointer));
_gestureMap[evt.pointer] = new _TapGesture(
gestureRecognizer: this,

14
com.unity.uiwidgets/Runtime/gestures/recognizer.cs


}
}
public abstract void addAllowedPointer(PointerDownEvent evt);
public abstract void addAllowedPointer(PointerEvent evt);
protected virtual void handleNonAllowedPointer(PointerDownEvent evt) {
}

Timer _timer;
public override void addAllowedPointer(PointerDownEvent evt) {
startTrackingPointer(evt.pointer, evt.transform);
public override void addAllowedPointer(PointerEvent evt) {
var _evt = (PointerDownEvent) evt;
D.assert(_evt != null);
startTrackingPointer(_evt.pointer, _evt.transform);
primaryPointer = evt.pointer;
initialPosition = new OffsetPair(local: evt.localPosition, global: evt.position);
primaryPointer = _evt.pointer;
initialPosition = new OffsetPair(local: _evt.localPosition, global: _evt.position);
_timer = Timer.create(deadline.Value, () => didExceedDeadlineWithEvent(evt));
_timer = Timer.create(deadline.Value, () => didExceedDeadlineWithEvent(_evt));
}
}
}

10
com.unity.uiwidgets/Runtime/gestures/tap.cs


public readonly Offset localPosition;
public readonly PointerDeviceKind kind;
public readonly PointerDeviceKind? kind;
public readonly int device;
}

protected abstract void handleTapCancel(PointerDownEvent down, PointerCancelEvent cancel, string reason);
public override void addAllowedPointer(PointerDownEvent evt) {
public override void addAllowedPointer(PointerEvent evt) {
var _evt = (PointerDownEvent) evt;
D.assert(_evt != null);
_down = evt;
_down = _evt;
base.addAllowedPointer(evt);
base.addAllowedPointer(_evt);
}
protected override void handlePrimaryPointer(PointerEvent evt) {

11
com.unity.uiwidgets/Runtime/gestures/force_press.cs


using System.Collections.Generic;
using System.Linq;
using Unity.UIWidgets.scheduler;
using Unity.UIWidgets.ui;
namespace Unity.UIWidgets.gestures {

Offset localPosition = null
) {
D.assert(globalPosition != null);
D.assert(pressure != null);
localPosition = localPosition ?? globalPosition;
this.localPosition = localPosition ?? globalPosition;
this.globalPosition = globalPosition;
this.pressure = pressure;
}

GestureForceInterpolation interpolation = null )
: base(debugOwner: debugOwner, kind: kind) {
interpolation = interpolation ?? _inverseLerp;
D.assert(startPressure != null);
D.assert(peakPressure != null);
D.assert(interpolation != null);
D.assert(peakPressure > startPressure);
this.startPressure = startPressure;
this.peakPressure = peakPressure;

float _lastPressure;
_ForceState _state = _ForceState.ready;
public override void addAllowedPointer(PointerDownEvent Event) {
public override void addAllowedPointer(PointerEvent Event) {
if (!(Event is PointerUpEvent) && Event.pressureMax <= 1.0f) {
resolve(GestureDisposition.rejected);
}

2
com.unity.uiwidgets/Runtime/gestures/converter.cs


var timeStamp = datum.timeStamp;
var kind = datum.kind;
// TODO: datum.signalKind is not nullable, "else" could not be reached
if (datum.signalKind == null || datum.signalKind == ui.PointerSignalKind.none) {
if (datum.signalKind == ui.PointerSignalKind.none) {
switch (datum.change) {
case PointerChange.add: {
yield return new PointerAddedEvent(

4
com.unity.uiwidgets/Runtime/material/about.cs


RouteSettings routeSettings = null
) {
D.assert(context != null);
D.assert(useRootNavigator != null);
showDialog<object>(
context: context,
useRootNavigator: useRootNavigator,

bool useRootNavigator = false
) {
D.assert(context != null);
D.assert(useRootNavigator != null);
Navigator.of(context, rootNavigator: useRootNavigator).push(new MaterialPageRoute(
builder: (BuildContext buildContext) => new LicensePage(
applicationName: applicationName,

bool _loaded = false;
Future _initLicenses() {
int debugFlowId = -1;
// int debugFlowId = -1;
// D.assert(() => {
// Flow flow = Flow.begin();
// Timeline.timeSync("_initLicenses()", () { }, flow: flow);

8
com.unity.uiwidgets/Runtime/material/app_bar.cs


if (centerTitle != null) {
return centerTitle;
}
D.assert(theme.platform != null);
switch (theme.platform) {
case RuntimePlatform.Android:
case RuntimePlatform.LinuxEditor:

Widget title = widget.title;
if (title != null) {
bool namesRoute;
switch (theme.platform) {
case RuntimePlatform.Android:
case RuntimePlatform.LinuxEditor:

namesRoute = true;
break;
default:
break;
}

2
com.unity.uiwidgets/Runtime/material/bottom_sheet.cs


}
public readonly string barrierLabel;
public override string barrierLabel { get; }
public override Color barrierColor {
get { return modalBarrierColor ?? Colors.black54; }

6
com.unity.uiwidgets/Runtime/material/button.cs


}
public override Widget build(BuildContext context) {
Color effectiveTextColor = MaterialStateProperty<Color>.resolveAs<Color>(widget.textStyle?.color, _states);
ShapeBorder effectiveShape = MaterialStateProperty<Color>.resolveAs<ShapeBorder>(widget.shape, _states);
Color effectiveTextColor = MaterialStateProperty<Color>.resolveAsMaterialStateProperty<Color>(widget.textStyle?.color, _states);
ShapeBorder effectiveShape = MaterialStateProperty<Color>.resolveAsMaterialStateProperty<ShapeBorder>(widget.shape, _states);
Offset densityAdjustment = widget.visualDensity.baseSizeAdjustment;
BoxConstraints effectiveConstraints = widget.visualDensity.effectiveConstraints(widget.constraints);
EdgeInsetsGeometry padding = widget.padding.add(

right: densityAdjustment.dx,
bottom: densityAdjustment.dy
)
).clamp(EdgeInsets.zero, EdgeInsetsGeometry.infinity) as EdgeInsets;
).clamp(EdgeInsets.zero, EdgeInsetsGeometry.infinityEdgeInsetsGeometry) as EdgeInsets;
Widget result = new ConstrainedBox(
constraints: effectiveConstraints,

1
com.unity.uiwidgets/Runtime/material/button_sheet_theme.cs


}
public static BottomSheetThemeData lerp(BottomSheetThemeData a, BottomSheetThemeData b, float t) {
D.assert(t != null);
if (a == null && b == null)
return null;
return new BottomSheetThemeData(

2
com.unity.uiwidgets/Runtime/material/button_theme.cs


}
public Color getDisabledTextColor(MaterialButton button) {
if (button.textColor is MaterialStateProperty<Color>)
if (button.textColor is IMaterialStateProperty<Color>)
return button.textColor;
if (button.disabledTextColor != null) {
return button.disabledTextColor;

2
com.unity.uiwidgets/Runtime/material/chip.cs


bool showCheckmark = widget.showCheckmark ?? chipTheme.showCheckmark ?? true;
TextStyle effectiveLabelStyle = widget.labelStyle ?? chipTheme.labelStyle;
Color resolvedLabelColor = MaterialStateProperty<Color>.resolveAs(effectiveLabelStyle?.color, _states);
Color resolvedLabelColor = MaterialStateProperty<Color>.resolveAsMaterialStateProperty(effectiveLabelStyle?.color, _states);
TextStyle resolvedLabelStyle = effectiveLabelStyle?.copyWith(color: resolvedLabelColor);
Widget result = new Material(

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


if (table is RenderTable renderTable) {
TableCellParentData cellParentData = cell.parentData as TableCellParentData;
D.assert(cellParentData.y != null);
Rect rect = renderTable.getRowBox(cellParentData.y);
// The rect is in the table's coordinate space. We need to change it to the
// TableRowInkWell's coordinate space.

2
com.unity.uiwidgets/Runtime/material/dialog.cs


public override Widget build(BuildContext context) {
return new InkWell(
onTap: () => onPressed(),
onTap: () => onPressed?.Invoke(),
child: new Padding(
padding: padding ?? EdgeInsets.symmetric(vertical: 8.0f, horizontal: 24.0f),
child: child

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


get { return null; }
}
public string barrierLabel;
public override string barrierLabel { get; }
public override Widget buildPage(BuildContext context, Animation<float> animation,
Animation<float> secondaryAnimation) {

1
com.unity.uiwidgets/Runtime/material/list_tile.cs


using Unity.UIWidgets.gestures;
using Unity.UIWidgets.painting;
using Unity.UIWidgets.rendering;
using Unity.UIWidgets.service;
using Unity.UIWidgets.ui;
using Unity.UIWidgets.widgets;
using UnityEngine;

28
com.unity.uiwidgets/Runtime/material/material_state.cs


public override Color resolve(HashSet<MaterialState> states) => _resolve(states);
}
abstract class MaterialStateProperty<T> {
interface IMaterialStateProperty<T> {
T resolve(HashSet<MaterialState> states);
}
abstract class MaterialStateProperty<T> : IMaterialStateProperty<T> {
public static T resolveAs<T>(T value, HashSet<MaterialState> states) {
if (value is MaterialStateProperty<T> materialStateProperty) {
MaterialStateProperty<T> property = materialStateProperty;
public static S resolveAsMaterialStateProperty<S>(S value, HashSet<MaterialState> states) {
if (value is MaterialStateProperty<S> materialStateProperty) {
MaterialStateProperty<S> property = materialStateProperty;
return property.resolve(states);
}

public static MaterialStateProperty<T> resolveWith<T>(material_.MaterialPropertyResolver<T> callback) =>
new _MaterialStateProperty<T>(callback);
public static MaterialStateProperty<S> resolveWithMaterialStateProperty<S>(material_.MaterialPropertyResolver<S> callback) =>
new _MaterialStateProperty<S>(callback);
}

public override T resolve(HashSet<MaterialState> states) => _resolve(states);
public static T resolveAs<T>(T value, HashSet<MaterialState> states) {
if (value is MaterialStateProperty<T> materialStateProperty) {
MaterialStateProperty<T> property = materialStateProperty;
public static S resolveAs_MaterialStateProperty<S>(S value, HashSet<MaterialState> states) {
if (value is MaterialStateProperty<S> materialStateProperty) {
MaterialStateProperty<S> property = materialStateProperty;
public static MaterialStateProperty<T> resolveWith<T>(material_.MaterialPropertyResolver<T> callback) =>
new _MaterialStateProperty<T>(callback);
public static MaterialStateProperty<S> resolveWith_MaterialStateProperty<S>(material_.MaterialPropertyResolver<S> callback) =>
new _MaterialStateProperty<S>(callback);
}
}

4
com.unity.uiwidgets/Runtime/material/outline_button.cs


Color _outlineColor {
get {
// TODO: what is the meaning of this line?
if (widget.borderSide?.color is MaterialStateProperty<Color>)
if (widget.borderSide?.color is IMaterialStateProperty<Color>)
return widget.borderSide.color;
if (!widget.enabled)
return widget.disabledBorderColor;

public ShapeBorder resolve(HashSet<MaterialState> states) {
return new _OutlineBorder(
shape: shape,
side: side.copyWith(color: MaterialStateProperty<Color>.resolveAs(side.color, states)
side: side.copyWith(color: MaterialStateProperty<Color>.resolveAsMaterialStateProperty(side.color, states)
)
);
}

4
com.unity.uiwidgets/Runtime/material/pickers/date_picker_dialog.cs


selectableDayPredicate == null || selectableDayPredicate(initialDate),
() => $"Provided initialDate {initialDate} must satisfy provided selectableDayPredicate."
);
D.assert(initialEntryMode != null);
D.assert(initialDatePickerMode != null);
D.assert(material_.debugCheckHasMaterialLocalizations(context));
Widget dialog = new _DatePickerDialog(

17
com.unity.uiwidgets/Runtime/material/pickers/calendar_date_picker.cs


using com.unity.uiwidgets.Runtime.rendering;
using Unity.UIWidgets.animation;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.material;
using Unity.UIWidgets.painting;
using Unity.UIWidgets.rendering;
using Unity.UIWidgets.ui;

this.firstDate = utils.dateOnly(firstDate.Value);
this.lastDate = utils.dateOnly(lastDate.Value);
D.assert(onDateChanged != null);
D.assert(initialCalendarMode != null);
this.onDateChanged = onDateChanged;
this.onDisplayedMonthChanged = onDisplayedMonthChanged;

}
Widget _buildPicker() {
D.assert(_mode != null);
switch (_mode) {
case DatePickerMode.day:
return new _MonthPicker(

child: new Text(localizations.formatDecimal(day), style: dayStyle.apply(color: dayColor))
)
);
if (isDisabled) {
dayWidget = dayWidget;
}
else {
if (!isDisabled) {
dayWidget = new GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () => onChanged(dayToBuild),

)
)
);
if (isDisabled) {
yearItem = yearItem;
}
else {
if (!isDisabled) {
yearItem = new InkWell(
key: new ValueKey<int>(year),
onTap: () => {

2
com.unity.uiwidgets/Runtime/material/popup_menu.cs


public override Offset getPositionForChild(Size size, Size childSize) {
float y = position.top;
if (selectedItemIndex != null && itemSizes != null) {
if (itemSizes != null) {
float selectedItemOffset = material_._kMenuVerticalPadding;
for (int index = 0; index < selectedItemIndex; index += 1)
selectedItemOffset += itemSizes[index].height;

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


get { return _values; }
set {
D.assert(value != null);
D.assert(value.start != null && value.start >= 0.0 && value.start <= 1.0f);
D.assert(value.end != null && value.end >= 0.0 && value.end <= 1.0f);
D.assert(value.start >= 0.0 && value.start <= 1.0f);
D.assert(value.end >= 0.0 && value.end <= 1.0f);
D.assert(value.start <= value.end);
RangeValues convertedValues = isDiscrete ? _discretizeRangeValues(value) : value;

1
com.unity.uiwidgets/Runtime/material/scaffold.cs


Color _bodyScrimColor = Colors.black;
internal void showBodyScrim(bool value, float opacity) {
D.assert(value != null);
if (_showBodyScrim == value && _bodyScrimColor.opacity == opacity) {
return;
}

345
com.unity.uiwidgets/Runtime/material/selectable_text.cs


using System;
using Unity.UIWidgets.animation;
using Unity.UIWidgets.async;
using Unity.UIWidgets.cupertino;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.gestures;

using TextStyle = Unity.UIWidgets.painting.TextStyle;
namespace Unity.UIWidgets.material {
public static class SelectableTextUtils {
internal const int iOSHorizontalOffset = -2;
}

D.assert(textSpan != null);
_textSpan = textSpan;
}
public override TextSpan buildTextSpan(TextStyle style = null ,bool withComposing = false) {
public override TextSpan buildTextSpan(TextStyle style = null, bool withComposing = false) {
set {
}
set { }
}
}

) : base(_delegate: state) {
_state = state;
}
public readonly _SelectableTextState _state;
protected override void onForcePressStart(ForcePressDetails details) {

protected override void onSingleLongTapMoveUpdate(LongPressMoveUpdateDetails details) {
if (_delegate.selectionEnabled) {
switch (Theme.of(_state.context).platform) {
case RuntimePlatform.IPhonePlayer:
case RuntimePlatform.IPhonePlayer:
case RuntimePlatform.OSXEditor:
case RuntimePlatform.OSXPlayer:
renderEditable.selectPositionAt(

editableText.hideToolbar();
if (_delegate.selectionEnabled) {
switch (Theme.of(_state.context).platform) {
case RuntimePlatform.IPhonePlayer:
case RuntimePlatform.IPhonePlayer:
case RuntimePlatform.OSXEditor:
case RuntimePlatform.OSXPlayer:
renderEditable.selectWordEdge(cause: SelectionChangedCause.tap);

break;
}
}
if (_state.widget.onTap != null)
_state.widget.onTap();
}

switch (Theme.of(_state.context).platform) {
case RuntimePlatform.IPhonePlayer:
case RuntimePlatform.IPhonePlayer:
case RuntimePlatform.OSXEditor:
case RuntimePlatform.OSXPlayer:
renderEditable.selectPositionAt(

}
public class SelectableText : StatefulWidget {
public SelectableText(
string data,
Key key = null,

GestureTapCallback onTap = null,
ScrollPhysics scrollPhysics = null,
TextWidthBasis? textWidthBasis = null
) : this(
) : this(
data: data,
textSpan: null,
key: key,

onTap: onTap,
scrollPhysics: scrollPhysics,
textWidthBasis: textWidthBasis
) {
) {
SelectableText(
string data,
TextSpan textSpan,

GestureTapCallback onTap = null,
ScrollPhysics scrollPhysics = null,
TextWidthBasis? textWidthBasis = null
) : base(key: key) {
) : base(key: key) {
D.assert(maxLines == null || maxLines > 0);
D.assert(minLines == null || minLines > 0);
D.assert(

selectAll: true,
copy: true
);
this.data = data;
this.textSpan = textSpan;
this.focusNode = focusNode;

textSpan != null,
() => "A non-null TextSpan must be provided to a SelectableText.rich widget."
);
return new SelectableText(
data: null,
textSpan: textSpan,

onTap: onTap,
scrollPhysics: scrollPhysics,
textWidthBasis: textWidthBasis
);
);
public readonly string data;
public readonly string data;
public readonly TextSpan textSpan;
public readonly FocusNode focusNode;
public readonly TextSpan textSpan;
public readonly TextStyle style;
public readonly StrutStyle strutStyle;
public readonly FocusNode focusNode;
public readonly TextAlign? textAlign;
public readonly TextStyle style;
public readonly TextDirection? textDirection;
public readonly StrutStyle strutStyle;
public readonly float? textScaleFactor;
public readonly bool autofocus;
public readonly int? minLines;
public readonly int? maxLines;
public readonly TextAlign? textAlign;
public readonly bool showCursor;
public readonly TextDirection? textDirection;
public readonly float? textScaleFactor;
public readonly float cursorWidth;
public readonly bool autofocus;
public readonly int? minLines;
public readonly Radius cursorRadius;
public readonly int? maxLines;
public readonly Color cursorColor;
public readonly bool showCursor;
public readonly float cursorWidth;
public readonly bool enableInteractiveSelection;
public readonly Radius cursorRadius;
public readonly Color cursorColor;
public readonly DragStartBehavior dragStartBehavior;
public readonly bool enableInteractiveSelection;
public readonly ToolbarOptions toolbarOptions;
public readonly DragStartBehavior dragStartBehavior;
public readonly ToolbarOptions toolbarOptions;
internal bool selectionEnabled {
get { return enableInteractiveSelection; }
}
public readonly GestureTapCallback onTap;
internal bool selectionEnabled {
get { return enableInteractiveSelection; }
}
public readonly GestureTapCallback onTap;
public readonly ScrollPhysics scrollPhysics;
public readonly ScrollPhysics scrollPhysics;
public readonly TextWidthBasis? textWidthBasis;
public readonly TextWidthBasis? textWidthBasis;
public override State createState() => new _SelectableTextState();
public override State createState() => new _SelectableTextState();
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add( new DiagnosticsProperty<string>("data", data, defaultValue: null));
properties.add( new DiagnosticsProperty<FocusNode>("focusNode", focusNode, defaultValue: null));
properties.add( new DiagnosticsProperty<TextStyle>("style", style, defaultValue: null));
properties.add( new DiagnosticsProperty<bool>("autofocus", autofocus, defaultValue: false));
properties.add( new DiagnosticsProperty<bool>("showCursor", showCursor, defaultValue: false));
properties.add( new IntProperty("minLines", minLines, defaultValue: null));
properties.add( new IntProperty("maxLines", maxLines, defaultValue: null));
properties.add( new EnumProperty<TextAlign?>("textAlign", textAlign, defaultValue: null));
properties.add( new EnumProperty<TextDirection?>("textDirection", textDirection, defaultValue: null));
properties.add( new FloatProperty("textScaleFactor", textScaleFactor, defaultValue: null));
properties.add( new FloatProperty("cursorWidth", cursorWidth, defaultValue: 2.0f));
properties.add( new DiagnosticsProperty<Radius>("cursorRadius", cursorRadius, defaultValue: null));
properties.add( new DiagnosticsProperty<Color>("cursorColor", cursorColor, defaultValue: null));
properties.add( new FlagProperty("selectionEnabled", value: selectionEnabled, defaultValue: true, ifFalse: "selection disabled"));
properties.add( new DiagnosticsProperty<ScrollPhysics>("scrollPhysics", scrollPhysics, defaultValue: null));
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new DiagnosticsProperty<string>("data", data, defaultValue: null));
properties.add(new DiagnosticsProperty<FocusNode>("focusNode", focusNode, defaultValue: null));
properties.add(new DiagnosticsProperty<TextStyle>("style", style, defaultValue: null));
properties.add(new DiagnosticsProperty<bool>("autofocus", autofocus, defaultValue: false));
properties.add(new DiagnosticsProperty<bool>("showCursor", showCursor, defaultValue: false));
properties.add(new IntProperty("minLines", minLines, defaultValue: null));
properties.add(new IntProperty("maxLines", maxLines, defaultValue: null));
properties.add(new EnumProperty<TextAlign?>("textAlign", textAlign, defaultValue: null));
properties.add(new EnumProperty<TextDirection?>("textDirection", textDirection, defaultValue: null));
properties.add(new FloatProperty("textScaleFactor", textScaleFactor, defaultValue: null));
properties.add(new FloatProperty("cursorWidth", cursorWidth, defaultValue: 2.0f));
properties.add(new DiagnosticsProperty<Radius>("cursorRadius", cursorRadius, defaultValue: null));
properties.add(new DiagnosticsProperty<Color>("cursorColor", cursorColor, defaultValue: null));
properties.add(new FlagProperty("selectionEnabled", value: selectionEnabled, defaultValue: true,
ifFalse: "selection disabled"));
properties.add(new DiagnosticsProperty<ScrollPhysics>("scrollPhysics", scrollPhysics, defaultValue: null));
}
_TextSpanEditingController _controller;
FocusNode _focusNode;

get { return _forcePressEnabled; }
set { _forcePressEnabled = value; }
}
bool _forcePressEnabled;
public GlobalKey<EditableTextState> editableTextKey {

textSpan: widget.textSpan ?? new TextSpan(text: widget.data)
);
}
if (_effectiveFocusNode.hasFocus && _controller.selection.isCollapsed) {
_showSelectionHandles = false;
}

_focusNode?.dispose();
base.dispose();
}
setState(() => {
_showSelectionHandles = willShowSelectionHandles;
});
setState(() => { _showSelectionHandles = willShowSelectionHandles; });
}
switch (Theme.of(context).platform) {

if (cause == SelectionChangedCause.longPress) {
_editableText?.bringIntoView(selection.basePos);
}
// Do nothing.
break;
// Do nothing.
break;
bool _shouldShowSelectionHandles(SelectionChangedCause cause) {
if (!_selectionGestureDetectorBuilder.shouldShowSelectionToolbar)
return false;

}
protected override bool wantKeepAlive => true;
Widget build(BuildContext context) {
base.build(context);
D.assert(() => {
return _controller._textSpan.visitChildren((InlineSpan span) => span is TextSpan);
}, () => "SelectableText only supports TextSpan; Other type of InlineSpan is not allowed");
D.assert(WidgetsD.debugCheckHasMediaQuery(context));
D.assert(WidgetsD.debugCheckHasDirectionality(context));
D.assert(
!(widget.style != null && widget.style.inherit == false &&
(widget.style.fontSize == null || widget.style.textBaseline == null)),
() => "inherit false style must supply fontSize and textBaseline"
);
public override Widget build(BuildContext context) {
base.build(context);
D.assert(() => { return _controller._textSpan.visitChildren((InlineSpan span) => span is TextSpan); },
() => "SelectableText only supports TextSpan; Other type of InlineSpan is not allowed");
D.assert(WidgetsD.debugCheckHasMediaQuery(context));
D.assert(WidgetsD.debugCheckHasDirectionality(context));
D.assert(
!(widget.style != null && widget.style.inherit == false &&
(widget.style.fontSize == null || widget.style.textBaseline == null)),
() => "inherit false style must supply fontSize and textBaseline"
);
ThemeData themeData = Theme.of(context);
FocusNode focusNode = _effectiveFocusNode;
ThemeData themeData = Theme.of(context);
FocusNode focusNode = _effectiveFocusNode;
TextSelectionControls textSelectionControls;
bool paintCursorAboveText;
bool cursorOpacityAnimates;
Offset cursorOffset = Offset.zero;
Color cursorColor = widget.cursorColor;
Radius cursorRadius = widget.cursorRadius;
TextSelectionControls textSelectionControls;
bool paintCursorAboveText;
bool cursorOpacityAnimates;
Offset cursorOffset = Offset.zero;
Color cursorColor = widget.cursorColor;
Radius cursorRadius = widget.cursorRadius;
switch (themeData.platform) {
case RuntimePlatform.IPhonePlayer:
case RuntimePlatform.OSXEditor:
case RuntimePlatform.OSXPlayer:
forcePressEnabled = true;
textSelectionControls = CupertinoTextFieldUtils.cupertinoTextSelectionControls;
paintCursorAboveText = true;
cursorOpacityAnimates = true;
cursorColor = cursorColor ?? CupertinoTheme.of(context).primaryColor;
cursorRadius = cursorRadius?? Radius.circular(2.0f);
cursorOffset = new Offset(SelectableTextUtils.iOSHorizontalOffset / MediaQuery.of(context).devicePixelRatio, 0);
break;
switch (themeData.platform) {
case RuntimePlatform.IPhonePlayer:
case RuntimePlatform.OSXEditor:
case RuntimePlatform.OSXPlayer:
forcePressEnabled = true;
textSelectionControls = CupertinoTextFieldUtils.cupertinoTextSelectionControls;
paintCursorAboveText = true;
cursorOpacityAnimates = true;
cursorColor = cursorColor ?? CupertinoTheme.of(context).primaryColor;
cursorRadius = cursorRadius ?? Radius.circular(2.0f);
cursorOffset =
new Offset(SelectableTextUtils.iOSHorizontalOffset / MediaQuery.of(context).devicePixelRatio,
0);
break;
default:
forcePressEnabled = false;
textSelectionControls = _MaterialTextSelectionControls.materialTextSelectionControls;
paintCursorAboveText = false;
cursorOpacityAnimates = false;
cursorColor = cursorColor ?? themeData.cursorColor;
break;
}
default:
forcePressEnabled = false;
textSelectionControls = _MaterialTextSelectionControls.materialTextSelectionControls;
paintCursorAboveText = false;
cursorOpacityAnimates = false;
cursorColor = cursorColor ?? themeData.cursorColor;
break;
}
DefaultTextStyle defaultTextStyle = DefaultTextStyle.of(context);
TextStyle effectiveTextStyle = widget.style;
if (widget.style == null || widget.style.inherit)
effectiveTextStyle = defaultTextStyle.style.merge(widget.style);
if (MediaQuery.boldTextOverride(context))
effectiveTextStyle = effectiveTextStyle.merge(new TextStyle(fontWeight: FontWeight.bold));
Widget child = new RepaintBoundary(
child: new EditableText(
key: editableTextKey,
style: effectiveTextStyle,
readOnly: true,
textWidthBasis: widget.textWidthBasis ?? defaultTextStyle.textWidthBasis,
showSelectionHandles: _showSelectionHandles,
showCursor: widget.showCursor,
controller: _controller,
focusNode: focusNode,
strutStyle: widget.strutStyle ?? new StrutStyle(),
textAlign: widget.textAlign ?? defaultTextStyle.textAlign ?? TextAlign.start,
textDirection: widget.textDirection,
textScaleFactor: widget.textScaleFactor,
autofocus: widget.autofocus,
forceLine: false,
toolbarOptions: widget.toolbarOptions,
minLines: widget.minLines,
maxLines: widget.maxLines ?? defaultTextStyle.maxLines,
selectionColor: themeData.textSelectionColor,
selectionControls: widget.selectionEnabled ? textSelectionControls : null,
onSelectionChanged: _handleSelectionChanged,
onSelectionHandleTapped: _handleSelectionHandleTapped,
rendererIgnoresPointer: true,
cursorWidth: widget.cursorWidth,
cursorRadius: cursorRadius,
cursorColor: cursorColor,
cursorOpacityAnimates: cursorOpacityAnimates,
cursorOffset: cursorOffset,
paintCursorAboveText: paintCursorAboveText,
backgroundCursorColor: CupertinoColors.inactiveGray,
enableInteractiveSelection: widget.enableInteractiveSelection,
dragStartBehavior: widget.dragStartBehavior,
scrollPhysics: widget.scrollPhysics
)
);
DefaultTextStyle defaultTextStyle = DefaultTextStyle.of(context);
TextStyle effectiveTextStyle = widget.style;
if (widget.style == null || widget.style.inherit)
effectiveTextStyle = defaultTextStyle.style.merge(widget.style);
if (MediaQuery.boldTextOverride(context))
effectiveTextStyle = effectiveTextStyle.merge(new TextStyle(fontWeight: FontWeight.bold));
return _selectionGestureDetectorBuilder.buildGestureDetector(
behavior: HitTestBehavior.translucent,
child: child
);
Widget child = new RepaintBoundary(
child: new EditableText(
key: editableTextKey,
style: effectiveTextStyle,
readOnly: true,
textWidthBasis: widget.textWidthBasis ?? defaultTextStyle.textWidthBasis,
showSelectionHandles: _showSelectionHandles,
showCursor: widget.showCursor,
controller: _controller,
focusNode: focusNode,
strutStyle: widget.strutStyle ?? new StrutStyle(),
textAlign: widget.textAlign ?? defaultTextStyle.textAlign ?? TextAlign.start,
textDirection: widget.textDirection,
textScaleFactor: widget.textScaleFactor,
autofocus: widget.autofocus,
forceLine: false,
toolbarOptions: widget.toolbarOptions,
minLines: widget.minLines,
maxLines: widget.maxLines ?? defaultTextStyle.maxLines,
selectionColor: themeData.textSelectionColor,
selectionControls: widget.selectionEnabled ? textSelectionControls : null,
onSelectionChanged: _handleSelectionChanged,
onSelectionHandleTapped: _handleSelectionHandleTapped,
rendererIgnoresPointer: true,
cursorWidth: widget.cursorWidth,
cursorRadius: cursorRadius,
cursorColor: cursorColor,
cursorOpacityAnimates: cursorOpacityAnimates,
cursorOffset: cursorOffset,
paintCursorAboveText: paintCursorAboveText,
backgroundCursorColor: CupertinoColors.inactiveGray,
enableInteractiveSelection: widget.enableInteractiveSelection,
dragStartBehavior: widget.dragStartBehavior,
scrollPhysics: widget.scrollPhysics
)
);
return _selectionGestureDetectorBuilder.buildGestureDetector(
behavior: HitTestBehavior.translucent,
child: child
);
}
}
}

2
com.unity.uiwidgets/Runtime/material/slider_theme.cs


const float _ninetyDegrees = Mathf.PI / 2.0f;
const float _thirtyDegrees = Mathf.PI / 6.0f;
const float _preferredHeight = _distanceBetweenTopBottomCenters + _topLobeRadius + _bottomLobeRadius;
const bool _debuggingLabelLocation = false;
static readonly bool _debuggingLabelLocation = false;
public Size getPreferredSize(
bool isEnabled,

8
com.unity.uiwidgets/Runtime/material/theme_data.cs


public class VisualDensity : Diagnosticable, IEquatable<VisualDensity> {
public VisualDensity(
float horizontal = 0.0f,
float vertical = 0.0f
float? horizontal = 0.0f,
float? vertical = 0.0f
) {
D.assert(horizontal != null);
D.assert(vertical != null);

D.assert(horizontal >= minimumDensity);
this.horizontal = horizontal;
this.vertical = vertical;
this.horizontal = horizontal.Value;
this.vertical = vertical.Value;
}
public static readonly float minimumDensity = -4.0f;

8
com.unity.uiwidgets/Runtime/material/toggle_buttons.cs


public override Widget build(BuildContext context) {
D.assert(
!isSelected.Any((bool val) => val == null),
() => "All elements of isSelected must be non-null.\n" +
"The current list of isSelected values is as follows:\n" +
$"{isSelected}"
);
D.assert(
focusNodes == null || !focusNodes.Any((FocusNode val) => val == null),
() => "All elements of focusNodes must be non-null.\n" +
"The current list of focus node values is as follows:\n" +

return box == null ? 0.0f : box.getMaxIntrinsicWidth(height);
}
float computeDistanceToActualBaseline(TextBaseline baseline) {
public override float? computeDistanceToActualBaseline(TextBaseline baseline) {
return child.computeDistanceToActualBaseline(baseline).Value +
horizontalBorderSide.width;
}

2
com.unity.uiwidgets/Runtime/painting/binding.cs


shaderWarmUp.execute();
}
}
public new static PaintingBinding instance {
get { return (PaintingBinding) ServicesBinding.instance; }
set { Window.instance._binding = value; }

41
com.unity.uiwidgets/Runtime/painting/box_border.cs


isUniform = false;
}
public virtual BorderSide top { get; }
public BorderSide top { get; set; }
public virtual BorderSide bottom { get; }
public BorderSide bottom { get; set; }
public virtual bool isUniform { get; }

public static BoxBorder lerp(BoxBorder a, BoxBorder b, float t) {
D.assert(t != null);
if ((a is Border || a == null) && (b is Border || b == null))
return Border.lerp((Border) a, (Border) b, t);
if ((a is BorderDirectional || a == null) && (b is BorderDirectional || b == null))

paint(canvas, rect, textDirection);
}
internal static void _paintUniformBorderWithRadius(Canvas canvas, Rect rect, BorderSide side,
internal virtual void _paintUniformBorderWithRadius(Canvas canvas, Rect rect, BorderSide side,
BorderRadius borderRadius) {
D.assert(side.style != BorderStyle.none);
Paint paint = new Paint();

}
}
internal static void _paintUniformBorderWithCircle(Canvas canvas, Rect rect, BorderSide side) {
internal virtual void _paintUniformBorderWithCircle(Canvas canvas, Rect rect, BorderSide side) {
D.assert(side.style != BorderStyle.none);
float width = side.width;
Paint paint = side.toPaint();

internal static void _paintUniformBorderWithRectangle(Canvas canvas, Rect rect, BorderSide side) {
internal virtual void _paintUniformBorderWithRectangle(Canvas canvas, Rect rect, BorderSide side) {
D.assert(side.style != BorderStyle.none);
float width = side.width;
Paint paint = side.toPaint();

left: BorderSide.merge(a.left, b.left)
);
}
public readonly BorderSide top;
public readonly BorderSide bottom;
public readonly BorderSide left;
public override EdgeInsetsGeometry dimensions {

}
}
public bool isUniform {
public override bool isUniform {
get { return isSameColor && isSameWidth && isSameStyle; }
}

paint(canvas, rect, textDirection);
}
public void paint(Canvas canvas, Rect rect,
public override void paint(Canvas canvas, Rect rect,
TextDirection? textDirection = null,
BoxShape shape = BoxShape.rectangle,
BorderRadius borderRadius = null) {

top: top, right: right, bottom: bottom, left: left);
}
static void _paintUniformBorderWithRadius(Canvas canvas, Rect rect, BorderSide side,
internal override void _paintUniformBorderWithRadius(Canvas canvas, Rect rect, BorderSide side,
BorderRadius borderRadius) {
D.assert(side.style != BorderStyle.none);
Paint paint = new Paint {

}
}
static void _paintUniformBorderWithCircle(Canvas canvas, Rect rect, BorderSide side) {
internal override void _paintUniformBorderWithCircle(Canvas canvas, Rect rect, BorderSide side) {
D.assert(side.style != BorderStyle.none);
float width = side.width;
Paint paint = side.toPaint();

static void _paintUniformBorderWithRectangle(Canvas canvas, Rect rect, BorderSide side) {
internal override void _paintUniformBorderWithRectangle(Canvas canvas, Rect rect, BorderSide side) {
D.assert(side.style != BorderStyle.none);
float width = side.width;
Paint paint = side.toPaint();

bottom: BorderSide.merge(a.bottom, b.bottom)
);
}
public override BorderSide top { get; }
public override BorderSide bottom { get; }
public override EdgeInsetsGeometry dimensions {
get => EdgeInsetsDirectional.fromSTEB(start.width, top.width, end.width, bottom.width);
}

}
public static BorderDirectional lerp(BorderDirectional a, BorderDirectional b, float t) {
D.assert(t != null);
if (a == null && b == null)
return null;
if (a == null)

case BoxShape.circle:
D.assert(borderRadius == null,
() => "A borderRadius can only be given for rectangular boxes.");
BoxBorder._paintUniformBorderWithCircle(canvas, rect, top);
_paintUniformBorderWithCircle(canvas, rect, top);
BoxBorder._paintUniformBorderWithRadius(canvas, rect, top, borderRadius);
_paintUniformBorderWithRadius(canvas, rect, top, borderRadius);
BoxBorder._paintUniformBorderWithRectangle(canvas, rect, top);
_paintUniformBorderWithRectangle(canvas, rect, top);
break;
}

62
com.unity.uiwidgets/Runtime/painting/edge_insets.cs


using System;
using JetBrains.Annotations;
using UnityEngine;
internal float _bottom { get; }
internal float _end { get; }
internal float _left { get; }
internal float _right { get; }
internal float _start { get; }
internal float _top { get; }
internal virtual float _bottom { get; }
internal virtual float _end { get; }
internal virtual float _left { get; }
internal virtual float _right { get; }
internal virtual float _start { get; }
internal virtual float _top { get; }
public static EdgeInsetsGeometry infinity = _MixedEdgeInsets.fromLRSETB(
public static EdgeInsetsGeometry infinityEdgeInsetsGeometry = _MixedEdgeInsets.fromLRSETB(
float.PositiveInfinity,
float.PositiveInfinity,
float.PositiveInfinity,

}
public float horizontal {
public virtual float horizontal {
public float vertical {
public virtual float vertical {
D.assert(axis != null);
switch (axis) {
case Axis.horizontal:
return horizontal;

return null;
}

}
public static EdgeInsetsGeometry lerp(EdgeInsetsGeometry a, EdgeInsetsGeometry b, float t) {
D.assert(t != null);
if (a == null && b == null)
return null;
if (a == null)

if (a is EdgeInsets && b is EdgeInsets)
return EdgeInsets.lerp((EdgeInsets) a, (EdgeInsets) b, t);
if (a is EdgeInsetsDirectional && b is EdgeInsetsDirectional)
return EdgeInsetsDirectional.lerp(a, b, t);
return EdgeInsetsDirectional.lerp((EdgeInsetsDirectional)a, (EdgeInsetsDirectional)b, t);
return _MixedEdgeInsets.fromLRSETB(
MathUtils.lerpNullableFloat(a._left, b._left, t),

public readonly float start;
float _start {
internal override float _start {
float _end {
internal override float _end {
float _top {
internal override float _top {
float _bottom {
internal override float _bottom {
float _left {
internal override float _left {
float _right {
internal override float _right {
get { return 0f; }
}

}
public static EdgeInsetsDirectional lerp(EdgeInsetsDirectional a, EdgeInsetsDirectional b, float t) {
D.assert(t != null);
if (a == null && b == null)
return null;
if (a == null)

return new _MixedEdgeInsets(_left, _right, _start, _end, _top, _bottom);
}
public readonly float _left;
internal override float _left { get; }
public readonly float _right;
internal override float _right { get; }
public readonly float _start;
internal override float _start { get; }
public readonly float _end;
internal override float _end { get; }
public readonly float _top;
internal override float _top { get; }
public readonly float _bottom;
internal override float _bottom { get; }
public override bool isNonNegative {

public readonly float top;
public readonly float bottom;
public static EdgeInsets infinity = fromLTRB(
public static EdgeInsets infinityEdgeInsets = fromLTRB(
float.PositiveInfinity,
float.PositiveInfinity,
float.PositiveInfinity,

public bool isNonNegative {
public override bool isNonNegative {
get {
return left >= 0.0
&& right >= 0.0

}
public float horizontal {
public override float horizontal {
public float vertical {
public override float vertical {
public float along(Axis axis) {
public float along(Axis? axis) {
D.assert(axis != null);
switch (axis) {
case Axis.horizontal:
return horizontal;

throw new Exception("unknown axis");
}

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


}
public static AlignmentGeometry lerp(AlignmentGeometry a, AlignmentGeometry b, float t) {
D.assert(t != null);
if (a == null && b == null)
return null;
if (a == null)

}
public static AlignmentDirectional lerpAlignmentDirectional(AlignmentDirectional a, AlignmentDirectional b, float t) {
D.assert(t != null);
if (a == null && b == null)
return null;
if (a == null)

public class TextAlignVertical {
public TextAlignVertical(float y) {
D.assert(y != null);
D.assert(y >= -1.0 && y <= 1.0);
this.y = y;
}

21
com.unity.uiwidgets/Runtime/painting/image_provider.cs


public abstract class ImageProvider {
public abstract ImageStream resolve(ImageConfiguration configuration);
public override bool Equals(object obj) {
if (ReferenceEquals(null, obj)) {
return false;
}
if (ReferenceEquals(this, obj)) {
return true;
}
if (obj.GetType() != GetType()) {
return false;
}
return false;
}
public override int GetHashCode() {
return base.GetHashCode();
}
public static bool operator ==(ImageProvider left, ImageProvider right) {
return Equals(left, right);

public class NetworkImageLoadException : Exception {
NetworkImageLoadException(int statusCode, Uri uri) {
D.assert(uri != null);
D.assert(statusCode != null);
this.statusCode = statusCode;
this.uri = uri;
_message = $"HTTP request failed, statusCode: {statusCode}, {uri}";

12
com.unity.uiwidgets/Runtime/painting/image_resolution.cs


string _findNearest(SplayTree<float, string> candidates, float value) {
if (candidates.ContainsKey(value))
return candidates[value];
float lower = candidates.lastKeyBefore(value);
float upper = candidates.firstKeyAfter(value);
if (lower == null)
return candidates[upper];
if (upper == null)
return candidates[lower];
var lower = candidates.lastKeyBefore(value);
var upper = candidates.firstKeyAfter(value);
else
return candidates[lower];
return candidates[lower];
}
internal static readonly Regex _extractRatioRegExp = new Regex(@"/?(\d+(\.\d*)?)x$");

5
com.unity.uiwidgets/Runtime/painting/image_cache.cs


throw;
}
}
bool listenedOnce = false;
_PendingImage untrackedPendingImage = null;
void listener(ImageInfo info, bool syncCall) {

if (untrackedPendingImage == null) {
_touch(key, cachedImage);
}
listenedOnce = true;
}
ImageStreamListener streamListener = new ImageStreamListener(listener);

21
com.unity.uiwidgets/Runtime/painting/basic_types.cs


return null;
}
public static AxisDirection? textDirectionToAxisDirection(TextDirection textDirection) {
D.assert(textDirection != null);
switch (textDirection) {
case TextDirection.rtl:
return AxisDirection.left;

return null;
}
public static AxisDirection? flipAxisDirection(AxisDirection axisDirection) {
D.assert(axisDirection != null);
switch (axisDirection) {
case AxisDirection.up:
return AxisDirection.down;

throw new Exception("unknown axis");
}
public static Axis axisDirectionToAxis(AxisDirection axisDirection) {
public static Axis? axisDirectionToAxis(AxisDirection? axisDirection) {
D.assert(axisDirection != null);
switch (axisDirection) {
case AxisDirection.up:
case AxisDirection.down:

return Axis.horizontal;
}
throw new Exception("unknown axisDirection");
return null;
public static AxisDirection textDirectionToAxisDirection(TextDirection textDirection) {
public static AxisDirection? textDirectionToAxisDirection(TextDirection textDirection) {
switch (textDirection) {
case TextDirection.rtl:
return AxisDirection.left;

throw new Exception("unknown textDirection");
return null;
public static AxisDirection flipAxisDirection(AxisDirection axisDirection) {
switch (axisDirection) {
public static AxisDirection? flipAxisDirection(AxisDirection? axisDirection) {
D.assert(axisDirection != null);
switch (axisDirection.Value) {
case AxisDirection.up:
return AxisDirection.down;
case AxisDirection.right:

return AxisDirection.right;
}
throw new Exception("unknown axisDirection");
return null;
public static bool axisDirectionIsReversed(AxisDirection axisDirection) {
public static bool axisDirectionIsReversed(AxisDirection? axisDirection) {
D.assert(axisDirection != null);
switch (axisDirection) {
case AxisDirection.up:
case AxisDirection.left:

2
com.unity.uiwidgets/Runtime/painting/decoration_image.cs


D.assert(() => {
// We check this first so that the assert will fire immediately, not just
// when the image is ready.
if (configuration.textDirection == null) {
if (configuration?.textDirection == null) {
throw new UIWidgetsError(new List<DiagnosticsNode>() {
new ErrorSummary(
"DecorationImage.matchTextDirection can only be used when a TextDirection is available."),

15
com.unity.uiwidgets/Runtime/painting/text_painter.cs


public PlaceholderDimensions(
Size size,
PlaceholderAlignment alignment,
TextBaseline baseline,
TextBaseline? baseline,
D.assert(alignment != null);
this.size = size;
this.alignment = alignment;
this.baseline = baseline;

public readonly float baselineOffset;
public readonly TextBaseline baseline;
public readonly TextBaseline? baseline;
public override string ToString() {
return $"PlaceholderDimensions({size}, {baseline})";

public TextWidthBasis textWidthBasis {
get { return _textWidthBasis; }
set {
D.assert(value != null);
if (_textWidthBasis == value)
return;
_textWidthBasis = value;

}
ParagraphStyle _createParagraphStyle(TextDirection defaultTextDirection = TextDirection.ltr) {
D.assert(textAlign != null);
D.assert(textDirection != null,
() => "TextPainter.textDirection must be set to a non-null value before using the TextPainter.");
return _text.style?.getParagraphStyle(

return value == 0x200F || value == 0x200E;
}
public int getOffsetAfter(int offset) {
public int? getOffsetAfter(int offset) {
return 0;
return null;
public int getOffsetBefore(int offset) {
public int? getOffsetBefore(int offset) {
return 0;
return null;
// TODO(goderbauer): doesn't handle extended grapheme clusters with more than one Unicode scalar value (https://github.com/flutter/flutter/issues/13404).
return _isUtf16Surrogate(prevCodeUnit.Value) ? offset - 2 : offset - 1;
}

2
com.unity.uiwidgets/Runtime/painting/matrix_utils.cs


return value == null ? "null" : value.ToString();
}
return string.Join("\n", MatrixUtils.debugDescribeTransform(value));
return string.Join("\n", MatrixUtils.debugDescribeTransform(valueT));
}
}
}

6
com.unity.uiwidgets/Runtime/painting/inline_span.cs


public class InlineSpanSemanticsInformation : IEquatable<InlineSpanSemanticsInformation> {
public InlineSpanSemanticsInformation(
string text,
bool isPlaceholder = false,
bool? isPlaceholder = false,
string semanticsLabel = null,
GestureRecognizer recognizer = null
) {

requiresOwnNode = isPlaceholder || recognizer != null;
requiresOwnNode = isPlaceholder.Value || recognizer != null;
}
public static readonly InlineSpanSemanticsInformation placeholder =

public virtual bool debugAssertIsValid() => true;
public abstract RenderComparison compareTo(InlineSpan other);
public virtual void debugFillProperties(DiagnosticPropertiesBuilder properties) {
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.defaultDiagnosticsTreeStyle = DiagnosticsTreeStyle.whitespace;
if (style != null) {

4
com.unity.uiwidgets/Runtime/painting/placeholder_span.cs


namespace Unity.UIWidgets.painting {
abstract class PlaceholderSpan : InlineSpan {
public PlaceholderSpan(
TextBaseline baseline = TextBaseline.alphabetic,
TextBaseline? baseline = null,
TextStyle style = null,
PlaceholderAlignment alignment = PlaceholderAlignment.bottom

public PlaceholderAlignment alignment;
public TextBaseline baseline;
public TextBaseline? baseline;
public override void computeToPlainText(
StringBuilder buffer,

12
com.unity.uiwidgets/Runtime/painting/colors.cs


}
static HSLColor lerp(HSLColor a, HSLColor b, float t) {
D.assert(t != null);
if (a == null && b == null)
return null;
if (a == null)

style: style,
level: level
) {
D.assert(showName != null);
D.assert(style != null);
D.assert(level != null);
}
public override Dictionary<string, object> toJsonMap(DiagnosticsSerializationDelegate Delegate) {

{"red", value.red},
{"green", value.green},
{"blue", value.blue},
{"alpha", value.alpha}
{"red", valueT.red},
{"green", valueT.green},
{"blue", valueT.blue},
{"alpha", valueT.alpha}
};
}

16
com.unity.uiwidgets/Runtime/rendering/object.mixin.njk


{{ ContainerParentDataMixin('SliverLogicalParentData') }}
{% macro ContainerRenderObjectMixin(with) %}
{% macro ContainerRenderObjectMixin(override, with) %}
public abstract class ContainerRenderObjectMixin{{with}}<ChildType, ParentDataType> : {{with}}, ContainerRenderObjectMixin
where ChildType : RenderObject
where ParentDataType : ParentData, ContainerParentDataMixin<ChildType> {

get { return _childCount; }
}
public bool debugValidateChild(RenderObject child) {
public {{override}}bool debugValidateChild(RenderObject child) {
D.assert(() => {
if (!(child is ChildType)) {
throw new UIWidgetsError(

}
{% endmacro %}
{{ ContainerRenderObjectMixin('RenderBox') }}
{{ ContainerRenderObjectMixin('', 'RenderBox') }}
{{ ContainerRenderObjectMixin('RenderSliver') }}
{{ ContainerRenderObjectMixin('', 'RenderSliver') }}
{{ ContainerRenderObjectMixin('RenderProxyBoxMixinRenderObjectWithChildMixinRenderBoxRenderStack') }}
{{ ContainerRenderObjectMixin('override ', 'RenderProxyBoxMixinRenderObjectWithChildMixinRenderBoxRenderStack') }}
{% macro RenderConstrainedLayoutBuilderMixin(abstract, with, constraint) %}
public {{abstract}} class RenderConstrainedLayoutBuilderMixin{{with}}<ConstraintType, ChildType> : RenderObjectWithChildMixin{{with}}<ChildType>,

public LayoutCallback<ConstraintType> _callback { get; set; }
public void updateCallback(LayoutCallback<ConstraintType> value) {
public virtual LayoutCallback<ConstraintType> _callback { get; set; }
public virtual void updateCallback(LayoutCallback<ConstraintType> value) {
if (value == _callback)
return;
_callback = value;

public void layoutAndBuildChild() {
public virtual void layoutAndBuildChild() {
D.assert(_callback != null);
invokeLayoutCallback(_callback);
}

20
com.unity.uiwidgets/Runtime/rendering/object.mixin.gen.cs


get { return _childCount; }
}
public bool debugValidateChild(RenderObject child) {
public override bool debugValidateChild(RenderObject child) {
D.assert(() => {
if (!(child is ChildType)) {
throw new UIWidgetsError(

where ConstraintType : Constraints
where ChildType : RenderObject {
public LayoutCallback<ConstraintType> _callback { get; set; }
public void updateCallback(LayoutCallback<ConstraintType> value) {
public virtual LayoutCallback<ConstraintType> _callback { get; set; }
public virtual void updateCallback(LayoutCallback<ConstraintType> value) {
if (value == _callback)
return;
_callback = value;

public void layoutAndBuildChild() {
public virtual void layoutAndBuildChild() {
D.assert(_callback != null);
invokeLayoutCallback(_callback);
}

where ConstraintType : BoxConstraints
where ChildType : RenderBox {
public LayoutCallback<ConstraintType> _callback { get; set; }
public void updateCallback(LayoutCallback<ConstraintType> value) {
public virtual LayoutCallback<ConstraintType> _callback { get; set; }
public virtual void updateCallback(LayoutCallback<ConstraintType> value) {
if (value == _callback)
return;
_callback = value;

public void layoutAndBuildChild() {
public virtual void layoutAndBuildChild() {
D.assert(_callback != null);
invokeLayoutCallback(_callback);
}

where ConstraintType : SliverConstraints
where ChildType : RenderSliver {
public LayoutCallback<ConstraintType> _callback { get; set; }
public void updateCallback(LayoutCallback<ConstraintType> value) {
public virtual LayoutCallback<ConstraintType> _callback { get; set; }
public virtual void updateCallback(LayoutCallback<ConstraintType> value) {
if (value == _callback)
return;
_callback = value;

public void layoutAndBuildChild() {
public virtual void layoutAndBuildChild() {
D.assert(_callback != null);
invokeLayoutCallback(_callback);
}

2
com.unity.uiwidgets/Runtime/rendering/error.cs


context.canvas.drawParagraph(_paragraph, offset + new Offset(left, top));
}
}
catch (Exception e) {
catch (Exception) {
// Intentionally left empty.
}
}

2
com.unity.uiwidgets/Runtime/rendering/image.cs


public bool matchTextDirection {
get { return _matchTextDirection; }
set {
D.assert(value != null);
if (value == _matchTextDirection)
return;
_matchTextDirection = value;

}
_resolve();
D.assert(_resolvedAlignment != null);
D.assert(_flipHorizontally != null);
painting_.paintImage(
canvas: context.canvas,
rect: offset & size,

2
com.unity.uiwidgets/Runtime/rendering/object.cs


}
public interface RenderObjectWithChildMixin<ChildType> : RenderObjectWithChildMixin where ChildType : RenderObject {
ChildType child { get; set; }
new ChildType child { get; set; }
}
public interface ContainerParentDataMixin<ChildType> : IParentData where ChildType : RenderObject {

2
com.unity.uiwidgets/Runtime/rendering/performance_overlay.cs


((optionsMask | (1 << (int) PerformanceOverlayOption.visualizeEngineStatistics)) > 0))
result += kDefaultGraphHeight;
return result;
return result;
}
}

1
com.unity.uiwidgets/Runtime/rendering/binding.cs


namespace Unity.UIWidgets.rendering {
public class RendererBinding : SchedulerBinding {
public new static RendererBinding instance {
get { return (RendererBinding) SchedulerBinding.instance; }
set { Window.instance._binding = value; }

19
com.unity.uiwidgets/Runtime/rendering/editable.cs


return _textPainter.textWidthBasis;
}
set {
D.assert(value != null);
if (_textPainter.textWidthBasis == value)
return;
_textPainter.textWidthBasis = value;

return _selectionHeightStyle;
}
set {
D.assert(value != null);
if (_selectionHeightStyle == value)
return;
_selectionHeightStyle = value;

return _selectionWidthStyle;
}
set {
D.assert(value != null);
if (_selectionWidthStyle == value)
return;
_selectionWidthStyle = value;

return _forceLine;
}
set {
D.assert(value != null);
if (_forceLine == value)
return;
_forceLine = value;

return _readOnly;
}
set {
D.assert(value != null);
if (_readOnly == value)
return;
_readOnly = value;

}
void _handleMoveCursorForwardByCharacter(bool extentSelection) {
int extentOffset = _textPainter.getOffsetAfter(_selection.extentOffset);
int? extentOffset = _textPainter.getOffsetAfter(_selection.extentOffset);
int baseOffset = !extentSelection ? extentOffset : _selection.baseOffset;
int baseOffset = !extentSelection ? extentOffset.Value : _selection.baseOffset;
new TextSelection(baseOffset: baseOffset, extentOffset: extentOffset), SelectionChangedCause.keyboard
new TextSelection(baseOffset: baseOffset, extentOffset: extentOffset.Value), SelectionChangedCause.keyboard
int extentOffset = _textPainter.getOffsetBefore(_selection.extentOffset);
int? extentOffset = _textPainter.getOffsetBefore(_selection.extentOffset);
int baseOffset = !extentSelection ? extentOffset : _selection.baseOffset;
int baseOffset = !extentSelection ? extentOffset.Value : _selection.baseOffset;
new TextSelection(baseOffset: baseOffset, extentOffset: extentOffset), SelectionChangedCause.keyboard
new TextSelection(baseOffset: baseOffset, extentOffset: extentOffset.Value), SelectionChangedCause.keyboard
);
}

Rect _caretPrototype;
void _layoutText( float minWidth = 0.0f, float maxWidth = float.PositiveInfinity ) {
D.assert(maxWidth != null && minWidth != null);
if (_textLayoutLastMaxWidth == maxWidth && _textLayoutLastMinWidth == minWidth)
return;
float availableMaxWidth = Mathf.Max(0.0f, maxWidth - _caretMargin);

return Rect.fromLTWH(0.0f, EditableUtils._kCaretHeightOffset, cursorWidth,
preferredLineHeight - 2.0f * EditableUtils._kCaretHeightOffset);
}
return null;
}
}

13
com.unity.uiwidgets/Runtime/rendering/box.cs


return true;
}
public float? getDistanceToBaseline(TextBaseline baseline, bool onlyReal = false) {
public float? getDistanceToBaseline(TextBaseline? baseline, bool onlyReal = false) {
D.assert(!_debugDoingBaseline,
() =>
"Please see the documentation for computeDistanceToActualBaseline for the required calling conventions of this method.");

return result;
}
public virtual float? getDistanceToActualBaseline(TextBaseline baseline) {
public float? getDistanceToActualBaseline(TextBaseline? baseline) {
//If there is no baseline, return null by default
if (baseline == null) {
return null;
}
return _cachedBaselines.putIfAbsent(baseline, () => computeDistanceToActualBaseline(baseline));
return _cachedBaselines.putIfAbsent(baseline.Value, () => computeDistanceToActualBaseline(baseline.Value));
}
public virtual float? computeDistanceToActualBaseline(TextBaseline baseline) {

32
com.unity.uiwidgets/Runtime/rendering/flex.cs


public CrossAxisAlignment _crossAxisAlignment;
public TextDirection textDirection {
public TextDirection? textDirection {
get { return _textDirection; }
set {
if (_textDirection == value) {

}
}
public TextDirection _textDirection;
public TextDirection? _textDirection;
public VerticalDirection verticalDirection {
public VerticalDirection? verticalDirection {
get { return _verticalDirection; }
set {
if (_verticalDirection == value) {

}
}
public VerticalDirection _verticalDirection;
public VerticalDirection? _verticalDirection;
public TextBaseline textBaseline {
get { return _textBaseline; }

// i.e. there's more than one child
switch (direction) {
case Axis.horizontal:
D.assert(textDirection != null, () => "Horizontal $runtimeType with multiple children has a null textDirection, so the layout order is undefined.");
D.assert(textDirection != null, () => $"Horizontal {GetType()} with multiple children has a null textDirection, so the layout order is undefined.");
D.assert(verticalDirection != null, () => "Vertical $runtimeType with multiple children has a null verticalDirection, so the layout order is undefined.");
D.assert(verticalDirection != null, () => $"Vertical {GetType()} with multiple children has a null verticalDirection, so the layout order is undefined.");
break;
}
}

case Axis.horizontal:
D.assert(textDirection != null, () => "Horizontal $runtimeType with $mainAxisAlignment has a null textDirection, so the alignment cannot be resolved.");
D.assert(textDirection != null, () => $"Horizontal {GetType()} with {mainAxisAlignment} has a null textDirection, so the alignment cannot be resolved.");
D.assert(verticalDirection != null, () => "Vertical $runtimeType with $mainAxisAlignment has a null verticalDirection, so the alignment cannot be resolved.");
D.assert(verticalDirection != null, () => $"Vertical {GetType()} with {mainAxisAlignment} has a null verticalDirection, so the alignment cannot be resolved.");
break;
}
}

case Axis.horizontal:
D.assert(verticalDirection != null, () => "Horizontal $runtimeType with $crossAxisAlignment has a null verticalDirection, so the alignment cannot be resolved.");
D.assert(verticalDirection != null, () => $"Horizontal {GetType()} with {crossAxisAlignment} has a null verticalDirection, so the alignment cannot be resolved.");
D.assert(textDirection != null, () => "Vertical $runtimeType with $crossAxisAlignment has a null textDirection, so the alignment cannot be resolved.");
D.assert(textDirection != null, () => $"Vertical {GetType()} with {crossAxisAlignment} has a null textDirection, so the alignment cannot be resolved.");
break;
}
}

}
}
static bool _startIsTopLeft(Axis direction, TextDirection textDirection,
VerticalDirection verticalDirection) {
static bool _startIsTopLeft(Axis direction, TextDirection? textDirection,
VerticalDirection? verticalDirection) {
switch (direction) {
case Axis.horizontal:
switch (textDirection) {

new ErrorDescription(
$"The edge of the {GetType()} that is overflowing has been marked " +
"in the rendering with a yellow and black striped pattern. This is " +
"usually caused by the contents being too big for the $runtimeType."
"usually caused by the contents being too big for the {GetType()}."
),
new ErrorHint(
"Consider applying a flex factor (e.g. using an Expanded widget) to " +

public override string toStringShort() {
string header = base.toStringShort();
if (_overflow is float && _hasOverflow)
if (_hasOverflow)
header += " OVERFLOWING";
return header;
}

properties.add(new EnumProperty<MainAxisAlignment>("mainAxisAlignment", mainAxisAlignment));
properties.add(new EnumProperty<MainAxisSize>("mainAxisSize", mainAxisSize));
properties.add(new EnumProperty<CrossAxisAlignment>("crossAxisAlignment", crossAxisAlignment));
properties.add(new EnumProperty<TextDirection>("textDirection", textDirection, defaultValue: null));
properties.add(new EnumProperty<VerticalDirection>("verticalDirection", verticalDirection, defaultValue: null));
properties.add(new EnumProperty<TextDirection?>("textDirection", textDirection, defaultValue: null));
properties.add(new EnumProperty<VerticalDirection?>("verticalDirection", verticalDirection, defaultValue: null));
properties.add(new EnumProperty<TextBaseline>("textBaseline", textBaseline, defaultValue: null));
}
}

13
com.unity.uiwidgets/Runtime/rendering/layer.cs


public class TextureLayer : Layer {
public TextureLayer(
Rect rect,
int textureId,
int? textureId,
this.textureId = textureId;
this.textureId = textureId.Value;
this.freeze = freeze;
}

layerOffset = layerOffset ?? Offset.zero;
D.assert(shader != null);
D.assert(maskRect != null);
D.assert(blendMode != null);
D.assert(layerOffset != null);
Rect shiftedMaskRect = layerOffset == Offset.zero ? maskRect : maskRect.shift(layerOffset);
engineLayer = builder.pushShaderMask(

public Clip clipBehavior {
get { return _clipBehavior; }
set {
D.assert(value != null);
D.assert(value != Clip.none);
if (value != _clipBehavior) {
_clipBehavior = value;

public Clip clipBehavior {
get { return _clipBehavior; }
set {
D.assert(value != null);
D.assert(value != Clip.none);
if (value != _clipBehavior) {
_clipBehavior = value;

Path clipPath = null,
Clip clipBehavior = Clip.antiAlias
) {
D.assert(clipBehavior != null);
D.assert(clipBehavior != Clip.none);
_clipPath = clipPath;
_clipBehavior = clipBehavior;

public Clip clipBehavior {
get { return _clipBehavior; }
set {
D.assert(value != null);
D.assert(value != Clip.none);
if (value != _clipBehavior) {
_clipBehavior = value;

public int alpha {
get { return _alpha; }
set {
D.assert(value != null);
if (value != _alpha) {
_alpha = value;
markNeedsAddToScene();

public override void addToScene(SceneBuilder builder, Offset layerOffset = null) {
layerOffset = layerOffset ?? Offset.zero;
D.assert(alpha != null);
bool enabled = firstChild != null;
D.assert(() => {
enabled = enabled && !D.debugDisableOpacityLayers;

}
public override void addToScene(SceneBuilder builder, Offset layerOffset = null) {
D.assert(optionsMask != null);
layerOffset = layerOffset ?? Offset.zero;
var shiftedOverlayRect = layerOffset == Offset.zero ? overlayRect : overlayRect.shift(layerOffset);

2
com.unity.uiwidgets/Runtime/rendering/list_body.cs


AxisDirection _axisDirection;
public Axis mainAxis {
public Axis? mainAxis {
get { return AxisUtils.axisDirectionToAxis(axisDirection); }
}

部分文件因为文件数量过多而无法显示

正在加载...
取消
保存