AdaptiveNavBar constructor

AdaptiveNavBar({
  1. bool canTitleGetTapped = false,
  2. void onTitleTapped()?,
  3. required double? screenWidth,
  4. required List<NavBarItem> navBarItems,
  5. Key? key,
  6. Widget? title,
  7. Widget? leading,
  8. bool automaticallyImplyLeading = true,
  9. Widget? flexibleSpace,
  10. PreferredSizeWidget? bottom,
  11. double? elevation,
  12. Color? shadowColor,
  13. ShapeBorder? shape,
  14. Color? backgroundColor,
  15. Color? foregroundColor,
  16. IconThemeData? iconTheme,
  17. IconThemeData? actionsIconTheme,
  18. bool primary = true,
  19. bool? centerTitle,
  20. bool excludeHeaderSemantics = false,
  21. double? titleSpacing,
  22. double toolbarOpacity = 1.0,
  23. double bottomOpacity = 1.0,
  24. double? toolbarHeight,
  25. double? leadingWidth,
  26. TextStyle? toolbarTextStyle,
  27. TextStyle? titleTextStyle,
  28. SystemUiOverlayStyle? systemOverlayStyle,
})

AdaptiveNavBar's named constructor

Implementation

AdaptiveNavBar({
  this.canTitleGetTapped = false,
  this.onTitleTapped,
  required this.screenWidth,
  required this.navBarItems,
  Key? key,
  Widget? title,
  Widget? leading,
  bool automaticallyImplyLeading = true,
  Widget? flexibleSpace,
  PreferredSizeWidget? bottom,
  double? elevation,
  Color? shadowColor,
  ShapeBorder? shape,
  Color? backgroundColor,
  Color? foregroundColor,
  IconThemeData? iconTheme,
  IconThemeData? actionsIconTheme,
  bool primary = true,
  bool? centerTitle,
  bool excludeHeaderSemantics = false,
  double? titleSpacing,
  double toolbarOpacity = 1.0,
  double bottomOpacity = 1.0,
  double? toolbarHeight,
  double? leadingWidth,
  TextStyle? toolbarTextStyle,
  TextStyle? titleTextStyle,
  SystemUiOverlayStyle? systemOverlayStyle,
}) : super(
        key: key,
        title: Padding(
          padding: const EdgeInsets.symmetric(horizontal: 20),
          child: canTitleGetTapped
              ? InkWell(
                  onTap: onTitleTapped,
                  child: title ??
                      const Text(
                        "MB NavBar",
                        style: TextStyle(
                          fontWeight: FontWeight.bold,
                          fontSize: 24,
                        ),
                      ),
                )
              : title ??
                  const Text(
                    "MB NavBar",
                    style: TextStyle(
                      fontWeight: FontWeight.bold,
                      fontSize: 24,
                    ),
                  ),
        ),
        actions: [
          screenWidth! < 800.toDouble()
              ? NavBarSmall(
                  navBarItems: navBarItems,
                )
              : NavBarWide(
                  navBarItems: navBarItems,
                ),
        ],
        leading: leading,
        automaticallyImplyLeading: automaticallyImplyLeading,
        flexibleSpace: flexibleSpace,
        bottom: bottom,
        elevation: elevation,
        shadowColor: shadowColor,
        shape: shape,
        backgroundColor: backgroundColor,
        foregroundColor: foregroundColor,
        iconTheme: iconTheme,
        actionsIconTheme: actionsIconTheme,
        primary: primary,
        centerTitle: centerTitle,
        excludeHeaderSemantics: excludeHeaderSemantics,
        titleSpacing: titleSpacing,
        toolbarOpacity: toolbarOpacity,
        bottomOpacity: bottomOpacity,
        toolbarHeight: toolbarHeight,
        leadingWidth: leadingWidth,
        toolbarTextStyle: toolbarTextStyle,
        titleTextStyle: titleTextStyle,
        systemOverlayStyle: systemOverlayStyle,
      );