CustomScaffold constructor

const CustomScaffold({
  1. Key? key,
  2. required int currentIndex,
  3. required ValueChanged<int> onTabTapped,
  4. required List<Widget> pages,
  5. Widget? body,
  6. required String userName,
  7. String welcomeMessage = 'Welcome',
  8. required ImageProvider<Object> userImage,
  9. List<Widget> navItems = const [Icon(Icons.home, size: 30, color: Colors.white), Icon(Icons.search, size: 30, color: Colors.white), Icon(Icons.add, size: 30, color: Colors.white), Icon(Icons.notifications, size: 30, color: Colors.white), Icon(Icons.person, size: 30, color: Colors.white)],
  10. Color navBarColor = const Color(0x33FFFFFF),
  11. Color navBackgroundColor = Colors.transparent,
  12. Color navButtonBackgroundColor = const Color(0x4DFFFFFF),
  13. double navBarHeight = 75,
  14. Duration animationDuration = const Duration(milliseconds: 600),
  15. Curve animationCurve = Curves.easeInOut,
  16. double appBarHeight = 80,
  17. Color appBarBackgroundColor = Colors.transparent,
  18. double appBarElevation = 0,
  19. Widget? leading,
  20. List<Widget>? actions,
})

Implementation

const CustomScaffold({
  Key? key,
  required this.currentIndex,
  required this.onTabTapped,
  required this.pages,
  this.body,
  required this.userName,
  this.welcomeMessage = 'Welcome',
  required this.userImage,
  this.navItems = const [
    Icon(Icons.home, size: 30, color: Colors.white),
    Icon(Icons.search, size: 30, color: Colors.white),
    Icon(Icons.add, size: 30, color: Colors.white),
    Icon(Icons.notifications, size: 30, color: Colors.white),
    Icon(Icons.person, size: 30, color: Colors.white),
  ],
  this.navBarColor = const Color(0x33FFFFFF),
  this.navBackgroundColor = Colors.transparent,
  this.navButtonBackgroundColor = const Color(0x4DFFFFFF),
  this.navBarHeight = 75,
  this.animationDuration = const Duration(milliseconds: 600),
  this.animationCurve = Curves.easeInOut,
  this.appBarHeight = 80,
  this.appBarBackgroundColor = Colors.transparent,
  this.appBarElevation = 0,
  this.leading,
  this.actions,
}) : super(key: key);