list_twolevel 0.0.1 copy "list_twolevel: ^0.0.1" to clipboard
list_twolevel: ^0.0.1 copied to clipboard

outdated

A simple two level listbuilder fill with Map<> Obj.

See #

OneLevel TwoLevel

use #

oneLevelList

List<Map<String, String>> oneLevelObj = [
    {'title': 'Vue', 'image': 'assets/Vue.png'},
    {'title': 'Web', 'image': 'assets/Web.png'},
    {'title': 'Flutter', 'image': 'assets/Flutter.png'},
    {'title': 'UnrealEngine', 'image': 'assets/UnrealEngine.png'}
  ];
ListBuilder(
          oneLevel: true,
          levelObj: oneLevelObj,
          backgroundColor: const Color(0xFF2E2E48),
          onPressed: (selectedCategory) {
            if (selectedCategory != 'default') {
              debugPrint('click $selectedCategory ');
            }
          },
        )

twoLevelList

List<Map<String, String>> twoLevelObj = [
    {'title': 'Vue'},
    {'title': 'Web'},
    {'title': 'Flutter'},
    {'title': 'UnrealEngine'}
  ];
ListBuilder(
          oneLevel: false,
          levelObj: twoLevelObj,
          backgroundColor: const Color(0xFF2E2E48),
          onPressed: (selectedTitle) {
            if (selectedTitle!= 'default') {
              debugPrint('click $selectedTitle');
            }
          },
        )

Function creator #

class ListBuilder extends StatefulWidget {
  bool oneLevel;
  List<Map<String, String>> levelObj;
  Function(String selectedTitle)? onPressed;   // return title String what you click
  double? itemHeight;
  Color? backgroundColor;
  TextStyle? textStyle;
  EdgeInsetsGeometry? listPadding;
  EdgeInsetsGeometry? itemMargin;
  MainAxisAlignment itemAlignment;            //
  }

use in my blog #

click to see:shAdowPlusing

code source #

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)

1
likes
0
points
38
downloads

Publisher

unverified uploader

Weekly Downloads

A simple two level listbuilder fill with Map<> Obj.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on list_twolevel