CircleBNB constructor
const
CircleBNB({})
Implementation
const CircleBNB({
super.key,
required this.size,
this.colorList,
required this.dragSpeed,
required this.items,
required this.onChangeIndex,
this.navigationStyle = NavigationStyle.linear,
this.linearItemCount = 3
}) : assert(items.length >= 3, 'items must contain more than 3 elements.'),
assert(colorList == null || colorList.length == 4, 'colorList must be null or have more than 4 elements.'),
assert(linearItemCount == null || (linearItemCount % 2 == 1 && linearItemCount <= 5 && linearItemCount <= items.length), 'linearItemCount must be an odd number, no more than 5 and not greater than the number of items.'),
assert(linearItemCount == null || !(navigationStyle == NavigationStyle.linear && linearItemCount > items.length), 'linearItemCount cannot be greater than the number of items when using linear navigation style.');