NavigationTab.badge constructor

NavigationTab.badge({
  1. required String title,
  2. required Widget page,
  3. Widget? icon,
  4. Widget? activeIcon,
  5. int? initialCount,
  6. bool? rememberCount = true,
  7. String? tooltip,
  8. Color? backgroundColor,
  9. Map<String, dynamic>? meta,
})

NavigationTab.badge is a class that holds the title, page, icon, activeIcon, backgroundColor, tooltip, and meta data of a bottom navigation tab with a badge.

Implementation

NavigationTab.badge(
    {required this.title,
    required this.page,
    this.icon,
    this.activeIcon,
    int? initialCount,
    bool? rememberCount = true,
    this.tooltip,
    this.backgroundColor,
    Map<String, dynamic>? meta})
    : meta = {},
      kind = "badge" {
  this.meta.addAll({
    "initialCount": initialCount,
    "rememberCount": rememberCount,
  });
}