This file contains 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 _ShoppingCartTabState extends State<ShoppingCartTab> { | |
// ... | |
Widget _buildDateAndTimePicker(BuildContext context) { // NEW FROM HERE | |
return Column( | |
children: <Widget>[ | |
Row( | |
mainAxisAlignment: MainAxisAlignment.spaceBetween, | |
children: <Widget>[ | |
Row( | |
mainAxisAlignment: MainAxisAlignment.start, | |
children: const <Widget>[ | |
Icon( | |
CupertinoIcons.clock, | |
color: CupertinoColors.lightBackgroundGray, | |
size: 28, | |
), | |
SizedBox(width: 6), | |
Text( | |
'Delivery time', | |
style: Styles.deliveryTimeLabel, | |
), | |
], | |
), | |
Text( | |
DateFormat.yMMMd().add_jm().format(dateTime), | |
style: Styles.deliveryTime, | |
), | |
], | |
), | |
Container( | |
height: _kDateTimePickerHeight, | |
child: CupertinoDatePicker( | |
mode: CupertinoDatePickerMode.dateAndTime, | |
initialDateTime: dateTime, | |
onDateTimeChanged: (newDateTime) { | |
setState(() { | |
dateTime = newDateTime; | |
}); | |
}, | |
), | |
), | |
], | |
); | |
} // TO HERE | |
SliverChildBuilderDelegate _buildSliverChildBuilderDelegate( | |
AppStateModel model) { | |
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment