nb_utils library Null safety

Classes

AnimatedItemWidget
AnimatedListView
AnimatedScrollView
AnimatedWrap
AnimationConfigurationClass
AnimationConfigurationClass provides the configuration used as a base for every children Animation. Configuration made in AnimationConfigurationClass can be overridden in Animation children if needed.
AnimationConfiguratorClass
AnimationExecutorClass
AnimationLimiterWidget
In the context of a scrollable view, your children's animations are only built as the user scrolls and they appear on the screen.
AppButton
Default App Button
AppTextField
Default Text Form Field
Blur
Blur any widget
CircularProgressGradient
A circular progress indicator with gradient effect.
Connectivity
Discover network connectivity configurations: Distinguish between WI-FI and cellular, check WI-FI status and more.
DotIndicator<T>
DotIndicatorState
DottedBorderWidget
DoublePressBackWidget
DoublePressBackWidget
FadeInAnimationWidget
An animation that fades its child.
FadeInConfiguration
FlipAnimationWidget
An animation that flips its child either vertically or horizontally.
FlipConfiguration
Fluttertoast
Plugin to show a toast message on screen Only for android, ios and Web platforms
FToast
Runs on dart side this has no interaction with the Native Side Works with all platforms just in two lines of code final fToast = FToast().init(context) fToast.showToast(child)
GoogleLogoPainter
Google logo CustomPaint
GoogleLogoWidget
Google logo created using CustomPaint
GradientBorder
GradientPainter
HorizontalList
HoverWidget
Hover Widget is useful is web platform
HyperLinkWidget
JwtDecoder
LanguageDataModel
LanguageListWidget
Use SELECTED_LANGUAGE_CODE Pref key to get selected language code
LanguageListWidgetState
LineIcons
This font was generated by FlutterIcon.com, which is derived from Fontello.
LiveStream
CREDITS https://pub.dev/packages/livestream
Loader
Circular Loader Widget
LoaderState
Marquee
Marquee Text
NBUtils
nb_utils class
NoDataWidget
OTPLengthModel
OTPTextField
OTPTextFieldState
OverlayBuilder
OverlayCustomWidget
Show custom widget on a widget click
OverlayOffsetWidget
PackageInfoData
Patterns
PersistentTabs
PlaceHolderWidget
Set nicely colored PlaceHolder while image is loading
RatingBarWidget
RatingBarWidget
ReadMoreText
Add read more button to a long text
ReadMoreTextState
Responsive
set different layout based on current screen size (mobile, web, desktop)
RestartAppWidget
RestartAppWidget
RichTextWidget
RoundedCheckBox
Widget that draw a beautiful checkbox rounded. Provided with animation if wanted
SBehavior
Custom scroll behaviour widget
ScaleAnimationWidget
An animation that scales its child.
ScaleConfiguration
SettingItemWidget
SettingItemWidget
SettingSection
SharedPreferences
Wraps NSUserDefaults (on iOS) and SharedPreferences (on Android), providing a persistent store for simple data.
SizeConfig
SizeListener
SizeListener Listen to your child widget's size
SlideAnimationWidget
An animation that slides its child.
SlideConfiguration
SnapHelperWidget<T>
TextIcon
ThemeWidget
TimerWidget
TimerWidget - Use this widget if you want to do something every X seconds or any duration.
ToastStateFulState
State for _ToastStateFul
UL
Add UL to its children
VersionInfoWidget
VersionInfoWidget
WalkThroughModelClass

Mixins

AfterLayoutMixin<T extends StatefulWidget>
Callback after build widget is rendered

Extensions

BooleanExtensions
ContextExtensions
DateTimeExt
DoubleExtensions
GetDurationUtils
Hex
IntExtensions
LayoutUtils
ListExtensions
NumExt
S
ScrollExtension
StringExtension
TextExtension
WidgetExtension

Constants

aliceBlue → const Color
const Color(0xFFF0F8FF)
antiqueWhite → const Color
const Color(0xFFFAEBD7)
appStoreBaseURL → const String
'https://apps.apple.com/in/app/'
aqua → const Color
const Color(0xFF00FFFF)
aquamarine → const Color
const Color(0xFF7FFFD4)
azure → const Color
const Color(0xFFF0FFFF)
beige → const Color
const Color(0xFFF5F5DC)
bisque → const Color
const Color(0xFFFFE4C4)
black → const Color
const Color(0xFF000000)
blackColor → const Color
Colors.black
blanchedAlmond → const Color
const Color(0xFFFFEBCD)
blueColor → const Color
const Color(0xFF0000FF)
blueViolet → const Color
const Color(0xFF8A2BE2)
brown → const Color
const Color(0xFFA52A2A)
burlyWood → const Color
const Color(0xFFDEB887)
cadetBlue → const Color
const Color(0xFF5F9EA0)
cardDarkColor → const Color
Color(0xFF1C1F26)
cardLightColor → const Color
Color(0xFFF6F7F9)
channelName → const String
'nb_utils'
chartreuse → const Color
const Color(0xFF7FFF00)
chocolate → const Color
const Color(0xFFD2691E)
coral → const Color
const Color(0xFFFF7F50)
cornflowerBlue → const Color
const Color(0xFF6495ED)
cornSilk → const Color
const Color(0xFFFFF8DC)
crimson → const Color
const Color(0xFFDC143C)
currencyDollar → const String
'\$'
currencyEuro → const String
'€'
currencyRupee → const String
'₹'
cyan → const Color
const Color(0xFF00FFFF)
darkBlue → const Color
const Color(0xFF00008B)
darkCyan → const Color
const Color(0xFF008B8B)
darkGoldenRod → const Color
const Color(0xFFB8860B)
darkGray → const Color
const Color(0xFFA9A9A9)
darkGreen → const Color
const Color(0xFF006400)
darkGrey → const Color
const Color(0xFFA9A9A9)
darkKhaki → const Color
const Color(0xFFBDB76B)
darkMagenta → const Color
const Color(0xFF8B008B)
darkOliveGreen → const Color
const Color(0xFF556B2F)
darkOrange → const Color
const Color(0xFFFF8C00)
darkOrchid → const Color
const Color(0xFF9932CC)
darkRed → const Color
const Color(0xFF8B0000)
darkSalmon → const Color
const Color(0xFFE9967A)
darkSeaGreen → const Color
const Color(0xFF8FBC8F)
darkSlateBlue → const Color
const Color(0xFF483D8B)
darkSlateGray → const Color
const Color(0xFF2F4F4F)
darkSlateGrey → const Color
const Color(0xFF2F4F4F)
darkTurquoise → const Color
const Color(0xFF00CED1)
darkViolet → const Color
const Color(0xFF9400D3)
deepPink → const Color
const Color(0xFFFF1493)
deepSkyBlue → const Color
const Color(0xFF00BFFF)
defaultAnimationDelay → const Duration
Duration(milliseconds: 50)
defaultAnimationDuration → const Duration
Duration(milliseconds: 500)
degrees2Radians → const double
pi / 180.0
dimGray → const Color
const Color(0xFF696969)
dimGrey → const Color
const Color(0xFF696969)
dividerDarkColor → const Color
Color(0xFF393D45)
dodgerBlue → const Color
const Color(0xFF1E90FF)
errorColor → const Color
Color(0xFFFF6347)
facebookBaseURL → const String
'https://www.facebook.com/'
facebookMessengerURL → const String
'https://m.me/'
fireBrick → const Color
const Color(0xFFB22222)
floralWhite → const Color
const Color(0xFFFFFAF0)
forestGreen → const Color
const Color(0xFF228B22)
fuchsia → const Color
const Color(0xFFFF00FF)
gainsBoro → const Color
const Color(0xFFDCDCDC)
ghostWhite → const Color
const Color(0xFFF8F8FF)
gold → const Color
const Color(0xFFFFD700)
goldenRod → const Color
const Color(0xFFDAA520)
googleDriveURL → const String
'https://docs.google.com/viewer?url='
gray → const Color
const Color(0xFF808080)
greenColor → const Color
const Color(0xFF008000)
greenYellow → const Color
const Color(0xFFADFF2F)
grey → const Color
const Color(0xFF808080)
honeyDew → const Color
const Color(0xFFF0FFF0)
hotPink → const Color
const Color(0xFFFF69B4)
indianRed → const Color
const Color(0xFFCD5C5C)
indigo → const Color
const Color(0xFF4B0082)
instagramBaseURL → const String
'https://www.instagram.com/'
ivory → const Color
const Color(0xFFFFFFF0)
khaki → const Color
const Color(0xFFF0E68C)
lavender → const Color
const Color(0xFFE6E6FA)
lavenderBlush → const Color
const Color(0xFFFFF0F5)
lawnGreen → const Color
const Color(0xFF7CFC00)
lemonChiffon → const Color
const Color(0xFFFFFACD)
lightBlue → const Color
const Color(0xFFADD8E6)
lightCoral → const Color
const Color(0xFFF08080)
lightCyan → const Color
const Color(0xFFE0FFFF)
lightGoldenRodYellow → const Color
const Color(0xFFFAFAD2)
lightGray → const Color
const Color(0xFFD3D3D3)
lightGreen → const Color
const Color(0xFF90EE90)
lightGrey → const Color
const Color(0xFFD3D3D3)
lightPink → const Color
const Color(0xFFFFB6C1)
lightSalmon → const Color
const Color(0xFFFFA07A)
lightSeaGreen → const Color
const Color(0xFF20B2AA)
lightSkyBlue → const Color
const Color(0xFF87CEFA)
lightSlateGray → const Color
const Color(0xFF778899)
lightSlateGrey → const Color
const Color(0xFF778899)
lightSteelBlue → const Color
const Color(0xFFB0C4DE)
lightYellow → const Color
const Color(0xFFFFFFE0)
lime → const Color
const Color(0xFF00FF00)
limeGreen → const Color
const Color(0xFF32CD32)
linen → const Color
const Color(0xFFFAF0E6)
linkedinBaseURL → const String
'https://www.linkedin.com/in/'
magenta → const Color
const Color(0xFFFF00FF)
MAIL_TO_PREFIX → const String
'mailto:'
maroon → const Color
const Color(0xFF800000)
mediumAquaMarine → const Color
const Color(0xFF66CDAA)
mediumBlue → const Color
const Color(0xFF0000CD)
mediumOrchid → const Color
const Color(0xFFBA55D3)
mediumPurple → const Color
const Color(0xFF9370DB)
mediumSeaGreen → const Color
const Color(0xFF3CB371)
mediumSlateBlue → const Color
const Color(0xFF7B68EE)
mediumSpringGreen → const Color
const Color(0xFF00FA9A)
mediumTurquoise → const Color
const Color(0xFF48D1CC)
mediumVioletRed → const Color
const Color(0xFFC71585)
midnightBlue → const Color
const Color(0xFF191970)
mintCream → const Color
const Color(0xFFF5FFFA)
mistyRose → const Color
const Color(0xFFFFE4E1)
moccasin → const Color
const Color(0xFFFFE4B5)
const Color(0xFFFFDEAD)
const Color(0xFF000080)
oldLace → const Color
const Color(0xFFFDF5E6)
olive → const Color
const Color(0xFF808000)
oliveDrab → const Color
const Color(0xFF6B8E23)
orange → const Color
const Color(0xFFFFA500)
orangeRed → const Color
const Color(0xFFFF4500)
orchid → const Color
const Color(0xFFDA70D6)
paleGoldenRod → const Color
const Color(0xFFEEE8AA)
paleGreen → const Color
const Color(0xFF98FB98)
paleTurquoise → const Color
const Color(0xFFAFEEEE)
paleVioletRed → const Color
const Color(0xFFDB7093)
papayaWhip → const Color
const Color(0xFFFFEFD5)
peachPuff → const Color
const Color(0xFFFFDAB9)
peru → const Color
const Color(0xFFCD853F)
pink → const Color
const Color(0xFFFFC0CB)
playStoreBaseURL → const String
'https://play.google.com/store/apps/details?id='
plum → const Color
const Color(0xFFDDA0DD)
powderBlue → const Color
const Color(0xFFB0E0E6)
purple → const Color
const Color(0xFF800080)
rebeccaPurple → const Color
const Color(0xFF663399)
redColor → const Color
const Color(0xFFFF0000)
redditBaseURL → const String
'https://reddit.com/r/'
rosyBrown → const Color
const Color(0xFFBC8F8F)
royalBlue → const Color
const Color(0xFF4169E1)
saddleBrown → const Color
const Color(0xFF8B4513)
salmon → const Color
const Color(0xFFFA8072)
sandyBrown → const Color
const Color(0xFFF4A460)
scaffoldDarkColor → const Color
Color(0xFF0E1116)
scaffoldLightColor → const Color
Color(0xFFEBF2F7)
seaGreen → const Color
const Color(0xFF2E8B57)
seaShell → const Color
const Color(0xFFFFF5EE)
SELECTED_LANGUAGE_CODE → const String
'selected_language_code'
sienna → const Color
const Color(0xFFA0522D)
silver → const Color
const Color(0xFFC0C0C0)
skyBlue → const Color
const Color(0xFF87CEEB)
slateBlue → const Color
const Color(0xFF6A5ACD)
slateGray → const Color
const Color(0xFF708090)
slateGrey → const Color
const Color(0xFF708090)
snow → const Color
const Color(0xFFFFFAFA)
spacingControl → const int
4
spacingControlHalf → const int
2
spacingLarge → const int
26
spacingMedium → const int
20
spacingStandard → const int
8
spacingStandardNew → const int
16
spacingXL → const int
30
spacingXXL → const int
34
springGreen → const Color
const Color(0xFF00FF7F)
steelBlue → const Color
const Color(0xFF4682B4)
tan → const Color
const Color(0xFFD2B48C)
teal → const Color
const Color(0xFF008080)
TEL_PREFIX → const String
'tel:'
telegramBaseURL → const String
'https://t.me/'
textPrimaryColor → const Color
Color(0xFF2E3033)
textSecondaryColor → const Color
Color(0xFF757575)
THEME_MODE_INDEX → const String
'theme_mode_index'
thistle → const Color
const Color(0xFFD8BFD8)
tomato → const Color
const Color(0xFFFF6347)
transparentColor → const Color
Color(0x00000000)
turquoise → const Color
const Color(0xFF40E0D0)
twitterBaseURL → const String
'https://twitter.com/'
viewLineColor → const Color
Color(0xFFEAEAEA)
violet → const Color
const Color(0xFFEE82EE)
whatsappURL → const String
'https://wa.me/'
wheat → const Color
const Color(0xFFF5DEB3)
white → const Color
const Color(0xFFFFFFFF)
whiteColor → const Color
Colors.white
whiteSmoke → const Color
const Color(0xFFF5F5F5)
yellow → const Color
const Color(0xFFFFFF00)
yellowGreen → const Color
const Color(0xFF9ACD32)
youtubeBaseURL → const String
'https://www.youtube.com/'

Properties

alphaRegExp RegExp
read / write
appBarBackgroundColorGlobal Color
read / write
appButtonBackgroundColorGlobal Color
read / write
appButtonScaleAnimationDurationGlobal int?
read / write
customDialogHeight double
read / write
customDialogWidth double
read / write
defaultAppBarElevation double
read / write
defaultAppButtonElevation double
read / write
defaultAppButtonRadius double
read / write
defaultAppButtonShapeBorder ShapeBorder?
read / write
defaultAppButtonTextColorGlobal Color
read / write
defaultBlurRadius double
read / write
defaultCurrencySymbol String
read / write
defaultDialogShape ShapeBorder?
read / write
defaultElevation int
read / write
defaultInkWellHighlightColor Color?
read / write
defaultInkWellHoverColor Color?
read / write
defaultInkWellRadius double?
read / write
defaultInkWellSplashColor Color?
read / write
defaultLoaderAccentColorGlobal Color?
read / write
defaultLoaderBgColorGlobal Color
read / write
defaultRadius double
read / write
defaultSpreadRadius double
read / write
defaultToastBackgroundColor Color
read / write
defaultToastBorderRadiusGlobal BorderRadius
read / write
defaultToastGravityGlobal ToastGravity
read / write
defaultToastTextColor Color
read / write
desktopBreakpointGlobal double
read / write
enableAppButtonScaleAnimationGlobal bool
read / write
errorInternetNotAvailable String
read / write
errorMessage String
read / write
errorSomethingWentWrong String
read / write
errorThisFieldRequired String
read / write
fontFamilyBoldGlobal String?
read / write
fontFamilyPrimaryGlobal String?
read / write
fontFamilySecondaryGlobal String?
read / write
fontWeightBoldGlobal FontWeight
read / write
fontWeightPrimaryGlobal FontWeight
read / write
fontWeightSecondaryGlobal FontWeight
read / write
forceEnableDebug bool
read / write
getContext → dynamic
read-only
getSelectedThemeMode String?
read-only
isAndroid bool
read-only
isApple bool
read-only
isDesktop bool
read-only
isGoogle bool
read-only
isIos bool
@Deprecated('Use isIOS instead')read-only
isIOS bool
read-only
isLinux bool
read-only
isMacOS bool
read-only
isMobile bool
read-only
isWeb bool
read-only
isWindows bool
read-only
lightColors List<Color>
Light Colors
read / write
liveStream LiveStream
read / write
localeLanguageList List<LanguageDataModel>
read / write
final
operatingSystemName String
read-only
operatingSystemVersion String
read-only
pageRouteAnimationGlobal PageRouteAnimation?
read / write
pageRouteTransitionDurationGlobal Duration
read / write
passwordLengthGlobal int
read / write
selectedLanguageDataModel LanguageDataModel?
read / write
shadowColorGlobal Color
read / write
sharedPreferences SharedPreferences
read / write
tabletBreakpointGlobal double
read / write
textBoldSizeGlobal double
read / write
textPrimaryColorGlobal Color
read / write
textPrimarySizeGlobal double
read / write
textSecondaryColorGlobal Color
read / write
textSecondarySizeGlobal double
read / write

Functions

afterBuildCreated(dynamic onCreated()?) → void
appBarWidget(String title, {Widget? child, Widget? titleWidget, List<Widget>? actions, Color? color, bool center = false, Color? textColor, int textSize = 20, bool showBack = true, Color? shadowColor, double? elevation, Widget? backWidget, Brightness? brightness, SystemUiOverlayStyle? systemUiOverlayStyle, TextStyle? titleTextStyle, PreferredSizeWidget? bottom, Widget? flexibleSpace}) AppBar
Default AppBar
boldTextStyle({int? size, Color? color, FontWeight? weight, String? fontFamily, double? letterSpacing, FontStyle? fontStyle, double? wordSpacing, TextDecoration? decoration, TextDecorationStyle? textDecorationStyle, TextBaseline? textBaseline, Color? decorationColor, Color? backgroundColor, double? height}) TextStyle
Styles
boxDecorationDefault({BorderRadiusGeometry? borderRadius, Color? color, Gradient? gradient, BoxBorder? border, BoxShape? shape, BlendMode? backgroundBlendMode, List<BoxShadow>? boxShadow, DecorationImage? image}) Decoration
boxDecorationRoundedWithShadow(int radiusAll, {Color backgroundColor = whiteColor, Color? shadowColor, double? blurRadius, double? spreadRadius, Offset offset = const Offset(0.0, 0.0), LinearGradient? gradient}) Decoration
rounded box decoration with shadow
boxDecorationWithRoundedCorners({Color backgroundColor = whiteColor, BorderRadius? borderRadius, LinearGradient? gradient, BoxBorder? border, List<BoxShadow>? boxShadow, DecorationImage? decorationImage, BoxShape boxShape = BoxShape.rectangle}) Decoration
rounded box decoration
boxDecorationWithShadow({Color backgroundColor = whiteColor, Color? shadowColor, double? blurRadius, double? spreadRadius, Offset offset = const Offset(0.0, 0.0), LinearGradient? gradient, BoxBorder? border, List<BoxShadow>? boxShadow, DecorationImage? decorationImage, BoxShape boxShape = BoxShape.rectangle, BorderRadius? borderRadius}) Decoration
box decoration with shadow
buildPageRoute<T>(Widget child, PageRouteAnimation? pageRouteAnimation, Duration? duration) Route<T>
buildTitleWidget(BuildContext context, DialogType dialogType, Color? primaryColor, Widget? customCenterWidget, double height, double width, String? centerImage, ShapeBorder? shape) Widget
clearSharedPref() Future<bool>
clear SharedPref
countDays(int difference) String
Converts the time difference to a number of days. This function truncates to the lowest day. returns ("1 day" OR "X days")
countHours(int difference) String
Converts the time difference to a number of hours. This function truncates to the lowest hour. returns ("1 hour" OR "X hours")
countMinutes(int difference) String
Converts the time difference to a number of minutes. This function truncates to the lowest minute. returns ("1 minute" OR "X minutes")
countMonths(int difference) String
Converts the time difference to a number of months. This function rounds to the nearest month. returns ("1 month" OR "X months" OR "1 year")
countSeconds(int difference) String
Converts the time difference to a number of seconds. This function truncates to the lowest second. returns ("Just now" OR "X seconds")
countWeeks(int difference) String
Converts the time difference to a number of weeks. This function truncates to the lowest week. returns ("1 week" OR "X weeks" OR "1 month")
countYears(int difference) String
Converts the time difference to a number of years. This function truncates to the lowest year. returns ("1 year" OR "X years")
createMaterialColor(Color color) MaterialColor
Returns MaterialColor from Color
createRichText({required List<TextSpan> list, TextOverflow overflow = TextOverflow.clip, int? maxLines, TextAlign textAlign = TextAlign.left, TextDirection? textDirection, StrutStyle? strutStyle}) RichText
@Deprecated('Use RichTextWidget instead')
currentMillisecondsTimeStamp() int
return current time in milliseconds
currentTimeStamp() int
return current timestamp
daysInMonth(int monthNum, int year) int
returns number of days in given month
defaultBoxShadow({Color? shadowColor, double? blurRadius, double? spreadRadius, Offset offset = const Offset(0.0, 0.0)}) List<BoxShadow>
default box shadow
defaultInputDecoration({String? hint, String? label, TextStyle? textStyle}) InputDecoration
returns default InputDecoration for AppTextField widget
defaultPlaceHolder(BuildContext context, DialogType dialogType, double? height, double? width, Color? primaryColor, {Widget? child, ShapeBorder? shape}) Widget
dialogAnimatedWrapperWidget({required Animation<double> animation, required Widget child, required DialogAnimation dialogAnimation, required Curve curve}) Widget
dialogShape([double? borderRadius]) ShapeBorder
dynamicAppButtonPadding(BuildContext context) EdgeInsets
enterFullScreen() → void
exitFullScreen() → void
finish(BuildContext context, [Object? result]) → void
Go back to previous screen.
formatTime(int timestamp) String
returns how much time ago from timestamp
getBool(String key, {dynamic defaultValue = false}) Future<bool>
Returns a Bool if exists in SharedPref
@Deprecated('Use getBoolAsync instead without using await')
getBoolAsync(String key, {bool defaultValue = false}) bool
Returns a Bool if exists in SharedPref
getCenteredImage(BuildContext context, DialogType dialogType, Color? primaryColor) Widget?
getColorFromHex(String hexColor, {Color? defaultColor}) Color
Returns Color from hex String.
getColorFromImage(Image image, [int quality = 10]) Future<List<int>?>
getDialogPrimaryColor(BuildContext context, DialogType dialogType, Color? primaryColor) Color
getDouble(String key, {dynamic defaultValue = 0.0}) Future<double>
Returns a Double if exists in SharedPref
@Deprecated('Use getDoubleAsync instead without using await')
getDoubleAsync(String key, {double defaultValue = 0.0}) double
Returns a Double if exists in SharedPref
getIcon(DialogType dialogType, {double? size}) Widget
getInt(String key, {dynamic defaultValue = 0}) Future<int>
Returns a Int if exists in SharedPref
@Deprecated('Use getIntAsync instead without using await')
getIntAsync(String key, {int defaultValue = 0}) int
Returns a Int if exists in SharedPref
getJSONAsync(String key, {Map<String, dynamic>? defaultValue}) Map<String, dynamic>
Returns a JSON if exists in SharedPref
getMatchingSharedPrefKeys(String key) List<String>
Returns List of Keys that matches with given Key
getMaterialYouColors() Future
Returns material you colors from Android
getMaterialYouPrimaryColor() Future<Color>
Returns primary color for material you theme
getMaterialYouTheme() Future<ThemeData>
Returns material you ThemeData
getPackageInfo() Future<PackageInfoData>
getPackageName() Future<String>
getPositiveText(DialogType dialogType) String
getSelectedLanguageModel({String? defaultLanguage}) LanguageDataModel?
getSharedPref() Future<SharedPreferences>
Returns SharedPref Instance
getString(String key, {dynamic defaultValue = ''}) Future<String>
Returns a String if exists in SharedPref
@Deprecated('Use getStringAsync instead without using await')
getStringAsync(String key, {String defaultValue = ''}) String
Returns a String if exists in SharedPref
getStringListAsync(String key) List<String>?
Returns a StringList if exists in SharedPref
getTitle(DialogType dialogType) String
hasMatch(String? s, String p) bool
hideKeyboard(dynamic context) → void
Hide soft keyboard
hideStatusBar() Future<void>
This function will hide status bar
initialize({double? defaultDialogBorderRadius, List<LanguageDataModel>? aLocaleLanguageList, String? defaultLanguage}) Future<void>
invokeNativeMethod<T>(String channel, String method, [dynamic arguments]) Future<T?>
Invoke Native method and get result
isAndroid12Above() Future<bool>
Return true if Android OS version is above 12
isConnectedToMobile() Future<bool>
returns true if connected to mobile
isConnectedToWiFi() Future<bool>
returns true if connected to wifi
isNetworkAvailable() Future<bool>
returns true if network is available
isSnapshotLoading(AsyncSnapshot snap, {bool checkHasData = false}) bool
Returns true is snapshot is loading
launchNewScreen<T>(BuildContext context, String tag) Future<T?>
Go to new screen with provided screen tag.
launchNewScreenWithNewTask<T>(BuildContext context, String tag) Future<T?>
Removes all previous screens from the back stack and redirect to new screen with provided screen tag
leapYear(int year) bool
return true if given year is an leap year
log(Object? value) → void
Prints only if in debug or profile mode
mailTo({required List<String> to, String subject = '', String body = '', List<String> cc = const [], List<String> bcc = const []}) Uri
makeNullable<T>(T? value) → T?
onError(Object o) Future<Null>
paste() Future<String>
Returns a string from Clipboard
pasteObject() Future
Returns a string from Clipboard
platformName() String
Returns current PlatformName
pop([Object? object]) → void
Dispose current screen or close current dialog
primaryTextStyle({int? size, Color? color, FontWeight? weight, String? fontFamily, double? letterSpacing, FontStyle? fontStyle, double? wordSpacing, TextDecoration? decoration, TextDecorationStyle? textDecorationStyle, TextBaseline? textBaseline, Color? decorationColor, Color? backgroundColor, double? height}) TextStyle
push<T>(Widget widget, {bool isNewTask = false, PageRouteAnimation? pageRouteAnimation, Duration? duration}) Future<T?>
Redirect to given widget without context
radians(double degrees) double
radius([double? radius]) BorderRadius
returns Radius
radiusCircular([double? radius]) Radius
returns Radius
radiusOnly({double? topRight, double? topLeft, double? bottomRight, double? bottomLeft}) BorderRadius
returns custom Radius on each side
removeKey(String key) Future<bool>
remove key from SharedPref
scrollBehaviour() → (Widget Function?(BuildContext, Widget?)?)
Custom scroll behaviour
secondaryTextStyle({int? size, Color? color, FontWeight? weight, String? fontFamily, double? letterSpacing, FontStyle? fontStyle, double? wordSpacing, TextDecoration? decoration, TextDecorationStyle? textDecorationStyle, TextBaseline? textBaseline, Color? decorationColor, Color? backgroundColor, double? height}) TextStyle
setBool(String key, bool value) Future<bool>
add a Bool in SharedPref
@Deprecated('Use setValue instead')
setBoolAsync(String key, bool value) Future<bool>
add a Bool in SharedPref
@Deprecated('Use setValue instead')
setDarkStatusBar() → void
setDouble(String key, double value) Future<bool>
add a Double in SharedPref
@Deprecated('Use setValue instead')
setDoubleAsync(String key, double value) Future<bool>
//////////////////////////////////////////////////////////////////// DEPRECATED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
add a Double in SharedPref
@Deprecated('Use setValue instead')
setInt(String key, int value) Future<bool>
add a Int in SharedPref
@Deprecated('Use setValue instead')
setIntAsync(String key, int value) Future<bool>
add a Int in SharedPref
@Deprecated('Use setValue instead')
setJSONAsync(String key, String value) Future<bool>
add a JSON in SharedPref
@Deprecated('Use setValue instead')
setLightStatusBar() → void
setOrientationLandscape() → void
Set orientation to landscape
setOrientationPortrait() → void
Set orientation to portrait
setStatusBarColor(Color statusBarColor, {Color? systemNavigationBarColor, Brightness? statusBarBrightness, Brightness? statusBarIconBrightness, int delayInMilliSeconds = 200}) Future<void>
Change status bar Color and Brightness
setString(String key, String value) Future<bool>
add a String in SharedPref
@Deprecated('Use setValue instead')
setStringAsync(String key, String value) Future<bool>
add a String in SharedPref
@Deprecated('Use setValue instead')
setValue(String key, dynamic value, {bool print = true}) Future<bool>
Add a value in SharedPref based on their type - Must be a String, int, bool, double, Map<String, dynamic> or StringList
showBottomSheetOrDialog({required BuildContext context, required Widget child, BottomSheetDialog bottomSheetDialog = BottomSheetDialog.Dialog}) Future
showConfirmDialog<bool>(dynamic context, String title, {String positiveText = 'Yes', String negativeText = 'No', Color? buttonColor, Color? barrierColor, bool? barrierDismissible, Function? onAccept}) Future<bool?>
show confirm dialog box
showConfirmDialogCustom(BuildContext context, {required dynamic onAccept(BuildContext), String? title, String? subTitle, String? positiveText, String? negativeText, String? centerImage, Widget? customCenterWidget, Color? primaryColor, Color? positiveTextColor, Color? negativeTextColor, ShapeBorder? shape, dynamic onCancel(BuildContext)?, bool barrierDismissible = true, double? height, double? width, bool cancelable = true, Color? barrierColor, DialogType dialogType = DialogType.CONFIRMATION, DialogAnimation dialogAnimation = DialogAnimation.DEFAULT, Duration? transitionDuration, Curve curve = Curves.easeInBack}) Future<bool?>
show confirm dialog box
showInDialog<T>(BuildContext context, {Widget? title, Widget? child, Widget? builder(BuildContext)?, ShapeBorder? shape, TextStyle? titleTextStyle, EdgeInsetsGeometry? contentPadding, Color? backgroundColor, DialogAnimation dialogAnimation = DialogAnimation.DEFAULT, double? elevation, Color? barrierColor, List<Widget>? actions, bool barrierDismissible = true, bool hideSoftKeyboard = true, Duration? transitionDuration, Curve curve = Curves.easeInBack}) Future<T?>
show child widget in dialog
showStatusBar() Future<void>
This function will show status bar
snackBar(BuildContext context, {String title = '', Widget? content, SnackBarAction? snackBarAction, Function? onVisible, Color? textColor, Color? backgroundColor, EdgeInsets? margin, EdgeInsets? padding, Animation<double>? animation, double? width, ShapeBorder? shape, Duration? duration, SnackBarBehavior? behavior, double? elevation}) → void
Show SnackBar
snapWidgetHelper<T>(AsyncSnapshot<T> snap, {Widget? errorWidget, Widget? loadingWidget, String? defaultErrorMessage, bool checkHasData = false, Widget errorBuilder(String)?}) Widget
Handle error and loading widget when using FutureBuilder or StreamBuilder
toast(String? value, {ToastGravity? gravity, dynamic length = Toast.LENGTH_SHORT, Color? bgColor, Color? textColor, bool print = false}) → void
Toast for default time
toastLong(String? value, {BuildContext? context, ToastGravity gravity = ToastGravity.BOTTOM, dynamic length = Toast.LENGTH_LONG, Color? bgColor, Color? textColor, bool print = false}) → void
Toast for long period of time
toasty(BuildContext context, String? text, {ToastGravity? gravity, dynamic length = Toast.LENGTH_SHORT, Color? bgColor, Color? textColor, bool print = false, bool removeQueue = false, Duration? duration, BorderRadius? borderRadius, EdgeInsets? padding}) → void

Enums

BottomSheetDialog
ConnectivityResult
Connection status check result.
DeviceSize
DialogAnimation
DialogType
DirectionMarguee
FlipAxisClass
An enum representing a flip axis.
HttpMethodType
HttpResponseType
LinkProvider
ListAnimationType
PageRouteAnimation
SymbolType
TextFieldType
ThemeModes
Toast
Toast Length Only for Android Platform
ToastGravity
ToastGravity Used to define the position of the Toast on the screen
TrimMode
WidgetType

Typedefs

AnimatedConfigBuilder = Widget Function(BuildContext context, AnimationController? animationController)
BoolWidgetBuilder = Widget Function(BuildContext context, bool isHovering)
PositionedToastBuilder = Widget Function(BuildContext context, Widget child)
Signature for a function to buildCustom Toast
RatingChangeCallback = void Function(double rating)