BadgeTab.fromNavigationTab constructor

BadgeTab.fromNavigationTab(
  1. NavigationTab page, {
  2. Key? key,
  3. required Widget icon,
  4. required int index,
  5. String? stateName,
})

Create a BadgeTab from a NavigationTab

Implementation

BadgeTab.fromNavigationTab(NavigationTab page,
    {super.key,
    required Widget this.icon,
    required int index,
    String? stateName})
    : state = (stateName ?? "${page.title}_navigation_tab_$index"),
      initialCount = page.meta['initialCount'],
      rememberCount = page.meta['rememberCount'],
      backgroundColor = page.backgroundColor,
      textColor = page.meta['textColor'],
      smallSize = page.meta['smallSize'],
      largeSize = page.meta['largeSize'],
      textStyle = page.meta['textStyle'],
      padding = page.meta['padding'],
      alignment = page.meta['alignment'],
      offset = page.meta['offset'],
      isLabelVisible = page.meta['isLabelVisible'];