List<Map<String, String>> listALevelObj = [
{'title': 'Vue', 'image': 'assets/Vue.png'},
{'title': 'Web', 'image': 'assets/Web.png'},
{'title': 'Flutter', 'image': 'assets/Flutter.png'},
{'title': 'UnrealEngine', 'image': 'assets/UnrealEngine.png'}
];
listA (){
return AListBuilder(
levelObj: listALevelObj,
backgroundColor: const Color(0xFF2E2E48),
onPressed: (selectedCategory) {
debugPrint('click $selectedCategory ');
setState(() {
});
},
);
}
List<Map<String, String>> listBLevelObj = [
{'title':'title1'},
{'title':'title2'},
{'title':'title3'},
{'title':'title4'},
{'title':'title5'},
];
listB (){
return BListBuilder(
levelObj: listBLevelObj,
itemHeight: 50,
backgroundColor: const Color(0xFF2E2E48),
onPressed: (selectedTitle) {
debugPrint('click $selectedTitle ');
setState(() {
});
},
);
}
https://pub.dev/packages/list_twolevel
click to see:shAdowPlusing
Github:shAdow-XJY/list_twolevel: a two level list builder --- flutter component. (github.com)
Gitee:list_twolevel: a two level list builder --- flutter component. (gitee.com)