sell ui changes

This commit is contained in:
NATHANIEL ENDICK
2023-02-26 15:34:27 -05:00
parent c347b6bd6d
commit a19c4e5877

View File

@@ -237,27 +237,30 @@ class _SellScreenState extends State<SellScreen> {
),
],
),
ElevatedButton(
onPressed: () {
List<String> locations = [];
User? user = auth.currentUser;
values.forEach((key, value) {
if (value == true) locations.add(key);
});
if (user != null) {
Seller seller = Seller(
user.displayName,
user.uid,
locations,
TimeRange(Timestamp.fromDate(startTimeTime),
Timestamp.fromDate(endTimeTime)),
double.parse(priceController.text));
addSeller(seller);
}
},
style: ButtonStyle(
backgroundColor:
MaterialStateColor.resolveWith((states) => Colors.blue),
),
Expanded(
child: Center(
child: Container(
child: ElevatedButton(
onPressed: () {
List<String> locations = [];
User? user = auth.currentUser;
values.forEach((key, value) {
if (value == true) locations.add(key);
});
if (user != null) {
Seller seller = Seller(
user.displayName,
user.uid,
locations,
TimeRange(Timestamp.fromDate(startTimeTime),
Timestamp.fromDate(endTimeTime)),
double.parse(priceController.text));
addSeller(seller);
}
},
child: const Text('Submit Sell Request'),
),
),
),
),