FrameDesign class

Pop Overlay Frame Design Template

For button callbacks:

  • Use onSuccess for synchronous operations where you want manual control Returns bool? - if null or true, the popup will be dismissed
  • Use onFutureSuccess for asynchronous operations that will automatically handle success/error states using MyFutureButton Returns Future<bool?> - if null or true, the popup will be dismissed after success animation
  • Use onFutureSuccessValidator to determine whether the popup should be dismissed after onFutureSuccess completes (returns bool? - null or true = dismiss)

Note: Only one of onSuccess or onFutureSuccess should be provided, not both. Configuration class for pop overlay frame design template

Contains all styling and behavior options for the standard pop overlay design. This class serves as a data holder for overlay configuration.

For button callbacks:

  • Use onSuccess for synchronous operations where you want manual control Returns bool? - if null or true, the popup will be dismissed
  • Use onFutureSuccess for asynchronous operations that will automatically handle success/error states using MyFutureButton Returns (bool?, Future<void>) - bool? determines dismissal, Future<void> is the async operation

Note: Only one of onSuccess or onFutureSuccess should be provided, not both.

Constructors

FrameDesign({bool? onSuccess()?, Future<void> onFutureSuccess()?, Future<bool?> onFutureSuccessValidator()?, VoidCallback? onCancel, String cancelButtonTitle = "Cancel", String title = "Title", String successButtonTitle = "Save", bool showCloseButton = true, bool conditionToDisableSuccessButton = false, IconData titlePrefixIcon = Icons.info, bool showBottomButtonBar = true, double? width, double? height, double? titleBarHeight, double? bottomBarHeight, String? info, Color? successButtonColor, Color? cancelButtonColor, FocusTraversalPolicy? traversalPolicy, bool cycleFocusWithinGroup = false, FocusNode? cancelButtonFocusNode, FocusNode? saveButtonFocusNode, String? cycleFocusTargetRoleBuilder()?, List<String> cycleFocusSkipRoles = const ['SAVE_BUTTON', 'CANCEL_BUTTON']})
const

Properties

bottomBarHeight double?
Height of the bottom bar (defaults to 50)
final
cancelButtonColor Color?
final
cancelButtonFocusNode FocusNode?
final
cancelButtonTitle String
Text displayed on the success button
final
conditionToDisableSuccessButton bool
Whether the success button should be disabled
final
cycleFocusSkipRoles List<String>
final
cycleFocusTargetRoleBuilder String? Function()?
final
cycleFocusWithinGroup bool
final
hashCode int
The hash code for this object.
no setterinherited
height double?
Height of the overlay (defaults to 600) - nullable for auto-height
final
info String?
Optional information string to display about the overlay
final
onCancel VoidCallback?
Callback executed when the cancel button is pressed
final
onFutureSuccess Future<void> Function()?
Future callback executed when the success/save button is pressed If provided, a MyFutureButton will be used instead of a regular button
final
onFutureSuccessValidator Future<bool?> Function()?
Validator function that determines whether the popup should be dismissed after onFutureSuccess completes Returns a Future<bool?>
final
onSuccess bool? Function()?
Callback executed when the success/save button is pressed Returns bool? - if null or true, the popup will be dismissed
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
saveButtonFocusNode FocusNode?
final
showBottomButtonBar bool
Whether to show the bottom button bar
final
showCloseButton bool
Whether to show the close button in the header
final
successButtonColor Color?
final
successButtonTitle String
Text displayed on the success button
final
title String
Title text displayed in the header
final
titleBarHeight double?
Height of the title bar (defaults to 80)
final
titlePrefixIcon IconData
Icon displayed before the title text
final
traversalPolicy FocusTraversalPolicy?
final
width double?
Width of the overlay (defaults to 600) - nullable for auto-width
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited