FlipBoxNavigationBar constructor

FlipBoxNavigationBar({
  1. required List<FlipBoxNavigationBarItem> items,
  2. int currentIndex = 0,
  3. IconThemeData selectedItemTheme = const IconThemeData(size: 24.0, color: Colors.black),
  4. IconThemeData unselectedItemTheme = const IconThemeData(size: 24.0, color: Colors.black),
  5. double verticalPadding = 16,
  6. dynamic backgroundColor,
  7. TextStyle? textStyle,
  8. Duration duration = const Duration(milliseconds: 800),
  9. ValueChanged<int>? onTap,
  10. Key? key,
})

Creates a flip box bottom navigation bar which can be used with Scaffold's Scaffold.bottomNavigationBar argument.

The length of items should be at least three.

The selectedItemTheme, unselectedItemTheme and backgroundColor must not be null.

The verticalPadding must be greater than 4.0.

The duration can be used to have custom Duration of animation. duration must be greater than 100ms.

Implementation

FlipBoxNavigationBar({
  required this.items,
  this.currentIndex = 0,
  this.selectedItemTheme =
      const IconThemeData(size: 24.0, color: Colors.black),
  this.unselectedItemTheme =
      const IconThemeData(size: 24.0, color: Colors.black),
  this.verticalPadding = 16,
  this.backgroundColor,
  this.textStyle,
  this.duration = const Duration(milliseconds: 800),
  this.onTap,
  Key? key,
})  : assert(items.length >= 3),
      assert(duration > const Duration(milliseconds: 100)),
      assert(verticalPadding >= 4.0),
      super(key: key);