child fix

This commit is contained in:
2023-02-26 13:58:50 -05:00
parent 306cba157a
commit 26f1d5f560

View File

@@ -46,10 +46,7 @@ class _SellScreenState extends State<SellScreen> {
resizeToAvoidBottomInset: true, resizeToAvoidBottomInset: true,
body: Padding( body: Padding(
padding: const EdgeInsets.fromLTRB(0, 8, 0, 0), padding: const EdgeInsets.fromLTRB(0, 8, 0, 0),
child: child: Column(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [
Column(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [
child:
Column(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [
Row( Row(
children: [ children: [
Expanded( Expanded(
@@ -119,9 +116,7 @@ class _SellScreenState extends State<SellScreen> {
children: [ children: [
ElevatedButton( ElevatedButton(
onPressed: () async { onPressed: () async {
DatePicker.showDateTimePicker(context, DatePicker.showDateTimePicker(context, showTitleActions: true, minTime: DateTime.now(), onChanged: (date) {
showTitleActions: true,
minTime: DateTime.now(), onChanged: (date) {
print('change $date'); print('change $date');
}, onConfirm: (date) { }, onConfirm: (date) {
setState(() { setState(() {
@@ -145,9 +140,7 @@ class _SellScreenState extends State<SellScreen> {
), ),
ElevatedButton( ElevatedButton(
onPressed: () async { onPressed: () async {
DatePicker.showDateTimePicker(context, DatePicker.showDateTimePicker(context, showTitleActions: true, minTime: DateTime.now(), onChanged: (date) {
showTitleActions: true,
minTime: DateTime.now(), onChanged: (date) {
print('change $date'); print('change $date');
}, onConfirm: (date) { }, onConfirm: (date) {
setState(() { setState(() {
@@ -200,19 +193,12 @@ class _SellScreenState extends State<SellScreen> {
if (value == true) locations.add(key); if (value == true) locations.add(key);
}); });
if (user != null) { if (user != null) {
Seller seller = Seller( Seller seller = Seller(user.displayName, user.uid, locations, TimeRange(Timestamp.fromDate(startTimeTime), Timestamp.fromDate(endTimeTime)), double.parse(priceController.text));
user.displayName,
user.uid,
locations,
TimeRange(Timestamp.fromDate(startTimeTime),
Timestamp.fromDate(endTimeTime)),
double.parse(priceController.text));
addSeller(seller); addSeller(seller);
} }
}, },
style: ButtonStyle( style: ButtonStyle(
backgroundColor: backgroundColor: MaterialStateColor.resolveWith((states) => Colors.blue),
MaterialStateColor.resolveWith((states) => Colors.blue),
), ),
child: const Text('Submit Sell Request'), child: const Text('Submit Sell Request'),
), ),