iizzaya
5 年前
当前提交
82b6fc9b
共有 14 个文件被更改,包括 734 次插入 和 40 次删除
-
29Runtime/cupertino/switch.cs
-
6Samples/UIWidgetsGallery/demo/cupertino/cupertino_buttons_demo.cs
-
46Samples/UIWidgetsGallery/gallery/demos.cs
-
24Samples/UIWidgetsGallery/demo/cupertino/cupertino_activity_indicator_demo.cs
-
11Samples/UIWidgetsGallery/demo/cupertino/cupertino_activity_indicator_demo.cs.meta
-
273Samples/UIWidgetsGallery/demo/cupertino/cupertino_alert_demo.cs
-
11Samples/UIWidgetsGallery/demo/cupertino/cupertino_alert_demo.cs.meta
-
5Samples/UIWidgetsGallery/demo/cupertino/cupertino_navigation_demo.cs
-
71Samples/UIWidgetsGallery/demo/cupertino/cupertino_slider_demo.cs
-
11Samples/UIWidgetsGallery/demo/cupertino/cupertino_slider_demo.cs.meta
-
73Samples/UIWidgetsGallery/demo/cupertino/cupertino_switch_demo.cs
-
11Samples/UIWidgetsGallery/demo/cupertino/cupertino_switch_demo.cs.meta
-
192Samples/UIWidgetsGallery/demo/cupertino/cupertino_text_field_demo.cs
-
11Samples/UIWidgetsGallery/demo/cupertino/cupertino_text_field_demo.cs.meta
|
|||
using Unity.UIWidgets.cupertino; |
|||
using Unity.UIWidgets.widgets; |
|||
|
|||
namespace UIWidgetsGallery.gallery { |
|||
/* |
|||
class CupertinoProgressIndicatorDemo : StatelessWidget { |
|||
public static string routeName = "/cupertino/progress_indicator"; |
|||
|
|||
public override |
|||
Widget build(BuildContext context) { |
|||
return new CupertinoPageScaffold( |
|||
navigationBar: new CupertinoNavigationBar( |
|||
previousPageTitle: "Cupertino", |
|||
middle: new Text("Activity Indicator"), |
|||
trailing: new CupertinoDemoDocumentationButton(routeName) |
|||
), |
|||
child: new Center( |
|||
child: new CupertinoActivityIndicator() |
|||
) |
|||
); |
|||
} |
|||
} |
|||
*/ |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: cd9442c2f316e4ad1924fa656a7788a8 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Collections.Generic; |
|||
using Unity.UIWidgets.cupertino; |
|||
using Unity.UIWidgets.foundation; |
|||
using Unity.UIWidgets.painting; |
|||
using Unity.UIWidgets.widgets; |
|||
|
|||
namespace UIWidgetsGallery.gallery { |
|||
/* |
|||
class CupertinoAlertDemo : StatefulWidget { |
|||
public static string routeName = "/cupertino/alert"; |
|||
public override State createState() => new _CupertinoAlertDemoState(); |
|||
} |
|||
|
|||
class _CupertinoAlertDemoState : State<CupertinoAlertDemo> { |
|||
string lastSelectedValue; |
|||
|
|||
void showDemoDialog( |
|||
BuildContext context = null, |
|||
Widget child = null |
|||
) { |
|||
CupertinoRouteUtils.showCupertinoDialog<string>( |
|||
context: context, |
|||
builder: (BuildContext _context) => child |
|||
).Then((string value) => { |
|||
if (value != null) { |
|||
this.setState(() => { this.lastSelectedValue = value; }); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
void showDemoActionSheet( |
|||
BuildContext context = null, |
|||
Widget child = null |
|||
) { |
|||
CupertinoRouteUtils.showCupertinoModalPopup<string>( |
|||
context: context, |
|||
builder: (BuildContext _context) => child |
|||
).Then((string value) => { |
|||
if (value != null) { |
|||
this.setState(() => { this.lastSelectedValue = value; }); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
public override Widget build(BuildContext context) { |
|||
return new CupertinoPageScaffold( |
|||
navigationBar: new CupertinoNavigationBar( |
|||
middle: new Text("Alerts"), |
|||
previousPageTitle: "Cupertino", |
|||
trailing: new CupertinoDemoDocumentationButton(CupertinoAlertDemo.routeName) |
|||
), |
|||
child: |
|||
new DefaultTextStyle( |
|||
style: CupertinoTheme.of(context).textTheme.textStyle, |
|||
child: new Builder( |
|||
builder: (BuildContext _context) => { |
|||
List<Widget> stackChildren = new List<Widget> { |
|||
new ListView( |
|||
padding: EdgeInsets.symmetric(vertical: 24.0f, horizontal: 72.0f) |
|||
+ MediaQuery.of(_context).padding, |
|||
children: new List<Widget> { |
|||
CupertinoButton.filled( |
|||
child: new Text("Alert"), |
|||
onPressed: () => { |
|||
this.showDemoDialog( |
|||
context: _context, |
|||
child: new CupertinoAlertDialog( |
|||
title: new Text("Discard draft?"), |
|||
actions: new List<Widget> { |
|||
new CupertinoDialogAction( |
|||
child: new Text("Discard"), |
|||
isDestructiveAction: true, |
|||
onPressed: () => { Navigator.pop(_context, "Discard"); } |
|||
), |
|||
new CupertinoDialogAction( |
|||
child: new Text("Cancel"), |
|||
isDefaultAction: true, |
|||
onPressed: () => { Navigator.pop(_context, "Cancel"); } |
|||
), |
|||
} |
|||
) |
|||
); |
|||
} |
|||
), |
|||
new Padding(padding: EdgeInsets.all(8.0f)), |
|||
CupertinoButton.filled( |
|||
child: new Text("Alert with Title"), |
|||
padding: EdgeInsets.symmetric(vertical: 16.0f, horizontal: 36.0f), |
|||
onPressed: () => { |
|||
this.showDemoDialog( |
|||
context: _context, |
|||
child: new CupertinoAlertDialog( |
|||
title: new Text( |
|||
"Allow \"Maps\" to access your location while you are using the app?") |
|||
, |
|||
content: new Text( |
|||
"Your current location will be displayed on the map and used \n" + |
|||
"for directions, nearby search results, and estimated travel times.") |
|||
, |
|||
actions: new List<Widget> { |
|||
new CupertinoDialogAction( |
|||
child: new Text("Don\"t Allow"), |
|||
onPressed: () => { |
|||
Navigator.pop(_context, "Disallow"); |
|||
} |
|||
), |
|||
new CupertinoDialogAction( |
|||
child: new Text("Allow"), |
|||
onPressed: () => { Navigator.pop(_context, "Allow"); } |
|||
), |
|||
} |
|||
) |
|||
); |
|||
} |
|||
), |
|||
new Padding(padding: EdgeInsets.all(8.0f)), |
|||
CupertinoButton.filled( |
|||
child: new Text("Alert with Buttons"), |
|||
padding: EdgeInsets.symmetric(vertical: 16.0f, horizontal: 36.0f), |
|||
onPressed: () => { |
|||
this.showDemoDialog( |
|||
context: _context, |
|||
child: new CupertinoDessertDialog( |
|||
title: new Text("Select Favorite Dessert"), |
|||
content: new Text( |
|||
"Please select your favorite type of dessert from the \n" + |
|||
"list below. Your selection will be used to customize the suggested \n" + |
|||
"list of eateries in your area.") |
|||
) |
|||
); |
|||
} |
|||
), |
|||
new Padding(padding: EdgeInsets.all(8.0f)), |
|||
CupertinoButton.filled( |
|||
child: new Text("Alert Buttons Only"), |
|||
padding: EdgeInsets.symmetric(vertical: 16.0f, horizontal: 36.0f), |
|||
onPressed: () => { |
|||
this.showDemoDialog( |
|||
context: _context, |
|||
child: new CupertinoDessertDialog() |
|||
); |
|||
} |
|||
), |
|||
new Padding(padding: EdgeInsets.all(8.0f)), |
|||
CupertinoButton.filled( |
|||
child: new Text("Action Sheet"), |
|||
padding: EdgeInsets.symmetric(vertical: 16.0f, horizontal: 36.0f), |
|||
onPressed: () => { |
|||
this.showDemoActionSheet( |
|||
context: _context, |
|||
child: new CupertinoActionSheet( |
|||
title: new Text("Favorite Dessert"), |
|||
message: |
|||
new Text( |
|||
"Please select the best dessert from the options below."), |
|||
actions: |
|||
new List<Widget> { |
|||
new CupertinoActionSheetAction( |
|||
child: new Text("Profiteroles"), |
|||
onPressed: () => { |
|||
Navigator.pop(_context, "Profiteroles"); |
|||
} |
|||
), |
|||
new CupertinoActionSheetAction( |
|||
child: new Text("Cannolis"), |
|||
onPressed: () => { |
|||
Navigator.pop(_context, "Cannolis"); |
|||
} |
|||
), |
|||
new CupertinoActionSheetAction( |
|||
child: new Text("Trifle"), |
|||
onPressed: () => { Navigator.pop(_context, "Trifle"); } |
|||
), |
|||
}, |
|||
cancelButton: new CupertinoActionSheetAction( |
|||
child: new Text("Cancel"), |
|||
isDefaultAction: |
|||
true, |
|||
onPressed: |
|||
() => { Navigator.pop(_context, "Cancel"); } |
|||
) |
|||
) |
|||
); |
|||
} |
|||
) |
|||
} |
|||
) |
|||
}; |
|||
|
|||
if (this.lastSelectedValue != null) { |
|||
stackChildren.Add( |
|||
new Positioned( |
|||
bottom: 32.0f, |
|||
child: new Text("You selected: $lastSelectedValue") |
|||
) |
|||
); |
|||
} |
|||
|
|||
return new Stack( |
|||
alignment: Alignment.center, |
|||
children: stackChildren |
|||
); |
|||
} |
|||
) |
|||
) |
|||
); |
|||
} |
|||
} |
|||
|
|||
class CupertinoDessertDialog : StatelessWidget { |
|||
public CupertinoDessertDialog( |
|||
Key key = null, |
|||
Widget title = null, |
|||
Widget content = null |
|||
) : base(key: key) { |
|||
this.title = title; |
|||
this.content = content; |
|||
} |
|||
|
|||
public readonly Widget title; |
|||
public readonly Widget content; |
|||
|
|||
public override Widget build(BuildContext context) { |
|||
return new CupertinoAlertDialog( |
|||
title: title, |
|||
content: content, |
|||
actions: new List<Widget> { |
|||
new CupertinoDialogAction( |
|||
child: new Text("Cheesecake"), |
|||
onPressed: () => { Navigator.pop(context, "Cheesecake"); } |
|||
), |
|||
new CupertinoDialogAction( |
|||
child: new Text("Tiramisu"), |
|||
onPressed: () => { Navigator.pop(context, "Tiramisu"); } |
|||
), |
|||
new CupertinoDialogAction( |
|||
child: new Text("Apple Pie"), |
|||
onPressed: |
|||
() => { Navigator.pop(context, "Apple Pie"); } |
|||
), |
|||
new CupertinoDialogAction( |
|||
child: new Text("Devil\"s food cake"), |
|||
onPressed: |
|||
() => { Navigator.pop(context, "Devil\"s food cake"); } |
|||
), |
|||
new CupertinoDialogAction( |
|||
child: new Text("Banana Split"), |
|||
onPressed: |
|||
() => { Navigator.pop(context, "Banana Split"); } |
|||
), |
|||
new CupertinoDialogAction( |
|||
child: new Text("Oatmeal Cookie"), |
|||
onPressed: |
|||
() => { Navigator.pop(context, "Oatmeal Cookies"); } |
|||
), |
|||
new CupertinoDialogAction( |
|||
child: new Text("Chocolate Brownie"), |
|||
onPressed: |
|||
() => { Navigator.pop(context, "Chocolate Brownies"); } |
|||
), |
|||
new CupertinoDialogAction( |
|||
child: new Text("Cancel"), |
|||
isDestructiveAction: |
|||
true, |
|||
onPressed: |
|||
() => { Navigator.pop(context, "Cancel"); } |
|||
), |
|||
} |
|||
); |
|||
} |
|||
} |
|||
*/ |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: fcd454968bdd543c181c3bde5aee8651 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
namespace UIWidgetsGallery.gallery { |
|||
public class cupertino_navigation_demo { |
|||
|
|||
} |
|||
} |
|
|||
using System.Collections.Generic; |
|||
using Unity.UIWidgets.cupertino; |
|||
using Unity.UIWidgets.rendering; |
|||
using Unity.UIWidgets.widgets; |
|||
|
|||
namespace UIWidgetsGallery.gallery { |
|||
class CupertinoSliderDemo : StatefulWidget { |
|||
public static string routeName = "/cupertino/slider"; |
|||
|
|||
public override State createState() { |
|||
return new _CupertinoSliderDemoState(); |
|||
} |
|||
} |
|||
|
|||
class _CupertinoSliderDemoState : State<CupertinoSliderDemo> { |
|||
float _value = 25.0f; |
|||
float _discreteValue = 20.0f; |
|||
|
|||
public override Widget build(BuildContext context) { |
|||
return new CupertinoPageScaffold( |
|||
navigationBar: new CupertinoNavigationBar( |
|||
middle: new Text("Sliders"), |
|||
previousPageTitle: "Cupertino", |
|||
trailing: new CupertinoDemoDocumentationButton(CupertinoSliderDemo.routeName) |
|||
), |
|||
child: new DefaultTextStyle( |
|||
style: CupertinoTheme.of(context).textTheme.textStyle, |
|||
child: new SafeArea( |
|||
child: new Center( |
|||
child: new Column( |
|||
mainAxisAlignment: MainAxisAlignment.spaceAround, |
|||
children: new List<Widget> { |
|||
new Column( |
|||
mainAxisSize: MainAxisSize.min, |
|||
children: new List<Widget> { |
|||
new CupertinoSlider( |
|||
value: this._value, |
|||
min: 0.0f, |
|||
max: 100.0f, |
|||
divisions: 100, // TODO: FIX BUG
|
|||
onChanged: (float value) => { |
|||
this.setState(() => { this._value = value; }); |
|||
} |
|||
), |
|||
new Text($"Cupertino Continuous: {this._value.ToString("F1")}"), |
|||
} |
|||
), |
|||
new Column( |
|||
mainAxisSize: MainAxisSize.min, |
|||
children: new List<Widget> { |
|||
new CupertinoSlider( |
|||
value: this._discreteValue, |
|||
min: 0.0f, |
|||
max: 100.0f, |
|||
divisions: 5, |
|||
onChanged: (float value) => { |
|||
this.setState(() => { this._discreteValue = value; }); |
|||
} |
|||
), |
|||
new Text($"Cupertino Discrete: {this._discreteValue}"), |
|||
} |
|||
), |
|||
} |
|||
) |
|||
) |
|||
) |
|||
) |
|||
); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 172d1ae6d262e45d4a131a02d85ddf44 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Collections.Generic; |
|||
using Unity.UIWidgets.cupertino; |
|||
using Unity.UIWidgets.rendering; |
|||
using Unity.UIWidgets.widgets; |
|||
|
|||
namespace UIWidgetsGallery.gallery { |
|||
class CupertinoSwitchDemo : StatefulWidget { |
|||
public static string routeName = "/cupertino/switch"; |
|||
|
|||
public override State createState() => new _CupertinoSwitchDemoState(); |
|||
} |
|||
|
|||
class _CupertinoSwitchDemoState : State<CupertinoSwitchDemo> { |
|||
bool _switchValue = false; |
|||
|
|||
public override Widget build(BuildContext context) { |
|||
return new CupertinoPageScaffold( |
|||
navigationBar: new CupertinoNavigationBar( |
|||
middle: new Text("Switch"), |
|||
previousPageTitle: "Cupertino", |
|||
trailing: new CupertinoDemoDocumentationButton(CupertinoSwitchDemo.routeName) |
|||
), |
|||
child: new DefaultTextStyle( |
|||
style: CupertinoTheme.of(context).textTheme.textStyle, |
|||
child: new SafeArea( |
|||
child: new Center( |
|||
child: new Column( |
|||
mainAxisAlignment: MainAxisAlignment.spaceAround, |
|||
children: new List<Widget> { |
|||
new Column( |
|||
children: new List<Widget> { |
|||
new CupertinoSwitch( |
|||
value: this._switchValue, |
|||
onChanged: (bool value) => { |
|||
this.setState(() => { this._switchValue = value; }); |
|||
} |
|||
), |
|||
new Text( |
|||
"Enabled - " + (this._switchValue ? "On" : "Off") |
|||
), |
|||
} |
|||
), |
|||
new Column( |
|||
children: new List<Widget> { |
|||
new CupertinoSwitch( |
|||
value: true, |
|||
onChanged: null |
|||
), |
|||
new Text( |
|||
"Disabled - On" |
|||
), |
|||
} |
|||
), |
|||
new Column( |
|||
children: new List<Widget> { |
|||
new CupertinoSwitch( |
|||
value: false, |
|||
onChanged: null |
|||
), |
|||
new Text( |
|||
"Disabled - Off" |
|||
), |
|||
} |
|||
) |
|||
} |
|||
) |
|||
) |
|||
) |
|||
) |
|||
); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 6f9a95d09a56a495f8878fd15b5aed4b |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Collections.Generic; |
|||
using Unity.UIWidgets.cupertino; |
|||
using Unity.UIWidgets.painting; |
|||
using Unity.UIWidgets.service; |
|||
using Unity.UIWidgets.widgets; |
|||
|
|||
namespace UIWidgetsGallery.gallery { |
|||
class CupertinoTextFieldDemo : StatefulWidget { |
|||
public const string routeName = "/cupertino/text_fields"; |
|||
|
|||
public override State createState() { |
|||
return new _CupertinoTextFieldDemoState(); |
|||
} |
|||
} |
|||
|
|||
class _CupertinoTextFieldDemoState : State<CupertinoTextFieldDemo> { |
|||
TextEditingController _chatTextController; |
|||
TextEditingController _locationTextController; |
|||
|
|||
public override void initState() { |
|||
base.initState(); |
|||
this._chatTextController = new TextEditingController(); |
|||
this._locationTextController = new TextEditingController(text: "Montreal, Canada"); |
|||
} |
|||
|
|||
Widget _buildChatTextField() { |
|||
return new CupertinoTextField( |
|||
controller: this._chatTextController, |
|||
textCapitalization: TextCapitalization.sentences, |
|||
placeholder: "Text Message", |
|||
decoration: new BoxDecoration( |
|||
border: Border.all( |
|||
width: 0.0f, |
|||
color: CupertinoColors.inactiveGray |
|||
), |
|||
borderRadius: BorderRadius.circular(15.0f) |
|||
), |
|||
maxLines: null, |
|||
keyboardType: TextInputType.multiline, |
|||
prefix: new Padding(padding: EdgeInsets.symmetric(horizontal: 4.0f)), |
|||
suffix: |
|||
new Padding( |
|||
padding: EdgeInsets.symmetric(horizontal: 4.0f), |
|||
child: new CupertinoButton( |
|||
color: CupertinoColors.activeGreen, |
|||
minSize: 0.0f, |
|||
child: new Icon( |
|||
CupertinoIcons.up_arrow, |
|||
size: 21.0f, |
|||
color: CupertinoColors.white |
|||
), |
|||
padding: EdgeInsets.all(2.0f), |
|||
borderRadius: |
|||
BorderRadius.circular(15.0f), |
|||
onPressed: () => this.setState(() => this._chatTextController.clear()) |
|||
) |
|||
), |
|||
autofocus: true, |
|||
suffixMode: OverlayVisibilityMode.editing, |
|||
onSubmitted: (string text) => this.setState(() => this._chatTextController.clear()) |
|||
); |
|||
} |
|||
|
|||
Widget _buildNameField() { |
|||
return new CupertinoTextField( |
|||
prefix: new Icon( |
|||
CupertinoIcons.person_solid, |
|||
color: CupertinoColors.lightBackgroundGray, |
|||
size: 28.0f |
|||
), |
|||
padding: EdgeInsets.symmetric(horizontal: 6.0f, vertical: 12.0f), |
|||
clearButtonMode: OverlayVisibilityMode.editing, |
|||
textCapitalization: TextCapitalization.words, |
|||
autocorrect: false, |
|||
decoration: new BoxDecoration( |
|||
border: new Border(bottom: new BorderSide(width: 0.0f, color: CupertinoColors.inactiveGray)) |
|||
), |
|||
placeholder: "Name" |
|||
); |
|||
} |
|||
|
|||
Widget _buildEmailField() { |
|||
return new CupertinoTextField( |
|||
prefix: new Icon( |
|||
CupertinoIcons.mail_solid, |
|||
color: CupertinoColors.lightBackgroundGray, |
|||
size: 28.0f |
|||
), |
|||
padding: EdgeInsets.symmetric(horizontal: 6.0f, vertical: 12.0f), |
|||
clearButtonMode: OverlayVisibilityMode.editing, |
|||
keyboardType: TextInputType.emailAddress, |
|||
autocorrect: false, |
|||
decoration: new BoxDecoration( |
|||
border: new Border(bottom: new BorderSide(width: 0.0f, color: CupertinoColors.inactiveGray)) |
|||
), |
|||
placeholder: "Email" |
|||
); |
|||
} |
|||
|
|||
Widget _buildLocationField() { |
|||
return new CupertinoTextField( |
|||
controller: this._locationTextController, |
|||
prefix: new Icon( |
|||
CupertinoIcons.location_solid, |
|||
color: CupertinoColors.lightBackgroundGray, |
|||
size: 28.0f |
|||
), |
|||
padding: EdgeInsets.symmetric(horizontal: 6.0f, vertical: 12.0f), |
|||
clearButtonMode: OverlayVisibilityMode.editing, |
|||
textCapitalization: TextCapitalization.words, |
|||
decoration: new BoxDecoration( |
|||
border: new Border(bottom: new BorderSide(width: 0.0f, color: CupertinoColors.inactiveGray)) |
|||
), |
|||
placeholder: "Location" |
|||
); |
|||
} |
|||
|
|||
Widget _buildPinField() { |
|||
return new CupertinoTextField( |
|||
prefix: new Icon( |
|||
CupertinoIcons.padlock_solid, |
|||
color: CupertinoColors.lightBackgroundGray, |
|||
size: 28.0f |
|||
), |
|||
padding: EdgeInsets.symmetric(horizontal: 6.0f, vertical: 12.0f), |
|||
clearButtonMode: OverlayVisibilityMode.editing, |
|||
keyboardType: TextInputType.number, |
|||
autocorrect: false, |
|||
obscureText: true, |
|||
decoration: new BoxDecoration( |
|||
border: new Border(bottom: new BorderSide(width: 0.0f, color: CupertinoColors.inactiveGray)) |
|||
), |
|||
placeholder: "Create a PIN" |
|||
); |
|||
} |
|||
|
|||
Widget _buildTagsField() { |
|||
return new CupertinoTextField( |
|||
controller: new TextEditingController(text: "colleague, reading club"), |
|||
prefix: new Icon( |
|||
CupertinoIcons.tags_solid, |
|||
color: CupertinoColors.lightBackgroundGray, |
|||
size: 28.0f |
|||
), |
|||
enabled: false, |
|||
padding: EdgeInsets.symmetric(horizontal: 6.0f, vertical: 12.0f), |
|||
decoration: new BoxDecoration( |
|||
border: new Border(bottom: new BorderSide(width: 0.0f, color: CupertinoColors.inactiveGray)) |
|||
) |
|||
); |
|||
} |
|||
|
|||
public override Widget build(BuildContext context) { |
|||
return new DefaultTextStyle( |
|||
style: new TextStyle( |
|||
fontFamily: ".SF Pro Text", // ".SF UI Text",
|
|||
inherit: false, |
|||
fontSize: 17.0f, |
|||
color: CupertinoColors.black |
|||
), |
|||
child: new CupertinoPageScaffold( |
|||
navigationBar: new CupertinoNavigationBar( |
|||
previousPageTitle: "Cupertino", |
|||
middle: new Text("Text Fields") |
|||
), |
|||
child: new SafeArea( |
|||
child: new ListView( |
|||
children: new List<Widget> { |
|||
new Padding( |
|||
padding: EdgeInsets.symmetric(vertical: 32.0f, horizontal: 16.0f), |
|||
child: new Column( |
|||
children: new List<Widget> { |
|||
this._buildNameField(), |
|||
this._buildEmailField(), |
|||
this._buildLocationField(), |
|||
this._buildPinField(), |
|||
this._buildTagsField(), |
|||
} |
|||
) |
|||
), |
|||
new Padding( |
|||
padding: EdgeInsets.symmetric(vertical: 32.0f, horizontal: 16.0f), |
|||
child: this._buildChatTextField() |
|||
), |
|||
} |
|||
) |
|||
) |
|||
) |
|||
); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 38c40bf70348345f5bc7e93853e451fd |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue