mirror of
https://github.com/SoPat712/RUSwipeShare.git
synced 2025-08-21 19:08:46 -04:00
Half done with ui for sell
This commit is contained in:
@@ -10,6 +10,7 @@ class SellScreen extends StatefulWidget {
|
|||||||
class _SellScreenState extends State<SellScreen> {
|
class _SellScreenState extends State<SellScreen> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
TimeOfDay _time = TimeOfDay.now();
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text('Sell'),
|
title: const Text('Sell'),
|
||||||
@@ -19,9 +20,21 @@ class _SellScreenState extends State<SellScreen> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.store_mall_directory, color: Colors.red),
|
Icon(Icons.store_mall_directory, color: Colors.red),
|
||||||
Expanded(
|
const Text('Place'),
|
||||||
child: const Text('Place'),
|
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);
|
||||||
|
});
|
||||||
|
},
|
||||||
),
|
),
|
||||||
|
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'),
|
||||||
@@ -35,3 +48,41 @@ class _SellScreenState extends State<SellScreen> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const List<String> list = <String>[
|
||||||
|
'Brower',
|
||||||
|
'BDH',
|
||||||
|
'LDH',
|
||||||
|
'Neilson',
|
||||||
|
'Woody\'s'
|
||||||
|
];
|
||||||
|
|
||||||
|
class LocationDropdown extends StatefulWidget {
|
||||||
|
const LocationDropdown({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<LocationDropdown> createState() => _LocationDropdownState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _LocationDropdownState extends State<LocationDropdown> {
|
||||||
|
String dropdownValue = list.first;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return DropdownButton<String>(
|
||||||
|
value: dropdownValue,
|
||||||
|
onChanged: (String? value) {
|
||||||
|
// This is called when the user selects an item.
|
||||||
|
setState(() {
|
||||||
|
dropdownValue = value!;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
items: list.map<DropdownMenuItem<String>>((String value) {
|
||||||
|
return DropdownMenuItem<String>(
|
||||||
|
value: value,
|
||||||
|
child: Text(value),
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user