can we set NodeIcon as a optional ?

Issue #38 resolved
xsm123 created an issue

In my project, i use iconfont , all my icon is from iconfont.ttf

Just because flutter_treeview , i have to include MaterialIcons-Regular.otf (898KB)

if we set NodeIcon as a optional , i can use my icon to drop the MaterialIcons-Regular.otf

Comments (6)

  1. xsm123 reporter

    TreeViewTheme treeViewTheme = TreeViewTheme(
        expanderTheme: ExpanderThemeData(
          type: ExpanderType.caret,
          modifier: ExpanderModifier.none,
          position: ExpanderPosition.start,
          color: MColors.userNavColor,
          size: 20,
        )
    

    make type: ExpanderType.caret to icon:Icon(Icons.caret)

    then i can use my icon

  2. Kevin Armstrong

    Are these two different requests? I’ve removed the NodeIcon class to better support Flutter’s tree shaking with icons. So you should be able to use any icon fonts.

    The option to specify your own caret is a good suggestion. I’ll try to get that implemented soon.

  3. Kevin Armstrong

    I see. Tree shaking should automatically use only what is declared and therefore reduce that size though.

    I will still look into making it optional.

  4. Log in to comment