ToolsAppBar constructor

ToolsAppBar({
  1. Key? key,
  2. required BuildContext context,
  3. String? title,
  4. ToolBar leftToolBar = const ToolBar(),
  5. ToolBar rightToolBar = const ToolBar(),
  6. Widget? leading,
  7. bool automaticallyImplyLeading = true,
  8. List<Widget>? actions,
  9. PreferredSizeWidget? bottom,
  10. double? elevation,
  11. double? scrolledUnderElevation,
  12. ScrollNotificationPredicate notificationPredicate = defaultScrollNotificationPredicate,
  13. Color? shadowColor,
  14. Color? surfaceTintColor,
  15. ShapeBorder? shape,
  16. Color? backgroundColor,
  17. Color? foregroundColor,
  18. IconThemeData? iconTheme,
  19. IconThemeData? actionsIconTheme,
  20. bool primary = true,
  21. bool? centerTitle,
  22. bool excludeHeaderSemantics = false,
  23. double? titleSpacing,
  24. double toolbarOpacity = 1.0,
  25. double bottomOpacity = 1.0,
  26. double? toolbarHeight,
  27. double? leadingWidth,
  28. TextStyle? toolbarTextStyle,
  29. TextStyle? titleTextStyle,
  30. SystemUiOverlayStyle? systemOverlayStyle,
  31. bool forceMaterialTransparency = false,
  32. Clip? clipBehavior,
})

Implementation

ToolsAppBar({
  super.key,
  required BuildContext context,

  /// Customizable AppBar attributes
  String? title,
  ToolBar leftToolBar = const ToolBar(),
  ToolBar rightToolBar = const ToolBar(),

  /// AppBar attributes
  super.leading,
  super.automaticallyImplyLeading,
  super.actions,
  super.bottom,
  super.elevation,
  super.scrolledUnderElevation,
  super.notificationPredicate,
  super.shadowColor,
  super.surfaceTintColor,
  super.shape,
  super.backgroundColor,
  super.foregroundColor,
  super.iconTheme,
  super.actionsIconTheme,
  super.primary,
  super.centerTitle,
  super.excludeHeaderSemantics,
  super.titleSpacing,
  super.toolbarOpacity,
  super.bottomOpacity,
  super.toolbarHeight,
  super.leadingWidth,
  super.toolbarTextStyle,
  super.titleTextStyle,
  super.systemOverlayStyle,
  super.forceMaterialTransparency,
  super.clipBehavior,

  /// AppBar widgets that are
  /// overridden by the tools

  // Widget? title,
  // Widget? flexibleSpace,
})  : assert(
        leading == null || leftToolBar.isEmpty,
        'Both leading and leftToolBar cannot be set at the same time',
      ),
      assert(
        actions == null || rightToolBar.isEmpty,
        'Both actions and rightToolBar cannot be set at the same time',
      ),
      super(
        title: _titleWidget(
          context,
          title,
          titleTextStyle,
          toolbarTextStyle,
          foregroundColor,
        ),
        // create toolbars for the left and right
        // within the flexible space widget
        flexibleSpace: _flexibleSpaceWidget(
          leftToolBar,
          rightToolBar,
        ),
      );