Ext mixin

A mixin with additional functionality.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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

Static Properties

isAndroid bool
Checks whether the device is running on Android.
no setter
isDebugMode bool
Checks whether the application is running in debug mode.
no setter
isDesktop bool
Checks whether the application is running on a desktop platform (Linux, macOS, or Windows).
no setter
isFuchsia bool
Checks whether the device is running on Fuchsia.
no setter
isIOS bool
Checks whether the device is running on iOS.
no setter
isLinux bool
Checks whether the device is running on Linux.
no setter
isMacOS bool
Checks whether the device is running on macOS.
no setter
isMobileOS bool
Checks whether the device is a mobile operating system (Android or iOS).
no setter
isProfileMode bool
Checks whether the application is running in profile mode.
no setter
isReleaseMode bool
Checks whether the application is running in release mode.
no setter
isWeb bool
Checks whether the application is running on the web.
no setter
isWindows bool
Checks whether the device is running on Windows.
no setter
randomColor Color
Generates a random color with random RGB values and a constant alpha value.
no setter
randomOpaqueColor Color
Generates a random opaque color with a fully opaque alpha value.
no setter
randomPrimaryColor Color
Generates a random primary color by selecting a random color from the list of primary colors provided by the Flutter framework.
no setter

Static Methods

copy(String data) Future<void>
Copies the provided String to the device clipboard.
deg2rad(dynamic deg) double
Converts degrees to radians.
getDistanceFromCoordinates(double lat1, double lng1, double lat2, double lng2) double
Calculates the great-circle distance between two geographic coordinates using the Haversine formula.
getMaterialColor(Color color) MaterialColor
Converts a given Color to a corresponding MaterialColor.
hexToColor(String code) Color
Converts a hexadecimal color code to a corresponding Color object.
showErrorSnackbar(String message, BuildContext context, {double? width, Duration animationDuration = const Duration(milliseconds: 1200), Duration reverseAnimationDuration = const Duration(milliseconds: 550), Duration displayDuration = const Duration(milliseconds: 3000), void onTap()?, bool persistent = false, void onAnimationControllerInit(AnimationController)?, EdgeInsets padding = const EdgeInsets.all(16), Curve curve = Curves.elasticOut, Curve reverseCurve = Curves.linearToEaseOut, SafeAreaValues safeAreaValues = const SafeAreaValues(), DismissType dismissType = DismissType.onSwipe, SnackBarPosition snackBarPosition = SnackBarPosition.top, List<DismissDirection> dismissDirection = const [DismissDirection.up, DismissDirection.horizontal], EdgeInsetsGeometry messagePadding = const EdgeInsets.symmetric(horizontal: 18), Widget icon = const Icon(Icons.error_outline, color: Color(0x15000000), size: 120), TextStyle textStyle = const TextStyle(fontWeight: FontWeight.w600, fontSize: 16, color: Colors.white), int maxLines = 2, int iconRotationAngle = 32, double iconPositionTop = -10, double iconPositionLeft = -8, Color backgroundColor = const Color(0xffff5252), List<BoxShadow> boxShadow = kDefaultBoxShadow, BorderRadius borderRadius = kDefaultBorderRadius, double textScaleFactor = 1.0, TextAlign textAlign = TextAlign.center}) → dynamic
A utility method for showing an error Snackbar with customizable options.
showInfoSnackbar(String message, BuildContext context, {double? width, Duration animationDuration = const Duration(milliseconds: 1200), Duration reverseAnimationDuration = const Duration(milliseconds: 550), Duration displayDuration = const Duration(milliseconds: 3000), void onTap()?, bool persistent = false, void onAnimationControllerInit(AnimationController)?, EdgeInsets padding = const EdgeInsets.all(16), Curve curve = Curves.elasticOut, Curve reverseCurve = Curves.linearToEaseOut, SafeAreaValues safeAreaValues = const SafeAreaValues(), DismissType dismissType = DismissType.onSwipe, SnackBarPosition snackBarPosition = SnackBarPosition.top, List<DismissDirection> dismissDirection = const [DismissDirection.up, DismissDirection.horizontal], EdgeInsetsGeometry messagePadding = const EdgeInsets.symmetric(horizontal: 18), Widget icon = const Icon(Icons.sentiment_neutral, color: Color(0x15000000), size: 120), TextStyle textStyle = const TextStyle(fontWeight: FontWeight.w600, fontSize: 16, color: Colors.white), int maxLines = 2, int iconRotationAngle = 32, double iconPositionTop = -10, double iconPositionLeft = -8, Color backgroundColor = const Color(0xff2196F3), List<BoxShadow> boxShadow = kDefaultBoxShadow, BorderRadius borderRadius = kDefaultBorderRadius, double textScaleFactor = 1.0, TextAlign textAlign = TextAlign.center}) → dynamic
A utility method for showing an information Snackbar with customizable options.
showMessageSnackbar(String message, BuildContext context, {double? width, Duration animationDuration = const Duration(milliseconds: 1200), Duration reverseAnimationDuration = const Duration(milliseconds: 550), Duration displayDuration = const Duration(milliseconds: 3000), void onTap()?, bool persistent = false, void onAnimationControllerInit(AnimationController)?, EdgeInsets padding = const EdgeInsets.all(16), Curve curve = Curves.elasticOut, Curve reverseCurve = Curves.linearToEaseOut, SafeAreaValues safeAreaValues = const SafeAreaValues(), DismissType dismissType = DismissType.onSwipe, SnackBarPosition snackBarPosition = SnackBarPosition.top, List<DismissDirection> dismissDirection = const [DismissDirection.up, DismissDirection.horizontal], EdgeInsetsGeometry messagePadding = const EdgeInsets.symmetric(horizontal: 18), Widget icon = const Icon(Icons.sentiment_satisfied_alt, color: Color(0x15000000), size: 120), TextStyle textStyle = const TextStyle(fontWeight: FontWeight.w600, fontSize: 16, color: Colors.white), int maxLines = 2, int iconRotationAngle = 32, double iconPositionTop = -10, double iconPositionLeft = -8, Color backgroundColor = const Color(0xFF31A586), List<BoxShadow> boxShadow = kDefaultBoxShadow, BorderRadius borderRadius = kDefaultBorderRadius, double textScaleFactor = 1.0, TextAlign textAlign = TextAlign.center}) → dynamic
A utility method for showing a success Snackbar with customizable options.
uniqueId({int length = 17, bool includeTimestamp = true}) String
Generates a unique ID consisting of random alphanumeric characters and an optional timestamp.

Constants

amber50 → const Color
amber100 → const Color
amber200 → const Color
amber300 → const Color
amber400 → const Color
amber500 → const Color
amber600 → const Color
amber700 → const Color
amber800 → const Color
amber900 → const Color
amberHex50 → const String
Amber Colors
amberHex100 → const String
amberHex200 → const String
amberHex300 → const String
amberHex400 → const String
amberHex500 → const String
amberHex600 → const String
amberHex700 → const String
amberHex800 → const String
amberHex900 → const String
black → const Color
blackHex → const String
Colors
blue50 → const Color
blue100 → const Color
blue200 → const Color
blue300 → const Color
blue400 → const Color
blue500 → const Color
blue600 → const Color
blue700 → const Color
blue800 → const Color
blue900 → const Color
blueHex50 → const String
Blue Colors
blueHex100 → const String
blueHex200 → const String
blueHex300 → const String
blueHex400 → const String
blueHex500 → const String
blueHex600 → const String
blueHex700 → const String
blueHex800 → const String
blueHex900 → const String
cyan50 → const Color
cyan100 → const Color
cyan200 → const Color
cyan300 → const Color
cyan400 → const Color
cyan500 → const Color
cyan600 → const Color
cyan700 → const Color
cyan800 → const Color
cyan900 → const Color
cyanHex50 → const String
Cyan Colors
cyanHex100 → const String
cyanHex200 → const String
cyanHex300 → const String
cyanHex400 → const String
cyanHex500 → const String
cyanHex600 → const String
cyanHex700 → const String
cyanHex800 → const String
cyanHex900 → const String
dp10 → const double
Pixel Values
dp11 → const double
dp12 → const double
dp13 → const double
dp14 → const double
dp15 → const double
dp16 → const double
dp17 → const double
dp18 → const double
dp19 → const double
dp20 → const double
dp21 → const double
dp22 → const double
dp23 → const double
dp24 → const double
dp25 → const double
dp26 → const double
dp27 → const double
dp28 → const double
dp29 → const double
dp30 → const double
dp35 → const double
dp40 → const double
dp45 → const double
dp50 → const double
emerald50 → const Color
emerald100 → const Color
emerald200 → const Color
emerald300 → const Color
emerald400 → const Color
emerald500 → const Color
emerald600 → const Color
emerald700 → const Color
emerald800 → const Color
emerald900 → const Color
emeraldHex50 → const String
Emerald Colors
emeraldHex100 → const String
emeraldHex200 → const String
emeraldHex300 → const String
emeraldHex400 → const String
emeraldHex500 → const String
emeraldHex600 → const String
emeraldHex700 → const String
emeraldHex800 → const String
emeraldHex900 → const String
fuchsia50 → const Color
fuchsia100 → const Color
fuchsia200 → const Color
fuchsia300 → const Color
fuchsia400 → const Color
fuchsia500 → const Color
fuchsia600 → const Color
fuchsia700 → const Color
fuchsia800 → const Color
fuchsia900 → const Color
fuchsiaHex50 → const String
Fuchsia Colors
fuchsiaHex100 → const String
fuchsiaHex200 → const String
fuchsiaHex300 → const String
fuchsiaHex400 → const String
fuchsiaHex500 → const String
fuchsiaHex600 → const String
fuchsiaHex700 → const String
fuchsiaHex800 → const String
fuchsiaHex900 → const String
gray50 → const Color
gray100 → const Color
gray200 → const Color
gray300 → const Color
gray400 → const Color
gray500 → const Color
gray600 → const Color
gray700 → const Color
gray800 → const Color
gray900 → const Color
grayHex50 → const String
Gray Colors
grayHex100 → const String
grayHex200 → const String
grayHex300 → const String
grayHex400 → const String
grayHex500 → const String
grayHex600 → const String
grayHex700 → const String
grayHex800 → const String
grayHex900 → const String
green50 → const Color
green100 → const Color
green200 → const Color
green300 → const Color
green400 → const Color
green500 → const Color
green600 → const Color
green700 → const Color
green800 → const Color
green900 → const Color
greenHex50 → const String
Green Colors
greenHex100 → const String
greenHex200 → const String
greenHex300 → const String
greenHex400 → const String
greenHex500 → const String
greenHex600 → const String
greenHex700 → const String
greenHex800 → const String
greenHex900 → const String
indigo50 → const Color
indigo100 → const Color
indigo200 → const Color
indigo300 → const Color
indigo400 → const Color
indigo500 → const Color
indigo600 → const Color
indigo700 → const Color
indigo800 → const Color
indigo900 → const Color
indigoHex50 → const String
Indigo Colors
indigoHex100 → const String
indigoHex200 → const String
indigoHex300 → const String
indigoHex400 → const String
indigoHex500 → const String
indigoHex600 → const String
indigoHex700 → const String
indigoHex800 → const String
indigoHex900 → const String
lime50 → const Color
lime100 → const Color
lime200 → const Color
lime300 → const Color
lime400 → const Color
lime500 → const Color
lime600 → const Color
lime700 → const Color
lime800 → const Color
lime900 → const Color
limeHex50 → const String
Lime Colors
limeHex100 → const String
limeHex200 → const String
limeHex300 → const String
limeHex400 → const String
limeHex500 → const String
limeHex600 → const String
limeHex700 → const String
limeHex800 → const String
limeHex900 → const String
neutral50 → const Color
neutral100 → const Color
neutral200 → const Color
neutral300 → const Color
neutral400 → const Color
neutral500 → const Color
neutral600 → const Color
neutral700 → const Color
neutral800 → const Color
neutral900 → const Color
neutralHex50 → const String
neutralHex100 → const String
neutralHex200 → const String
neutralHex300 → const String
neutralHex400 → const String
neutralHex500 → const String
neutralHex600 → const String
neutralHex700 → const String
neutralHex800 → const String
neutralHex900 → const String
orange50 → const Color
orange100 → const Color
orange200 → const Color
orange300 → const Color
orange400 → const Color
orange500 → const Color
orange600 → const Color
orange700 → const Color
orange800 → const Color
orange900 → const Color
orangeHex50 → const String
Orange Colors
orangeHex100 → const String
orangeHex200 → const String
orangeHex300 → const String
orangeHex400 → const String
orangeHex500 → const String
orangeHex600 → const String
orangeHex700 → const String
orangeHex800 → const String
orangeHex900 → const String
pink50 → const Color
pink100 → const Color
pink200 → const Color
pink300 → const Color
pink400 → const Color
pink500 → const Color
pink600 → const Color
pink700 → const Color
pink800 → const Color
pink900 → const Color
pinkHex50 → const String
Pink Colors
pinkHex100 → const String
pinkHex200 → const String
pinkHex300 → const String
pinkHex400 → const String
pinkHex500 → const String
pinkHex600 → const String
pinkHex700 → const String
pinkHex800 → const String
pinkHex900 → const String
purple50 → const Color
purple100 → const Color
purple200 → const Color
purple300 → const Color
purple400 → const Color
purple500 → const Color
purple600 → const Color
purple700 → const Color
purple800 → const Color
purple900 → const Color
purpleHex50 → const String
Purple Colors
purpleHex100 → const String
purpleHex200 → const String
purpleHex300 → const String
purpleHex400 → const String
purpleHex500 → const String
purpleHex600 → const String
purpleHex700 → const String
purpleHex800 → const String
purpleHex900 → const String
red50 → const Color
red100 → const Color
red200 → const Color
red300 → const Color
red400 → const Color
red500 → const Color
red600 → const Color
red700 → const Color
red800 → const Color
red900 → const Color
redHex50 → const String
Red Colors
redHex100 → const String
redHex200 → const String
redHex300 → const String
redHex400 → const String
redHex500 → const String
redHex600 → const String
redHex700 → const String
redHex800 → const String
redHex900 → const String
rose50 → const Color
rose100 → const Color
rose200 → const Color
rose300 → const Color
rose400 → const Color
rose500 → const Color
rose600 → const Color
rose700 → const Color
rose800 → const Color
rose900 → const Color
roseHex50 → const String
Rose Colors
roseHex100 → const String
roseHex200 → const String
roseHex300 → const String
roseHex400 → const String
roseHex500 → const String
roseHex600 → const String
roseHex700 → const String
roseHex800 → const String
roseHex900 → const String
sky50 → const Color
sky100 → const Color
sky200 → const Color
sky300 → const Color
sky400 → const Color
sky500 → const Color
sky600 → const Color
sky700 → const Color
sky800 → const Color
sky900 → const Color
skyHex50 → const String
Sky Colors
skyHex100 → const String
skyHex200 → const String
skyHex300 → const String
skyHex400 → const String
skyHex500 → const String
skyHex600 → const String
skyHex700 → const String
skyHex800 → const String
skyHex900 → const String
slate50 → const Color
slate100 → const Color
slate200 → const Color
slate300 → const Color
slate400 → const Color
slate500 → const Color
slate600 → const Color
slate700 → const Color
slate800 → const Color
slate900 → const Color
slateHex50 → const String
slateHex100 → const String
slateHex200 → const String
slateHex300 → const String
slateHex400 → const String
slateHex500 → const String
slateHex600 → const String
slateHex700 → const String
slateHex800 → const String
slateHex900 → const String
stone50 → const Color
stone100 → const Color
stone200 → const Color
stone300 → const Color
stone400 → const Color
stone500 → const Color
stone600 → const Color
stone700 → const Color
stone800 → const Color
stone900 → const Color
stoneHex50 → const String
stoneHex100 → const String
stoneHex200 → const String
stoneHex300 → const String
stoneHex400 → const String
stoneHex500 → const String
stoneHex600 → const String
stoneHex700 → const String
stoneHex800 → const String
stoneHex900 → const String
teal50 → const Color
teal100 → const Color
teal200 → const Color
teal300 → const Color
teal400 → const Color
teal500 → const Color
teal600 → const Color
teal700 → const Color
teal800 → const Color
teal900 → const Color
tealHex50 → const String
Teal Colors
tealHex100 → const String
tealHex200 → const String
tealHex300 → const String
tealHex400 → const String
tealHex500 → const String
tealHex600 → const String
tealHex700 → const String
tealHex800 → const String
tealHex900 → const String
transparent → const Color
violet50 → const Color
violet100 → const Color
violet200 → const Color
violet300 → const Color
violet400 → const Color
violet500 → const Color
violet600 → const Color
violet700 → const Color
violet800 → const Color
violet900 → const Color
violetHex50 → const String
Violet Colors
violetHex100 → const String
violetHex200 → const String
violetHex300 → const String
violetHex400 → const String
violetHex500 → const String
violetHex600 → const String
violetHex700 → const String
violetHex800 → const String
violetHex900 → const String
white → const Color
whiteHex → const String
yellow50 → const Color
yellow100 → const Color
yellow200 → const Color
yellow300 → const Color
yellow400 → const Color
yellow500 → const Color
yellow600 → const Color
yellow700 → const Color
yellow800 → const Color
yellow900 → const Color
yellowHex50 → const String
Yellow Colors
yellowHex100 → const String
yellowHex200 → const String
yellowHex300 → const String
yellowHex400 → const String
yellowHex500 → const String
yellowHex600 → const String
yellowHex700 → const String
yellowHex800 → const String
yellowHex900 → const String
zinc50 → const Color
zinc100 → const Color
zinc200 → const Color
zinc300 → const Color
zinc400 → const Color
zinc500 → const Color
zinc600 → const Color
zinc700 → const Color
zinc800 → const Color
zinc900 → const Color
zincHex50 → const String
zincHex100 → const String
zincHex200 → const String
zincHex300 → const String
zincHex400 → const String
zincHex500 → const String
zincHex600 → const String
zincHex700 → const String
zincHex800 → const String
zincHex900 → const String