浏览代码

[Cupertino] Fix bugs & Update Gallery.

/main
iizzaya 5 年前
当前提交
653f437c
共有 18 个文件被更改,包括 3607 次插入391 次删除
  1. 36
      Runtime/cupertino/nav_bar.cs
  2. 16
      Runtime/cupertino/scrollbar.cs
  3. 25
      Runtime/cupertino/switch.cs
  4. 25
      Runtime/ui/text.cs
  5. 5
      Samples/UIWidgetsGallery/Editor/GalleryMainEditor.cs
  6. 5
      Samples/UIWidgetsGallery/GalleryMain.cs
  7. 30
      Samples/UIWidgetsGallery/gallery/demo.cs
  8. 681
      Samples/UIWidgetsGallery/gallery/demos.cs
  9. 8
      Samples/UIWidgetsGallery/demo/cupertino.meta
  10. 1001
      Tests/Resources/SF-Pro-Text-Bold.otf
  11. 24
      Tests/Resources/SF-Pro-Text-Bold.otf.meta
  12. 1001
      Tests/Resources/SF-Pro-Text-Regular.otf
  13. 22
      Tests/Resources/SF-Pro-Text-Regular.otf.meta
  14. 1001
      Tests/Resources/SF-Pro-Text-Semibold.otf
  15. 23
      Tests/Resources/SF-Pro-Text-Semibold.otf.meta
  16. 84
      Samples/UIWidgetsGallery/demo/cupertino/cupertino_buttons_demo.cs
  17. 11
      Samples/UIWidgetsGallery/demo/cupertino/cupertino_buttons_demo.cs.meta

36
Runtime/cupertino/nav_bar.cs


using Color = Unity.UIWidgets.ui.Color;
using Rect = Unity.UIWidgets.ui.Rect;
using TextStyle = Unity.UIWidgets.painting.TextStyle;
using Transform = Unity.UIWidgets.widgets.Transform;
namespace Unity.UIWidgets.cupertino {
class NavBarUtils {

public static readonly _HeroTag _defaultHeroTag = new _HeroTag(null);
public static Widget _wrapWithBackground(
Border border,
Color backgroundColor,
Widget child,
Border border = null,
Color backgroundColor = null,
Widget child = null,
bool updateSystemUiOverlay = true
) {
Widget result = child;

bool transitionBetweenRoutes = true,
object heroTag = null
) : base(key: key) {
D.assert(
heroTag != null,
() => "heroTag cannot be null. Use transitionBetweenRoutes = false to " +
"disable Hero transition on this navigation bar."
);
D.assert(
!transitionBetweenRoutes || ReferenceEquals(heroTag, NavBarUtils._defaultHeroTag),
() => "Cannot specify a heroTag override if this navigation bar does not " +
"transition due to transitionBetweenRoutes = false."
);
this.leading = leading;
this.automaticallyImplyLeading = automaticallyImplyLeading;
this.automaticallyImplyMiddle = automaticallyImplyMiddle;

this.actionsForegroundColor = actionsForegroundColor;
this.transitionBetweenRoutes = transitionBetweenRoutes;
this.heroTag = heroTag ?? NavBarUtils._defaultHeroTag;
D.assert(
this.heroTag != null,
() => "heroTag cannot be null. Use transitionBetweenRoutes = false to " +
"disable Hero transition on this navigation bar."
);
D.assert(
!transitionBetweenRoutes || ReferenceEquals(this.heroTag, NavBarUtils._defaultHeroTag),
() => "Cannot specify a heroTag override if this navigation bar does not " +
"transition due to transitionBetweenRoutes = false."
);
}
public readonly Widget leading;

EdgeInsets padding = null,
bool? middleVisible = null
) : base(key: key) {
this.components = components;
this.padding = padding;
this.middleVisible = middleVisible ?? true;
}
public readonly _NavigationBarStaticComponents components;

class _BackChevron : StatelessWidget {
public _BackChevron(Key key = null) : base(key: key) {
}
public _BackChevron(Key key = null) : base(key: key) { }
public override Widget build(BuildContext context) {
TextStyle textStyle = DefaultTextStyle.of(context).style;

) : base(key: componentsKeys.navBarBoxKey) {
D.assert(largeExpanded != null);
D.assert(!largeExpanded.Value || this.largeTitleTextStyle != null);
this.componentsKeys = componentsKeys;
this.backgroundColor = backgroundColor;
this.backButtonTextStyle = backButtonTextStyle;

16
Runtime/cupertino/scrollbar.cs


using Unity.UIWidgets.widgets;
namespace Unity.UIWidgets.cupertino {
public class CupertinoScrollbarUtils {
class CupertinoScrollbarUtils {
public static float _kScrollbarThickness = 2.5f;
public static float _kScrollbarMainAxisMargin = 4.0f;
public static float _kScrollbarCrossAxisMargin = 2.5f;
public static float _kScrollbarMinLength = 36.0f;
public static float _kScrollbarMinOverscrollLength = 8.0f;
public const float _kScrollbarThickness = 2.5f;
public const float _kScrollbarMainAxisMargin = 4.0f;
public const float _kScrollbarCrossAxisMargin = 2.5f;
public const float _kScrollbarMinLength = 36.0f;
public const float _kScrollbarMinOverscrollLength = 8.0f;
public static Radius _kScrollbarRadius = Radius.circular(1.25f);
public static TimeSpan _kScrollbarTimeToFade = new TimeSpan(0, 0, 0, 0, 50);
public static TimeSpan _kScrollbarFadeDuration = new TimeSpan(0, 0, 0, 0, 250);

public readonly Widget child;
public override State createState() => new _CupertinoScrollbarState();
public override State createState() {
return new _CupertinoScrollbarState();
}
}
class _CupertinoScrollbarState : TickerProviderStateMixin<CupertinoScrollbar> {

25
Runtime/cupertino/switch.cs


public override RenderObject createRenderObject(BuildContext context) {
return (RenderObject) new _RenderCupertinoSwitch(
return new _RenderCupertinoSwitch(
value: this.value,
activeColor: this.activeColor,
onChanged: this.onChanged,

Color activeColor,
TextDirection textDirection,
TickerProvider vsync,
ValueChanged<bool> onChanged,
ValueChanged<bool> onChanged = null,
DragStartBehavior dragStartBehavior = DragStartBehavior.start
) : base(additionalConstraints: BoxConstraints.tightFor(
width: CupertinoSwitchUtils._kSwitchWidth,

}
this._value = value;
// this.markNeedsSemanticsUpdate();
this._position.curve = Curves.ease;
this._position.reverseCurve = Curves.ease.flipped;
if (value) {

}
bool _value;
public TickerProvider vsync {
get { return this._vsync; }

this._position.curve = null;
this._position.reverseCurve = null;
float delta = details.primaryDelta / CupertinoSwitchUtils._kTrackInnerLength ?? 0f;
switch (this.textDirection) {
case TextDirection.rtl:
this._positionController.setValue(this._positionController.value - delta);
break;
case TextDirection.ltr:
this._positionController.setValue(this._positionController.value + delta);
break;
}
this._positionController.setValue(this._positionController.value + delta);
// switch (this.textDirection) {
// case TextDirection.rtl:
// this._positionController.setValue(this._positionController.value - delta);
// break;
// case TextDirection.ltr:
// this._positionController.setValue(this._positionController.value + delta);
// break;
// }
}
}

25
Runtime/ui/text.cs


public readonly int index;
public static readonly FontWeight w100 = new FontWeight(0);
public static readonly FontWeight w200 = new FontWeight(1);
public static readonly FontWeight w300 = new FontWeight(2);
public static readonly FontWeight w400 = new FontWeight(3);
public static readonly FontWeight w500 = new FontWeight(4);
public static readonly FontWeight w600 = new FontWeight(5);
public static readonly FontWeight w700 = new FontWeight(6);
public static readonly FontWeight w800 = new FontWeight(7);
public static readonly FontWeight w900 = new FontWeight(8);
public static readonly FontWeight w100 = new FontWeight(0); // Ultralight
public static readonly FontWeight w200 = new FontWeight(1); // Thin
public static readonly FontWeight w300 = new FontWeight(2); // Light
public static readonly FontWeight w400 = new FontWeight(3); // Regular
public static readonly FontWeight w500 = new FontWeight(4); // Medium
public static readonly FontWeight w600 = new FontWeight(5); // Semibold
public static readonly FontWeight w700 = new FontWeight(6); // Bold
public static readonly FontWeight w800 = new FontWeight(7); // Heavy
public static readonly FontWeight w900 = new FontWeight(8); // Black
public static readonly FontWeight bold = w700;

5
Samples/UIWidgetsGallery/Editor/GalleryMainEditor.cs


protected override void OnEnable() {
FontManager.instance.addFont(Resources.Load<Font>("MaterialIcons-Regular"), "Material Icons");
FontManager.instance.addFont(Resources.Load<Font>("GalleryIcons"), "GalleryIcons");
FontManager.instance.addFont(Resources.Load<Font>("CupertinoIcons"), "CupertinoIcons");
FontManager.instance.addFont(Resources.Load<Font>(path: "SF-Pro-Text-Regular"), ".SF Pro Text", FontWeight.w400);
FontManager.instance.addFont(Resources.Load<Font>(path: "SF-Pro-Text-Semibold"), ".SF Pro Text", FontWeight.w600);
FontManager.instance.addFont(Resources.Load<Font>(path: "SF-Pro-Text-Bold"), ".SF Pro Text", FontWeight.w700);
base.OnEnable();
}
}

5
Samples/UIWidgetsGallery/GalleryMain.cs


FontManager.instance.addFont(Resources.Load<Font>("MaterialIcons-Regular"), "Material Icons");
FontManager.instance.addFont(Resources.Load<Font>("GalleryIcons"), "GalleryIcons");
FontManager.instance.addFont(Resources.Load<Font>("CupertinoIcons"), "CupertinoIcons");
FontManager.instance.addFont(Resources.Load<Font>(path: "SF-Pro-Text-Regular"), ".SF Pro Text", FontWeight.w400);
FontManager.instance.addFont(Resources.Load<Font>(path: "SF-Pro-Text-Semibold"), ".SF Pro Text", FontWeight.w600);
FontManager.instance.addFont(Resources.Load<Font>(path: "SF-Pro-Text-Bold"), ".SF Pro Text", FontWeight.w700);
base.OnEnable();
}
}

30
Samples/UIWidgetsGallery/gallery/demo.cs


using System.Collections.Generic;
using System.Linq;
using Unity.UIWidgets.cupertino;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.material;
using Unity.UIWidgets.painting;

&& other.description == this.description
&& other.documentationUrl == this.documentationUrl;
}
public override bool Equals(object obj) {
if (ReferenceEquals(null, obj)) {
return false;

}
public class FullScreenCodeDialogState : State<FullScreenCodeDialog> {
public FullScreenCodeDialogState() {
}
public FullScreenCodeDialogState() { }
string _exampleCode;

return new IconButton(
icon: new Icon(Icons.library_books),
tooltip: "API documentation",
onPressed: () => Application.OpenURL(this.documentationUrl)
);
}
}
class CupertinoDemoDocumentationButton : StatelessWidget {
public CupertinoDemoDocumentationButton(
string routeName,
Key key = null
) : base(key: key) {
this.documentationUrl = DemoUtils.kDemoDocumentationUrl[routeName];
D.assert(
DemoUtils.kDemoDocumentationUrl[routeName] != null,
() => $"A documentation URL was not specified for demo route {routeName} in kAllGalleryDemos"
);
}
public readonly string documentationUrl;
public override Widget build(BuildContext context) {
return new CupertinoButton(
padding: EdgeInsets.zero,
child: new Icon(CupertinoIcons.book),
onPressed: () => Application.OpenURL(this.documentationUrl)
);
}

681
Samples/UIWidgetsGallery/gallery/demos.cs


using System.Collections.Generic;
using System.Linq;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.material;
using Unity.UIWidgets.widgets;
namespace UIWidgetsGallery.gallery {

if (ReferenceEquals(null, other)) {
return false;
}
return string.Equals(this.name, other.name) && Equals(this.icon, other.icon);
}

}
return this.Equals((GalleryDemoCategory) obj);
}

public override string ToString() {
return $"{this.GetType()}({this.title} {this.routeName})";
}
}
public static partial class DemoUtils {

title: "Shrine",
subtitle: "Basic shopping app",
icon: GalleryIcons.shrine,
category: DemoUtils._kDemos,
category: _kDemos,
routeName: ShrineDemo.routeName,
buildRoute: (BuildContext context) => new ShrineDemo()
),

icon: GalleryIcons.account_box,
category: DemoUtils._kDemos,
category: _kDemos,
routeName: ContactsDemo.routeName,
buildRoute: (BuildContext context) => new ContactsDemo()
),

icon: GalleryIcons.animation,
category: DemoUtils._kDemos,
category: _kDemos,
routeName: AnimationDemo.routeName,
buildRoute: (BuildContext context) => new AnimationDemo()
),

title: "Colors",
subtitle: "All of the predefined colors",
icon: GalleryIcons.colors,
category: DemoUtils._kStyle,
category: _kStyle,
routeName: ColorsDemo.routeName,
buildRoute: (BuildContext context) => new ColorsDemo()
),

icon: GalleryIcons.custom_typography,
category: DemoUtils._kStyle,
category: _kStyle,
routeName: TypographyDemo.routeName,
buildRoute: (BuildContext context) => new TypographyDemo()
),

title: "Backdrop",
subtitle: "Select a front layer from back layer",
icon: GalleryIcons.backdrop,
category: DemoUtils._kMaterialComponents,
category: _kMaterialComponents,
routeName: BackdropDemo.routeName,
buildRoute: (BuildContext context) => new BackdropDemo()
),

icon: GalleryIcons.bottom_app_bar,
category: DemoUtils._kMaterialComponents,
category: _kMaterialComponents,
routeName: BottomAppBarDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/material/BottomAppBar-class.html",
buildRoute: (BuildContext context) => new BottomAppBarDemo()

subtitle: "Bottom navigation with cross-fading views",
icon: GalleryIcons.bottom_navigation,
category: DemoUtils._kMaterialComponents,
category: _kMaterialComponents,
routeName: BottomNavigationDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/material/BottomNavigationBar-class.html",
buildRoute: (BuildContext context) => new BottomNavigationDemo()

title: "Buttons",
subtitle: "Flat, raised, dropdown, and more",
icon: GalleryIcons.generic_buttons,
category: DemoUtils._kMaterialComponents,
category: _kMaterialComponents,
routeName: ButtonsDemo.routeName,
buildRoute: (BuildContext context) => new ButtonsDemo()
),

title: "Cards",
subtitle: "Baseline cards with rounded corners",
icon: GalleryIcons.cards,
category: DemoUtils._kMaterialComponents,
category: _kMaterialComponents,
routeName: CardsDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/material/Card-class.html",
buildRoute: (BuildContext context) => new CardsDemo()

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) => DataTableDemo()
// ),
// 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) => 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) => ElevationDemo()
// ),
// new GalleryDemo(
// title: "Expand/collapse list control",
// subtitle: "A list with one sub-list level",
// icon: GalleryIcons.expand_all,
// category: GalleryDemoCategory._kMaterialComponents,
// routeName: TwoLevelListDemo.routeName,
// documentationUrl: "https://docs.flutter.io/flutter/material/ExpansionTile-class.html",
// buildRoute: (BuildContext context) => TwoLevelListDemo()
// ),
// 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) => 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) => 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: "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) => DrawerDemo()
// ),
// 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) => PageSelectorDemo()
// ),
// new GalleryDemo(
// title: "Pickers",
// subtitle: "Date and time selection widgets",
// icon: GalleryIcons.@event,
// category: GalleryDemoCategory._kMaterialComponents,
// routeName: DateAndTimePickerDemo.routeName,
// documentationUrl: "https://docs.flutter.io/flutter/material/showDatePicker.html",
// buildRoute: (BuildContext context) => DateAndTimePickerDemo()
// ),
// 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) => ProgressIndicatorDemo()
// ),
// 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) => 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) => 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) => 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) => 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) => 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) => TabsDemo()
// ),
// 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) => 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) => const 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) => TooltipDemo()
// ),
//
// // Cupertino Components
// new 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) => CupertinoProgressIndicatorDemo()
// ),
// new GalleryDemo(
// title: "Alerts",
// icon: GalleryIcons.dialogs,
// category: GalleryDemoCategory._kCupertinoComponents,
// routeName: CupertinoAlertDemo.routeName,
// documentationUrl: "https://docs.flutter.io/flutter/cupertino/showCupertinoDialog.html",
// buildRoute: (BuildContext context) => CupertinoAlertDemo()
// ),
// new GalleryDemo(
// 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) => CupertinoButtonsDemo()
// ),
// new GalleryDemo(
// 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) => CupertinoNavigationDemo()
// ),
// new GalleryDemo(
// title: "Pickers",
// icon: GalleryIcons.@event,
// category: GalleryDemoCategory._kCupertinoComponents,
// routeName: CupertinoPickerDemo.routeName,
// documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoPicker-class.html",
// buildRoute: (BuildContext context) => CupertinoPickerDemo()
// ),
// new GalleryDemo(
// title: "Pull to refresh",
// icon: GalleryIcons.cupertino_pull_to_refresh,
// category: _kCupertinoComponents,
// routeName: CupertinoRefreshControlDemo.routeName,
// documentationUrl:
// "https://docs.flutter.io/flutter/cupertino/CupertinoSliverRefreshControl-class.html",
// buildRoute: (BuildContext context) => CupertinoRefreshControlDemo()
// ),
// new GalleryDemo(
// 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) => CupertinoSegmentedControlDemo()
// ),
// new GalleryDemo(
// title: "Sliders",
// icon: GalleryIcons.sliders,
// category: GalleryDemoCategory._kCupertinoComponents,
// routeName: CupertinoSliderDemo.routeName,
// documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoSlider-class.html",
// buildRoute: (BuildContext context) => CupertinoSliderDemo()
// ),
// new GalleryDemo(
// 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) => CupertinoSwitchDemo()
// ),
// new GalleryDemo(
// title: "Text Fields",
// icon: GalleryIcons.text_fields_alt,
// category: GalleryDemoCategory._kCupertinoComponents,
// routeName: CupertinoTextFieldDemo.routeName,
// buildRoute: (BuildContext context) => CupertinoTextFieldDemo()
// ),
//
// // Media
// new GalleryDemo(
// title: "Animated images",
// subtitle: "GIF and WebP animations",
// icon: GalleryIcons.animation,
// category: GalleryDemoCategory._kMedia,
// routeName: ImagesDemo.routeName,
// buildRoute: (BuildContext context) => ImagesDemo()
// ),
// new GalleryDemo(
// title: "Video",
// subtitle: "Video playback",
// icon: GalleryIcons.drive_video,
// category: GalleryDemoCategory._kMedia,
// routeName: VideoDemo.routeName,
// buildRoute: (BuildContext context) => new VideoDemo()
// ),
// 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) => DataTableDemo()
// ),
// 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) => 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) => ElevationDemo()
// ),
// new GalleryDemo(
// title: "Expand/collapse list control",
// subtitle: "A list with one sub-list level",
// icon: GalleryIcons.expand_all,
// category: GalleryDemoCategory._kMaterialComponents,
// routeName: TwoLevelListDemo.routeName,
// documentationUrl: "https://docs.flutter.io/flutter/material/ExpansionTile-class.html",
// buildRoute: (BuildContext context) => TwoLevelListDemo()
// ),
// 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) => 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) => 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: "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) => DrawerDemo()
// ),
// 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) => PageSelectorDemo()
// ),
// new GalleryDemo(
// title: "Pickers",
// subtitle: "Date and time selection widgets",
// icon: GalleryIcons.@event,
// category: GalleryDemoCategory._kMaterialComponents,
// routeName: DateAndTimePickerDemo.routeName,
// documentationUrl: "https://docs.flutter.io/flutter/material/showDatePicker.html",
// buildRoute: (BuildContext context) => DateAndTimePickerDemo()
// ),
// 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) => ProgressIndicatorDemo()
// ),
// 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) => 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) => 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) => 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) => 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) => 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) => TabsDemo()
// ),
// 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) => 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) => const 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) => TooltipDemo()
// ),
//
// Cupertino Components
// new GalleryDemo(
// title: "Activity Indicator",
// icon: GalleryIcons.cupertino_progress,
// category: _kCupertinoComponents,
// routeName: CupertinoProgressIndicatorDemo.routeName,
// documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoActivityIndicator-class.html",
// buildRoute: (BuildContext context) => CupertinoProgressIndicatorDemo()
// ),
// new GalleryDemo(
// title: "Alerts",
// icon: GalleryIcons.dialogs,
// category: GalleryDemoCategory._kCupertinoComponents,
// routeName: CupertinoAlertDemo.routeName,
// documentationUrl: "https://docs.flutter.io/flutter/cupertino/showCupertinoDialog.html",
// buildRoute: (BuildContext context) => CupertinoAlertDemo()
// ),
new GalleryDemo(
title: "Buttons",
icon: GalleryIcons.generic_buttons,
category: _kCupertinoComponents,
routeName: CupertinoButtonsDemo.routeName,
documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoButton-class.html",
buildRoute: (BuildContext context) => new CupertinoButtonsDemo()
),
// new GalleryDemo(
// 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) => CupertinoNavigationDemo()
// ),
// new GalleryDemo(
// title: "Pickers",
// icon: GalleryIcons.@event,
// category: GalleryDemoCategory._kCupertinoComponents,
// routeName: CupertinoPickerDemo.routeName,
// documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoPicker-class.html",
// buildRoute: (BuildContext context) => CupertinoPickerDemo()
// ),
// new GalleryDemo(
// title: "Pull to refresh",
// icon: GalleryIcons.cupertino_pull_to_refresh,
// category: _kCupertinoComponents,
// routeName: CupertinoRefreshControlDemo.routeName,
// documentationUrl:
// "https://docs.flutter.io/flutter/cupertino/CupertinoSliverRefreshControl-class.html",
// buildRoute: (BuildContext context) => CupertinoRefreshControlDemo()
// ),
// new GalleryDemo(
// 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) => CupertinoSegmentedControlDemo()
// ),
// new GalleryDemo(
// title: "Sliders",
// icon: GalleryIcons.sliders,
// category: GalleryDemoCategory._kCupertinoComponents,
// routeName: CupertinoSliderDemo.routeName,
// documentationUrl: "https://docs.flutter.io/flutter/cupertino/CupertinoSlider-class.html",
// buildRoute: (BuildContext context) => CupertinoSliderDemo()
// ),
// new GalleryDemo(
// 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) => CupertinoSwitchDemo()
// ),
// new GalleryDemo(
// title: "Text Fields",
// icon: GalleryIcons.text_fields_alt,
// category: GalleryDemoCategory._kCupertinoComponents,
// routeName: CupertinoTextFieldDemo.routeName,
// buildRoute: (BuildContext context) => CupertinoTextFieldDemo()
// ),
//
// // Media
// new GalleryDemo(
// title: "Animated images",
// subtitle: "GIF and WebP animations",
// icon: GalleryIcons.animation,
// category: GalleryDemoCategory._kMedia,
// routeName: ImagesDemo.routeName,
// buildRoute: (BuildContext context) => ImagesDemo()
// ),
// new GalleryDemo(
// title: "Video",
// subtitle: "Video playback",
// icon: GalleryIcons.drive_video,
// category: GalleryDemoCategory._kMedia,
// routeName: VideoDemo.routeName,
// buildRoute: (BuildContext context) => new VideoDemo()
// ),
// galleryDemos.Insert(0,
// new GalleryDemo(
// title: "Pesto",
// subtitle: "Simple recipe browser",
// icon: Icons.adjust,
// category: GalleryDemoCategory._kDemos,
// routeName: PestoDemo.routeName,
// buildRoute: (BuildContext context) => new PestoDemo()
// )
// );
// galleryDemos.Insert(0,
// new GalleryDemo(
// title: "Pesto",
// subtitle: "Simple recipe browser",
// icon: Icons.adjust,
// category: GalleryDemoCategory._kDemos,
// routeName: PestoDemo.routeName,
// buildRoute: (BuildContext context) => new PestoDemo()
// )
// );
return true;
});

demo => demo.documentationUrl
);
}
}
}

8
Samples/UIWidgetsGallery/demo/cupertino.meta


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

1001
Tests/Resources/SF-Pro-Text-Bold.otf
文件差异内容过多而无法显示
查看文件

24
Tests/Resources/SF-Pro-Text-Bold.otf.meta


fileFormatVersion: 2
guid: fe4433873da2c44a58194766452da171
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontName: SF Pro Text
fontNames:
- SF Pro Text
fallbackFontReferences:
- {fileID: 12800000, guid: d59013752e4e844828a89a2b96cfa704, type: 3}
- {fileID: 12800000, guid: a7b8140888514456bb2e63f86338624a, type: 3}
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:

1001
Tests/Resources/SF-Pro-Text-Regular.otf
文件差异内容过多而无法显示
查看文件

22
Tests/Resources/SF-Pro-Text-Regular.otf.meta


fileFormatVersion: 2
guid: a7b8140888514456bb2e63f86338624a
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontName: SF Pro Text
fontNames:
- SF Pro Text
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:

1001
Tests/Resources/SF-Pro-Text-Semibold.otf
文件差异内容过多而无法显示
查看文件

23
Tests/Resources/SF-Pro-Text-Semibold.otf.meta


fileFormatVersion: 2
guid: d59013752e4e844828a89a2b96cfa704
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontName: SF Pro Text
fontNames:
- SF Pro Text
fallbackFontReferences:
- {fileID: 12800000, guid: a7b8140888514456bb2e63f86338624a, type: 3}
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:

84
Samples/UIWidgetsGallery/demo/cupertino/cupertino_buttons_demo.cs


using System.Collections.Generic;
using Unity.UIWidgets.cupertino;
using Unity.UIWidgets.material;
using Unity.UIWidgets.painting;
using Unity.UIWidgets.rendering;
using Unity.UIWidgets.widgets;
namespace UIWidgetsGallery.gallery {
class CupertinoButtonsDemo : StatefulWidget {
public static string routeName = "/cupertino/buttons";
public override State createState() => new _CupertinoButtonDemoState();
}
class _CupertinoButtonDemoState : State<CupertinoButtonsDemo> {
int _pressedCount = 0;
public override Widget build(BuildContext context) {
return new CupertinoPageScaffold(
navigationBar: new CupertinoNavigationBar(
middle: new Text("Buttons"),
previousPageTitle: "Cupertino",
trailing: new CupertinoDemoDocumentationButton(CupertinoButtonsDemo.routeName)
),
child: new DefaultTextStyle(
style: CupertinoTheme.of(context).textTheme.textStyle,
child: new SafeArea(
child: new Column(
children: new List<Widget> {
new Padding(
padding: EdgeInsets.all(16.0f),
child: new Text(
"iOS themed buttons are flat. They can have borders or backgrounds but only when necessary."
)
),
new Expanded(
child: new Column(
mainAxisAlignment: MainAxisAlignment.center,
children: new List<Widget> {
new Text(this._pressedCount > 0
? $"Button pressed {this._pressedCount} time" +
(this._pressedCount == 1 ? "" : "s")
: " "),
new Padding(padding: EdgeInsets.all(12.0f)),
new Align(
alignment: new Alignment(0.0f, -0.2f),
child:
new Row(
mainAxisSize: MainAxisSize.min,
children: new List<Widget> {
new CupertinoButton(
child: new Text("Cupertino Button"),
onPressed:
() => { this.setState(() => { this._pressedCount += 1; }); }
),
new CupertinoButton(
child: new Text("Disabled"),
onPressed: null
)
}
)
),
new Padding(padding: EdgeInsets.all(12.0f)),
CupertinoButton.filled(
child: new Text("With Background"),
onPressed:
() => { this.setState(() => { this._pressedCount += 1; }); }
),
new Padding(padding: EdgeInsets.all(12.0f)),
CupertinoButton.filled(
child: new Text("Disabled"),
onPressed: null
),
}
)
)
}
)
)
)
);
}
}
}

11
Samples/UIWidgetsGallery/demo/cupertino/cupertino_buttons_demo.cs.meta


fileFormatVersion: 2
guid: 00dd97e6ab3004c7485beababbe548ab
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存