class SQLHelper
Future<List<Map<String, dynamic>>> selectAllServer() async {
final db = await init();
return db.query('server', orderBy: "ip");
}
class ModalDialog
List<Map<String, dynamic>> _server = [];
void getDataDB() async {
final data = await db.selectAllServer();
setState(() {
_server = data;
});
}
DropdownButtonFormField(
onChanged: (val) {},
items: _server.map((ip) {
return DropdownMenuItem(
value: ip['ip'],
child: Text(ip['ket']),
);
}).toList(),
)
Why Value and Child DropdownMenuItem now show? I want to make Dropdown, value and title get from sqflite.