nb_utils library
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.
- ConnectivityPlusLinuxPlugin
- The Linux implementation of ConnectivityPlatform.
-
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
- Model class for Locales
- 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-web.flutter-io.cn/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
- Model class for package info
- Patterns
- Predefined Patterns for different validation
- 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
- Wraps NSUserDefaults (on iOS) and SharedPreferences (on Android), providing a persistent store for simple data.
- SizeConfig
- Model class for Size Configurations
- 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
- Model class for walkthrough
Enums
- BottomSheetDialog
- ConnectivityResult
- Connection status check result.
- DeviceSize
- DialogAnimation
- Enum for Dialog Animation
- DialogType
- Enum for Dialog Type
- DirectionMarguee
- FlipAxisClass
- An enum representing a flip axis.
- HttpMethodType
- HttpResponseType
- LinkProvider
- Enum for Link Provider
- ListAnimationType
- PageRouteAnimation
- Enum for page route
- SymbolType
- TextFieldType
- Enum for Text Field
- ThemeModes
- Toast
- Toast Length Only for Android Platform
- ToastGravity
- ToastGravity Used to define the position of the Toast on the screen
- TrimMode
- WidgetType
Mixins
-
AfterLayoutMixin<
T extends StatefulWidget> - Callback after build widget is rendered
Extensions
- BooleanExtensions on bool?
- ContextExtensions on BuildContext
- DateTimeExt on DateTime
- DoubleExtensions on double?
- GetDurationUtils on Duration
- Hex on Color
- IntExtensions on int?
- LayoutUtils on BoxConstraints
-
ListExtensions
on Iterable<
T> ? - NumExt on num?
- S on String?
- ScrollExtension on ScrollController
- StringExtension on String?
- TextExtension on Text
- WidgetExtension on Widget?
Constants
- aliceBlue → const Color
- antiqueWhite → const Color
- appStoreBaseURL → const String
- aqua → const Color
- aquamarine → const Color
- azure → const Color
- beige → const Color
- bisque → const Color
- black → const Color
- blackColor → const Color
- blanchedAlmond → const Color
- blueColor → const Color
- blueViolet → const Color
- brown → const Color
- burlyWood → const Color
- cadetBlue → const Color
- cardDarkColor → const Color
- cardLightColor → const Color
- channelName → const String
- chartreuse → const Color
- chocolate → const Color
- coral → const Color
- cornflowerBlue → const Color
- cornSilk → const Color
- crimson → const Color
- currencyDollar → const String
- currencyEuro → const String
- currencyRupee → const String
- cyan → const Color
- darkBlue → const Color
- darkCyan → const Color
- darkGoldenRod → const Color
- darkGray → const Color
- darkGreen → const Color
- darkGrey → const Color
- darkKhaki → const Color
- darkMagenta → const Color
- darkOliveGreen → const Color
- darkOrange → const Color
- darkOrchid → const Color
- darkRed → const Color
- darkSalmon → const Color
- darkSeaGreen → const Color
- darkSlateBlue → const Color
- darkSlateGray → const Color
- darkSlateGrey → const Color
- darkTurquoise → const Color
- darkViolet → const Color
- deepPink → const Color
- deepSkyBlue → const Color
- defaultAnimationDelay → const Duration
- defaultAnimationDuration → const Duration
- degrees2Radians → const double
- dimGray → const Color
- dimGrey → const Color
- dividerDarkColor → const Color
- dodgerBlue → const Color
- errorColor → const Color
- facebookBaseURL → const String
- facebookMessengerURL → const String
- fireBrick → const Color
- floralWhite → const Color
- forestGreen → const Color
- fuchsia → const Color
- gainsBoro → const Color
- ghostWhite → const Color
- gold → const Color
- goldenRod → const Color
- googleDriveURL → const String
- gray → const Color
- greenColor → const Color
- greenYellow → const Color
- grey → const Color
- honeyDew → const Color
- hotPink → const Color
- indianRed → const Color
- indigo → const Color
- instagramBaseURL → const String
- ivory → const Color
- khaki → const Color
- lavender → const Color
- lavenderBlush → const Color
- lawnGreen → const Color
- lemonChiffon → const Color
- lightBlue → const Color
- lightCoral → const Color
- lightCyan → const Color
- lightGoldenRodYellow → const Color
- lightGray → const Color
- lightGreen → const Color
- lightGrey → const Color
- lightPink → const Color
- lightSalmon → const Color
- lightSeaGreen → const Color
- lightSkyBlue → const Color
- lightSlateGray → const Color
- lightSlateGrey → const Color
- lightSteelBlue → const Color
- lightYellow → const Color
- lime → const Color
- limeGreen → const Color
- linen → const Color
- linkedinBaseURL → const String
- magenta → const Color
- MAIL_TO_PREFIX → const String
- maroon → const Color
- mediumAquaMarine → const Color
- mediumBlue → const Color
- mediumOrchid → const Color
- mediumPurple → const Color
- mediumSeaGreen → const Color
- mediumSlateBlue → const Color
- mediumSpringGreen → const Color
- mediumTurquoise → const Color
- mediumVioletRed → const Color
- midnightBlue → const Color
- mintCream → const Color
- mistyRose → const Color
- moccasin → const Color
- oldLace → const Color
- olive → const Color
- oliveDrab → const Color
- orange → const Color
- orangeRed → const Color
- orchid → const Color
- paleGoldenRod → const Color
- paleGreen → const Color
- paleTurquoise → const Color
- paleVioletRed → const Color
- papayaWhip → const Color
- peachPuff → const Color
- peru → const Color
- pink → const Color
- playStoreBaseURL → const String
- plum → const Color
- powderBlue → const Color
- purple → const Color
- rebeccaPurple → const Color
- redColor → const Color
- redditBaseURL → const String
- rosyBrown → const Color
- royalBlue → const Color
- saddleBrown → const Color
- salmon → const Color
- sandyBrown → const Color
- scaffoldDarkColor → const Color
- scaffoldLightColor → const Color
- seaGreen → const Color
- seaShell → const Color
- SELECTED_LANGUAGE_CODE → const String
- sienna → const Color
- silver → const Color
- skyBlue → const Color
- slateBlue → const Color
- slateGray → const Color
- slateGrey → const Color
- snow → const Color
- spacingControl → const int
- spacingControlHalf → const int
- spacingLarge → const int
- spacingMedium → const int
- spacingStandard → const int
- spacingStandardNew → const int
- spacingXL → const int
- spacingXXL → const int
- springGreen → const Color
- steelBlue → const Color
- tan → const Color
- teal → const Color
- TEL_PREFIX → const String
- telegramBaseURL → const String
- textPrimaryColor → const Color
- textSecondaryColor → const Color
- THEME_MODE_INDEX → const String
- thistle → const Color
- tomato → const Color
- transparentColor → const Color
- turquoise → const Color
- twitterBaseURL → const String
- viewLineColor → const Color
- violet → const Color
- whatsappURL → const String
- wheat → const Color
- white → const Color
- whiteColor → const Color
- whiteSmoke → const Color
- yellow → const Color
- yellowGreen → const Color
- youtubeBaseURL → const String
Properties
- alphaRegExp ↔ RegExp
-
getter/setter pair
- appBarBackgroundColorGlobal ↔ Color
-
getter/setter pair
- appButtonBackgroundColorGlobal ↔ Color
-
getter/setter pair
- appButtonScaleAnimationDurationGlobal ↔ int?
-
getter/setter pair
- customDialogHeight ↔ double
-
getter/setter pair
- customDialogWidth ↔ double
-
getter/setter pair
- defaultAppBarElevation ↔ double
-
getter/setter pair
- defaultAppButtonElevation ↔ double
-
getter/setter pair
- defaultAppButtonRadius ↔ double
-
getter/setter pair
- defaultAppButtonShapeBorder ↔ ShapeBorder?
-
getter/setter pair
- defaultAppButtonTextColorGlobal ↔ Color
-
getter/setter pair
- defaultBlurRadius ↔ double
-
getter/setter pair
- defaultCurrencySymbol ↔ String
-
getter/setter pair
- defaultDialogShape ↔ ShapeBorder?
-
getter/setter pair
- defaultElevation ↔ int
-
getter/setter pair
- defaultInkWellHighlightColor ↔ Color?
-
getter/setter pair
- defaultInkWellHoverColor ↔ Color?
-
getter/setter pair
- defaultInkWellRadius ↔ double?
-
getter/setter pair
- defaultInkWellSplashColor ↔ Color?
-
getter/setter pair
- defaultLoaderAccentColorGlobal ↔ Color?
-
getter/setter pair
- defaultLoaderBgColorGlobal ↔ Color
-
getter/setter pair
- defaultRadius ↔ double
-
getter/setter pair
- defaultSpreadRadius ↔ double
-
getter/setter pair
- defaultToastBackgroundColor ↔ Color
-
getter/setter pair
- defaultToastBorderRadiusGlobal ↔ BorderRadius
-
getter/setter pair
- defaultToastGravityGlobal ↔ ToastGravity
-
getter/setter pair
- defaultToastTextColor ↔ Color
-
getter/setter pair
- desktopBreakpointGlobal ↔ double
-
getter/setter pair
- enableAppButtonScaleAnimationGlobal ↔ bool
-
getter/setter pair
- errorInternetNotAvailable ↔ String
-
getter/setter pair
- errorMessage ↔ String
-
getter/setter pair
- errorSomethingWentWrong ↔ String
-
getter/setter pair
- errorThisFieldRequired ↔ String
-
getter/setter pair
- fontFamilyBoldGlobal ↔ String?
-
getter/setter pair
- fontFamilyPrimaryGlobal ↔ String?
-
getter/setter pair
- fontFamilySecondaryGlobal ↔ String?
-
getter/setter pair
- fontWeightBoldGlobal ↔ FontWeight
-
getter/setter pair
- fontWeightPrimaryGlobal ↔ FontWeight
-
getter/setter pair
- fontWeightSecondaryGlobal ↔ FontWeight
-
getter/setter pair
- forceEnableDebug ↔ bool
-
If forceEnableDebug if true, you will be able to see log in the logcat in release build also.
By default, your log will not seen in logcat in release mode.
getter/setter pair
- getContext → dynamic
-
no setter
- getSelectedThemeMode → String?
-
no setter
- isAndroid → bool
-
return true if running on Android
no setter
- isApple → bool
-
return true if running on iOS or macOS
no setter
- isDesktop → bool
-
return true if running on Desktop
no setter
- isGoogle → bool
-
return true if running on Android of Fuchsia
no setter
- isIOS → bool
-
return true if running on iOS
no setter
- isIos → bool
-
no setter
- isLinux → bool
-
return true if running on Linux
no setter
- isMacOS → bool
-
return true if running on macOs
no setter
- isMobile → bool
-
return true if running on Mobile OS
no setter
- isWeb → bool
-
return true if running on Web
no setter
- isWindows → bool
-
return true if running on Windows
no setter
-
lightColors
↔ List<
Color> -
Light Colors
getter/setter pair
- liveStream ↔ LiveStream
-
getter/setter pair
-
localeLanguageList
↔ List<
LanguageDataModel> -
getter/setter pair
- maxScreenWidth ↔ double?
-
getter/setter pair
-
final
- operatingSystemName → String
-
return OS name
no setter
- operatingSystemVersion → String
-
return OS version
no setter
- pageRouteAnimationGlobal ↔ PageRouteAnimation?
-
getter/setter pair
- pageRouteTransitionDurationGlobal ↔ Duration
-
getter/setter pair
- passwordLengthGlobal ↔ int
-
getter/setter pair
- selectedLanguageDataModel ↔ LanguageDataModel?
-
getter/setter pair
- shadowColorGlobal ↔ Color
-
getter/setter pair
-
getter/setter pair
- tabletBreakpointGlobal ↔ double
-
getter/setter pair
- textBoldSizeGlobal ↔ double
-
getter/setter pair
- textPrimaryColorGlobal ↔ Color
-
getter/setter pair
- textPrimarySizeGlobal ↔ double
-
getter/setter pair
- textSecondaryColorGlobal ↔ Color
-
getter/setter pair
- textSecondarySizeGlobal ↔ double
-
getter/setter pair
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 - title for dialog
- 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 -
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 - placeholder for dialog
-
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
-
FToastBuilder(
) → TransitionBuilder - Simple builder method to create a TransitionBuilder and for the use in MaterialApp builder method
-
getBool(
String key, {dynamic defaultValue = false}) → Future< bool> - Returns a Bool if exists in SharedPref
-
getBoolAsync(
String key, {bool defaultValue = false}) → bool - Returns a Bool if exists in SharedPref
-
getCenteredImage(
BuildContext context, DialogType dialogType, Color? primaryColor) → Widget? - Build center image for dialog
-
getColorFromHex(
String hexColor, {Color? defaultColor}) → Color - Returns Color from hex String.
-
getColorFromImage(
Image image, [int quality = 10]) → Future< List< int> ?> - get colors used in image
-
getDialogPrimaryColor(
BuildContext context, DialogType dialogType, Color? primaryColor) → Color - dialog primary color
-
getDouble(
String key, {dynamic defaultValue = 0.0}) → Future< double> - Returns a Double if exists in SharedPref
-
getDoubleAsync(
String key, {double defaultValue = 0.0}) → double - Returns a Double if exists in SharedPref
-
getIcon(
DialogType dialogType, {double? size}) → Widget - get icon for dialog
-
getInt(
String key, {dynamic defaultValue = 0}) → Future< int> - Returns a Int if exists in SharedPref
-
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
- 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> - Get Package Name
-
getPositiveText(
DialogType dialogType) → String - build positive text for dialog
-
getSelectedLanguageModel(
{String? defaultLanguage}) → LanguageDataModel? - Returns SharedPref Instance
-
getSocialMediaLink(
LinkProvider linkProvider, {String url = ''}) → String - Use getSocialMediaLink function to build social media links
-
getString(
String key, {dynamic defaultValue = ''}) → Future< String> - Returns a String if exists in SharedPref
-
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 - Build title
-
hasMatch(
String? s, String p) → bool - has match return bool for pattern matching
-
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 - mailto: function to open native email app
-
makeNullable<
T> (T? value) → T? - Make any variable nullable
-
onError(
Object o) → Future< Null> - use this for catchError in Future functions
-
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
-
setBoolAsync(
String key, bool value) → Future< bool> - add a Bool in SharedPref
-
setDarkStatusBar(
) → void - Dark Status Bar
-
setDouble(
String key, double value) → Future< bool> - add a Double in SharedPref
-
setDoubleAsync(
String key, double value) → Future< bool> -
//////////////////////////////////////////////////////////////////// DEPRECATED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
add a Double in SharedPref -
setInt(
String key, int value) → Future< bool> - add a Int in SharedPref
-
setIntAsync(
String key, int value) → Future< bool> - add a Int in SharedPref
-
setJSONAsync(
String key, String value) → Future< bool> - add a JSON in SharedPref
-
setLightStatusBar(
) → void - Light Status Bar
-
setOrientationLandscape(
) → void - Set orientation to landscape
-
setOrientationPortrait(
) → void - Set orientation to portrait
-
setStatusBarColor(
Color statusBarColor, {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
-
setStringAsync(
String key, String value) → Future< bool> - add a String in SharedPref
-
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
-
splashDelay(
{int second = 2}) → Future< void> - Use this if you want to skip splash delay above Android 12
-
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 = const Duration(seconds: 2), BorderRadius? borderRadius, EdgeInsets? padding}) → void - Toast with Context
Typedefs
- AnimatedConfigBuilder = Widget Function(BuildContext context, AnimationController? animationController)
- BoolWidgetBuilder = Widget Function(BuildContext context, bool isHovering)
- NetworkManagerClientFactory = NetworkManagerClient Function()
- PositionedToastBuilder = Widget Function(BuildContext context, Widget child)
- Signature for a function to buildCustom Toast
- RatingChangeCallback = void Function(double rating)