add date and time picker together in flutter
Budget: £10 – £11 GBP
currently , my flutter booking app shows only time picker but i like to add date picker as well, so when customer book , he can pick time and date together,
SizedBox(
height: height * 0.015,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Card(
elevation: 5.0,
child: GestureDetector(
onTap: () async {
showTimePicker(
initialEntryMode: TimePickerEntryMode.input,
context: context,
initialTime: TimeOfDay.now())
.then(( value) {
FocusScope.of(context).requestFocus(new FocusNode());
print(value.format(context).toString());
setState(() {
pickuptime = value.format(context).toString();
});
});
},
child: Container(
decoration: BoxDecoration(
//color: Colors.grey[200],
color: Colors.white,
borderRadius: BorderRadius.circular(30.0),
),
padding: EdgeInsets.only(left: 10.0),
height: height * 0.050,
width: width * 0.30,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text('$pickuptime', style: TextStyle(
fontSize: 12.0, color: Colors.black),
),
],
),
),
),
),
SizedBox(
height: height * 0.015,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Card(
elevation: 5.0,
child: GestureDetector(
onTap: () async {
showTimePicker(
initialEntryMode: TimePickerEntryMode.input,
context: context,
initialTime: TimeOfDay.now())
.then(( value) {
FocusScope.of(context).requestFocus(new FocusNode());
print(value.format(context).toString());
setState(() {
pickuptime = value.format(context).toString();
});
});
},
child: Container(
decoration: BoxDecoration(
//color: Colors.grey[200],
color: Colors.white,
borderRadius: BorderRadius.circular(30.0),
),
padding: EdgeInsets.only(left: 10.0),
height: height * 0.050,
width: width * 0.30,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text('$pickuptime', style: TextStyle(
fontSize: 12.0, color: Colors.black),
),
],
),
),
),
),