HeraldV
Decapat
- Katılım
- 10 Eylül 2021
- Mesajlar
- 270
- Çözümler
- 2
Daha fazla
- Cinsiyet
- Erkek
- Meslek
- Yazılım Mühendisi
Merhabalar, CheckboxListTile kullanarak ekranda 50 den fazla checkbox listelemeyi düşünüyorum. Bu checkboxların bulundugu map listesi içerisinde arama yapıp nasıl ekrana gösterebilirim?
Teşekkürler.
[CODE title="Liste"]Map<String, bool> List = {
"Kullanıcı 01": false,
"Kullanıcı 02": false,
"Kullanıcı 03": false,
"Kullanıcı 04": false,
"Kullanıcı 05": false,
"Kullanıcı 06": false,
"Kullanıcı 07": false,
};[/CODE]
[CODE title="Görüntülenen yer"] ListView(
children: List.keys.map<Widget>((
String key,
) {
return CheckboxListTile(
value: List[key],
title: Text(
key,
style: TextStyle(
color:
it_tool_main_blue,
fontSize: 17.0,
fontFamily:
'sans-bold.ttf',
fontWeight:
FontWeight.bold),
),
activeColor:
it_tool_main_blue,
checkColor: Colors.white,
onChanged: (bool? value) {
_setState(() {
List[key] = value!;
if (value == false) {
print(key);
print(List[key]);
} else {
print(key);
print(List[key]);
}
});
});
}).toList(),
),[/CODE]
Teşekkürler.
[CODE title="Liste"]Map<String, bool> List = {
"Kullanıcı 01": false,
"Kullanıcı 02": false,
"Kullanıcı 03": false,
"Kullanıcı 04": false,
"Kullanıcı 05": false,
"Kullanıcı 06": false,
"Kullanıcı 07": false,
};[/CODE]
[CODE title="Görüntülenen yer"] ListView(
children: List.keys.map<Widget>((
String key,
) {
return CheckboxListTile(
value: List[key],
title: Text(
key,
style: TextStyle(
color:
it_tool_main_blue,
fontSize: 17.0,
fontFamily:
'sans-bold.ttf',
fontWeight:
FontWeight.bold),
),
activeColor:
it_tool_main_blue,
checkColor: Colors.white,
onChanged: (bool? value) {
_setState(() {
List[key] = value!;
if (value == false) {
print(key);
print(List[key]);
} else {
print(key);
print(List[key]);
}
});
});
}).toList(),
),[/CODE]