UdAppBar constructor
UdAppBar({
- required BuildContext context,
- double? height,
- Color? backgroundColor,
- String? titleText,
- Color? titleColor,
- double? titleFontSize,
- FontWeight? titleFontWeight,
- Alignment? titleAlignment,
- double? titleWidth,
- double? titlePaddingLeft,
- double? titlePaddingRight,
- Widget? customDesign,
- Widget? customLeft,
- Widget? customMiddle,
- Widget? customRight,
- double? appBarPaddingLeft,
- double? appBarPaddingright,
- bool? disableShadow,
- double? shadowBlurRadius,
- Color? shadowColor,
- Offset? shadowOffset,
- double? shadowSpreadRadius,
- bool? gradientEnable,
- 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,
);