mirror of
https://github.com/SoPat712/RUSwipeShare.git
synced 2025-08-21 19:08:46 -04:00
sell fixes
This commit is contained in:
@@ -8,9 +8,25 @@ class SellScreen extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _SellScreenState extends State<SellScreen> {
|
class _SellScreenState extends State<SellScreen> {
|
||||||
|
Map<String, bool> values = {
|
||||||
|
'Busch Dining Hall': false,
|
||||||
|
'Livingston Dining Hall': false,
|
||||||
|
'Brower Dining Hall': false,
|
||||||
|
'Neilson Dining Hall': false,
|
||||||
|
'Cafe West': false,
|
||||||
|
'Cook Cafe': false,
|
||||||
|
'Douglass Cafe': false,
|
||||||
|
'Harvest INFH': false,
|
||||||
|
'Kilmer\'s Market': false,
|
||||||
|
'College Ave Dining Hall': false,
|
||||||
|
'Red Pine Pizza': false,
|
||||||
|
'Rock Cafe': false,
|
||||||
|
'Sbarro': false,
|
||||||
|
'Woody\'s Cafe': false,
|
||||||
|
};
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
TimeOfDay _time = TimeOfDay.now();
|
TimeOfDay time = TimeOfDay.now();
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text('Sell'),
|
title: const Text('Sell'),
|
||||||
@@ -21,24 +37,40 @@ class _SellScreenState extends State<SellScreen> {
|
|||||||
children: [
|
children: [
|
||||||
Icon(Icons.store_mall_directory, color: Colors.red),
|
Icon(Icons.store_mall_directory, color: Colors.red),
|
||||||
const Text('Place'),
|
const Text('Place'),
|
||||||
ListTile(
|
ConstrainedBox(
|
||||||
title: Text(_time.format(context)),
|
constraints: BoxConstraints.expand(height: 100),
|
||||||
onTap: () {
|
child: ListView(
|
||||||
Future<TimeOfDay?> selectedTime = showTimePicker(
|
children: values.keys.map((String key) {
|
||||||
context: context,
|
return CheckboxListTile(
|
||||||
initialTime: _time,
|
title: Text(key),
|
||||||
);
|
value: values[key],
|
||||||
setState(() {
|
onChanged: (bool? value) {
|
||||||
selectedTime.then((value) => _time = value!);
|
setState(() {
|
||||||
_time = TimeOfDay(hour: 10, minute: 00);
|
values[key] = value!;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
LocationDropdown(),
|
LocationDropdown(),
|
||||||
Icon(Icons.access_time, color: Colors.red),
|
Icon(Icons.access_time, color: Colors.red),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: const Text('Time'),
|
child: const Text('Time'),
|
||||||
),
|
),
|
||||||
|
ListTile(
|
||||||
|
title: Text(time.format(context)),
|
||||||
|
onTap: () {
|
||||||
|
Future<TimeOfDay?> selectedTime = showTimePicker(
|
||||||
|
context: context,
|
||||||
|
initialTime: time,
|
||||||
|
);
|
||||||
|
setState(() {
|
||||||
|
selectedTime.then((value) => time = value!);
|
||||||
|
time = TimeOfDay(hour: 10, minute: 00);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
Icon(Icons.attach_money, color: Colors.red),
|
Icon(Icons.attach_money, color: Colors.red),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: const Text('Cost'),
|
child: const Text('Cost'),
|
||||||
@@ -49,13 +81,7 @@ class _SellScreenState extends State<SellScreen> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const List<String> list = <String>[
|
const List<String> list = <String>['Brower', 'BDH', 'LDH', 'Neilson', 'Woody\'s'];
|
||||||
'Brower',
|
|
||||||
'BDH',
|
|
||||||
'LDH',
|
|
||||||
'Neilson',
|
|
||||||
'Woody\'s'
|
|
||||||
];
|
|
||||||
|
|
||||||
class LocationDropdown extends StatefulWidget {
|
class LocationDropdown extends StatefulWidget {
|
||||||
const LocationDropdown({super.key});
|
const LocationDropdown({super.key});
|
||||||
|
Reference in New Issue
Block a user