EmojiAlert class

Creates the main EmojiAlert popup description is the only required parameter by default it creates White popup with emojiType set to EMOJI_TYPE.HAPPY without any button

Inheritance

Constructors

EmojiAlert({required Widget description, Widget? alertTitle, bool enableMainButton = false, bool enableSecondaryButton = false, Function? onSecondaryButtonPressed, Function? onMainButtonPressed, EMOJI_TYPE emojiType = EMOJI_TYPE.HAPPY, double height = DEFAULT_POPUP_HEIGHT, double emojiSize = DEFAULT_EMOJI_SIZE, Color background = Colors.white, Color mainButtonColor = Colors.blue, Color secondaryButtonColor = Colors.blue, Text mainButtonText = const Text(CONFIRM_STRING), Text secondaryButtonText = const Text(CANCEL_STRING), double buttonSize = DEFAULT_BUTTON_SIZE, double cancelButtonColorOpacity = DEFAULT_OPACITY, bool cancelable = true, CORNER_RADIUS_TYPES cornerRadiusType = CORNER_RADIUS_TYPES.BOTTOM_ONLY, double? width, ANIMATION_TYPE animationType = ANIMATION_TYPE.NONE})

Properties

alertTitle Widget?
The title of the popup dialog a Widget type parameter If it's null the popup will only contain description
final
animationType ANIMATION_TYPE
Type of animation that will be applied to the emoji icon values:
final
background Color
The alert background color used in the popup by default it's white
final
buttonSize double
the width set to buttons both MainButton and SecondaryButton by default it's 200
final
cancelable bool
define whether the popup is cancelable when pressing outside it. by default cancelable = true
final
cancelButtonColorOpacity double
The opacity applied to the secondary button background color by default it's 0.2
final
cornerRadiusType CORNER_RADIUS_TYPES
The popup corners radius by default cornerRadiusType = CORNER_RADIUS_TYPES.BOTTOM_ONLY possible values:
final
description Widget
Widget used as body in the popup dialog required attribute
final
emojiSize double
The emoji size by default it's 80
final
emojiType EMOJI_TYPE
The emoji that will be rendered by default emojiType = EMOJI_TYPE.HAPPY
final
enableMainButton bool
used to enable the main button ElevatedButton by default it's set to false so nothing will be rendered
final
enableSecondaryButton bool
used to enable the secondary button of type TextButton by default it's false
final
hashCode int
The hash code for this object.
no setterinherited
height double
The popup height size by default it's set to 200
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
mainButtonColor Color
main button background Color by default it's set to blue
final
mainButtonText Text
Text widget will be used in the main button widget by default:
final
onMainButtonPressed Function?
the function invoked when pressing the main button By default it's null
final
onSecondaryButtonPressed Function?
The function invoked when presseing the secondary button
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secondaryButtonColor Color
The secondary button color, by default it's blue an opacity value will be added to this color cancelButtonColorOpacity
final
secondaryButtonText Text
Text widget used in rendering the second button widget by default:
final
width double?
The popup width size, by default it's null mainly used when displaying the bottom sheet modal
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _EmojiAlertState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
displayAlert(BuildContext context) → dynamic
Display the alert in a dialog form context the app context to display the alert
displayBottomSheet(BuildContext context) → dynamic
Display the alert content in a bottom sheet modal context the app context to display the alert
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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