浏览代码

Merge branch 'zgh/cupertino/fix' of https://github.com/Unity-Technologies/com.unity.uiwidgets into zgh/cupertino/fix

/zgh-devtools
Shiyun Wen 4 年前
当前提交
8fd690c9
共有 159 个文件被更改,包括 1643 次插入549 次删除
  1. 1
      Samples/UIWidgetsSamples_2019_4/Assets/MaterialSample/MaterialTabBarSample.cs
  2. 4
      Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/cupertino/cupertino_navigation_demo.cs
  3. 86
      Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/backdrop_demo.cs
  4. 3
      Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/bottom_app_bar_demo.cs
  5. 10
      Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/cards_demo.cs
  6. 10
      Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/chip_demo.cs
  7. 6
      Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/data_table_demo.cs
  8. 4
      Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/dialog_demo.cs
  9. 6
      Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/drawer_demo.cs
  10. 28
      Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/shrine/shopping_cart.cs
  11. 3
      Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/shrine/supplemental/product_card.cs
  12. 8
      Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/gallery/demo.cs
  13. 482
      Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/gallery/demos.cs
  14. 6
      com.unity.uiwidgets/Editor/UIWidgetsPanelEditor.cs
  15. 23
      com.unity.uiwidgets/Runtime/animation/animation_controller.cs
  16. 2
      com.unity.uiwidgets/Runtime/animation/curves.cs
  17. 4
      com.unity.uiwidgets/Runtime/cupertino/date_picker.cs
  18. 4
      com.unity.uiwidgets/Runtime/cupertino/route.cs
  19. 8
      com.unity.uiwidgets/Runtime/cupertino/slider.cs
  20. 4
      com.unity.uiwidgets/Runtime/cupertino/switch.cs
  21. 21
      com.unity.uiwidgets/Runtime/engine2/UIWidgetsPanel.cs
  22. 5
      com.unity.uiwidgets/Runtime/foundation/debug.cs
  23. 3
      com.unity.uiwidgets/Runtime/gestures/multidrag.cs
  24. 4
      com.unity.uiwidgets/Runtime/material/animated_icons/animated_icons.cs
  25. 2
      com.unity.uiwidgets/Runtime/material/app_bar_theme.cs
  26. 4
      com.unity.uiwidgets/Runtime/material/arc.cs
  27. 3
      com.unity.uiwidgets/Runtime/material/bottom_app_bar_theme.cs
  28. 7
      com.unity.uiwidgets/Runtime/material/bottom_sheet.cs
  29. 27
      com.unity.uiwidgets/Runtime/material/button_bar_theme.cs
  30. 4
      com.unity.uiwidgets/Runtime/material/button_sheet_theme.cs
  31. 2
      com.unity.uiwidgets/Runtime/material/card_theme.cs
  32. 5
      com.unity.uiwidgets/Runtime/material/checkbox_list_tile.cs
  33. 4
      com.unity.uiwidgets/Runtime/material/chip_theme.cs
  34. 29
      com.unity.uiwidgets/Runtime/material/data_table.cs
  35. 6
      com.unity.uiwidgets/Runtime/material/data_table_source.cs
  36. 3
      com.unity.uiwidgets/Runtime/material/dialog_theme.cs
  37. 9
      com.unity.uiwidgets/Runtime/material/divider_theme.cs
  38. 9
      com.unity.uiwidgets/Runtime/material/dropdown.cs
  39. 11
      com.unity.uiwidgets/Runtime/material/floatting_action_button_theme.cs
  40. 2
      com.unity.uiwidgets/Runtime/material/grid_tile_bar.cs
  41. 4
      com.unity.uiwidgets/Runtime/material/icon_button.cs
  42. 3
      com.unity.uiwidgets/Runtime/material/ink_decoration.cs
  43. 2
      com.unity.uiwidgets/Runtime/material/input_border.cs
  44. 4
      com.unity.uiwidgets/Runtime/material/input_decorator.cs
  45. 2
      com.unity.uiwidgets/Runtime/material/mergeable_material.cs
  46. 10
      com.unity.uiwidgets/Runtime/material/navigation_rail.cs
  47. 7
      com.unity.uiwidgets/Runtime/material/navigation_rail_theme.cs
  48. 1
      com.unity.uiwidgets/Runtime/material/paginated_data_table.cs
  49. 15
      com.unity.uiwidgets/Runtime/material/popup_menu.cs
  50. 6
      com.unity.uiwidgets/Runtime/material/popup_menu_theme.cs
  51. 13
      com.unity.uiwidgets/Runtime/material/radio.cs
  52. 8
      com.unity.uiwidgets/Runtime/material/range_slider.cs
  53. 4
      com.unity.uiwidgets/Runtime/material/ratio_list_tile.cs
  54. 2
      com.unity.uiwidgets/Runtime/material/refresh_indicator.cs
  55. 38
      com.unity.uiwidgets/Runtime/material/scaffold.cs
  56. 6
      com.unity.uiwidgets/Runtime/material/scrollbar.cs
  57. 4
      com.unity.uiwidgets/Runtime/material/slider_theme.cs
  58. 3
      com.unity.uiwidgets/Runtime/material/snack_bar_theme.cs
  59. 1
      com.unity.uiwidgets/Runtime/material/switch.cs
  60. 86
      com.unity.uiwidgets/Runtime/material/theme_data.cs
  61. 2
      com.unity.uiwidgets/Runtime/material/time_picker.cs
  62. 22
      com.unity.uiwidgets/Runtime/painting/alignment.cs
  63. 2
      com.unity.uiwidgets/Runtime/painting/borders.cs
  64. 4
      com.unity.uiwidgets/Runtime/painting/box_shadow.cs
  65. 8
      com.unity.uiwidgets/Runtime/painting/colors.cs
  66. 6
      com.unity.uiwidgets/Runtime/painting/decoration_image.cs
  67. 28
      com.unity.uiwidgets/Runtime/painting/edge_insets.cs
  68. 6
      com.unity.uiwidgets/Runtime/painting/fractional_offset.cs
  69. 44
      com.unity.uiwidgets/Runtime/painting/gradient.cs
  70. 10
      com.unity.uiwidgets/Runtime/painting/matrix_utils.cs
  71. 4
      com.unity.uiwidgets/Runtime/painting/rounded_rectangle_border.cs
  72. 8
      com.unity.uiwidgets/Runtime/painting/stadium_border.cs
  73. 2
      com.unity.uiwidgets/Runtime/painting/text_style.cs
  74. 8
      com.unity.uiwidgets/Runtime/rendering/box.cs
  75. 4
      com.unity.uiwidgets/Runtime/rendering/editable.cs
  76. 8
      com.unity.uiwidgets/Runtime/rendering/stack.cs
  77. 11
      com.unity.uiwidgets/Runtime/ui2/Matrix4.cs
  78. 28
      com.unity.uiwidgets/Runtime/ui2/geometry.cs
  79. 10
      com.unity.uiwidgets/Runtime/ui2/painting.cs
  80. 2
      com.unity.uiwidgets/Runtime/ui2/text.cs
  81. 8
      com.unity.uiwidgets/Runtime/widgets/animated_cross_fade.cs
  82. 87
      com.unity.uiwidgets/Runtime/widgets/dismissible.cs
  83. 4
      com.unity.uiwidgets/Runtime/widgets/editable_text.cs
  84. 4
      com.unity.uiwidgets/Runtime/widgets/focus_manager.cs
  85. 8
      com.unity.uiwidgets/Runtime/widgets/form.cs
  86. 4
      com.unity.uiwidgets/Runtime/widgets/framework.cs
  87. 4
      com.unity.uiwidgets/Runtime/widgets/navigator.cs
  88. 2
      com.unity.uiwidgets/Runtime/widgets/nested_scroll_view.cs
  89. 24
      com.unity.uiwidgets/Runtime/widgets/routes.cs
  90. 3
      com.unity.uiwidgets/Runtime/widgets/scroll_position.cs
  91. 6
      com.unity.uiwidgets/Runtime/widgets/transitions.cs
  92. 2
      engine/src/shell/platform/unity/darwin/macos/uiwidgets_panel.h
  93. 24
      engine/src/shell/platform/unity/darwin/macos/uiwidgets_panel.mm
  94. 23
      engine/src/shell/platform/unity/darwin/macos/unity_surface_manager.mm
  95. 112
      Samples/UIWidgetsSamples_2019_4/Assets/MaterialSample/NavigatorPopSample.cs
  96. 549
      Samples/UIWidgetsSamples_2019_4/Assets/Scene/GalleryTest.unity
  97. 7
      Samples/UIWidgetsSamples_2019_4/Assets/Scene/GalleryTest.unity.meta
  98. 8
      Samples/UIWidgetsSamples_2019_4/Assets/StreamingAssets/gallery/people.meta
  99. 7
      Samples/UIWidgetsSamples_2019_4/Assets/StreamingAssets/gallery/people/ali_landscape.png.meta
  100. 8
      Samples/UIWidgetsSamples_2019_4/Assets/StreamingAssets/gallery/people/square.meta

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


using Unity.UIWidgets.painting;
using Unity.UIWidgets.ui;
using Unity.UIWidgets.widgets;
using UnityEngine;
using ui_ = Unity.UIWidgets.widgets.ui_;
namespace UIWidgetsSample {

4
Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/cupertino/cupertino_navigation_demo.cs


decoration: new BoxDecoration(
image: new DecorationImage(
image: new FileImage(
file: "people/square/trevor.png"
file: "gallery/people/square/trevor.png"
)
),
shape: BoxShape.circle

decoration: new BoxDecoration(
image: new DecorationImage(
image: new FileImage(
"people/square/sandra.png"
"gallery/people/square/sandra.png"
)
),
shape: BoxShape.circle

86
Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/backdrop_demo.cs


title: "Accessories",
assets: new List<string>
{
"StreamingAssets/gallery/products/belt.png",
"StreamingAssets/gallery/products/earrings.png",
"StreamingAssets/gallery/products/backpack.png",
"StreamingAssets/gallery/products/hat.png",
"StreamingAssets/gallery/products/scarf.png",
"StreamingAssets/gallery/products/sunnies.png"
"gallery/products/belt.png",
"gallery/products/earrings.png",
"gallery/products/backpack.png",
"gallery/products/hat.png",
"gallery/products/scarf.png",
"gallery/products/sunnies.png"
}
),
new Category(

"StreamingAssets/gallery/products/backpack.png",
"StreamingAssets/gallery/products/cup.png",
"StreamingAssets/gallery/products/napkins.png",
"StreamingAssets/gallery/products/top.png"
"gallery/products/backpack.png",
"gallery/products/cup.png",
"gallery/products/napkins.png",
"gallery/products/top.png"
}
),
new Category(

"StreamingAssets/gallery/products/jacket.png",
"StreamingAssets/gallery/products/jumper.png",
"StreamingAssets/gallery/products/scarf.png",
"StreamingAssets/gallery/products/sweater.png",
"StreamingAssets/gallery/products/sweats.png"
"gallery/products/jacket.png",
"gallery/products/jumper.png",
"gallery/products/scarf.png",
"gallery/products/sweater.png",
"gallery/products/sweats.png"
}
),
new Category(

"StreamingAssets/gallery/products/cup.png",
"StreamingAssets/gallery/products/napkins.png",
"StreamingAssets/gallery/products/planters.png",
"StreamingAssets/gallery/products/table.png",
"StreamingAssets/gallery/products/teaset.png"
"gallery/products/cup.png",
"gallery/products/napkins.png",
"gallery/products/planters.png",
"gallery/products/table.png",
"gallery/products/teaset.png"
}
),
new Category(

"StreamingAssets/gallery/products/jumper.png",
"StreamingAssets/gallery/products/shirt.png",
"StreamingAssets/gallery/products/sweater.png",
"StreamingAssets/gallery/products/top.png"
"gallery/products/jumper.png",
"gallery/products/shirt.png",
"gallery/products/sweater.png",
"gallery/products/top.png"
}
),
new Category(

"StreamingAssets/gallery/products/backpack.png",
"StreamingAssets/gallery/products/belt.png",
"StreamingAssets/gallery/products/cup.png",
"StreamingAssets/gallery/products/dress.png",
"StreamingAssets/gallery/products/earrings.png",
"StreamingAssets/gallery/products/flatwear.png",
"StreamingAssets/gallery/products/hat.png",
"StreamingAssets/gallery/products/jacket.png",
"StreamingAssets/gallery/products/jumper.png",
"StreamingAssets/gallery/products/napkins.png",
"StreamingAssets/gallery/products/planters.png",
"StreamingAssets/gallery/products/scarf.png",
"StreamingAssets/gallery/products/shirt.png",
"StreamingAssets/gallery/products/sunnies.png",
"StreamingAssets/gallery/products/sweater.png",
"StreamingAssets/gallery/products/sweats.png",
"StreamingAssets/gallery/products/table.png",
"StreamingAssets/gallery/products/teaset.png",
"StreamingAssets/gallery/products/top.png"
"gallery/products/backpack.png",
"gallery/products/belt.png",
"gallery/products/cup.png",
"gallery/products/dress.png",
"gallery/products/earrings.png",
"gallery/products/flatwear.png",
"gallery/products/hat.png",
"gallery/products/jacket.png",
"gallery/products/jumper.png",
"gallery/products/napkins.png",
"gallery/products/planters.png",
"gallery/products/scarf.png",
"gallery/products/shirt.png",
"gallery/products/sunnies.png",
"gallery/products/sweater.png",
"gallery/products/sweats.png",
"gallery/products/table.png",
"gallery/products/teaset.png",
"gallery/products/top.png"
}
)
};

3
Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/bottom_app_bar_demo.cs


public override Path getOuterPath(Rect host, Rect guest)
{
if (!host.overlaps(guest))
//there is a bug in flutter when guest == null, we fix it here
if (guest == null || !host.overlaps(guest))
{
var path = new Path();
path.addRect(host);

10
Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/cards_demo.cs


{
public static class CardsDemoUtils
{
public static readonly string _kGalleryAssetsPackage = "flutter_gallery_assets";
public static readonly string _kGalleryAssetsPackage = "gallery/";
}
internal enum CardDemoType

D.assert(description != null);
D.assert(city != null);
D.assert(location != null);
this.assetName = assetName;
this.assetPackage = assetPackage;
this.title = title;
this.description = description;
this.city = city;
this.location = location;
this.type = type;
}
public readonly string assetName;

10
Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/chip_demo.cs


public static readonly Dictionary<string, string> _avatars = new Dictionary<string, string>()
{
{"hammer", "people/square/ali.png"},
{"chisel", "people/square/sandra.png"},
{"fryer", "people/square/trevor.png"},
{"fabricator", "people/square/stella.png"},
{"customer", "people/square/peter.png"},
{"hammer", "gallery/people/square/ali.png"},
{"chisel", "gallery/people/square/sandra.png"},
{"fryer", "gallery/people/square/trevor.png"},
{"fabricator", "gallery/people/square/stella.png"},
{"customer", "gallery/people/square/peter.png"},
};
public static readonly Dictionary<string, HashSet<string>> _toolActions =

6
Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/data_table_demo.cs


);
}
private new int rowCount => this._desserts.Count;
public override int rowCount => this._desserts.Count;
private new bool isRowCountApproximate => false;
public override bool isRowCountApproximate => false;
private new int selectedRowCount => this._selectedCount;
public override int selectedRowCount => this._selectedCount;
public void _selectAll(bool isChecked)
{

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


readonly GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>.key();
TimeOfDay _selectedTime;
void initState() {
public override void initState() {
base.initState();
DateTime now = DateTime.Now;
_selectedTime = new TimeOfDay(hour: now.Hour, minute: now.Minute);

6
Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/material/drawer_demo.cs


{
public static class DrawerDemoUtils
{
public static readonly string _kAsset0 = "people/square/trevor.png";
public static readonly string _kAsset1 = "people/square/stella.png";
public static readonly string _kAsset2 = "people/square/sandra.png";
public static readonly string _kAsset0 = "gallery/people/square/trevor.png";
public static readonly string _kAsset1 = "gallery/people/square/stella.png";
public static readonly string _kAsset2 = "gallery/people/square/sandra.png";
public static readonly string _kGalleryAssetsPackage = "flutter_gallery_assets";
}

28
Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/shrine/shopping_cart.cs


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

List<Widget> _createShoppingCartRows(AppStateModel model)
{
List<Widget> widgets = new List<Widget>();
for (int id = 0; id < model.productsInCart.Count; id++)
foreach (var product in model.productsInCart.Keys)
widgets.Add(new ShoppingCartRow(
product: model.getProductById(id),
quantity: model.productsInCart[id],
onPressed: ()=> {
model.removeItemFromCart(id);
}
));
int id = product;
widgets.Add(new ShoppingCartRow(
product: model.getProductById(id),
quantity: model.productsInCart[id],
onPressed: ()=> {
model.removeItemFromCart(id);
}
));
}
return widgets;

public class ShoppingCartRow : StatelessWidget {
public ShoppingCartRow(
Product product = null,
int? quantity = null,
int quantity = 1,
this.quantity = quantity?? 0;
this.quantity = quantity;
this.onPressed = onPressed;
}

new Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: new List<Widget>{
Image.asset(
Image.file(
package: product.assetPackage,
//package: product.assetPackage,
fit: BoxFit.cover,
width: 75.0f,
height: 75.0f

new Expanded(
child: new Text($"Quantity: {quantity}")
),
new Text($"x $ {product.price : D} ")
new Text($"x $ {product.price :F} ")
}
),
new Text(

3
Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/demo/shrine/supplemental/product_card.cs


using Unity.UIWidgets.painting;
using Unity.UIWidgets.rendering;
using Unity.UIWidgets.widgets;
using UnityEngine;
namespace UIWidgetsGallery.demo.shrine.supplemental
{

),
new SizedBox(height: 4.0f),
new Text(
$" $ { product.price:D}",
$" $ { product.price:F}",
style: theme.textTheme.caption
),
}

8
Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsGallery/gallery/demo.cs


public TabbedComponentDemoScaffold(
List<ComponentDemoTabData> demos,
string title,
List<Widget> actions,
List<Widget> actions = null,
bool isScrollable = true,
bool showExampleCodeAction = true
)

public override Widget build(BuildContext context)
{
var children = new List<Widget>(this.actions);
var children = new List<Widget>();
if (actions != null)
{
children.AddRange(actions);
}
children.Add(new Builder(
builder: (BuildContext subContext) =>
{

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


using System;
using Unity.UIWidgets.material;
using UnityEngine;
namespace UIWidgetsGallery.gallery
{

string name,
string name,
if (ReferenceEquals(this, other))
{
return true;
}
if (ReferenceEquals(this, other)) return true;
if (ReferenceEquals(other, null))
{
return false;
}
if (ReferenceEquals(other, null)) return false;
return this.icon.Equals(other.icon) && this.name == other.name;
return icon.Equals(other.icon) && name == other.name;
if (ReferenceEquals(this, obj))
{
return true;
}
if (ReferenceEquals(this, obj)) return true;
if (ReferenceEquals(obj, null)) return false;
if (obj.GetType() != GetType()) return false;
if (ReferenceEquals(obj, null))
{
return false;
}
if (obj.GetType() != GetType())
{
return false;
}
return Equals((GalleryDemoCategory)obj);
return Equals((GalleryDemoCategory) obj);
public static bool operator==(GalleryDemoCategory left, GalleryDemoCategory right)
public static bool operator ==(GalleryDemoCategory left, GalleryDemoCategory right)
{
return Equals(left, right);
}

return !Equals(left, right);
}
public override int GetHashCode() {
unchecked {
public override int GetHashCode()
{
unchecked
{
return ((icon?.GetHashCode() ?? 0) * 397) ^ (name?.GetHashCode() ?? 0);
}
}

return $"{GetType()}{name}";
}
public static readonly GalleryDemoCategory _kStyle = new GalleryDemoCategory(
public static readonly GalleryDemoCategory _kStyle = new GalleryDemoCategory(
public static readonly GalleryDemoCategory _kMaterialComponents = new GalleryDemoCategory(
public static readonly GalleryDemoCategory _kMaterialComponents = new GalleryDemoCategory(
public static readonly GalleryDemoCategory _kCupertinoComponents = new GalleryDemoCategory(
public static readonly GalleryDemoCategory _kCupertinoComponents = new GalleryDemoCategory(
public static readonly GalleryDemoCategory _kMedia = new GalleryDemoCategory(
public static readonly GalleryDemoCategory _kMedia = new GalleryDemoCategory(
class GalleryDemo {
internal class GalleryDemo
{
public GalleryDemo(
string title = null,
IconData icon = null,

}
public readonly string title;
public readonly IconData icon;
public readonly string subtitle;
public readonly GalleryDemoCategory category;
public readonly string routeName;
public readonly WidgetBuilder buildRoute;
public readonly string documentationUrl;
public override string ToString() {
public readonly IconData icon;
public readonly string subtitle;
public readonly GalleryDemoCategory category;
public readonly string routeName;
public readonly WidgetBuilder buildRoute;
public readonly string documentationUrl;
public override string ToString()
{
List<GalleryDemo> cupertinoDemos = new List<GalleryDemo>()
List<GalleryDemo> galleryDemos = new List<GalleryDemo>()
title: "Activity Indicator",
icon: GalleryIcons.cupertino_progress,
category:GalleryDemoCategory._kCupertinoComponents,
routeName: CupertinoProgressIndicatorDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoActivityIndicator-class.html",
buildRoute: (BuildContext context) => new CupertinoProgressIndicatorDemo()
title: "Activity Indicator",
icon: GalleryIcons.cupertino_progress,
category: GalleryDemoCategory._kCupertinoComponents,
routeName: CupertinoProgressIndicatorDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoActivityIndicator-class.html",
buildRoute: (BuildContext context) => new CupertinoProgressIndicatorDemo()
title: "Alerts",
icon: GalleryIcons.dialogs,
category:GalleryDemoCategory._kCupertinoComponents,
routeName: CupertinoAlertDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/cupertino/showCupertinoDialog.html",
buildRoute: (BuildContext context) => new CupertinoAlertDemo()
title: "Alerts",
icon: GalleryIcons.dialogs,
category: GalleryDemoCategory._kCupertinoComponents,
routeName: CupertinoAlertDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/cupertino/showCupertinoDialog.html",
buildRoute: (BuildContext context) => new CupertinoAlertDemo()
title: "Buttons",
icon: GalleryIcons.generic_buttons,
category:GalleryDemoCategory._kCupertinoComponents,
routeName: CupertinoButtonsDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoButton-class.html",
buildRoute: (BuildContext context) => new CupertinoButtonsDemo()
title: "Buttons",
icon: GalleryIcons.generic_buttons,
category: GalleryDemoCategory._kCupertinoComponents,
routeName: CupertinoButtonsDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoButton-class.html",
buildRoute: (BuildContext context) => new CupertinoButtonsDemo()
title: "Navigation",
icon: GalleryIcons.bottom_navigation,
category:GalleryDemoCategory._kCupertinoComponents,
routeName: CupertinoNavigationDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoTabScaffold-class.html",
buildRoute: (BuildContext context) => new CupertinoNavigationDemo()
title: "Navigation",
icon: GalleryIcons.bottom_navigation,
category: GalleryDemoCategory._kCupertinoComponents,
routeName: CupertinoNavigationDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoTabScaffold-class.html",
buildRoute: (BuildContext context) => new CupertinoNavigationDemo()
title: "Pickers",
icon: GalleryIcons.cards,
category:GalleryDemoCategory._kCupertinoComponents,
routeName: CupertinoPickerDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoPicker-class.html",
buildRoute: (BuildContext context) => new CupertinoPickerDemo()
title: "Pickers",
icon: GalleryIcons.cards,
category: GalleryDemoCategory._kCupertinoComponents,
routeName: CupertinoPickerDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoPicker-class.html",
buildRoute: (BuildContext context) => new CupertinoPickerDemo()
title: "Pull to refresh",
icon: GalleryIcons.cupertino_pull_to_refresh,
category:GalleryDemoCategory._kCupertinoComponents,
routeName: CupertinoRefreshControlDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoSliverRefreshControl-class.html",
buildRoute: (BuildContext context) => new CupertinoRefreshControlDemo()
title: "Pull to refresh",
icon: GalleryIcons.cupertino_pull_to_refresh,
category: GalleryDemoCategory._kCupertinoComponents,
routeName: CupertinoRefreshControlDemo.routeName,
documentationUrl:
"https://docs.flutter.io/flutter/cupertino/CupertinoSliverRefreshControl-class.html",
buildRoute: (BuildContext context) => new CupertinoRefreshControlDemo()
title: "Segmented Control",
icon: GalleryIcons.tabs,
category:GalleryDemoCategory._kCupertinoComponents,
routeName: CupertinoSegmentedControlDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoSegmentedControl-class.html",
buildRoute: (BuildContext context) => new CupertinoSegmentedControlDemo()
title: "Segmented Control",
icon: GalleryIcons.tabs,
category: GalleryDemoCategory._kCupertinoComponents,
routeName: CupertinoSegmentedControlDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoSegmentedControl-class.html",
buildRoute: (BuildContext context) => new CupertinoSegmentedControlDemo()
title: "Sliders",
icon: GalleryIcons.sliders,
category:GalleryDemoCategory._kCupertinoComponents,
routeName: CupertinoSliderDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoSlider-class.html",
buildRoute: (BuildContext context) => new CupertinoSliderDemo()
title: "Sliders",
icon: GalleryIcons.sliders,
category: GalleryDemoCategory._kCupertinoComponents,
routeName: CupertinoSliderDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoSlider-class.html",
buildRoute: (BuildContext context) => new CupertinoSliderDemo()
title: "Switches",
icon: GalleryIcons.cupertino_switch,
category:GalleryDemoCategory._kCupertinoComponents,
routeName: CupertinoSwitchDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoSwitch-class.html",
buildRoute: (BuildContext context) => new CupertinoSwitchDemo()
title: "Switches",
icon: GalleryIcons.cupertino_switch,
category: GalleryDemoCategory._kCupertinoComponents,
routeName: CupertinoSwitchDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoSwitch-class.html",
buildRoute: (BuildContext context) => new CupertinoSwitchDemo()
title: "Text Fields",
icon: GalleryIcons.text_fields_alt,
category:GalleryDemoCategory._kCupertinoComponents,
routeName: CupertinoTextFieldDemo.routeName,
buildRoute: (BuildContext context) => new CupertinoTextFieldDemo()
)
};
List<GalleryDemo> galleryDemos = new List<GalleryDemo>
{
title: "Text Fields",
icon: GalleryIcons.text_fields_alt,
category: GalleryDemoCategory._kCupertinoComponents,
routeName: CupertinoTextFieldDemo.routeName,
buildRoute: (BuildContext context) => new CupertinoTextFieldDemo()
),
new GalleryDemo(
title: "Shrine",
subtitle: "Basic shopping app",

buildRoute: (BuildContext context) => new BottomNavigationDemo()
),
new GalleryDemo(
title: "Bottom sheet: Modal",
subtitle: "A dismissable bottom sheet",
icon: GalleryIcons.bottom_sheets,
category: GalleryDemoCategory._kMaterialComponents,
routeName: ModalBottomSheetDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/material/showModalBottomSheet.html",
buildRoute: (BuildContext context) => new ModalBottomSheetDemo()
),
new GalleryDemo(
title: "Bottom sheet: Persistent",
subtitle: "A bottom sheet that sticks around",
icon: GalleryIcons.bottom_sheet_persistent,
category: GalleryDemoCategory._kMaterialComponents,
routeName: PersistentBottomSheetDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/material/ScaffoldState/showBottomSheet.html",
buildRoute: (BuildContext context) => new PersistentBottomSheetDemo()
),
new GalleryDemo(
title: "Buttons",
subtitle: "Flat, raised, dropdown, and more",
icon: GalleryIcons.generic_buttons,

),
new GalleryDemo(
title: "Cards",
subtitle: "Baseline cards with rounded corners",
icon: GalleryIcons.cards,
category: GalleryDemoCategory._kMaterialComponents,
routeName: CardsDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/material/Card-class.html",
buildRoute: (BuildContext context) => new CardsDemo()
),
new GalleryDemo(
title: "Buttons: Floating Action Button",
subtitle: "FAB with transitions",
icon: GalleryIcons.buttons,
category: GalleryDemoCategory._kMaterialComponents,
routeName: TabsFabDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/material/FloatingActionButton-class.html",
buildRoute: (BuildContext context) => new TabsFabDemo()
),
new GalleryDemo(
title: "Chips",
subtitle: "Labeled with delete buttons and avatars",
icon: GalleryIcons.chips,
category: GalleryDemoCategory._kMaterialComponents,
routeName: ChipDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/material/Chip-class.html",
buildRoute: (BuildContext context) => new ChipDemo()
),
new GalleryDemo(
title: "Data tables",
subtitle: "Rows and columns",
icon: GalleryIcons.data_table,
category: GalleryDemoCategory._kMaterialComponents,
routeName: DataTableDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/material/PaginatedDataTable-class.html",
buildRoute: (BuildContext context) => new DataTableDemo()
),
new GalleryDemo(
title: "Pull to refresh",
subtitle: "Refresh indicators",
icon: GalleryIcons.refresh,
category: GalleryDemoCategory._kMaterialComponents,
routeName: OverscrollDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/material/RefreshIndicator-class.html",
buildRoute: (BuildContext context) => new OverscrollDemo()
),
new GalleryDemo(
title: "Search",
subtitle: "Expandable search",
icon: Icons.search,
category: GalleryDemoCategory._kMaterialComponents,
routeName: SearchDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/material/showSearch.html",
buildRoute: (BuildContext context) => new SearchDemo()
),
new GalleryDemo(
title: "Selection controls",
subtitle: "Checkboxes, radio buttons, and switches",
icon: GalleryIcons.check_box,
category: GalleryDemoCategory._kMaterialComponents,
routeName: SelectionControlsDemo.routeName,
buildRoute: (BuildContext context) => new SelectionControlsDemo()
),
new GalleryDemo(
title: "Sliders",
subtitle: "Widgets for selecting a value by swiping",
icon: GalleryIcons.sliders,
category: GalleryDemoCategory._kMaterialComponents,
routeName: SliderDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/material/Slider-class.html",
buildRoute: (BuildContext context) => new SliderDemo()
),
new GalleryDemo(
title: "Snackbar",
subtitle: "Temporary messaging",
icon: GalleryIcons.snackbar,
category: GalleryDemoCategory._kMaterialComponents,
routeName: SnackBarDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/material/ScaffoldState/showSnackBar.html",
buildRoute: (BuildContext context) => new SnackBarDemo()
),
new GalleryDemo(
title: "Tabs",
subtitle: "Tabs with independently scrollable views",
icon: GalleryIcons.tabs,
category: GalleryDemoCategory._kMaterialComponents,
routeName: TabsDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/material/TabBarView-class.html",
buildRoute: (BuildContext context) => new TabsDemo()
),
new GalleryDemo(
title: "Dialogs",
subtitle: "Simple, alert, and fullscreen",
icon: GalleryIcons.dialogs,
category: GalleryDemoCategory._kMaterialComponents,
routeName: DialogDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/material/showDialog.html",
buildRoute: (BuildContext context) => new DialogDemo()
),
new GalleryDemo(
title: "Elevations",
subtitle: "Shadow values on cards",
// TODO(larche): Change to custom icon for elevations when one exists.
icon: GalleryIcons.cupertino_progress,
category: GalleryDemoCategory._kMaterialComponents,
routeName: ElevationDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/material/Material/elevation.html",
buildRoute: (BuildContext context) => new ElevationDemo()
),
new GalleryDemo(
title: "Navigation drawer",
subtitle: "Navigation drawer with standard header",
icon: GalleryIcons.menu,
category: GalleryDemoCategory._kMaterialComponents,
routeName: DrawerDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/material/Drawer-class.html",
buildRoute: (BuildContext context) => new DrawerDemo()
),
new GalleryDemo(
title: "Expansion panels",
subtitle: "List of expanding panels",
icon: GalleryIcons.expand_all,
category: GalleryDemoCategory._kMaterialComponents,
routeName: ExpansionPanelsDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/material/ExpansionPanel-class.html",
buildRoute: (BuildContext context) => new ExpansionPanelsDemo()
),
new GalleryDemo(
title: "Grid",
subtitle: "Row and column layout",
icon: GalleryIcons.grid_on,
category: GalleryDemoCategory._kMaterialComponents,
routeName: GridListDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/widgets/GridView-class.html",
buildRoute: (BuildContext context) => new GridListDemo()
),
new GalleryDemo(
title: "Icons",
subtitle: "Enabled and disabled icons with opacity",
icon: GalleryIcons.sentiment_very_satisfied,
category: GalleryDemoCategory._kMaterialComponents,
routeName: IconsDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/material/IconButton-class.html",
buildRoute: (BuildContext context) => new IconsDemo()
),
new GalleryDemo(
title: "Lists",
subtitle: "Scrolling list layouts",
icon: GalleryIcons.list_alt,
category: GalleryDemoCategory._kMaterialComponents,
routeName: ListDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/material/ListTile-class.html",
buildRoute: (BuildContext context) => new ListDemo()
),
new GalleryDemo(
title: "Lists: leave-behind list items",
subtitle: "List items with hidden actions",
icon: GalleryIcons.lists_leave_behind,
category: GalleryDemoCategory._kMaterialComponents,
routeName: LeaveBehindDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/widgets/Dismissible-class.html",
buildRoute: (BuildContext context) => new LeaveBehindDemo()
),
new GalleryDemo(
title: "Lists: reorderable",
subtitle: "Reorderable lists",
icon: GalleryIcons.list_alt,
category: GalleryDemoCategory._kMaterialComponents,
routeName: ReorderableListDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/material/ReorderableListView-class.html",
buildRoute: (BuildContext context) => new ReorderableListDemo()
),
new GalleryDemo(
title: "Menus",
subtitle: "Menu buttons and simple menus",
icon: GalleryIcons.more_vert,
category: GalleryDemoCategory._kMaterialComponents,
routeName: MenuDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/material/PopupMenuButton-class.html",
buildRoute: (BuildContext context) => new MenuDemo()
),
new GalleryDemo(
title: "Pagination",
subtitle: "PageView with indicator",
icon: GalleryIcons.page_control,
category: GalleryDemoCategory._kMaterialComponents,
routeName: PageSelectorDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/material/TabBarView-class.html",
buildRoute: (BuildContext context) => new PageSelectorDemo()
),
new GalleryDemo(
title: "Progress indicators",
subtitle: "Linear, circular, indeterminate",
icon: GalleryIcons.progress_activity,
category: GalleryDemoCategory._kMaterialComponents,
routeName: ProgressIndicatorDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/material/LinearProgressIndicator-class.html",
buildRoute: (BuildContext context) => new ProgressIndicatorDemo()
),
new GalleryDemo(
title: "Tabs: Scrolling",
subtitle: "Tab bar that scrolls",
category: GalleryDemoCategory._kMaterialComponents,
icon: GalleryIcons.tabs,
routeName: ScrollableTabsDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/material/TabBar-class.html",
buildRoute: (BuildContext context) => new ScrollableTabsDemo()
),
new GalleryDemo(
title: "Text fields",
subtitle: "Single line of editable text and numbers",
icon: GalleryIcons.text_fields_alt,
category: GalleryDemoCategory._kMaterialComponents,
routeName: TextFormFieldDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/material/TextFormField-class.html",
buildRoute: (BuildContext context) => new TextFormFieldDemo()
),
new GalleryDemo(
title: "Tooltips",
subtitle: "Short message displayed on long-press",
icon: GalleryIcons.tooltip,
category: GalleryDemoCategory._kMaterialComponents,
routeName: TooltipDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/material/Tooltip-class.html",
buildRoute: (BuildContext context) => new TooltipDemo()
return cupertinoDemos;
return galleryDemos;
new HashSet<GalleryDemoCategory>(kAllGalleryDemos.Select<GalleryDemo, GalleryDemoCategory>((GalleryDemo demo) => demo.category).ToList());
new HashSet<GalleryDemoCategory>(kAllGalleryDemos
.Select<GalleryDemo, GalleryDemoCategory>((GalleryDemo demo) => demo.category).ToList());
static Dictionary<GalleryDemoCategory, List<GalleryDemo>> _generateCategoryToDemos()
private static Dictionary<GalleryDemoCategory, List<GalleryDemo>> _generateCategoryToDemos()
{
result.Add(category, kAllGalleryDemos.Where((GalleryDemo demo) =>
{
return demo.category == category;
}).ToList());
}
result.Add(category,
kAllGalleryDemos.Where((GalleryDemo demo) => { return demo.category == category; }).ToList());
return result;
}

static Dictionary<string, string> _generateDemoDocumentationUrls()
private static Dictionary<string, string> _generateDemoDocumentationUrls()
{
{
}
}
return result;
}

}

6
com.unity.uiwidgets/Editor/UIWidgetsPanelEditor.cs


base.OnInspectorGUI();
var pixelRatioProperty = serializedObject.FindProperty("devicePixelRatioOverride");
var antiAliasingProperty = serializedObject.FindProperty("hardwareAntiAliasing");
var ShowDebugLog = serializedObject.FindProperty("m_ShowDebugLog");
EditorGUI.BeginChangeCheck();
EditorGUILayout.PropertyField(ShowDebugLog);
if (EditorGUI.EndChangeCheck()) {
UIWidgetsPanel.ShowDebugLog = ShowDebugLog.boolValue;
}
UIWidgetsPanel panel = (UIWidgetsPanel)target;
serializedObject.ApplyModifiedProperties();

23
com.unity.uiwidgets/Runtime/animation/animation_controller.cs


using System.Collections.Generic;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.physics;
using Unity.UIWidgets.scheduler2;
using UnityEngine;
using Ticker = Unity.UIWidgets.scheduler2.Ticker;
using TickerFuture = Unity.UIWidgets.scheduler2.TickerFuture;
using TickerProvider = Unity.UIWidgets.scheduler2.TickerProvider;

reverse,
}
public enum AnimationBehavior {
normal,
preserve,
}
public class AnimationController :
AnimationLocalStatusListenersMixinAnimationLocalListenersMixinAnimationEagerListenerMixinAnimation<float> {
public AnimationController(

string debugLabel = null,
float lowerBound = 0.0f,
float upperBound = 1.0f,
AnimationBehavior animationBehavior = AnimationBehavior.normal,
TickerProvider vsync = null
) {
D.assert(upperBound >= lowerBound);

this.debugLabel = debugLabel;
this.lowerBound = lowerBound;
this.upperBound = upperBound;
this.animationBehavior = animationBehavior;
_ticker = vsync.createTicker(_tick);
_internalSetValue(value ?? lowerBound);

TimeSpan? duration = null,
TimeSpan? reverseDuration = null,
string debugLabel = null,
AnimationBehavior? animationBehavior = null,
D.assert(animationBehavior != null);
lowerBound = float.NegativeInfinity;
upperBound = float.PositiveInfinity;
_direction = _AnimationDirection.forward;

this.debugLabel = debugLabel;
this.animationBehavior = animationBehavior.Value;
_ticker = vsync.createTicker(_tick);
_internalSetValue(value);

TimeSpan? duration = null,
TimeSpan? reverseDuration = null,
string debugLabel = null,
TickerProvider vsync = null
TickerProvider vsync = null,
AnimationBehavior animationBehavior = AnimationBehavior.preserve
return new AnimationController(value, duration, reverseDuration, debugLabel, vsync);
return new AnimationController(value, duration, reverseDuration, debugLabel, animationBehavior, vsync);
public readonly AnimationBehavior animationBehavior;
public readonly string debugLabel;

if (_reverse && _isPlayingReverse) {
directionSetter(_AnimationDirection.reverse);
return Mathf.Lerp(_max, _min, t);
return MathUtils.lerpNullableFloat(_max, _min, t);
return Mathf.Lerp(_min, _max, t);
return MathUtils.lerpNullableFloat(_min, _max, t);
}
}

2
com.unity.uiwidgets/Runtime/animation/curves.cs


}
}
float t2 = (t - startValue.dx) / (endValue.dx - startValue.dx);
return Mathf.Lerp(startValue.dy, endValue.dy, t2);
return MathUtils.lerpNullableFloat(startValue.dy, endValue.dy, t2);
}
}

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


TimeSpan? initialTimerDuration = null,
int minuteInterval = 1,
int secondInterval = 1,
Alignment alignment = null,
AlignmentGeometry alignment = null,
Color backgroundColor = null,
ValueChanged<TimeSpan> onTimerDurationChanged = null
):base(key : key) {

public readonly int minuteInterval;
public readonly int secondInterval;
public readonly ValueChanged<TimeSpan> onTimerDurationChanged;
public readonly Alignment alignment;
public readonly AlignmentGeometry alignment;
public readonly Color backgroundColor;
public override State createState() {

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


}
if (animateForward) {
int droppedPageForwardAnimationTime = Mathf.Min(
Mathf.Lerp(CupertinoRouteUtils._kMaxDroppedSwipePageForwardAnimationTime, 0f,
MathUtils.lerpNullableFloat(CupertinoRouteUtils._kMaxDroppedSwipePageForwardAnimationTime, 0f,
controller.value).floor(),
CupertinoRouteUtils._kMaxPageBackAnimationTime
);

if (controller.isAnimating) {
int droppedPageBackAnimationTime =
Mathf.Lerp(0f, CupertinoRouteUtils._kMaxDroppedSwipePageForwardAnimationTime,
MathUtils.lerpNullableFloat(0f, CupertinoRouteUtils._kMaxDroppedSwipePageForwardAnimationTime,
controller.value).floor();
controller.animateBack(0.0f, duration: TimeSpan.FromMilliseconds(droppedPageBackAnimationTime),
curve: animationCurve);

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


class _CupertinoSliderState : TickerProviderStateMixin<CupertinoSlider> {
void _handleChanged(float value) {
D.assert(widget.onChanged != null);
float lerpValue = Mathf.Lerp(widget.min, widget.max, value);
float lerpValue = MathUtils.lerpNullableFloat(widget.min, widget.max, value);
if (lerpValue != widget.value) {
widget.onChanged(lerpValue);
}

D.assert(widget.onChangeStart != null);
widget.onChangeStart(Mathf.Lerp(widget.min, widget.max, value));
widget.onChangeStart(MathUtils.lerpNullableFloat(widget.min, widget.max, value));
widget.onChangeEnd(Mathf.Lerp(widget.min, widget.max, value));
widget.onChangeEnd(MathUtils.lerpNullableFloat(widget.min, widget.max, value));
}
public override Widget build(BuildContext context) {

visualPosition = _value;
break;
}
return Mathf.Lerp(_trackLeft + CupertinoThumbPainter.radius, _trackRight - CupertinoThumbPainter.radius, visualPosition);
return MathUtils.lerpNullableFloat(_trackLeft + CupertinoThumbPainter.radius, _trackRight - CupertinoThumbPainter.radius, visualPosition);
}
}

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


canvas.drawRRect(trackRRect, paint);
float currentThumbExtension = CupertinoThumbPainter.extension * currentReactionValue;
float thumbLeft = Mathf.Lerp(
float thumbLeft = MathUtils.lerpNullableFloat(
float thumbRight = Mathf.Lerp(
float thumbRight = MathUtils.lerpNullableFloat(
trackRect.left + CupertinoSwitchUtils._kTrackInnerStart + CupertinoThumbPainter.radius +
currentThumbExtension,
trackRect.left + CupertinoSwitchUtils._kTrackInnerEnd + CupertinoThumbPainter.radius,

21
com.unity.uiwidgets/Runtime/engine2/UIWidgetsPanel.cs


}
}
public bool m_ShowDebugLog = false;
public static List<UIWidgetsPanel> panels = new List<UIWidgetsPanel>();
public static bool ShowDebugLog {
get => _ShowDebugLog;
set {
foreach (var panel in panels) {
panel.m_ShowDebugLog = value;
}
_ShowDebugLog = value;
}
}
static bool _ShowDebugLog = false;
protected void OnEnable() {
base.OnEnable();
D.assert(_renderTexture == null);

_ptr = UIWidgetsPanel_constructor((IntPtr) _handle, UIWidgetsPanel_entrypoint);
panels.Add(this);
_ShowDebugLog = m_ShowDebugLog;
var settings = new Dictionary<string, object>();
if (fonts != null && fonts.Length > 0) {
settings.Add("fonts", fontsToObject(fonts));

_handle = default;
_disableUIWidgetsPanel();
panels.Remove(this);
D.assert(!isolate.isValid);
base.OnDisable();

5
com.unity.uiwidgets/Runtime/foundation/debug.cs


using System;
using System.Diagnostics;
using System.Linq;
using Unity.UIWidgets.engine2;
using Unity.UIWidgets.painting;
using Unity.UIWidgets.ui;
using Canvas = Unity.UIWidgets.ui.Canvas;

[Conditional("UNITY_ASSERTIONS")]
public static void assert(Func<bool> result, Func<string> message = null) {
if (!result()) {
if (UIWidgetsPanel.ShowDebugLog && !result()) {
throw new AssertionError(message != null ? message() : "");
}
}

if (!result) {
if (UIWidgetsPanel.ShowDebugLog && !result) {
throw new AssertionError(message != null ? message() : "");
}
}

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


D.assert(_pointers.ContainsKey(pointer));
GestureBinding.instance.pointerRouter.removeRoute(pointer, _handleEvent);
_pointers[pointer].dispose();
var pointerData = _pointers[pointer];
pointerData.dispose();
}

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


return values[0];
}
float targetIdx = Mathf.Lerp(0, values.Count - 1, progress);
float targetIdx = MathUtils.lerpNullableFloat(0, values.Count - 1, progress);
int lowIdx = targetIdx.floor();
int highIdx = targetIdx.ceil();
float t = targetIdx - lowIdx;

public readonly List<float> opacities;
public void paint(Canvas canvas, Color color, _UiPathFactory uiPathFactory, float progress) {
float opacity = AnimatedIconUtils._interpolate<float>(opacities, progress, Mathf.Lerp);
float opacity = AnimatedIconUtils._interpolate<float>(opacities, progress, MathUtils.lerpNullableFloat);
Paint paint = new Paint();
paint.style = PaintingStyle.fill;
paint.color = color.withOpacity(color.opacity * opacity);

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


return new AppBarTheme(
brightness: t < 0.5f ? a?.brightness : b?.brightness,
color: Color.lerp(a?.color, b?.color, t),
elevation: Mathf.Lerp(a?.elevation ?? 0.0f, b?.elevation ?? 0.0f, t),
elevation: MathUtils.lerpNullableFloat(a?.elevation, b?.elevation, t),
iconTheme: IconThemeData.lerp(a?.iconTheme, b?.iconTheme, t),
actionsIconTheme: IconThemeData.lerp(a?.actionsIconTheme, b?.actionsIconTheme, t),
textTheme: TextTheme.lerp(a?.textTheme, b?.textTheme, t)

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


}
Offset center = _centerArc.lerp(t);
float width = Mathf.Lerp(begin.width, end.width, t);
float height = Mathf.Lerp(begin.height, end.height, t);
float width = MathUtils.lerpNullableFloat(begin.width, end.width, t);
float height = MathUtils.lerpNullableFloat(begin.height, end.height, t);
return Rect.fromLTWH(
(center.dx - width / 2.0f),
(center.dy - height / 2.0f),

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


using Unity.UIWidgets.foundation;
using Unity.UIWidgets.painting;
using Unity.UIWidgets.ui;
using Unity.UIWidgets.widgets;
using UnityEngine;
using Color = Unity.UIWidgets.ui.Color;

public static BottomAppBarTheme lerp(BottomAppBarTheme a, BottomAppBarTheme b, float t) {
return new BottomAppBarTheme(
color: Color.lerp(a?.color, b?.color, t),
elevation: Mathf.Lerp(a?.elevation ?? 0.0f, b?.elevation ?? 0.0f, t),
elevation: MathUtils.lerpNullableFloat(a?.elevation, b?.elevation, t),
shape: t < 0.5f ? a?.shape : b?.shape
);
}

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


public partial class material_ {
public static readonly TimeSpan _bottomSheetEnterDuration = new TimeSpan(0, 0, 0, 0, 250);
public static readonly TimeSpan _bottomSheetExitDuration = new TimeSpan(0, 0, 0, 0, 200);
public static readonly Curve _modalBottomSheetCurve = material_.decelerateEasing;
public static Curve _modalBottomSheetCurve {
get => decelerateEasing;
}
public const float _minFlingVelocity = 700.0f;
public const float _closeProgressThreshold = 0.5f;

D.assert(builder != null);
D.assert(elevation == null || elevation >= 0.0);
D.assert(elevation >= 0.0f);
this.animationController = animationController;
this.enableDrag = enableDrag;
this.elevation = elevation;

27
com.unity.uiwidgets/Runtime/material/button_bar_theme.cs


using Unity.UIWidgets.foundation;
using Unity.UIWidgets.painting;
using Unity.UIWidgets.rendering;
using Unity.UIWidgets.ui;
using UnityEngine;
using Object = UnityEngine.Object;
namespace Unity.UIWidgets.material {
public class ButtonBarThemeData : Diagnosticable, IEquatable<ButtonBarThemeData> {

ButtonBarLayoutBehavior? layoutBehavior = null,
VerticalDirection? overflowDirection = null
) {
D.assert(buttonMinWidth >= 0.0f);
D.assert(buttonHeight >= 0.0f);
D.assert(buttonMinWidth == null || buttonMinWidth >= 0.0f);
D.assert(buttonHeight == null || buttonHeight >= 0.0f);
this.alignment = alignment;
this.mainAxisSize = mainAxisSize;
this.buttonTextTheme = buttonTextTheme;

alignment: t < 0.5 ? a.alignment : b.alignment,
mainAxisSize: t < 0.5 ? a.mainAxisSize : b.mainAxisSize,
buttonTextTheme: t < 0.5 ? a.buttonTextTheme : b.buttonTextTheme,
buttonMinWidth: Mathf.Lerp(a?.buttonMinWidth ?? 0, b?.buttonMinWidth ?? 0, t),
buttonHeight: Mathf.Lerp(a?.buttonHeight ?? 0, b?.buttonHeight ?? 0, t),
buttonMinWidth: MathUtils.lerpNullableFloat(a?.buttonMinWidth, b?.buttonMinWidth, t),
buttonHeight: MathUtils.lerpNullableFloat(a?.buttonHeight, b?.buttonHeight, t),
buttonPadding: EdgeInsetsGeometry.lerp(a?.buttonPadding, b?.buttonPadding, t),
buttonAlignedDropdown: t < 0.5 ? a.buttonAlignedDropdown : b.buttonAlignedDropdown,
layoutBehavior: t < 0.5 ? a.layoutBehavior : b.layoutBehavior,

public override int GetHashCode() {
unchecked {
var hashCode = (int) alignment;
hashCode = (hashCode * 397) ^ (int) mainAxisSize;
hashCode = (hashCode * 397) ^ (int) buttonTextTheme;
hashCode = (hashCode * 397) ^ buttonMinWidth.GetHashCode();
hashCode = (hashCode * 397) ^ buttonHeight.GetHashCode();
var hashCode = (int) (alignment ?? 0);
hashCode = (hashCode * 397) ^ (int) (mainAxisSize ?? 0);
hashCode = (hashCode * 397) ^ (int) (buttonTextTheme ?? 0);
hashCode = (hashCode * 397) ^ (buttonMinWidth?.GetHashCode() ?? 0);
hashCode = (hashCode * 397) ^ (buttonHeight?.GetHashCode() ?? 0);
hashCode = (hashCode * 397) ^ buttonAlignedDropdown.GetHashCode();
hashCode = (hashCode * 397) ^ (int) layoutBehavior;
hashCode = (hashCode * 397) ^ (int) overflowDirection;
hashCode = (hashCode * 397) ^ (buttonAlignedDropdown?.GetHashCode() ?? 0);
hashCode = (hashCode * 397) ^ (int) (layoutBehavior ?? 0);
hashCode = (hashCode * 397) ^ (int) (overflowDirection ?? 0);
return hashCode;
}
}

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


return null;
return new BottomSheetThemeData(
backgroundColor: Color.lerp(a?.backgroundColor, b?.backgroundColor, t),
elevation: Mathf.Lerp(a?.elevation ?? 0, b?.elevation ?? 0, t),
elevation: MathUtils.lerpNullableFloat(a?.elevation, b?.elevation, t),
modalElevation: Mathf.Lerp(a?.modalElevation ?? 0, b?.modalElevation ?? 0, t),
modalElevation: MathUtils.lerpNullableFloat(a?.modalElevation, b?.modalElevation, t),
shape: ShapeBorder.lerp(a?.shape, b?.shape, t),
clipBehavior: t < 0.5 ? a?.clipBehavior : b?.clipBehavior
);

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


clipBehavior: t < 0.5f ? a?.clipBehavior : b?.clipBehavior,
color: Color.lerp(a?.color, b?.color, t),
shadowColor: Color.lerp(a?.shadowColor, b?.shadowColor, t),
elevation: Mathf.Lerp(a?.elevation ?? 0.0f, b?.elevation ?? 0.0f, t),
elevation: MathUtils.lerpNullableFloat(a?.elevation, b?.elevation, t),
margin: EdgeInsetsGeometry.lerp(a?.margin, b?.margin, t),
shape: ShapeBorder.lerp(a?.shape, b?.shape, t)
);

5
com.unity.uiwidgets/Runtime/material/checkbox_list_tile.cs


namespace Unity.UIWidgets.material {
public class CheckboxListTile : StatelessWidget {
public CheckboxListTile(
Key key,
Key key = null,
bool? value = null,
ValueChanged<bool?> onChanged = null,
Color activeColor = null,

this.secondary = secondary;
this.selected = selected;
this.controlAffinity = controlAffinity;
this.value = value;
this.activeColor = activeColor;
this.onChanged = onChanged;
}
public readonly bool? value;

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


labelStyle: TextStyle.lerp(a?.labelStyle, b?.labelStyle, t),
secondaryLabelStyle: TextStyle.lerp(a?.secondaryLabelStyle, b?.secondaryLabelStyle, t),
brightness: t < 0.5f ? a?.brightness ?? Brightness.light : b?.brightness ?? Brightness.light,
elevation: Mathf.Lerp(a?.elevation ?? 0.0f, b?.elevation ?? 0.0f, t),
pressElevation: Mathf.Lerp(a?.pressElevation ?? 0.0f, b?.pressElevation ?? 0.0f, t)
elevation: MathUtils.lerpNullableFloat(a?.elevation, b?.elevation, t),
pressElevation: MathUtils.lerpNullableFloat(a?.pressElevation, b?.pressElevation, t)
);
}

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


// TODO(dkwingsmt): Only wrap Inkwell if onSort != null. Blocked by
// https://github.com/flutter/flutter/issues/51152
label = new InkWell(
onTap: () => onSort(),
onTap: () => onSort?.Invoke(),
child: label
);
return label;

!rows.Any((DataRow row) => row.onSelectChanged != null && !row.selected);
List<TableColumnWidth> tableColumns =
new List<TableColumnWidth>(columns.Count + (displayCheckboxColumn ? 1 : 0));
List<TableRow> tableRows = Enumerable.Range(1, 10).Select((index) => {
new List<TableColumnWidth>(new TableColumnWidth[columns.Count + (displayCheckboxColumn ? 1 : 0)]);
List<TableRow> tableRows = Enumerable.Range(0, rows.Count + 1).Select((index) => {
children: new List<Widget>(tableColumns.Count)
children: new List<Widget>(new Widget[tableColumns.Count])
// List<TableRow> tableRows = List<TableRow>.gegenerate(
// rows.length + 1, // the +1 is for the header row
// (int index) {
// return TableRow(
// key: index == 0 ? _headingRowKey : rows[index - 1].key,
// decoration: index > 0 && rows[index - 1].selected
// ? _kSelectedDecoration
// : _kUnselectedDecoration,
// children: List<Widget>(tableColumns.length),
// );
// },
// );
int rowIndex;

tableColumns[displayColumnIndex] = new IntrinsicColumnWidth();
}
var currentColumnIndex = dataColumnIndex;
tableRows[0].children[displayColumnIndex] = _buildHeadingCell(
context: context,
padding: padding,

onSort: column.onSort != null
? () => column.onSort(dataColumnIndex, sortColumnIndex != dataColumnIndex || !sortAscending)
? () => column.onSort(currentColumnIndex, sortColumnIndex != currentColumnIndex || !sortAscending)
: (VoidCallback) null,
sorted: dataColumnIndex == sortColumnIndex,
ascending: sortAscending

DataCell cell = row.cells[dataColumnIndex];
var curRow = row;
tableRows[rowIndex].children[displayColumnIndex] = _buildDataCell(
context: context,
padding: padding,

showEditIcon: cell.showEditIcon,
onTap: cell.onTap,
onSelectChanged: () => {
if (row.onSelectChanged != null) {
row.onSelectChanged(!row.selected);
if (curRow.onSelectChanged != null) {
curRow.onSelectChanged(!curRow.selected);
}
});
rowIndex += 1;

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


public abstract class DataTableSource : ChangeNotifier {
public abstract DataRow getRow(int index);
public int rowCount { get; }
public virtual int rowCount { get; }
public bool isRowCountApproximate { get; }
public virtual bool isRowCountApproximate { get; }
public int selectedRowCount { get; }
public virtual int selectedRowCount { get; }
}
}

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


using System;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.painting;
using Unity.UIWidgets.ui;
using Unity.UIWidgets.widgets;
using UnityEngine;
using Color = Unity.UIWidgets.ui.Color;

public static DialogTheme lerp(DialogTheme a, DialogTheme b, float t) {
return new DialogTheme(
backgroundColor: Color.lerp(a?.backgroundColor, b?.backgroundColor, t),
elevation: Mathf.Lerp(a?.elevation ?? 0.0f, b?.elevation ?? 0.0f, t),
elevation: MathUtils.lerpNullableFloat(a?.elevation, b?.elevation, t),
shape: ShapeBorder.lerp(a?.shape, b?.shape, t),
titleTextStyle: TextStyle.lerp(a?.titleTextStyle, b?.titleTextStyle, t),
contentTextStyle: TextStyle.lerp(a?.contentTextStyle, b?.contentTextStyle, t)

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


using System;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.painting;
using Unity.UIWidgets.ui;
using Unity.UIWidgets.widgets;
using UnityEngine;
using Color = Unity.UIWidgets.ui.Color;

public static DividerThemeData lerp(DividerThemeData a, DividerThemeData b, float t) {
return new DividerThemeData(
color: Color.lerp(a?.color, b?.color, t),
space: Mathf.Lerp(a?.space ?? 0, b?.space ?? 0, t),
thickness: Mathf.Lerp(a?.thickness ?? 0, b?.thickness ?? 0, t),
indent: Mathf.Lerp(a?.indent ?? 0, b?.indent ?? 0, t),
endIndent: Mathf.Lerp(a?.endIndent ?? 0, b?.endIndent ?? 0, t)
space: MathUtils.lerpNullableFloat(a?.space, b?.space, t),
thickness: MathUtils.lerpNullableFloat(a?.thickness, b?.thickness, t),
indent: MathUtils.lerpNullableFloat(a?.indent, b?.indent, t),
endIndent: MathUtils.lerpNullableFloat(a?.endIndent, b?.endIndent, t)
);
}

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


? material_._kAlignedMenuMargin
: material_._kUnalignedMenuMargin;
List<_MenuItem<T>> menuItems = new List<_MenuItem<T>>(widget.items.Count);
List<_MenuItem<T>> menuItems = new List<_MenuItem<T>>(new _MenuItem<T>[widget.items.Count]);
menuItems[index] = new _MenuItem<T>(
item: widget.items[index],
var pindex = index;
menuItems[pindex] = new _MenuItem<T>(
item: widget.items[pindex],
_dropdownRoute.itemHeights[index] = size.height;
_dropdownRoute.itemHeights[pindex] = size.height;
}
);
}

11
com.unity.uiwidgets/Runtime/material/floatting_action_button_theme.cs


using System;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.painting;
using Unity.UIWidgets.ui;
using UnityEngine;
using Color = Unity.UIWidgets.ui.Color;

focusColor: Color.lerp(a?.focusColor, b?.focusColor, t),
hoverColor: Color.lerp(a?.hoverColor, b?.hoverColor, t),
splashColor: Color.lerp(a?.splashColor, b?.splashColor, t),
elevation: Mathf.Lerp(a?.elevation ?? 0, b?.elevation ?? 0, t),
focusElevation: Mathf.Lerp(a?.focusElevation ?? 0, b?.focusElevation ?? 0, t),
hoverElevation: Mathf.Lerp(a?.hoverElevation ?? 0, b?.hoverElevation ?? 0, t),
disabledElevation: Mathf.Lerp(a?.disabledElevation ?? 0, b?.disabledElevation ?? 0, t),
highlightElevation: Mathf.Lerp(a?.highlightElevation ?? 0, b?.highlightElevation ?? 0, t),
elevation: MathUtils.lerpNullableFloat(a?.elevation, b?.elevation, t),
focusElevation: MathUtils.lerpNullableFloat(a?.focusElevation, b?.focusElevation, t),
hoverElevation: MathUtils.lerpNullableFloat(a?.hoverElevation, b?.hoverElevation, t),
disabledElevation: MathUtils.lerpNullableFloat(a?.disabledElevation, b?.disabledElevation, t),
highlightElevation: MathUtils.lerpNullableFloat(a?.highlightElevation, b?.highlightElevation, t),
shape: ShapeBorder.lerp(a?.shape, b?.shape, t)
);
}

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


using Unity.UIWidgets.widgets;
namespace Unity.UIWidgets.material {
class GridTileBar : StatelessWidget {
public class GridTileBar : StatelessWidget {
public GridTileBar(
Key key = null,
Color backgroundColor = null,

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


float iconSize = 24.0f,
VisualDensity visualDensity = null,
EdgeInsetsGeometry padding = null,
Alignment alignment = null,
AlignmentGeometry alignment = null,
Widget icon = null,
Color color = null,
Color focusColor = null,

public readonly EdgeInsetsGeometry padding;
public readonly Alignment alignment;
public readonly AlignmentGeometry alignment;
public readonly Widget icon;

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


ImageErrorListener onImageError = null,
ColorFilter colorFilter = null,
BoxFit? fit = null,
Alignment alignment = null,
AlignmentGeometry alignment = null,
Rect centerSlice = null,
ImageRepeat repeat = ImageRepeat.noRepeat,
float? width = null,

VoidCallback onRemoved = null
) : base(controller: controller, referenceBox: referenceBox, onRemoved: onRemoved) {
D.assert(configuration != null);
D.assert(decoration != null);
D.assert(controller != null);
D.assert(referenceBox != null);
_configuration = configuration;

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


canvas.drawRRect(center, paint);
}
else {
float extent = Mathf.Lerp(0.0f, gapExtent + gapPadding * 2.0f, gapPercentage);
float extent = MathUtils.lerpNullableFloat(0.0f, gapExtent + gapPadding * 2.0f, gapPercentage);
Path path = _gapBorderPath(canvas, center, Mathf.Max(0.0f,gapStart - gapPadding), extent);
canvas.drawPath(path, paint);
}

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


float t = decoration.floatingLabelProgress;
bool isOutlineBorder = decoration.border != null && decoration.border.isOutline;
float floatingY = isOutlineBorder ? -labelHeight * 0.25f : contentPadding.top;
float scale = Mathf.Lerp(1.0f, 0.75f, t);
float scale = MathUtils.lerpNullableFloat(1.0f, 0.75f, t);
float dy = Mathf.Lerp(0.0f, floatingY - labelOffset.dy, t);
float dy = MathUtils.lerpNullableFloat(0.0f, floatingY - labelOffset.dy, t);
_labelTransform = Matrix4.identity();
_labelTransform.translate(dx, labelOffset.dy + dy);
_labelTransform.scale(scale, scale, 1);

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


float _getGapSize(int index) {
MaterialGap gap = (MaterialGap) _children[index];
return Mathf.Lerp(_animationTuples[gap.key].gapStart,
return MathUtils.lerpNullableFloat(_animationTuples[gap.key].gapStart,
gap.size,
_animationTuples[gap.key].gapAnimation.value);
}

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


materialChildren.AddRange(new List<Widget>() {
new ConstrainedBox(
constraints: new BoxConstraints(
minWidth: Mathf.Lerp(minWidth, minExtendedWidth, _extendedAnimation.value)
minWidth: MathUtils.lerpNullableFloat(minWidth, minExtendedWidth, _extendedAnimation.value)
),
child: widget.leading
),

if (widget.trailing != null) {
alignChildren.Add(new ConstrainedBox(
constraints: new BoxConstraints(
minWidth: Mathf.Lerp(minWidth, minExtendedWidth, _extendedAnimation.value)
minWidth: MathUtils.lerpNullableFloat(minWidth, minExtendedWidth, _extendedAnimation.value)
),
child: widget.trailing
));

else {
content = new ConstrainedBox(
constraints: new BoxConstraints(
minWidth: Mathf.Lerp(minWidth ?? 0, minExtendedWidth ?? 0,
extendedTransitionAnimation.value)
minWidth: MathUtils.lerpNullableFloat(minWidth, minExtendedWidth,
extendedTransitionAnimation.value) ?? 0
),
child: new ClipRect(
child: new Row(

float appearingAnimationValue = 1 - _positionAnimation.value;
float verticalPadding = Mathf.Lerp(material_._verticalDestinationPaddingNoLabel,
float verticalPadding = MathUtils.lerpNullableFloat(material_._verticalDestinationPaddingNoLabel,
material_._verticalDestinationPaddingWithLabel, appearingAnimationValue);
content = new Container(
constraints: new BoxConstraints(

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


using System;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.painting;
using Unity.UIWidgets.ui;
using Unity.UIWidgets.widgets;
using UnityEngine;
using Color = Unity.UIWidgets.ui.Color;

return null;
return new NavigationRailThemeData(
backgroundColor: Color.lerp(a?.backgroundColor, b?.backgroundColor, t),
elevation: Mathf.Lerp(a?.elevation ?? 0, b?.elevation ?? 0, t),
elevation: MathUtils.lerpNullableFloat(a?.elevation, b?.elevation, t),
groupAlignment: Mathf.Lerp(a?.groupAlignment ?? 0, b?.groupAlignment ?? 0, t),
groupAlignment: MathUtils.lerpNullableFloat(a?.groupAlignment, b?.groupAlignment, t),
labelType: t < 0.5 ? a?.labelType : b?.labelType
);
}

}
public static bool operator !=(NavigationRailThemeData self, NavigationRailThemeData other) {
return Equals(self, other);
return !Equals(self, other);
}
public bool Equals(NavigationRailThemeData other) {

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


this.availableRowsPerPage = availableRowsPerPage;
this.onRowsPerPageChanged = onRowsPerPageChanged;
this.dragStartBehavior = dragStartBehavior;
this.source = source;
}

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


PopupMenuThemeData popupMenuTheme = PopupMenuTheme.of(context);
for (int i = 0; i < route.items.Count; i += 1) {
float start = (i + 1) * unit;
int index = i;
float start = (index + 1) * unit;
Widget item = route.items[i];
if (route.initialValue != null && route.items[i].represents((T) route.initialValue)) {
Widget item = route.items[index];
if (route.initialValue != null && route.items[index].represents((T) route.initialValue)) {
item = new Container(
color: Theme.of(context).highlightColor,
child: item

children.Add(
new _MenuItem(
onLayout: (Size size) => { route.itemSizes[i] = size; },
onLayout: (Size size) => { route.itemSizes[index] = size; },
child: new FadeTransition(
opacity: opacityCurvedAnimation,
child: item

this.color = color;
this.showMenuContext = showMenuContext;
this.captureInheritedThemes = captureInheritedThemes;
itemSizes = new List<Size>(items.Count);
itemSizes = new List<Size>(new Size[items.Count]);
}
public readonly RelativeRect position;

this.child = child;
this.icon = icon;
this.offset = offset;
this.enabled = enabled;
this.shape = shape;
this.color = color;
this.captureInheritedThemes = captureInheritedThemes;
}

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


using System;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.painting;
using Unity.UIWidgets.ui;
using TextStyle = Unity.UIWidgets.painting.TextStyle;
namespace Unity.UIWidgets.material {
public class PopupMenuThemeData : Diagnosticable, IEquatable<PopupMenuThemeData> {

return new PopupMenuThemeData(
color: Color.lerp(a?.color, b?.color, t),
shape: ShapeBorder.lerp(a?.shape, b?.shape, t),
elevation: Mathf.Lerp(a?.elevation ?? 0, b?.elevation ?? 0, t),
elevation: MathUtils.lerpNullableFloat(a?.elevation, b?.elevation, t),
textStyle: TextStyle.lerp(a?.textStyle, b?.textStyle, t)
);
}

}
public static bool operator !=(PopupMenuThemeData self, PopupMenuThemeData other) {
return Equals(self, other);
return !Equals(self, other);
}
public bool Equals(PopupMenuThemeData other) {

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


public const float _kInnerRadius = 4.5f;
}
public class Radio<T> : StatefulWidget where T : class {
public class Radio<T> : StatefulWidget {
T value = null,
T groupValue = null,
T value = default,
T groupValue = default,
ValueChanged<T> onChanged = null,
bool toggleable = false,
Color activeColor = null,

) : base(key: key) {
D.assert(value != null);
D.assert(groupValue != null);
D.assert(onChanged != null);
this.value = value;
this.groupValue = groupValue;
this.onChanged = onChanged;

}
}
class _RadioState<T> : TickerProviderStateMixin<Radio<T>> where T : class {
class _RadioState<T> : TickerProviderStateMixin<Radio<T>> {
bool enabled {
get { return widget.onChanged != null; }
}

void _handleChanged(bool? selected) {
if (selected == null) {
widget.onChanged(null);
widget.onChanged(default);
return;
}
if (selected == true) {

child: new Builder(
builder: (BuildContext subContext) => {
return new _RadioRenderObjectWidget(
selected: widget.value == widget.groupValue,
selected: widget.value.Equals(widget.groupValue),
activeColor: widget.activeColor ?? themeData.toggleableActiveColor,
inactiveColor: _getInactiveColor(themeData),
focusColor: widget.focusColor ?? themeData.focusColor,

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


}
class _RangeSliderState : SingleTickerProviderStateMixin<RangeSlider> {
class _RangeSliderState : TickerProviderStateMixin<RangeSlider> {
static readonly TimeSpan enableAnimationDuration = new TimeSpan(0, 0, 0, 0, 75);
static readonly TimeSpan valueIndicatorAnimationDuration = new TimeSpan(0, 0, 0, 0, 100);

}
float _lerp(float value) {
return Mathf.Lerp(widget.min, widget.max, value);
return MathUtils.lerpNullableFloat(widget.min, widget.max, value);
}
RangeValues _lerpRangeValues(RangeValues values) {

float _discretize(float value) {
float result = value.clamp(0.0f, 1.0f);
if (isDiscrete) {
result = (result * divisions.Value).round() / divisions.Value;
result = (result * divisions.Value).round() * 1.0f / divisions.Value;
}
return result;

);
}
void paint(PaintingContext context, Offset offset) {
public override void paint(PaintingContext context, Offset offset) {
float startValue = _state.startPositionController.value;
float endValue = _state.endPositionController.value;

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


using Unity.UIWidgets.widgets;
namespace Unity.UIWidgets.material {
public class RadioListTile<T> : StatelessWidget where T : class {
public class RadioListTile<T> : StatelessWidget {
public RadioListTile(
Key key = null,
T value = default,

onTap: onChanged != null
? () => {
if (toggleable && isChecked) {
onChanged(null);
onChanged(default);
return;
}

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


});
}
Future show(bool atTop = true) {
public Future show(bool atTop = true) {
if (_mode != _RefreshIndicatorMode.refresh && _mode != _RefreshIndicatorMode.snap) {
if (_mode == null) {
_start(atTop ? AxisDirection.down : AxisDirection.up);

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


)
));
}
}
if (_isExtendedFloatingActionButton(widget.child)) {
children.Add(new ScaleTransition(
scale: _extendedCurrentScaleAnimation,
child: new FadeTransition(
opacity: _currentScaleAnimation,
child: widget.child
)
));
}
else {
children.Add(new ScaleTransition(
scale: _currentScaleAnimation,
child: new RotationTransition(
turns: _currentRotationAnimation,
child: widget.child
)
));
}
if (_isExtendedFloatingActionButton(widget.child)) {
children.Add(new ScaleTransition(
scale: _extendedCurrentScaleAnimation,
child: new FadeTransition(
opacity: _currentScaleAnimation,
child: widget.child
)
));
}
else {
children.Add(new ScaleTransition(
scale: _currentScaleAnimation,
child: new RotationTransition(
turns: _currentRotationAnimation,
child: widget.child
)
));
}
return new Stack(

float curveProgress = (t - startingPoint) / (1 - startingPoint);
float transformed = curve.transform(curveProgress);
return Mathf.Lerp(startingPoint, 1, transformed);
return MathUtils.lerpNullableFloat(startingPoint, 1, transformed);
}
public override string ToString() {

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


}
public override Widget build(BuildContext context) {
//TODO:uncomment here when cupertino updates are merged
/*if (_useCupertinoScrollbar.Value) {
if (_useCupertinoScrollbar.Value) {
}*/
}
return new NotificationListener<ScrollNotification>(
onNotification: _handleScrollNotification,
child: new RepaintBoundary(

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


D.assert(a != null);
D.assert(b != null);
return new SliderThemeData(
trackHeight: Mathf.Lerp(a.trackHeight.Value, b.trackHeight.Value, t),
trackHeight: MathUtils.lerpNullableFloat(a.trackHeight, b.trackHeight, t),
activeTrackColor: Color.lerp(a.activeTrackColor, b.activeTrackColor, t),
inactiveTrackColor: Color.lerp(a.inactiveTrackColor, b.inactiveTrackColor, t),
disabledActiveTrackColor: Color.lerp(a.disabledActiveTrackColor, b.disabledActiveTrackColor, t),

rangeValueIndicatorShape: t < 0.5 ? a.rangeValueIndicatorShape : b.rangeValueIndicatorShape,
showValueIndicator: t < 0.5 ? a.showValueIndicator : b.showValueIndicator,
valueIndicatorTextStyle: TextStyle.lerp(a.valueIndicatorTextStyle, b.valueIndicatorTextStyle, t),
minThumbSeparation: Mathf.Lerp(a.minThumbSeparation.Value, b.minThumbSeparation.Value, t),
minThumbSeparation: MathUtils.lerpNullableFloat(a.minThumbSeparation, b.minThumbSeparation, t),
thumbSelector: t < 0.5 ? a.thumbSelector : b.thumbSelector
);
}

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


using Unity.UIWidgets.foundation;
using Unity.UIWidgets.material;
using Unity.UIWidgets.painting;
using Unity.UIWidgets.ui;
using UnityEngine;
using Color = Unity.UIWidgets.ui.Color;
using Object = UnityEngine.Object;

actionTextColor: Color.lerp(a?.actionTextColor, b?.actionTextColor, t),
disabledActionTextColor: Color.lerp(a?.disabledActionTextColor, b?.disabledActionTextColor, t),
contentTextStyle: TextStyle.lerp(a?.contentTextStyle, b?.contentTextStyle, t),
elevation: Mathf.Lerp(a?.elevation ?? 0, b?.elevation ?? 0, t),
elevation: MathUtils.lerpNullableFloat(a?.elevation, b?.elevation, t),
shape: ShapeBorder.lerp(a?.shape, b?.shape, t),
behavior: t < 0.5 ? a.behavior : b.behavior
);

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


) : base(key: key) {
D.assert(value != null);
this.value = value.Value;
D.assert(onChanged != null);
D.assert(activeThumbImage != null || onActiveThumbImageError == null);
D.assert(inactiveThumbImage != null || onInactiveThumbImageError == null);
this.onChanged = onChanged;

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


using Unity.UIWidgets.cupertino;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.rendering;
using Unity.UIWidgets.service;
using Unity.UIWidgets.ui;
using Unity.UIWidgets.widgets;
using UnityEngine;

DialogTheme dialogTheme = null,
FloatingActionButtonThemeData floatingActionButtonTheme = null,
Typography typography = null,
SnackBarThemeData snackBarTheme = null
SnackBarThemeData snackBarTheme = null,
BottomSheetThemeData bottomSheetTheme = null,
PopupMenuThemeData popupMenuTheme = null,
MaterialBannerThemeData bannerTheme = null,
DividerThemeData dividerTheme = null,
ButtonBarThemeData buttonBarTheme = null
) {
brightness = brightness ?? Brightness.light;
bool isDark = brightness == Brightness.dark;

dialogTheme = dialogTheme ?? new DialogTheme();
floatingActionButtonTheme = floatingActionButtonTheme ?? new FloatingActionButtonThemeData();
snackBarTheme = snackBarTheme ?? new SnackBarThemeData();
bottomSheetTheme = bottomSheetTheme ?? new BottomSheetThemeData();
popupMenuTheme = popupMenuTheme ?? new PopupMenuThemeData();
bannerTheme = bannerTheme ?? new MaterialBannerThemeData();
dividerTheme = dividerTheme ?? new DividerThemeData();
buttonBarTheme = buttonBarTheme ?? new ButtonBarThemeData();
D.assert(brightness != null);
D.assert(visualDensity != null);

D.assert(dialogTheme != null);
D.assert(floatingActionButtonTheme != null);
D.assert(snackBarTheme != null);
D.assert(bottomSheetTheme != null);
D.assert(popupMenuTheme != null);
D.assert(bannerTheme != null);
D.assert(dividerTheme != null);
D.assert(buttonBarTheme != null);
this.brightness = brightness ?? Brightness.light;
this.visualDensity = visualDensity;

this.floatingActionButtonTheme = floatingActionButtonTheme;
this.typography = typography;
this.snackBarTheme = snackBarTheme;
this.bottomSheetTheme = bottomSheetTheme;
this.popupMenuTheme = popupMenuTheme;
this.bannerTheme = bannerTheme;
this.dividerTheme = dividerTheme;
this.buttonBarTheme = buttonBarTheme;
}
public static ThemeData raw(

DialogTheme dialogTheme = null,
FloatingActionButtonThemeData floatingActionButtonTheme = null,
Typography typography = null,
SnackBarThemeData snackBarTheme = null
SnackBarThemeData snackBarTheme = null,
BottomSheetThemeData bottomSheetTheme = null,
PopupMenuThemeData popupMenuTheme = null,
MaterialBannerThemeData bannerTheme = null,
DividerThemeData dividerTheme = null,
ButtonBarThemeData buttonBarTheme = null
) {
D.assert(brightness != null);
D.assert(visualDensity != null);

D.assert(dialogTheme != null);
D.assert(floatingActionButtonTheme != null);
D.assert(snackBarTheme != null);
D.assert(bottomSheetTheme != null);
D.assert(popupMenuTheme != null);
D.assert(bannerTheme != null);
D.assert(dividerTheme != null);
D.assert(buttonBarTheme != null);
return new ThemeData(
brightness: brightness,

dialogTheme: dialogTheme,
floatingActionButtonTheme: floatingActionButtonTheme,
typography: typography,
snackBarTheme: snackBarTheme);
snackBarTheme: snackBarTheme,
bottomSheetTheme: bottomSheetTheme,
popupMenuTheme: popupMenuTheme,
bannerTheme: bannerTheme,
dividerTheme: dividerTheme,
buttonBarTheme: buttonBarTheme
);
}
public static ThemeData from(

DialogTheme dialogTheme = null,
FloatingActionButtonThemeData floatingActionButtonTheme = null,
Typography typography = null,
SnackBarThemeData snackBarTheme = null
SnackBarThemeData snackBarTheme = null,
BottomSheetThemeData bottomSheetTheme = null,
PopupMenuThemeData popupMenuTheme = null,
MaterialBannerThemeData bannerTheme = null,
DividerThemeData dividerTheme = null,
ButtonBarThemeData buttonBarTheme = null
) {
return raw(
brightness: brightness ?? this.brightness,

dialogTheme: dialogTheme ?? this.dialogTheme,
floatingActionButtonTheme: floatingActionButtonTheme ?? this.floatingActionButtonTheme,
typography: typography ?? this.typography,
snackBarTheme: snackBarTheme ?? this.snackBarTheme
snackBarTheme: snackBarTheme ?? this.snackBarTheme,
bottomSheetTheme: bottomSheetTheme ?? this.bottomSheetTheme,
popupMenuTheme: popupMenuTheme ?? this.popupMenuTheme,
bannerTheme: bannerTheme ?? this.bannerTheme,
dividerTheme: dividerTheme ?? this.dividerTheme,
buttonBarTheme: buttonBarTheme ?? this.buttonBarTheme
);
}

floatingActionButtonTheme: FloatingActionButtonThemeData.lerp(a.floatingActionButtonTheme,
b.floatingActionButtonTheme, t),
typography: Typography.lerp(a.typography, b.typography, t),
snackBarTheme: SnackBarThemeData.lerp(a.snackBarTheme, b.snackBarTheme, t)
snackBarTheme: SnackBarThemeData.lerp(a.snackBarTheme, b.snackBarTheme, t),
bottomSheetTheme: BottomSheetThemeData.lerp(a.bottomSheetTheme, b.bottomSheetTheme, t),
popupMenuTheme: PopupMenuThemeData.lerp(a.popupMenuTheme, b.popupMenuTheme, t),
bannerTheme: MaterialBannerThemeData.lerp(a.bannerTheme, b.bannerTheme, t),
dividerTheme: DividerThemeData.lerp(a.dividerTheme, b.dividerTheme, t),
buttonBarTheme: ButtonBarThemeData.lerp(a.buttonBarTheme, b.buttonBarTheme, t)
);
}

other.dialogTheme == dialogTheme &&
other.floatingActionButtonTheme == floatingActionButtonTheme &&
other.typography == typography &&
other.snackBarTheme == snackBarTheme;
other.snackBarTheme == snackBarTheme &&
other.bottomSheetTheme == bottomSheetTheme &&
other.popupMenuTheme == popupMenuTheme &&
other.bannerTheme == bannerTheme &&
other.dividerTheme == dividerTheme &&
other.buttonBarTheme == buttonBarTheme;
}
public override bool Equals(object obj) {

hashCode = (hashCode * 397) ^ floatingActionButtonTheme.GetHashCode();
hashCode = (hashCode * 397) ^ typography.GetHashCode();
hashCode = (hashCode * 397) ^ snackBarTheme.GetHashCode();
hashCode = (hashCode * 397) ^ bottomSheetTheme.GetHashCode();
hashCode = (hashCode * 397) ^ popupMenuTheme.GetHashCode();
hashCode = (hashCode * 397) ^ bannerTheme.GetHashCode();
hashCode = (hashCode * 397) ^ dividerTheme.GetHashCode();
hashCode = (hashCode * 397) ^ buttonBarTheme.GetHashCode();
_cachedHashCode = hashCode;
return hashCode;

properties.add(new DiagnosticsProperty<Typography>("typography", typography,
defaultValue: defaultData.typography));
properties.add(new DiagnosticsProperty<SnackBarThemeData>("snackBarTheme", snackBarTheme, defaultValue: defaultData.snackBarTheme, level: DiagnosticLevel.debug));
properties.add(new DiagnosticsProperty<BottomSheetThemeData>("bottomSheetTheme", bottomSheetTheme, defaultValue: defaultData.bottomSheetTheme, level: DiagnosticLevel.debug));
properties.add(new DiagnosticsProperty<PopupMenuThemeData>("popupMenuTheme", popupMenuTheme, defaultValue: defaultData.popupMenuTheme, level: DiagnosticLevel.debug));
properties.add(new DiagnosticsProperty<MaterialBannerThemeData>("bannerTheme", bannerTheme, defaultValue: defaultData.bannerTheme, level: DiagnosticLevel.debug));
properties.add(new DiagnosticsProperty<DividerThemeData>("dividerTheme", dividerTheme, defaultValue: defaultData.dividerTheme, level: DiagnosticLevel.debug));
properties.add(new DiagnosticsProperty<ButtonBarThemeData>("buttonBarTheme", buttonBarTheme, defaultValue: defaultData.buttonBarTheme, level: DiagnosticLevel.debug));
}
}

internal static VisualDensity lerp(VisualDensity a, VisualDensity b, float t) {
return new VisualDensity(
horizontal: Mathf.Lerp(a.horizontal, b.horizontal, t),
vertical: Mathf.Lerp(a.horizontal, b.horizontal, t)
horizontal: MathUtils.lerpNullableFloat(a.horizontal, b.horizontal, t),
vertical: MathUtils.lerpNullableFloat(a.horizontal, b.horizontal, t)
);
}

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


);
string formattedNextMinute = localizations.formatMinute(nextMinute);
TimeOfDay previousMinute = fragmentContext.selectedTime.replacing(
minute: (fragmentContext.selectedTime.minute - 1) % TimeOfDay.minutesPerHour
minute: (fragmentContext.selectedTime.minute - 1 + TimeOfDay.minutesPerHour) % TimeOfDay.minutesPerHour
);
string formattedPreviousMinute = localizations.formatMinute(previousMinute);

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


if (a is AlignmentDirectional && b is AlignmentDirectional)
return AlignmentDirectional.lerp(a, b, t);
return new _MixedAlignment(
Mathf.Lerp(a._x, b._x, t),
Mathf.Lerp(a._start, b._start, t),
Mathf.Lerp(a._y, b._y, t)
MathUtils.lerpNullableFloat(a._x, b._x, t),
MathUtils.lerpNullableFloat(a._start, b._start, t),
MathUtils.lerpNullableFloat(a._y, b._y, t)
);
}

}
if (a == null) {
return new Alignment(Mathf.Lerp(0.0f, b.x, t), Mathf.Lerp(0.0f, b.y, t));
return new Alignment(MathUtils.lerpNullableFloat(0.0f, b.x, t), MathUtils.lerpNullableFloat(0.0f, b.y, t));
return new Alignment(Mathf.Lerp(a.x, 0.0f, t), Mathf.Lerp(a.y, 0.0f, t));
return new Alignment(MathUtils.lerpNullableFloat(a.x, 0.0f, t), MathUtils.lerpNullableFloat(a.y, 0.0f, t));
return new Alignment(Mathf.Lerp(a.x, b.x, t), Mathf.Lerp(a.y, b.y, t));
return new Alignment(MathUtils.lerpNullableFloat(a.x, b.x, t), MathUtils.lerpNullableFloat(a.y, b.y, t));
}
public bool Equals(Alignment other) {

if (a == null && b == null)
return null;
if (a == null)
return new AlignmentDirectional(Mathf.Lerp(0.0f, b.start, t),
Mathf.Lerp(0.0f, b.y, t));
return new AlignmentDirectional(MathUtils.lerpNullableFloat(0.0f, b.start, t),
MathUtils.lerpNullableFloat(0.0f, b.y, t));
return new AlignmentDirectional(Mathf.Lerp(a.start, 0.0f, t),
Mathf.Lerp(a.y, 0.0f, t));
return new AlignmentDirectional(Mathf.Lerp(a.start, b.start, t), Mathf.Lerp(a.y, b.y, t));
return new AlignmentDirectional(MathUtils.lerpNullableFloat(a.start, 0.0f, t),
MathUtils.lerpNullableFloat(a.y, 0.0f, t));
return new AlignmentDirectional(MathUtils.lerpNullableFloat(a.start, b.start, t), MathUtils.lerpNullableFloat(a.y, b.y, t));
}
public override Alignment resolve(TextDirection? direction) {

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


return b;
}
float width = Mathf.Lerp(a.width, b.width, t);
float width = MathUtils.lerpNullableFloat(a.width, b.width, t);
if (width < 0.0) {
return none;
}

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


return new BoxShadow(
color: Color.lerp(a.color, b.color, t),
offset: Offset.lerp(a.offset, b.offset, t),
blurRadius: Mathf.Lerp(a.blurRadius, b.blurRadius, t),
spreadRadius: Mathf.Lerp(a.spreadRadius, b.spreadRadius, t)
blurRadius: MathUtils.lerpNullableFloat(a.blurRadius, b.blurRadius, t),
spreadRadius: MathUtils.lerpNullableFloat(a.spreadRadius, b.spreadRadius, t)
);
}

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


if (b == null)
return a._scaleAlpha(1.0f - t);
return HSLColor.fromAHSL(
Mathf.Lerp(a.alpha, b.alpha, t).clamp(0.0f, 1.0f),
Mathf.Lerp(a.hue, b.hue, t) % 360.0f,
Mathf.Lerp(a.saturation, b.saturation, t).clamp(0.0f, 1.0f),
Mathf.Lerp(a.lightness, b.lightness, t).clamp(0.0f, 1.0f)
MathUtils.lerpNullableFloat(a.alpha, b.alpha, t).clamp(0.0f, 1.0f),
MathUtils.lerpNullableFloat(a.hue, b.hue, t) % 360.0f,
MathUtils.lerpNullableFloat(a.saturation, b.saturation, t).clamp(0.0f, 1.0f),
MathUtils.lerpNullableFloat(a.lightness, b.lightness, t).clamp(0.0f, 1.0f)
);
}

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


ImageErrorListener onError = null,
ColorFilter colorFilter = null,
BoxFit? fit = null,
Alignment alignment = null,
AlignmentGeometry alignment = null,
Rect centerSlice = null,
ImageRepeat repeat = ImageRepeat.noRepeat,
bool matchTextDirection = false

public readonly ImageErrorListener onError;
public readonly ColorFilter colorFilter;
public readonly BoxFit? fit;
public readonly Alignment alignment;
public readonly AlignmentGeometry alignment;
public readonly Rect centerSlice;
public readonly ImageRepeat repeat;
public readonly bool matchTextDirection;

scale: _image.scale,
colorFilter: _details.colorFilter,
fit: _details.fit,
alignment: _details.alignment,
alignment: _details.alignment.resolve(configuration.textDirection),
centerSlice: _details.centerSlice,
repeat: _details.repeat,
flipHorizontally: flipHorizontally,

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


return EdgeInsetsDirectional.lerp(a, b, t);
return _MixedEdgeInsets.fromLRSETB(
Mathf.Lerp(a._left, b._left, t),
Mathf.Lerp(a._right, b._right, t),
Mathf.Lerp(a._start, b._start, t),
Mathf.Lerp(a._end, b._end, t),
Mathf.Lerp(a._top, b._top, t),
Mathf.Lerp(a._bottom, b._bottom, t)
MathUtils.lerpNullableFloat(a._left, b._left, t),
MathUtils.lerpNullableFloat(a._right, b._right, t),
MathUtils.lerpNullableFloat(a._start, b._start, t),
MathUtils.lerpNullableFloat(a._end, b._end, t),
MathUtils.lerpNullableFloat(a._top, b._top, t),
MathUtils.lerpNullableFloat(a._bottom, b._bottom, t)
);
}

if (b == null)
return a * (1.0f - t);
return fromSTEB(
Mathf.Lerp(a.start, b.start, t),
Mathf.Lerp(a.top, b.top, t),
Mathf.Lerp(a.end, b.end, t),
Mathf.Lerp(a.bottom, b.bottom, t)
MathUtils.lerpNullableFloat(a.start, b.start, t),
MathUtils.lerpNullableFloat(a.top, b.top, t),
MathUtils.lerpNullableFloat(a.end, b.end, t),
MathUtils.lerpNullableFloat(a.bottom, b.bottom, t)
);
}

}
return fromLTRB(
Mathf.Lerp(a.left, b.left, t),
Mathf.Lerp(a.top, b.top, t),
Mathf.Lerp(a.right, b.right, t),
Mathf.Lerp(a.bottom, b.bottom, t)
MathUtils.lerpNullableFloat(a.left, b.left, t),
MathUtils.lerpNullableFloat(a.top, b.top, t),
MathUtils.lerpNullableFloat(a.right, b.right, t),
MathUtils.lerpNullableFloat(a.bottom, b.bottom, t)
);
}

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


}
if (a == null) {
return new FractionalOffset(Mathf.Lerp(0.5f, b.dx, t), Mathf.Lerp(0.5f, b.dy, t));
return new FractionalOffset(MathUtils.lerpNullableFloat(0.5f, b.dx, t), MathUtils.lerpNullableFloat(0.5f, b.dy, t));
return new FractionalOffset(Mathf.Lerp(a.dx, 0.5f, t), Mathf.Lerp(a.dy, 0.5f, t));
return new FractionalOffset(MathUtils.lerpNullableFloat(a.dx, 0.5f, t), MathUtils.lerpNullableFloat(a.dy, 0.5f, t));
return new FractionalOffset(Mathf.Lerp(a.dx, b.dx, t), Mathf.Lerp(a.dy, b.dy, t));
return new FractionalOffset(MathUtils.lerpNullableFloat(a.dx, b.dx, t), MathUtils.lerpNullableFloat(a.dy, b.dy, t));
}
public override string ToString() {

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


public class LinearGradient : Gradient, IEquatable<LinearGradient> {
public LinearGradient(
Alignment begin = null,
Alignment end = null,
AlignmentGeometry begin = null,
AlignmentGeometry end = null,
List<Color> colors = null,
List<float> stops = null,
TileMode tileMode = TileMode.clamp,

this.tileMode = tileMode;
}
public readonly Alignment begin;
public readonly AlignmentGeometry begin;
public readonly Alignment end;
public readonly AlignmentGeometry end;
begin.withinRect(rect),
end.withinRect(rect),
begin.resolve(textDirection).withinRect(rect),
end.resolve(textDirection).withinRect(rect),
colors, _impliedStops(),
tileMode, _resolveTransform(rect, textDirection)
);

b._impliedStops(),
t);
return new LinearGradient(
begin: Alignment.lerp(a.begin, b.begin, t),
end: Alignment.lerp(a.end, b.end, t),
begin: AlignmentGeometry.lerp(a.begin, b.begin, t),
end: AlignmentGeometry.lerp(a.end, b.end, t),
colors: interpolated.colors,
stops: interpolated.stops,
tileMode: t < 0.5 ? a.tileMode : b.tileMode

public class RadialGradient : Gradient, IEquatable<RadialGradient> {
public RadialGradient(
Alignment center = null,
AlignmentGeometry center = null,
AlignmentGeometry focal = null,
float focalRadius = 0.0f,
this.focal = focal;
this.focalRadius = focalRadius;
public readonly Alignment center;
public readonly AlignmentGeometry center;
public readonly float radius;

public override Shader createShader(Rect rect, TextDirection? textDirection = null) {
return ui.Gradient.radial(
center.withinRect(rect),
center.resolve(textDirection).withinRect(rect),
radius * rect.shortestSide,
colors, _impliedStops(),
tileMode,

b._impliedStops(),
t);
return new RadialGradient(
center: Alignment.lerp(a.center, b.center, t),
radius: Mathf.Max(0.0f, Mathf.Lerp(a.radius, b.radius, t)),
center: AlignmentGeometry.lerp(a.center, b.center, t),
radius: Mathf.Max(0.0f, MathUtils.lerpNullableFloat(a.radius, b.radius, t)),
tileMode: t < 0.5 ? a.tileMode : b.tileMode
tileMode: t < 0.5 ? a.tileMode : b.tileMode,
focal: AlignmentGeometry.lerp(a.focal, b.focal, t),
focalRadius: Mathf.Max(0.0f, MathUtils.lerpNullableFloat(a.focalRadius, b.focalRadius, t))
);
}

public class SweepGradient : Gradient, IEquatable<SweepGradient> {
public SweepGradient(
Alignment center = null,
AlignmentGeometry center = null,
float startAngle = 0.0f,
float endAngle = Mathf.PI * 2,
List<Color> colors = null,

this.tileMode = tileMode;
}
public readonly Alignment center;
public readonly AlignmentGeometry center;
public readonly float startAngle;

public override Shader createShader(Rect rect, TextDirection? textDirection = null) {
return ui.Gradient.sweep(
center.withinRect(rect),
center.resolve(textDirection).withinRect(rect),
colors, _impliedStops(),
tileMode,
startAngle, endAngle, _resolveTransform(rect, textDirection)

_ColorsAndStops._interpolateColorsAndStops(a.colors, a.stops, b.colors, b.stops, t);
return new SweepGradient(
center: Alignment.lerp(a.center, b.center, t),
startAngle: Mathf.Max(0.0f, Mathf.Lerp(a.startAngle, b.startAngle, t)),
endAngle: Mathf.Max(0.0f, Mathf.Lerp(a.endAngle, b.endAngle, t)),
startAngle: Mathf.Max(0.0f, MathUtils.lerpNullableFloat(a.startAngle, b.startAngle, t)),
endAngle: Mathf.Max(0.0f, MathUtils.lerpNullableFloat(a.endAngle, b.endAngle, t)),
colors: interpolated.colors,
stops: interpolated.stops,
tileMode: t < 0.5 ? a.tileMode : b.tileMode

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


public static Rect inverseTransformRect(Matrix4 transform, Rect rect) {
D.assert(rect != null);
D.assert(transform.determinant() != 0.0);
//FIXME: there is a bug here
//In flutter this assertion has been commented, but we cannot do it since the call of Matrix4.tryInvert will fail
//we need to find a better way to fix this issue here
// D.assert(transform.determinant() != 0.0);
transform = Matrix4.tryInvert(transform);
transform = Matrix4.copy(transform);
transform.invert();
return transformRect(transform, rect);
}

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


return new _RoundedRectangleToCircleBorder(
side: BorderSide.lerp(border.side, side, t),
borderRadius: BorderRadius.lerp(border.borderRadius, borderRadius, t),
circleness: Mathf.Lerp(border.circleness, circleness, t)
circleness: MathUtils.lerpNullableFloat(border.circleness, circleness, t)
);
}

return new _RoundedRectangleToCircleBorder(
side: BorderSide.lerp(side, border.side, t),
borderRadius: BorderRadius.lerp(borderRadius, border.borderRadius, t),
circleness: Mathf.Lerp(circleness, border.circleness, t)
circleness: MathUtils.lerpNullableFloat(circleness, border.circleness, t)
);
}

8
com.unity.uiwidgets/Runtime/painting/stadium_border.cs


if (a is _StadiumToCircleBorder border) {
return new _StadiumToCircleBorder(
side: BorderSide.lerp(border.side, side, t),
circleness: Mathf.Lerp(border.circleness, circleness, t)
circleness: MathUtils.lerpNullableFloat(border.circleness, circleness, t)
);
}

if (b is _StadiumToCircleBorder border) {
return new _StadiumToCircleBorder(
side: BorderSide.lerp(side, border.side, t),
circleness: Mathf.Lerp(circleness, border.circleness, t)
circleness: MathUtils.lerpNullableFloat(circleness, border.circleness, t)
);
}

return new _StadiumToRoundedRectangleBorder(
side: BorderSide.lerp(border.side, side, t),
borderRadius: BorderRadius.lerp(border.borderRadius, borderRadius, t),
rectness: Mathf.Lerp(border.rectness, rectness, t)
rectness: MathUtils.lerpNullableFloat(border.rectness, rectness, t)
);
}

return new _StadiumToRoundedRectangleBorder(
side: BorderSide.lerp(side, border.side, t),
borderRadius: BorderRadius.lerp(borderRadius, border.borderRadius, t),
rectness: Mathf.Lerp(rectness, border.rectness, t)
rectness: MathUtils.lerpNullableFloat(rectness, border.rectness, t)
);
}

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


decoration: t < 0.5 ? a.decoration : b.decoration,
decorationColor: Color.lerp(a.decorationColor, b.decorationColor, t),
decorationStyle: t < 0.5 ? a.decorationStyle : b.decorationStyle,
decorationThickness: Mathf.Lerp(
decorationThickness: MathUtils.lerpNullableFloat(
a.decorationThickness ?? b.decorationThickness ?? 0.0f,
b.decorationThickness ?? a.decorationThickness ?? 0.0f, t),
shadows: t < 0.5f ? a.shadows : b.shadows,

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


() => "Cannot interpolate between finite constraints and unbounded constraints.");
return new BoxConstraints(
minWidth: a.minWidth.isFinite()
? Mathf.Lerp(a.minWidth, b.minWidth, t)
? MathUtils.lerpNullableFloat(a.minWidth, b.minWidth, t)
? Mathf.Lerp(a.maxWidth, b.maxWidth, t)
? MathUtils.lerpNullableFloat(a.maxWidth, b.maxWidth, t)
? Mathf.Lerp(a.minHeight, b.minHeight, t)
? MathUtils.lerpNullableFloat(a.minHeight, b.minHeight, t)
? Mathf.Lerp(a.maxHeight, b.maxHeight, t)
? MathUtils.lerpNullableFloat(a.maxHeight, b.maxHeight, t)
: float.PositiveInfinity
);
}

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


if (_resetFloatingCursorAnimationValue != null) {
sizeAdjustmentX =
Mathf.Lerp(sizeAdjustmentX, 0f, _resetFloatingCursorAnimationValue.Value);
MathUtils.lerpNullableFloat(sizeAdjustmentX, 0f, _resetFloatingCursorAnimationValue.Value);
Mathf.Lerp(sizeAdjustmentY, 0f, _resetFloatingCursorAnimationValue.Value);
MathUtils.lerpNullableFloat(sizeAdjustmentY, 0f, _resetFloatingCursorAnimationValue.Value);
}
Rect floatingCaretPrototype = Rect.fromLTRB(

8
com.unity.uiwidgets/Runtime/rendering/stack.cs


}
return fromLTRB(
Mathf.Lerp(a.left, b.left, t),
Mathf.Lerp(a.top, b.top, t),
Mathf.Lerp(a.right, b.right, t),
Mathf.Lerp(a.bottom, b.bottom, t)
MathUtils.lerpNullableFloat(a.left, b.left, t),
MathUtils.lerpNullableFloat(a.top, b.top, t),
MathUtils.lerpNullableFloat(a.right, b.right, t),
MathUtils.lerpNullableFloat(a.bottom, b.bottom, t)
);
}

11
com.unity.uiwidgets/Runtime/ui2/Matrix4.cs


return result;
}
public Matrix4 copy(Matrix4 other) {
setFrom(other);
return this;
public static Matrix4 copy(Matrix4 other) {
var result = zero();
result.setFrom(other);
return result;
}

return r;
}
public Matrix4 clone() => new Matrix4().copy(this);
public Matrix4 clone() => copy(this);
public static Matrix4 operator *(Matrix4 a, Matrix4 b) {
var result = a.clone();

float invSY = 1.0f / sy;
float invSZ = 1.0f / sz;
Matrix4 m = new Matrix4().copy(this);
Matrix4 m = copy(this);
m._m4storage[0] *= invSX;
m._m4storage[1] *= invSX;
m._m4storage[2] *= invSX;

28
com.unity.uiwidgets/Runtime/ui2/geometry.cs


b = b ?? a;
return a + (b - a) * t;
}
public static float lerpNullableFloat(float a, float b, float t) {
return a + (b - a) * t;
}
public static int round(this float value) {
return Mathf.RoundToInt(value);

return a * (1.0f - t);
}
return new Offset(Mathf.Lerp(a.dx, b.dx, t), Mathf.Lerp(a.dy, b.dy, t));
return new Offset(MathUtils.lerpNullableFloat(a.dx, b.dx, t), MathUtils.lerpNullableFloat(a.dy, b.dy, t));
}
public bool Equals(Offset other) {

return a * (1.0f - t);
}
return new Size(Mathf.Lerp(a.width, b.width, t), Mathf.Lerp(a.height, b.height, t));
return new Size(MathUtils.lerpNullableFloat(a.width, b.width, t), MathUtils.lerpNullableFloat(a.height, b.height, t));
}
public bool Equals(Size other) {

}
return fromLTRB(
Mathf.Lerp(a.left, b.left, t),
Mathf.Lerp(a.top, b.top, t),
Mathf.Lerp(a.right, b.right, t),
Mathf.Lerp(a.bottom, b.bottom, t)
MathUtils.lerpNullableFloat(a.left, b.left, t),
MathUtils.lerpNullableFloat(a.top, b.top, t),
MathUtils.lerpNullableFloat(a.right, b.right, t),
MathUtils.lerpNullableFloat(a.bottom, b.bottom, t)
);
}

}
return elliptical(
Mathf.Lerp(a.x, b.x, t),
Mathf.Lerp(a.y, b.y, t)
MathUtils.lerpNullableFloat(a.x, b.x, t),
MathUtils.lerpNullableFloat(a.y, b.y, t)
);
}

}
return fromLTRBAndCorners(
Mathf.Lerp(a.left, b.left, t),
Mathf.Lerp(a.top, b.top, t),
Mathf.Lerp(a.right, b.right, t),
Mathf.Lerp(a.bottom, b.bottom, t),
MathUtils.lerpNullableFloat(a.left, b.left, t),
MathUtils.lerpNullableFloat(a.top, b.top, t),
MathUtils.lerpNullableFloat(a.right, b.right, t),
MathUtils.lerpNullableFloat(a.bottom, b.bottom, t),
Radius.lerp(a.tlRadius, b.tlRadius, t),
Radius.lerp(a.trRadius, b.trRadius, t),
Radius.lerp(a.brRadius, b.brRadius, t),

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


}
return fromARGB(
((int) Mathf.Lerp(a.alpha, b.alpha, t)).clamp(0, 255),
((int) Mathf.Lerp(a.red, b.red, t)).clamp(0, 255),
((int) Mathf.Lerp(a.green, b.green, t)).clamp(0, 255),
((int) Mathf.Lerp(a.blue, b.blue, t)).clamp(0, 255)
((int) MathUtils.lerpNullableFloat(a.alpha, b.alpha, t)).clamp(0, 255),
((int) MathUtils.lerpNullableFloat(a.red, b.red, t)).clamp(0, 255),
((int) MathUtils.lerpNullableFloat(a.green, b.green, t)).clamp(0, 255),
((int) MathUtils.lerpNullableFloat(a.blue, b.blue, t)).clamp(0, 255)
);
}

return new Shadow(
color: Color.lerp(a.color, b.color, t),
offset: Offset.lerp(a.offset, b.offset, t),
blurRadius: Mathf.Lerp(a.blurRadius, b.blurRadius, t)
blurRadius: MathUtils.lerpNullableFloat(a.blurRadius, b.blurRadius, t)
);
}

2
com.unity.uiwidgets/Runtime/ui2/text.cs


public static FontWeight lerp(FontWeight a, FontWeight b, float t) {
if (a == null && b == null)
return null;
return values[Mathf.Lerp(a?.index ?? normal.index, b?.index ?? normal.index, t).round().clamp(0, 8)];
return values[MathUtils.lerpNullableFloat(a?.index ?? normal.index, b?.index ?? normal.index, t).round().clamp(0, 8)];
}
public static readonly Dictionary<int, string> map = new Dictionary<int, string> {

8
com.unity.uiwidgets/Runtime/widgets/animated_cross_fade.cs


Curve firstCurve = null,
Curve secondCurve = null,
Curve sizeCurve = null,
Alignment alignment = null,
AlignmentGeometry alignment = null,
CrossFadeState? crossFadeState = null,
TimeSpan? duration = null,
TimeSpan? reverseDuration = null,

public readonly Curve sizeCurve;
public readonly Alignment alignment;
public readonly AlignmentGeometry alignment;
public readonly AnimatedCrossFadeBuilder layoutBuilder;

public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new EnumProperty<CrossFadeState>("crossFadeState", crossFadeState));
properties.add(new DiagnosticsProperty<Alignment>("alignment", alignment,
properties.add(new DiagnosticsProperty<AlignmentGeometry>("alignment", alignment,
defaultValue: Alignment.topCenter));
properties.add(new IntProperty("duration", duration?.Milliseconds, unit: "ms"));
properties.add(new IntProperty("reverseDuration", reverseDuration?.Milliseconds, unit: "ms", defaultValue: null));

description.add(new EnumProperty<CrossFadeState>("crossFadeState", widget.crossFadeState));
description.add(
new DiagnosticsProperty<AnimationController>("controller", _controller, showName: false));
description.add(new DiagnosticsProperty<Alignment>("alignment", widget.alignment,
description.add(new DiagnosticsProperty<AlignmentGeometry>("alignment", widget.alignment,
defaultValue: Alignment.topCenter));
}
}

87
com.unity.uiwidgets/Runtime/widgets/dismissible.cs


}
_dragUnderway = false;
_confirmStartResizeAnimation().then_((value) => {
if (_moveController.isCompleted && value) {
_startResizeAnimation();
}
else {
float flingVelocity = _directionIsXAxis
? details.velocity.pixelsPerSecond.dx
: details.velocity.pixelsPerSecond.dy;
switch (_describeFlingGesture(details.velocity)) {
case _FlingGestureKind.forward:
D.assert(_dragExtent != 0.0f);
D.assert(!_moveController.isDismissed);
if ((widget.dismissThresholds.getOrDefault(_dismissDirection) ??
_kDismissThreshold) >= 1.0) {
_moveController.reverse();
break;
}
if (_moveController.isCompleted) {
_confirmStartResizeAnimation().then_((value) => {
if (value) {
_startResizeAnimation();
return;
}
});
}
_dragExtent = flingVelocity.sign();
_moveController.fling(velocity: flingVelocity.abs() * _kFlingVelocityScale);
break;
case _FlingGestureKind.reverse:
D.assert(_dragExtent != 0.0f);
D.assert(!_moveController.isDismissed);
_dragExtent = flingVelocity.sign();
_moveController.fling(velocity: -flingVelocity.abs() * _kFlingVelocityScale);
break;
case _FlingGestureKind.none:
if (!_moveController.isDismissed) {
// we already know it's not completed, we check that above
if (_moveController.value >
(widget.dismissThresholds.getOrDefault(_dismissDirection) ??
_kDismissThreshold)) {
_moveController.forward();
}
else {
_moveController.reverse();
}
}
float flingVelocity = _directionIsXAxis
? details.velocity.pixelsPerSecond.dx
: details.velocity.pixelsPerSecond.dy;
switch (_describeFlingGesture(details.velocity)) {
case _FlingGestureKind.forward:
D.assert(_dragExtent != 0.0f);
D.assert(!_moveController.isDismissed);
if ((widget.dismissThresholds.getOrDefault(_dismissDirection) ??
_kDismissThreshold) >= 1.0) {
_moveController.reverse();
break;
}
break;
_dragExtent = flingVelocity.sign();
_moveController.fling(velocity: flingVelocity.abs() * _kFlingVelocityScale);
break;
case _FlingGestureKind.reverse:
D.assert(_dragExtent != 0.0f);
D.assert(!_moveController.isDismissed);
_dragExtent = flingVelocity.sign();
_moveController.fling(velocity: -flingVelocity.abs() * _kFlingVelocityScale);
break;
case _FlingGestureKind.none:
if (!_moveController.isDismissed) {
// we already know it's not completed, we check that above
if (_moveController.value >
(widget.dismissThresholds.getOrDefault(_dismissDirection) ??
_kDismissThreshold)) {
_moveController.forward();
}
else {
_moveController.reverse();
}
}
});
break;
}
}
void _handleDismissStatusChanged(AnimationStatus status) {

D.assert(() => {
if (_resizeAnimation.status != AnimationStatus.forward) {
D.assert(_resizeAnimation.status == AnimationStatus.completed);
throw new UIWidgetsError(new List<DiagnosticsNode>{
throw new UIWidgetsError(new List<DiagnosticsNode> {
new ErrorSummary("A dismissed Dismissible widget is still part of the tree."),
new ErrorHint(
"Make sure to implement the onDismissed handler and to immediately remove the Dismissible " +

children.Add(content);
content = new Stack(children: children);
}
return new GestureDetector(

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


}
else {
float lerpValue = _floatingCursorResetController.value;
float lerpX = Mathf.Lerp(_lastBoundedOffset.dx, finalPosition.dx, lerpValue);
float lerpY = Mathf.Lerp(_lastBoundedOffset.dy, finalPosition.dy, lerpValue);
float lerpX = MathUtils.lerpNullableFloat(_lastBoundedOffset.dx, finalPosition.dx, lerpValue);
float lerpY = MathUtils.lerpNullableFloat(_lastBoundedOffset.dy, finalPosition.dy, lerpValue);
renderEditable.setFloatingCursor(FloatingCursorDragState.Update, new Offset(lerpX, lerpY),
_lastTextPosition, resetLerpValue: lerpValue);

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


get { return FocusManager.instance.highlightMode; }
}
public FocusScopeNode nearestScope {
public virtual FocusScopeNode nearestScope {
get { return enclosingScope; }
}

skipTraversal: skipTraversal
) {}
public FocusScopeNode nearestScope {
public override FocusScopeNode nearestScope {
get { return this; }
}

8
com.unity.uiwidgets/Runtime/widgets/form.cs


public delegate void FormFieldSetter<T>(T newValue);
public delegate Widget FormFieldBuilder<T>(FormFieldState<T> field) where T : class;
public delegate Widget FormFieldBuilder<T>(FormFieldState<T> field);
public class FormField<T> : StatefulWidget where T : class {
public class FormField<T> : StatefulWidget {
T initialValue = null,
T initialValue = default,
bool autovalidate = false,
bool enabled = true
) : base(key: key) {

void reset();
}
public class FormFieldState<T> : State<FormField<T>>, FormFieldState where T : class {
public class FormFieldState<T> : State<FormField<T>>, FormFieldState {
T _value;
string _errorText;

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


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

public override void didChangeDependencies() {
base.didChangeDependencies();
bool _didChangeDependencies = true;
_didChangeDependencies = true;
}
public override DiagnosticsNode toDiagnosticsNode(string name = null,

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


}
D.assert(entry != null);
_history.Remove(entry);
entry.remove();
_flushHistoryUpdates(rearrangeOverlay: false);
D.assert(() => {
_debugLocked = false;

_debugLocked = true;
return true;
});
// D.assert(_history.Where(_RouteEntry.isRoutePredicate(route)).Count() == 1);
List<_RouteEntry> routeEntries = new List<_RouteEntry>();
foreach (var historyEntry in _history) {
if (_RouteEntry.isRoutePredicate(route)(historyEntry)) {

2
com.unity.uiwidgets/Runtime/widgets/nested_scroll_view.cs


: new ClampingScrollPhysics(),
controller: _coordinator._outerController,
slivers: widget._buildSlivers(
context,
_context,
_coordinator._innerController,
_lastHasScrolledBody
),

24
com.unity.uiwidgets/Runtime/widgets/routes.cs


public _ModalScope(
Key key = null,
ModalRoute<T> route = null)
: base(key) {
: base(key, route) {
public readonly new ModalRoute<T> route;
public new readonly ModalRoute<T> route;
public override State createState() {
return new _ModalScopeState<T>();

_ModalScopeState scope = _scopeKey.currentState as _ModalScopeState ;
D.assert(scope != null);
bool result = false;
foreach (WillPopCallback callback in _willPopCallbacks) {
callback.Invoke().then(v => result = !(bool)v);
if (result) {
return Future.value(RoutePopDisposition.doNotPop).to<RoutePopDisposition>();
Future InvokePopCallbacks(int index) {
if (index == _willPopCallbacks.Count) {
return base.willPop();
var callback = _willPopCallbacks[index];
return callback.Invoke().then(v => {
if (!(bool) v) {
return Future.value(RoutePopDisposition.doNotPop);
}
return InvokePopCallbacks(index + 1);
});
return base.willPop();
return InvokePopCallbacks(0).to<RoutePopDisposition>();
}
public void addScopedWillPopCallback(WillPopCallback callback) {

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


this.keepScrollOffset = keepScrollOffset;
this.debugLabel = debugLabel;
_coordinator = coordinator;
if (oldPosition != null) {
absorb(oldPosition);
}

public bool hasMaxScrollExtent {
get { return _maxScrollExtent != null; }
}
public override float pixels {
get {
D.assert(_pixels != null);

6
com.unity.uiwidgets/Runtime/widgets/transitions.cs


public class AlignTransition : AnimatedWidget {
public AlignTransition(
Animation<Alignment> alignment,
Animation<AlignmentGeometry> alignment,
Widget child,
Key key = null,
float? widthFactor = null,

this.heightFactor = heightFactor;
}
Animation<Alignment> alignment {
get { return (Animation<Alignment>) listenable; }
Animation<AlignmentGeometry> alignment {
get { return (Animation<AlignmentGeometry>) listenable; }
}
public readonly float? widthFactor;

2
engine/src/shell/platform/unity/darwin/macos/uiwidgets_panel.h


void VSyncCallback(intptr_t baton);
void OnKeyDown(int keyCode, bool isKeyDown);
void OnMouseMove(float x, float y);
void OnMouseDown(float x, float y, int button);

24
engine/src/shell/platform/unity/darwin/macos/uiwidgets_panel.mm


}
}
void UIWidgetsPanel::OnKeyDown(int keyCode, bool isKeyDown) {
if (process_events_) {
UIWidgetsPointerEvent event = {};
event.phase = isKeyDown ? UIWidgetsPointerPhase::kMouseDown : UIWidgetsPointerPhase::kMouseUp;
event.device_kind =
UIWidgetsPointerDeviceKind::kUIWidgetsPointerDeviceKindKeyboard;
event.buttons = keyCode;
event.struct_size = sizeof(event);
event.timestamp =
std::chrono::duration_cast<std::chrono::microseconds>(
std::chrono::high_resolution_clock::now().time_since_epoch())
.count();
UIWidgetsEngineSendPointerEvent(engine_, &event, 1);
}
}
void UIWidgetsPanel::OnMouseMove(float x, float y) {
if (process_events_) {
SendMouseMove(x, y);

UIWIDGETS_API(void)
UIWidgetsPanel_unregisterTexture(UIWidgetsPanel* panel, int texture_id) {
panel->UnregisterTexture(texture_id);
}
UIWIDGETS_API(void)
UIWidgetsPanel_onKey(UIWidgetsPanel* panel, int keyCode, bool isKeyDown) {
panel->OnKeyDown(keyCode, isKeyDown);
}
UIWIDGETS_API(void)

23
engine/src/shell/platform/unity/darwin/macos/unity_surface_manager.mm


gl_context_ = [[NSOpenGLContext alloc] initWithFormat:pixelFormat shareContext:nil];
gl_resource_context_ = [[NSOpenGLContext alloc] initWithFormat:pixelFormat shareContext:gl_context_];
FML_DCHECK(gl_context_ != nullptr && gl_resource_context_ != nullptr);
FML_DCHECK(gl_context_ != nullptr);
}
UnitySurfaceManager::~UnitySurfaceManager() { ReleaseNativeRenderContext(); }

const GLuint ConstGLType = GL_UNSIGNED_INT_8_8_8_8_REV;
//render context must be available
FML_DCHECK(metal_device_ != nullptr && gl_context_ != nullptr && gl_resource_context_ != nullptr);
FML_DCHECK(metal_device_ != nullptr && gl_context_ != nullptr);
//render textures must be released already
FML_DCHECK(pixelbuffer_ref == nullptr && default_fbo_ == 0 && gl_tex_ == 0 && gl_tex_cache_ref_ == nullptr && gl_tex_ref_ == nullptr && metal_tex_ == nullptr && metal_tex_ref_ == nullptr && metal_tex_cache_ref_ == nullptr);

bool UnitySurfaceManager::MakeCurrentResourceContext()
{
[gl_resource_context_ makeCurrentContext];
if (gl_resource_context_ == nullptr)
{
[gl_context_ makeCurrentContext];
}
else
{
[gl_resource_context_ makeCurrentContext];
}
return true;
}

void UnitySurfaceManager::ReleaseNativeRenderContext()
{
FML_DCHECK(gl_resource_context_);
CGLReleaseContext(gl_resource_context_.CGLContextObj);
gl_resource_context_ = nullptr;
if (gl_resource_context_ != nullptr)
{
CGLReleaseContext(gl_resource_context_.CGLContextObj);
gl_resource_context_ = nullptr;
}
FML_DCHECK(gl_context_);
CGLReleaseContext(gl_context_.CGLContextObj);

return true;
}
} // namespace uiwidgets
} // namespace uiwidgets

112
Samples/UIWidgetsSamples_2019_4/Assets/MaterialSample/NavigatorPopSample.cs


using System.Collections.Generic;
using Unity.UIWidgets.async2;
using Unity.UIWidgets.engine2;
using Unity.UIWidgets.material;
using Unity.UIWidgets.painting;
using Unity.UIWidgets.rendering;
using Unity.UIWidgets.widgets;
namespace UIWidgetsSample
{
public class NavigatorPopSample : UIWidgetsPanel
{
protected override void main()
{
ui_.runApp(new MaterialApp(
title: "Returning Data",
home: new PopDemo()));
}
protected new void OnEnable()
{
base.OnEnable();
}
}
public class PopDemo : StatelessWidget
{
public override Widget build(BuildContext context)
{
return new Scaffold(
appBar: new AppBar(
title: new Text("Returning Data Demo")
),
body: new Center(child: new SelectionButton())
);
}
}
internal class SelectionButton : StatelessWidget
{
public override Widget build(BuildContext context)
{
return new RaisedButton(
onPressed: () => { _navigateAndDisplaySelection(context); },
child: new Text("Pick an option, any option!")
);
}
// A method that launches the SelectionScreen and awaits the result from
// Navigator.pop!
private void _navigateAndDisplaySelection(BuildContext context)
{
// Navigator.push returns a Future that will complete after we call
// Navigator.pop on the Selection Screen!
Future<bool> result = Navigator.push<bool>(
context,
new MaterialPageRoute(builder: (subContext) => new SelectionScreen())
);
// After the Selection Screen returns a result, show it in a Snackbar!
result.then(value =>
{
bool res = (bool) value;
Scaffold
.of(context)
.showSnackBar(new SnackBar(content: new Text($"{res}")));
});
}
}
internal class SelectionScreen : StatelessWidget
{
public override Widget build(BuildContext context)
{
return new Scaffold(
appBar: new AppBar(
title: new Text("Pick an option")
),
body: new Center(
child: new Column(
mainAxisAlignment: MainAxisAlignment.center,
children: new List<Widget>
{
new Padding(
padding: EdgeInsets.all(8.0f),
child: new RaisedButton(
onPressed: () =>
{
// Close the screen and return "Yep!" as the result
Navigator.pop(context, true);
},
child: new Text("Yep!")
)
),
new Padding(
padding: EdgeInsets.all(8.0f),
child: new RaisedButton(
onPressed: () =>
{
// Close the screen and return "Nope!" as the result
Navigator.pop(context, false);
},
child: new Text("Nope.")
)
)
}
)
)
);
}
}
}

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


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 11
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 12
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_ExtractAmbientOcclusion: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 1
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 512
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 256
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 1
m_PVRDenoiserTypeDirect: 1
m_PVRDenoiserTypeIndirect: 1
m_PVRDenoiserTypeAO: 1
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_UseShadowmask: 1
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &764046566
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 764046568}
- component: {fileID: 764046567}
m_Layer: 0
m_Name: Directional Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!108 &764046567
Light:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 764046566}
m_Enabled: 1
serializedVersion: 10
m_Type: 1
m_Shape: 0
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_InnerSpotAngle: 21.80208
m_CookieSize: 10
m_Shadows:
m_Type: 2
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_CullingMatrixOverride:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_UseCullingMatrixOverride: 0
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingLayerMask: 1
m_Lightmapping: 4
m_LightShadowCasterMode: 0
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
m_UseBoundingSphereOverride: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!4 &764046568
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 764046566}
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1 &847097468
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 847097469}
- component: {fileID: 847097471}
- component: {fileID: 847097470}
m_Layer: 5
m_Name: RawImage
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &847097469
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 847097468}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2122288190}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &847097470
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 847097468}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9c5c86936ca864ae684720ddcd50d759, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Texture: {fileID: 0}
m_UVRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
fonts:
- family: Material Icons
fonts:
- asset: MaterialIcons-Regular.ttf
weight: 0
- family: CupertinoIcons
fonts:
- asset: CupertinoIcons.ttf
weight: 0
- family: GalleryIcons
fonts:
- asset: gallery/GalleryIcons.ttf
weight: 0
devicePixelRatioOverride: 1
hardwareAntiAliasing: 0
--- !u!222 &847097471
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 847097468}
m_CullTransparentMesh: 0
--- !u!1 &1548023132
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1548023135}
- component: {fileID: 1548023134}
- component: {fileID: 1548023133}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &1548023133
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1548023132}
m_Enabled: 1
--- !u!20 &1548023134
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1548023132}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 1
orthographic size: 5.6
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &1548023135
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1548023132}
m_LocalRotation: {x: 0, y: 0.7071068, z: -0.7071068, w: 0}
m_LocalPosition: {x: 0, y: 1, z: 0.32}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 90, y: 180, z: 0}
--- !u!1 &1900497009
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1900497012}
- component: {fileID: 1900497011}
- component: {fileID: 1900497010}
m_Layer: 0
m_Name: EventSystem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1900497010
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1900497009}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalAxis: Horizontal
m_VerticalAxis: Vertical
m_SubmitButton: Submit
m_CancelButton: Cancel
m_InputActionsPerSecond: 10
m_RepeatDelay: 0.5
m_ForceModuleActive: 0
--- !u!114 &1900497011
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1900497009}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FirstSelected: {fileID: 0}
m_sendNavigationEvents: 1
m_DragThreshold: 10
--- !u!4 &1900497012
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1900497009}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2122288186
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2122288190}
- component: {fileID: 2122288189}
- component: {fileID: 2122288188}
- component: {fileID: 2122288187}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &2122288187
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2122288186}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &2122288188
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2122288186}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
--- !u!223 &2122288189
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2122288186}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!224 &2122288190
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2122288186}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 847097469}
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}

7
Samples/UIWidgetsSamples_2019_4/Assets/Scene/GalleryTest.unity.meta


fileFormatVersion: 2
guid: 27915d755e23b4d4a893865b51d5203b
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Samples/UIWidgetsSamples_2019_4/Assets/StreamingAssets/gallery/people.meta


fileFormatVersion: 2
guid: 2dbbafa041af0734d80ee32fb2a86acd
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

7
Samples/UIWidgetsSamples_2019_4/Assets/StreamingAssets/gallery/people/ali_landscape.png.meta


fileFormatVersion: 2
guid: 01e7bfe3faad80844bd0b5646771537b
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Samples/UIWidgetsSamples_2019_4/Assets/StreamingAssets/gallery/people/square.meta


fileFormatVersion: 2
guid: cb13df95cf832d54582aa9f2cba091cd
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

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

正在加载...
取消
保存