empathetech_flutter_ui
library
Constants
-
advancedColorsKey
→ const String
-
-
advancedTextKey
→ const String
-
-
alexBrush
→ const String
-
'alexBrush'
-
allKeys
→ const Map<String, Type>
-
globalKeys, textStyleKeys, layoutKeys, colorKeys, imageKeys
-
americanEnglish
→ const Locale
-
'en_US'
-
appLocaleKey
→ const String
-
-
arabic
→ const Locale
-
'ar'
-
atkinsonHyperlegible
→ const String
-
'atkinsonHyperlegible'
-
baseEmpathConfig
→ const Map<String, Object>
-
Empathetech EzConfig.defaults base to build from
-
blackHex
→ const int
-
0xFF000000
-
bodyBoldedKey
→ const String
-
-
bodyFontFamilyKey
→ const String
-
-
bodyFontHeightKey
→ const String
-
-
bodyFontSizeKey
→ const String
-
-
bodyItalicizedKey
→ const String
-
-
bodyLetterSpacingKey
→ const String
-
-
bodyUnderlinedKey
→ const String
-
-
bodyWordSpacingKey
→ const String
-
-
bold
→ const String
-
bold
-
boxFitSuffix
→ const String
-
'Fit'
-
chinese
→ const Locale
-
'zh'
-
colorKeys
→ const Map<String, Type>
-
light, dark
X all 26 material color scheme keys
y the userColorsKey
-
contain
→ const String
-
'contain'
-
cover
→ const String
-
'cover'
-
creole
→ const Locale
-
'ht'
-
csError
→ const String
-
-
csErrorContainer
→ const String
-
-
csInversePrimary
→ const String
-
-
csInverseSurface
→ const String
-
-
csOnError
→ const String
-
-
csOnErrorContainer
→ const String
-
-
csOnInverseSurface
→ const String
-
-
csOnPrimary
→ const String
-
-
csOnPrimaryContainer
→ const String
-
-
csOnPrimaryFixed
→ const String
-
-
csOnPrimaryFixedVariant
→ const String
-
-
csOnSecondary
→ const String
-
-
csOnSecondaryContainer
→ const String
-
-
csOnSecondaryFixed
→ const String
-
-
csOnSecondaryFixedVariant
→ const String
-
-
csOnSurface
→ const String
-
-
csOnSurfaceVariant
→ const String
-
-
csOnTertiary
→ const String
-
-
csOnTertiaryContainer
→ const String
-
-
csOnTertiaryFixed
→ const String
-
-
csOnTertiaryFixedVariant
→ const String
-
-
csOutline
→ const String
-
-
csOutlineVariant
→ const String
-
-
csPrimary
→ const String
-
-
csPrimaryContainer
→ const String
-
-
csPrimaryFixed
→ const String
-
-
csPrimaryFixedDim
→ const String
-
-
csScrim
→ const String
-
-
csSecondary
→ const String
-
-
csSecondaryContainer
→ const String
-
-
csSecondaryFixed
→ const String
-
-
csSecondaryFixedDim
→ const String
-
-
csShadow
→ const String
-
-
csSurface
→ const String
-
-
csSurfaceBright
→ const String
-
-
csSurfaceContainer
→ const String
-
-
csSurfaceContainerHigh
→ const String
-
-
csSurfaceContainerHighest
→ const String
-
-
csSurfaceContainerLow
→ const String
-
-
csSurfaceContainerLowest
→ const String
-
-
csSurfaceDim
→ const String
-
-
csSurfaceTint
→ const String
-
-
csTertiary
→ const String
-
-
csTertiaryContainer
→ const String
-
-
csTertiaryFixed
→ const String
-
-
csTertiaryFixedDim
→ const String
-
-
darkBackgroundImageKey
→ const String
-
-
darkColors
→ const List<String>
-
Ordered List for populating color setting screen(s)
-
darkColorSchemeImageKey
→ const String
-
-
darkErrorContainerKey
→ const String
-
-
darkErrorKey
→ const String
-
-
darkInversePrimaryKey
→ const String
-
-
darkInverseSurfaceKey
→ const String
-
-
darkOnErrorContainerKey
→ const String
-
-
darkOnErrorKey
→ const String
-
-
darkOnInverseSurfaceKey
→ const String
-
-
darkOnPrimaryContainerKey
→ const String
-
-
darkOnPrimaryFixedKey
→ const String
-
-
darkOnPrimaryFixedVariantKey
→ const String
-
-
darkOnPrimaryKey
→ const String
-
-
darkOnSecondaryContainerKey
→ const String
-
-
darkOnSecondaryFixedKey
→ const String
-
-
darkOnSecondaryFixedVariantKey
→ const String
-
-
darkOnSecondaryKey
→ const String
-
-
darkOnSurfaceKey
→ const String
-
-
darkOnSurfaceVariantKey
→ const String
-
-
darkOnTertiaryContainerKey
→ const String
-
-
darkOnTertiaryFixedKey
→ const String
-
-
darkOnTertiaryFixedVariantKey
→ const String
-
-
darkOnTertiaryKey
→ const String
-
-
darkOutlineKey
→ const String
-
-
darkOutlineVariantKey
→ const String
-
-
darkPrimaryContainerKey
→ const String
-
-
darkPrimaryFixedDimKey
→ const String
-
-
darkPrimaryFixedKey
→ const String
-
-
darkPrimaryKey
→ const String
-
-
darkScrimKey
→ const String
-
-
darkSecondaryContainerKey
→ const String
-
-
darkSecondaryFixedDimKey
→ const String
-
-
darkSecondaryFixedKey
→ const String
-
-
darkSecondaryKey
→ const String
-
-
darkShadowKey
→ const String
-
-
darkSurface
→ const Color
-
0xFF222222 == 34 of each
-
darkSurfaceBrightKey
→ const String
-
-
darkSurfaceContainer
→ const Color
-
0xFF111111 == 17 of each
-
darkSurfaceContainerHex
→ const int
-
0xFF111111 == 17 of each
-
darkSurfaceContainerHighestKey
→ const String
-
-
darkSurfaceContainerHighKey
→ const String
-
-
darkSurfaceContainerKey
→ const String
-
-
darkSurfaceContainerLowestKey
→ const String
-
-
darkSurfaceContainerLowKey
→ const String
-
-
darkSurfaceDim
→ const Color
-
0xFF191919 == 25 of each
-
darkSurfaceDimHex
→ const int
-
0xFF191919 == 25 of each
-
darkSurfaceDimKey
→ const String
-
-
darkSurfaceHex
→ const int
-
0xFF222222 == 34 of each
-
darkSurfaceKey
→ const String
-
-
darkSurfaceTintKey
→ const String
-
-
darkTertiaryContainerKey
→ const String
-
-
darkTertiaryFixedDimKey
→ const String
-
-
darkTertiaryFixedKey
→ const String
-
-
darkTertiaryKey
→ const String
-
-
darkTextBackgroundOpacityKey
→ const String
-
-
defaultBodySize
→ const double
-
16.0
-
defaultDesktopPadding
→ const double
-
17.5
-
defaultDesktopSpacing
→ const double
-
25.0
-
defaultDisplaySize
→ const double
-
42.0
-
defaultFontHeight
→ const double
-
1.5
-
defaultHeadlineSize
→ const double
-
32.0
-
defaultIconSize
→ const double
-
20.0
-
defaultLabelSize
→ const double
-
14.0
-
defaultLetterSpacing
→ const double
-
0.25
-
defaultMargin
→ const double
-
10.0
-
defaultMobilePadding
→ const double
-
17.5
-
defaultMobileSpacing
→ const double
-
25.0
-
defaultTextOpacity
→ const double
-
0.0
-
defaultTitleSize
→ const double
-
22.0
-
defaultWordSpacing
→ const double
-
1.0
-
desktopEmpathConfig
→ const Map<String, Object>
-
-
displayBoldedKey
→ const String
-
-
displayFontFamilyKey
→ const String
-
-
displayFontHeightKey
→ const String
-
-
displayFontSizeKey
→ const String
-
-
displayItalicizedKey
→ const String
-
-
displayLetterSpacingKey
→ const String
-
-
displayUnderlinedKey
→ const String
-
-
displayWordSpacingKey
→ const String
-
-
egyptianArabic
→ const Locale
-
'ar_EG'
-
empathEucalyptus
→ const Color
-
0xFF20DAA5
-
empathEucalyptusDim
→ const Color
-
0x4020DAA5
-
empathEucalyptusDimHex
→ const int
-
0x4020DAA5
-
empathEucalyptusHex
→ const int
-
0xFF20DAA5
-
empathPurple
→ const Color
-
0xFFA520DA
-
empathPurpleDim
→ const Color
-
0x40A520DA
-
empathPurpleDimHex
→ const int
-
0x40A520DA
-
empathPurpleHex
→ const int
-
0xFFA520DA
-
empathSand
→ const Color
-
0xFFDAA520
-
empathSandDim
→ const Color
-
0x40DAA520
-
empathSandDimHex
→ const int
-
0x40DAA520
-
empathSandHex
→ const int
-
0xFFDAA520
-
english
→ const Locale
-
'en'
-
ezHighContrastDark
→ const ColorScheme
-
Custom ColorScheme.highContrastDark
-
ezHighContrastLight
→ const ColorScheme
-
Custom ColorScheme.highContrastLight
-
ezPillShape
→ const BorderRadius
-
BorderRadius.all(Radius.circular => 64.0)
-
ezRoundEdge
→ const BorderRadius
-
BorderRadius.all(Radius.circular => 4.0)
-
filipino
→ const Locale
-
'fil'
-
fill
→ const String
-
'fill'
-
fingerPaint
→ const String
-
'fingerPaint'
-
fitHeight
→ const String
-
'fitHeight'
-
fitWidth
→ const String
-
'fitWidth'
-
focusOpacity
→ const double
-
0.12
-
fontSizeMaxes
→ const Map<String, double>
-
84.0, 64.0, 42.0, 32.0, 28.0
-
fontSizeMins
→ const Map<String, double>
-
21.0, 16.0, 11.0, 8.0, 7.0
-
french
→ const Locale
-
'fr'
-
globalKeys
→ const Map<String, Type>
-
isLeftyKey, isDarkThemeKey, appLocaleKey
-
headlineBoldedKey
→ const String
-
-
headlineFontFamilyKey
→ const String
-
-
headlineFontHeightKey
→ const String
-
-
headlineFontSizeKey
→ const String
-
-
headlineItalicizedKey
→ const String
-
-
headlineLetterSpacingKey
→ const String
-
-
headlineUnderlinedKey
→ const String
-
-
headlineWordSpacingKey
→ const String
-
-
hideScrollKey
→ const String
-
-
highlightOpacity
→ const double
-
0.08
-
homePath
→ const String
-
'/'
-
iconSizeKey
→ const String
-
-
imageKeys
→ const Map<String, Type>
-
light, dark
X
ColorSchemeImageKey, BackgroundImageKey, BackgroundImageKeyFit
-
isDarkThemeKey
→ const String
-
-
isLeftyKey
→ const String
-
-
italic
→ const String
-
italic
-
labelBoldedKey
→ const String
-
-
labelFontFamilyKey
→ const String
-
-
labelFontHeightKey
→ const String
-
-
labelFontSizeKey
→ const String
-
-
labelItalicizedKey
→ const String
-
-
labelLetterSpacingKey
→ const String
-
-
labelUnderlinedKey
→ const String
-
-
labelWordSpacingKey
→ const String
-
-
layoutKeys
→ const Map<String, Type>
-
marginKey, paddingKey, spacingKey, hideScrollKey
-
lexend
→ const String
-
'lexend'
-
lightBackgroundImageKey
→ const String
-
-
lightColors
→ const List<String>
-
Ordered List for populating color setting screen(s)
-
lightColorSchemeImageKey
→ const String
-
-
lightErrorContainerKey
→ const String
-
-
lightErrorKey
→ const String
-
-
lightInversePrimaryKey
→ const String
-
-
lightInverseSurfaceKey
→ const String
-
-
lightOnErrorContainerKey
→ const String
-
-
lightOnErrorKey
→ const String
-
-
lightOnInverseSurfaceKey
→ const String
-
-
lightOnPrimaryContainerKey
→ const String
-
-
lightOnPrimaryFixedKey
→ const String
-
-
lightOnPrimaryFixedVariantKey
→ const String
-
-
lightOnPrimaryKey
→ const String
-
-
lightOnSecondaryContainerKey
→ const String
-
-
lightOnSecondaryFixedKey
→ const String
-
-
lightOnSecondaryFixedVariantKey
→ const String
-
-
lightOnSecondaryKey
→ const String
-
-
lightOnSurfaceKey
→ const String
-
-
lightOnSurfaceVariantKey
→ const String
-
-
lightOnTertiaryContainerKey
→ const String
-
-
lightOnTertiaryFixedKey
→ const String
-
-
lightOnTertiaryFixedVariantKey
→ const String
-
-
lightOnTertiaryKey
→ const String
-
-
lightOutlineKey
→ const String
-
-
lightOutlineVariantKey
→ const String
-
-
lightPrimaryContainerKey
→ const String
-
-
lightPrimaryFixedDimKey
→ const String
-
-
lightPrimaryFixedKey
→ const String
-
-
lightPrimaryKey
→ const String
-
-
lightScrimKey
→ const String
-
-
lightSecondaryContainerKey
→ const String
-
-
lightSecondaryFixedDimKey
→ const String
-
-
lightSecondaryFixedKey
→ const String
-
-
lightSecondaryKey
→ const String
-
-
lightShadowKey
→ const String
-
-
lightSurface
→ const Color
-
0xFFFFFFFF == white
-
lightSurfaceBrightKey
→ const String
-
-
lightSurfaceContainer
→ const Color
-
0xFFF0F0F0 == -15 of each
-
lightSurfaceContainerHex
→ const int
-
0xFFF0F0F0 == -15 of each
-
lightSurfaceContainerHighestKey
→ const String
-
-
lightSurfaceContainerHighKey
→ const String
-
-
lightSurfaceContainerKey
→ const String
-
-
lightSurfaceContainerLowestKey
→ const String
-
-
lightSurfaceContainerLowKey
→ const String
-
-
lightSurfaceDim
→ const Color
-
0xFFF8F8F8 == -7 of each
-
lightSurfaceDimHex
→ const int
-
0xFFF8F8F8 == -7 of each
-
lightSurfaceDimKey
→ const String
-
-
lightSurfaceHex
→ const int
-
0xFFFFFFFF == white
-
lightSurfaceKey
→ const String
-
-
lightSurfaceTintKey
→ const String
-
-
lightTertiaryContainerKey
→ const String
-
-
lightTertiaryFixedDimKey
→ const String
-
-
lightTertiaryFixedKey
→ const String
-
-
lightTertiaryKey
→ const String
-
-
lightTextBackgroundOpacityKey
→ const String
-
-
marginKey
→ const String
-
-
maxBody
→ const double
-
32.0
-
maxDisplay
→ const double
-
84.0
-
maxFontHeight
→ const double
-
2.0
-
maxHeadline
→ const double
-
64.0
-
maxIconSize
→ const double
-
48.0
-
maxLabel
→ const double
-
28.0
-
maxLetterSpacing
→ const double
-
2.0
-
maxMargin
→ const double
-
20.0
-
maxOpacity
→ const double
-
1.0
-
maxPadding
→ const double
-
40.0
-
maxSpacing
→ const double
-
50.0
-
maxTitle
→ const double
-
42.0
-
maxWordSpacing
→ const double
-
3.0
-
minBody
→ const double
-
8.0
-
minDisplay
→ const double
-
21.0
-
minFontHeight
→ const double
-
1.0
-
minHeadline
→ const double
-
16.0
-
minIconSize
→ const double
-
16.0
-
minLabel
→ const double
-
7.0
-
minLetterSpacing
→ const double
-
0.0
-
minMargin
→ const double
-
5.0
-
minOpacity
→ const double
-
0.0
-
minPadding
→ const double
-
10.0
-
minSpacing
→ const double
-
10.0
-
minTitle
→ const double
-
11.0
-
minWordSpacing
→ const double
-
0.0
-
mobileEmpathConfig
→ const Map<String, Object>
-
-
noImageValue
→ const String
-
Allows for app images whose default is an asset to be "null"
-
none
→ const String
-
'none'
-
noto
→ const String
-
'noto'
-
openSans
→ const String
-
'openSans'
-
paddingKey
→ const String
-
-
pressStart2P
→ const String
-
'pressStart2P'
-
readexPro
→ const String
-
'readexPro'
-
rMax
→ const int
-
255
-
roboto
→ const String
-
'roboto'
-
sampleString
→ const String
-
'-55.55'
-
scaleDown
→ const String
-
'scaleDown'
-
selectionOpacity
→ const double
-
0.25
-
simplifiedChinese
→ const Locale
-
'zh_CN'
-
sourceCodePro
→ const String
-
'sourceCodePro'
-
spacingKey
→ const String
-
-
spanish
→ const Locale
-
'es'
-
success
→ const String
-
'SUCCESS'
-
textColorPrefix
→ const String
-
'On'
-
textFieldRadius
→ const BorderRadius
-
BorderRadius.only(top left && top right: Radius.circular => 4.0)
-
textStyleKeys
→ const Map<String, Type>
-
display, headline, title, body, label
X
FontFamily, FontSize, FontWeight, FontStyle, LetterSpacing, WordSpacing, FontHeight, FontDecoration
y
darkTextBackgroundOpacity, lightTextBackgroundOpacity, iconSize
-
titleBoldedKey
→ const String
-
-
titleFontFamilyKey
→ const String
-
-
titleFontHeightKey
→ const String
-
-
titleFontSizeKey
→ const String
-
-
titleItalicizedKey
→ const String
-
-
titleLetterSpacingKey
→ const String
-
-
titleUnderlinedKey
→ const String
-
-
titleWordSpacingKey
→ const String
-
-
transparentHex
→ const int
-
0x00000000
-
underlined
→ const String
-
underlined
-
userColorsKey
→ const String
-
-
webImgHint
→ const String
-
example.com/image.jpg
-
whiteHex
→ const int
-
0xFFFFFFFF
Functions
-
closeKeyboard(BuildContext context)
→ void
-
More readable than...
FocusScope.of(context).unfocus();
-
doNothing()
→ void
-
Is there a required Function that you wish was optional?
Then doNothing!
-
ezActionPairs({required BuildContext context, String? confirmMsg, required void onConfirm(), bool confirmIsDefault = false, bool confirmIsDestructive = false, String? denyMsg, required void onDeny(), bool denyIsDefault = false, bool denyIsDestructive = false, TextStyle? style})
→ (List<EzMaterialAction>, List<EzCupertinoAction>)
-
Pairs with EzAlertDialog
Use when you want a variation of yes/no
Returns EzAlertDialog.materialActions, EzAlertDialog.cupertinoActions
-
ezBodyStyle(Color? color)
→ TextStyle
-
Builds TextTheme.bodyLarge w/ values from EzConfig.prefs
-
ezCamelToClass(String name)
→ String
-
camelCase -> ClassCase
-
ezCamelToSnake(String name)
→ String
-
camelCase -> snake_case
-
ezCamelToTitle(String name)
→ String
-
camelCase -> Title Case
-
ezChaCha(WidgetTester tester, Finder finder, {Offset leftOffset = const Offset(-100, 0), Offset rightOffset = const Offset(100, 0)})
→ Future<void>
-
For integration testing
Take the
finder
and
Slide to the left, then
Slide to the right...
-
ezClassToCamel(String name)
→ String
-
ClassCase -> camelCase
-
ezClassToSnake(String name)
→ String
-
ClassCase -> snake_case
-
ezClassToTitle(String name)
→ String
-
ClassCase -> Title Case
-
ezCmd(String cmd, {required String dir, required void onSuccess(), required void onFailure(String message), void onError(String message)?, bool debug = true, ValueNotifier<String>? readout})
→ Future<void>
-
Run a CLI
cmd
Track the stdout/err with debug
and readout
-
ezColorPicker(BuildContext context, {String? title, required Color startColor, required void onColorChange(Color chosenColor), String? confirmMsg, required void onConfirm(), String? denyMsg, required void onDeny()})
→ Future
-
Wraps a
ColorPicker
in an EzAlertDialog
-
ezColorScheme(Brightness brightness)
→ ColorScheme
-
Generate a ColorScheme based on values present in EzConfig.prefs
-
ezDefaultBodyStyle(Color? color)
→ TextStyle
-
Builds TextTheme.bodyLarge w/ values from EzConfig.defaults
-
ezDefaultDisplayStyle(Color? color)
→ TextStyle
-
Builds TextTheme.displayLarge w/ values from EzConfig.defaults
-
ezDefaultHeadlineStyle(Color? color)
→ TextStyle
-
Builds TextTheme.headlineLarge w/ values from EzConfig.defaults
-
ezDefaultLabelStyle(Color? color)
→ TextStyle
-
Builds TextTheme.labelLarge w/ values from EzConfig.defaults
-
ezDefaultTitleStyle(Color? color)
→ TextStyle
-
Builds TextTheme.titleLarge w/ values from EzConfig.defaults
-
ezDismiss(WidgetTester tester, {Offset offset = const Offset(1, 1)})
→ Future<void>
-
For integration testing
WidgetTester.tapAt the
offset
to dismiss a dialog/modal/etc
-
ezDisplayStyle(Color? color)
→ TextStyle
-
Builds TextTheme.displayLarge w/ values from EzConfig.prefs
-
ezDropdownWidth({required BuildContext context, required List<String> entries})
→ double
-
Returns an appropriate width for a DropdownMenu
-
ezFeedback({required BuildContext parentContext, required EFUILang l10n, required String supportEmail, required String appName})
→ Future<void>
-
-
ezFind(WidgetTester tester, Finder finder, {Matcher matcher = findsOneWidget})
→ Future<void>
-
For integration testing
expect(
finder
, matcher
) and ensure visibility
-
ezFindText(WidgetTester tester, String text, {bool findRichText = false, bool skipOffstage = false, Matcher matcher = findsOneWidget})
→ Future<void>
-
For integration testing
Find text and ensure visibility
-
ezFindWidget(WidgetTester tester, Type widgetType, {Matcher matcher = findsOneWidget, bool skipOffstage = false})
→ Future<void>
-
For integration testing
Find widget and ensure visibility
-
ezFirstWord(String text)
→ String
-
Splits the string on '_' and/or ' ' and returns the first word
-
ezFitFromName(String? name)
→ BoxFit?
-
Given a BoxFit.name, return the associated BoxFit
Returns null is
name
is unrecognized
-
ezHeadlineStyle(Color? color)
→ TextStyle
-
Builds TextTheme.headlineLarge w/ values from EzConfig.prefs
-
ezHold(WidgetTester tester, Finder finder, {bool warnIfMissed = false})
→ Future<void>
-
For integration testing
Ensure visibility of, long press at, and settle a
finder
target
-
ezHoldText(WidgetTester tester, String text, {bool warnIfMissed = false})
→ Future<void>
-
For integration testing
Ensure visibility of, long press at, and settle a
text
target
-
ezImagePicker({required BuildContext context, required String prefsPath, required ImageSource source})
→ Future<String?>
-
Wraps an
ImagePicker
in a try/catch and successful results to EzConfig
-
ezImageProvider(String path)
→ ImageProvider<Object>
-
Returns and AssetImage, NetworkImage, or FileImage based on the
path
-
ezImageSize(BuildContext context)
→ double
-
Recommended size for an image
Starts with 160.0; chosen by visual inspection
Then, applies MediaQuery text scaling and EzConfig icon scaling
-
ezL10n(BuildContext context)
→ EFUILang
-
More readable than...
EFUILang.of(context) ?? EzConfig.l10nFallback
-
ezLabelStyle(Color? color)
→ TextStyle
-
Builds TextTheme.labelLarge w/ values from EzConfig.prefs
-
ezLog(String message, {String prefix = '', int? wrapWidth, ValueNotifier<String>? buffer})
→ void
-
debugPrint alias; for permanent logging
Reserving debugPrint for temporary logging makes them easier to remove when the time comes
Optionally provide a
prefix
to make log filtering easier (include spaces!)
Also supports logging to a String 'buffer' (aka ValueNotifier)
-
ezLogAlert(BuildContext context, {String? title, required String message, (List<Widget>, List<Widget>)? customActions})
→ Future
-
ezLog the passed message and display an EzAlertDialog to notify the user
-
ezLstIcon(EzLayoutSettingType settingType)
→ Icon
-
Get the Icon for
settingType
-
ezLstName(BuildContext context, EzLayoutSettingType settingType)
→ String
-
Get human readable name for
settingType
-
ezPause(int seconds)
→ Future<void>
-
Wait for a desired number of
seconds
-
ezReadingTime(String passage)
→ Duration
-
Relaxed reading time for a US tween: 100 words per minute
-
ezSnackBar({Color? backgroundColor, double? elevation, ShapeBorder? shape, SnackBarBehavior? behavior, SnackBarAction? action, double? actionOverflowThreshold, bool? showCloseIcon, Color? closeIconColor, Animation<double>? animation, VoidCallback? onVisible, DismissDirection? dismissDirection, Clip clipBehavior = Clip.hardEdge, required BuildContext context, required String message, double? margin, Duration? duration})
→ ScaffoldFeatureController<SnackBar, SnackBarClosedReason>
-
Standardized SnackBar with an EzCountdownTimer
Most parameters are available, but SnackBar.padding, SnackBar.width, SnackBar.content, and SnackBar.duration are controlled
SnackBar.padding can be influenced by
margin
, SnackBar.padding is always EdgeInsets.all
SnackBar.width, SnackBar.content, and SnackBar.duration all respond to message
-
ezSnakeToCamel(String name)
→ String
-
snake_case -> camelCase
-
ezSnakeToClass(String name)
→ String
-
-
ezSnakeToTitle(String name)
→ String
-
snake_case -> Title Case
-
ezSubHeadingStyle(TextTheme textTheme)
→ TextStyle?
-
TextTheme.headlineLarge w/ the TextStyle.fontSize of TextTheme.titleLarge
-
ezSubTitleStyle(TextTheme textTheme)
→ TextStyle?
-
TextTheme.bodyLarge w/ the TextStyle.fontSize of TextTheme.titleLarge
-
ezTapBack(WidgetTester tester, String back, {bool warnIfMissed = false})
→ Future<void>
-
For integration testing
Find and touch the button whose Tooltip is
back
-
ezTextFieldConstraints(BuildContext context)
→ BoxConstraints
-
threeQs = widthOf context * 0.75
min: threeQs, max: min(threeQs, ScreenSize.small)
-
ezTextSize(String text, {required BuildContext context, required TextStyle? style})
→ Size
-
Returns the soon-to-be rendered Size of
text
via a TextPainter
-
ezTextTheme(Color? color)
→ TextTheme
-
Creates a TextTheme with sizes inspired by...
https://m3.material.io/styles/typography/type-scale-tokens
Each variant triplet (large, medium, small) are identical
15 different options would be overload for users... 5 makes much more sense
-
ezThemeData(Brightness brightness)
→ ThemeData
-
Creates a ThemeData from EzConfig values
-
ezTitleStyle(Color? color)
→ TextStyle
-
Builds TextTheme.titleLarge w/ values from EzConfig.prefs
-
ezTitleToCamel(String name)
→ String
-
Title Case -> camelCase
-
ezTitleToClass(String name)
→ String
-
Title Case -> ClassCase
-
ezTitleToSnake(String name)
→ String
-
Title Case -> snake_case
-
ezToolbarHeight(BuildContext context, String title, {TextStyle? style})
→ double
-
Calculate a recommended AppBar.toolbarHeight
max(ezTextSize + 2 * EzConfig.getmarginKey, kMinInteractiveDimension)
-
ezTouch(WidgetTester tester, Finder finder, {bool warnIfMissed = false})
→ Future<void>
-
For integration testing
Ensure visibility of, tap at, and settle a
finder
target
-
ezTouchText(WidgetTester tester, String text, {bool findRichText = false, bool skipOffstage = false, bool warnIfMissed = false})
→ Future<void>
-
For integration testing
Ensure visibility of, tap at, and settle a
text
target
-
ezTouchWidget(WidgetTester tester, Type widgetType, {bool skipOffstage = false, bool warnIfMissed = false})
→ Future<void>
-
For integration testing
Ensure visibility of, tap at, and settle a
widgetType
target
-
ezUrlCheck(String text)
→ bool
-
Returns whether the passed
text
follows a URL pattern
-
ezVideoTime(Duration duration, {bool showMili = false})
→ String
-
Format
duration
into a video time format
Defaults to 'mm:ss', and will adapt to 'hh:mm:ss' if necessary
Optionally showMili
-
ezWindowNamer(BuildContext context, String title)
→ void
-
SystemChrome.setApplicationSwitcherDescription wrapper
Sets the title of the tab on web and the title of the window on desktop
-
fuseWithGFont({required TextStyle starter, required String gFont})
→ TextStyle
-
Passes
starter
to the gFont
's GoogleFonts.textStyle
param
Returns starter
if gFont
is not found/supported
-
getBasePlatform()
→ TargetPlatform
-
Get the current TargetPlatform; "slow" but reliable
Alias exists for kIsWeb support
-
getColorName(String key)
→ String
-
Get the human readable name of a
key
s color
-
getLiveColor(BuildContext context, String key)
→ Color
-
Get the live ColorScheme value of
key
-
getLongest(List<String> list)
→ String
-
Returns the longest String in
list
-
getRandomURL(List<String> imageURLs)
→ String
-
Provide a List of
imageURLs
and one will be returned at random
-
getTextColor(Color background)
→ Color
-
Returns the guesstimated most readable text color (black/white) for
background
-
heightOf(BuildContext context)
→ double
-
More readable than...
MediaQuery.of(context).size.height
-
isApple()
→ bool
-
Alias exists for kIsWeb support
-
isDarkTheme(BuildContext context)
→ bool
-
First checks
PlatformTheme
then falls back to MediaQuery
-
isDesktop()
→ bool
-
Alias exists for kIsWeb support
isMobile is preferred; technically more efficient
-
isMobile()
→ bool
-
Alias exists for kIsWeb support
-
lookupEFUILang(Locale locale)
→ Future<EFUILang>
-
-
screenshotHint()
→ String
-
Button combo for taking a screenshot on the current (desktop) TargetPlatform
Defaults to an empty string on mobile (and unknown) platforms
-
snackWidth({required BuildContext context, required String message, TextStyle? style, double? margin, bool showCloseIcon = true})
→ double
-
Calculates ezSnackBar width based on
message
and context
style
defaults to SnackBarThemeData.contentTextStyle
-
storeColorScheme({required ColorScheme colorScheme, required Brightness brightness})
→ Future<void>
-
Store the passed ColorScheme in EzConfig.prefs
-
storeImageColorScheme({required String path, required Brightness brightness})
→ Future<String>
-
Generates a ColorScheme based on the image found at
path
Then stores the values in EzConfig.preferences
-
testDHSetting(WidgetTester tester, {required EFUILang l10n, required bool isLefty})
→ Future<void>
-
For integration testing
Test EzDominantHandSwitch
-
testImageSetting(WidgetTester tester, {required Finder finder, required String type, required bool updateCS, required EFUILang l10n, required List<String> networkImageURLs, required bool isLefty})
→ Future<void>
-
For integration testing
Tests EzImageSetting
-
testLocaleSetting(WidgetTester tester, {required EFUILang l10n, required LocaleNames l10nNames, required bool isLefty})
→ Future<void>
-
For integration testing
Test EzLocaleSetting
-
testResetButton(WidgetTester tester, {required RBType type, required EFUILang l10n, required bool isLefty})
→ Future<void>
-
For integration testing
Tests EzResetButton
-
testTMSwitch(WidgetTester tester, {required EFUILang l10n, required bool isLefty})
→ Future<void>
-
For integration testing
Test EzThemeModeSwitch
-
widthOf(BuildContext context)
→ double
-
More readable than...
MediaQuery.of(context).size.width