Skip to content

Instantly share code, notes, and snippets.

@josue1dario2
Created February 28, 2023 05:24
Show Gist options
  • Save josue1dario2/bc78f9afe3753357a0612675986e326d to your computer and use it in GitHub Desktop.
Save josue1dario2/bc78f9afe3753357a0612675986e326d to your computer and use it in GitHub Desktop.
4. Dropdown
class DropDownScreen extends StatelessWidget {
const DropDownScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Container(
//color: Colors.amber,
height: 250,
width: 400,
child: Column(
children: [
Container(
child: DropdownButton(
hint: Text('Cuadrillas (8)'),
items: <String>[
'Cuadrillas 1',
'Cuadrillas 2',
'Cuadrillas 3',
'Cuadrillas 4',
'Cuadrillas 5',
'Cuadrillas 6',
'Cuadrillas 7',
'Cuadrillas 8'
].map((String value) {
return DropdownMenuItem<String>(
value: value,
child: Text(value),
);
}).toList(),
onChanged: (_) {},
),
),
DropdownButton(
hint: Text('Operarios (18)'),
items: <String>[
'Operario 1',
'Operario 2',
'Operario 3',
'Operario 4',
'Operario 5',
'Operario 6',
'Operario 7',
'Operario 8',
'Operario 9',
'Operario 10',
'Operario 11',
'Operario 12',
'Operario 13',
'Operario 14',
'Operario 15',
'Operario 16',
'Operario 17',
'Operario 18'
].map((String value) {
return DropdownMenuItem<String>(
value: value,
child: Text(value),
);
}).toList(),
onChanged: (_) {},
)
],
),
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment