AnimNavBar constructor

const AnimNavBar(
  1. {Key key,
  2. @required double height,
  3. @required List<IconData> icons,
  4. @required dynamic onChanged(
    1. int
    ),
  5. @required List<GlobalKey<State<StatefulWidget>>> globalKey,
  6. @required BuildContext context,
  7. Duration duration = const Duration(milliseconds: 300),
  8. Color backgroundColor = const Color(0xff2c362f),
  9. Color unselectedIconColor = Colors.grey,
  10. Color selectedIconColor = Colors.white,
  11. Color highLightColor = Colors.white,
  12. bool embossed = false}
)

Implementation

const AnimNavBar({
  Key key,

  /// The height cannot be null
  @required this.height,

  /// The list of icons cannot be null
  @required this.icons,

  /// The onChanged function cannot be null
  @required this.onChanged,

  /// The list of globalKey cannot be null
  @required this.globalKey,

  /// The buildContext cannot be null
  @required this.context,

  /// The duration is a optional parameter and it is initialised with 900 milliseconds
  this.duration = const Duration(milliseconds: 300),

  /// The backgroundColor is a optional parameter and it is initialised with Color(0xff2c362f)
  this.backgroundColor = const Color(0xff2c362f),

  /// The unselectedIconColor is a optional parameter and it is initialised with Colors.grey
  this.unselectedIconColor = Colors.grey,

  /// The selectedIconColor is a optional parameter and it is initialised with Colors.white
  this.selectedIconColor = Colors.white,

  /// The highLightColor is a optional parameter and it is initialised with Colors.white
  this.highLightColor = Colors.white,

  /// The embossed is a optional parameter and it is initialised with false
  this.embossed = false,
})  :

      /// GlobalKey cannot be null
      assert(globalKey != null && globalKey.length > 0),

      /// The list of icons cannot be null
      assert(icons != null && icons.length > 0),

      /// The onChanged cannot be null
      assert(onChanged != null),

      /// The List of icons length should be equal to the list of globalKey's length
      assert(icons.length != 0 &&
          globalKey.length != 0 &&
          icons.length == globalKey.length),

      /// The context cannot be null
      assert(context != null),

      /// The height cannot be null
      assert(height != null);