This commit is contained in:
NATHANIEL ENDICK
2023-02-26 15:34:18 -05:00
8 changed files with 58 additions and 97 deletions

View File

@@ -237,30 +237,27 @@ class _SellScreenState extends State<SellScreen> {
),
],
),
),
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'),
),
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),
),
),
),