AnimNavBar constructor
const
AnimNavBar(- {Key key,
- @required double height,
- @required List<IconData> icons,
- @required dynamic onChanged(
- int
),
- @required List<GlobalKey<State<StatefulWidget>>> globalKey,
- @required BuildContext context,
- Duration duration = const Duration(milliseconds: 300),
- Color backgroundColor = const Color(0xff2c362f),
- Color unselectedIconColor = Colors.grey,
- Color selectedIconColor = Colors.white,
- Color highLightColor = Colors.white,
- 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);