UdAppBar constructor

UdAppBar({
  1. required BuildContext context,
  2. double? height,
  3. Color? backgroundColor,
  4. String? titleText,
  5. Color? titleColor,
  6. double? titleFontSize,
  7. FontWeight? titleFontWeight,
  8. Alignment? titleAlignment,
  9. double? titleWidth,
  10. double? titlePaddingLeft,
  11. double? titlePaddingRight,
  12. Widget? customDesign,
  13. Widget? customLeft,
  14. Widget? customMiddle,
  15. Widget? customRight,
  16. double? appBarPaddingLeft,
  17. double? appBarPaddingright,
  18. bool? disableShadow,
  19. double? shadowBlurRadius,
  20. Color? shadowColor,
  21. Offset? shadowOffset,
  22. double? shadowSpreadRadius,
  23. bool? gradientEnable,
  24. LinearGradient? gradient,
})

UdAppBar is a simplified and responsive appbar and very easy to use. We provided possible options for you so that you can customize it easily.

Remember! if you dont want to provide custom height then you must pass the context.

Implementation

UdAppBar({
  required this.context,
  this.height,
  this.backgroundColor,
  this.titleText,
  this.titleColor,
  this.titleFontSize,
  this.titleFontWeight,
  this.titleAlignment,
  this.titleWidth,
  this.titlePaddingLeft,
  this.titlePaddingRight,
  this.customDesign,
  this.customLeft,
  this.customMiddle,
  this.customRight,
  this.appBarPaddingLeft,
  this.appBarPaddingright,
  this.disableShadow,
  this.shadowBlurRadius,
  this.shadowColor,
  this.shadowOffset,
  this.shadowSpreadRadius,
  this.gradientEnable,
  this.gradient,
}) : preferredSize = Size.fromHeight(
        height != null
            ? Platform.isIOS
                ? height
                : MediaQuery.of(context).padding.top +
                    height -
                    doNotUseThisDesignValue(context: context) * 20
            : Platform.isIOS
                ? doNotUseThisDesignValue(context: context) * 106
                : MediaQuery.of(context).padding.top +
                    doNotUseThisDesignValue(context: context) * 55,
      );