GFAlert constructor
const
GFAlert({
- Key? key,
- String? title,
- TextStyle titleTextStyle = const TextStyle(color: Colors.black87, fontSize: 20, fontWeight: FontWeight.w700),
- Alignment? titleAlignment,
- String? subtitle,
- TextStyle subtitleTextStyle = const TextStyle(color: Colors.black87, fontSize: 17, fontWeight: FontWeight.w400),
- Alignment? subtitleAlignment,
- Widget? bottomBar,
- Alignment? bottomBarAlignment,
- Widget? content,
- Alignment? contentAlignment,
- Color? backgroundColor,
- double? width,
- GFAlertType type = GFAlertType.rounded,
- Alignment? alignment,
- EdgeInsetsGeometry? padding,
- List<
BoxShadow> ? shadow, - double? borderRadius,
- String? okButtonText,
- String? cancelButtonText,
- TextStyle okButtonTextStyle = const TextStyle(fontSize: 18, color: Colors.lightBlue),
- TextStyle cancelButtonTextStyle = const TextStyle(fontSize: 18, color: Colors.lightBlue),
- void onTapCancel()?,
- void onTapOk()?,
Alert has to be wrap inside the body like GFFloatingWidget. See GFFloatingWidget
Implementation
const GFAlert({
Key? key,
this.title,
this.titleTextStyle = const TextStyle(
color: Colors.black87,
fontSize: 20,
fontWeight: FontWeight.w700,
),
this.titleAlignment,
this.subtitle,
this.subtitleTextStyle = const TextStyle(
color: Colors.black87,
fontSize: 17,
fontWeight: FontWeight.w400,
),
this.subtitleAlignment,
this.bottomBar,
this.bottomBarAlignment,
this.content,
this.contentAlignment,
this.backgroundColor,
this.width,
this.type = GFAlertType.rounded,
this.alignment,
this.padding,
this.shadow,
this.borderRadius,
this.okButtonText,
this.cancelButtonText,
this.okButtonTextStyle = const TextStyle(
fontSize: 18,
color: Colors.lightBlue,
),
this.cancelButtonTextStyle = const TextStyle(
fontSize: 18,
color: Colors.lightBlue,
),
this.onTapCancel,
this.onTapOk,
}) : super(key: key);