DrawerManager constructor
DrawerManager(})
Implementation
DrawerManager(
BuildContext context, {
Key? key,
this.backgroundColor,
this.elevation,
this.shape,
this.child,
this.semanticLabel,
this.drawerElements,
required List<Widget> tileSelections,
}) : super(key: key) {
dmProvider = Provider.of<DrawerManagerProvider>(context, listen: false);
dmProvider.drawerSelections = tileSelections;
var drawerSelectionCount = tileSelections.length;
final drawerTileCount = dmProvider.onTapFunctions.length;
final drawerTileCountErrorMessage = 'The DrawerTile count is more than the drawer selections. Check that your DrawerTiles ($drawerTileCount), and your selections ($drawerSelectionCount) match.';
assert(drawerTileCount <= drawerSelectionCount, drawerTileCountErrorMessage);
}