GFAlert constructor

const GFAlert({
  1. Key? key,
  2. String? title,
  3. TextStyle titleTextStyle = const TextStyle(color: Colors.black87, fontSize: 20, fontWeight: FontWeight.w700),
  4. Alignment? titleAlignment,
  5. String? subtitle,
  6. TextStyle subtitleTextStyle = const TextStyle(color: Colors.black87, fontSize: 17, fontWeight: FontWeight.w400),
  7. Alignment? subtitleAlignment,
  8. Widget? bottomBar,
  9. Alignment? bottomBarAlignment,
  10. Widget? content,
  11. Alignment? contentAlignment,
  12. Color? backgroundColor,
  13. double? width,
  14. GFAlertType type = GFAlertType.rounded,
  15. Alignment? alignment,
  16. EdgeInsetsGeometry? padding,
  17. List<BoxShadow>? shadow,
  18. double? borderRadius,
  19. String? okButtonText,
  20. String? cancelButtonText,
  21. TextStyle okButtonTextStyle = const TextStyle(fontSize: 18, color: Colors.lightBlue),
  22. TextStyle cancelButtonTextStyle = const TextStyle(fontSize: 18, color: Colors.lightBlue),
  23. void onTapCancel()?,
  24. 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);