This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ListView.builder( | |
shrinkWrap: true, | |
padding: EdgeInsets.all(8.0), | |
itemCount: _filteredChoices.length, | |
itemBuilder: (BuildContext context, int index) { | |
return HelperWidgets.getAlertChoiceItem( | |
this, _filteredChoices[index], index, _selectedId); | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
showModalBottomSheet( | |
context: context, | |
builder: (context) { | |
return Container( | |
color: CupertinoColors.white, | |
height: MediaQuery.of(context).copyWith().size.height / 3, | |
child: Column( | |
children: <Widget>[ | |
Align( | |
alignment: Alignment.topRight, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CupertinoTextField( | |
keyboardType: TextInputType.number, | |
controller: minAgeController, | |
decoration: BoxDecoration( | |
border: Border( | |
bottom: BorderSide( | |
color: Color(0xFFbdbdbd), | |
width: 1.0, | |
))), | |
style: TextStyle( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final Map<int, Widget> children = <int, Widget>{ | |
0: Text('Basic'), | |
1: Text('Advanced'), | |
}; | |
CupertinoSegmentedControl<int>( | |
children: children, | |
onValueChanged: (int newValue) { | |
setState(() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
showDialog( | |
context: context, | |
barrierDismissible: false, | |
builder: (context) { | |
return new CupertinoAlertDialog( | |
title: new Text('Data not saved?'), | |
content: new Text( | |
'Data will be lost. Are you sure you want to exit?'), | |
actions: <Widget>[ | |
new CupertinoButton( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
showActionSheet( | |
context: context, | |
child: CupertinoActionSheet( | |
message: const Text('Select image from'), | |
actions: <Widget>[ | |
CupertinoActionSheetAction( | |
child: Padding( | |
padding: const EdgeInsets.only(right: 16.0), | |
child: Text( | |
'Camera', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CupertinoPageScaffold( | |
navigationBar: CupertinoNavigationBar( | |
middle: Text( | |
title, | |
style: TextStyle(color: Colors.black), | |
), | |
trailing: CupertinoButton( | |
padding: EdgeInsets.only(top: 0, right: 16.0), | |
child: Text( | |
"Save", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class InputDoneView extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Container( | |
width: double.infinity, | |
color: Color(Const.doneButtonBg), | |
child: Align( | |
alignment: Alignment.topRight, | |
child: Padding( | |
padding: const EdgeInsets.only(top: 4.0, bottom: 4.0), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
showOverlay(BuildContext context) { | |
if (overlayEntry != null) return; | |
OverlayState overlayState = Overlay.of(context); | |
overlayEntry = OverlayEntry(builder: (context) { | |
return Positioned( | |
bottom: MediaQuery.of(context).viewInsets.bottom, | |
right: 0.0, | |
left: 0.0, | |
child: InputDoneView()); | |
}); |
OlderNewer