This package helps you daily usable function and ready-made Widgets with ease.

Related tags

Animation nb_utils
Overview

Pub Package GitHub: bhoominn GitHub: bhoominn

Show some love and like to support the project

Documentation

API Docs are available.

Platform Support

Android iOS MacOS Web Linux Windows
✔️ ✔️ ✔️ ✔️ ✔️ ✔️

Installation

Add this line to pubspec.yaml

dependencies:
    nb_utils: <latest_version>

Import package

import 'package:nb_utils/nb_utils.dart';

Initialize nb_utils in main.dart file for initializing Shared Preferences and other variables.

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await initialize();

  runApp(MyApp());
}

Now, add navigatorKey in your MaterialApp or CupertinoApp

return MaterialApp(
  debugShowCheckedModeBanner: false,
  navigatorKey: navigatorKey,
  home: HomePage(),
);

Migrating from 4.3.1 to 4.4.0+

BuildContext parameter is added to onAccept and onCancel in showConfirmDialogCustom method.

Featured on Google's Dev Library

Checkout here Dev Library Contributors

Examples

Ready to Use widgets with Optional Parameters

/// Add a Google Logo
/// Add size parameter for custom size - Default is 24
GoogleLogoWidget(),

GoogleLogoWidget

/// You can use your preferred State Management technique
Loader().visible(mIsLoading),

Loader

/// AppBar widget
appBarWidget(
  "Title",
),
SettingSection(
  title: Text('Account Management', style: boldTextStyle(size: 24)),
  subTitle: Text('Control your account', style: primaryTextStyle()), // Optional
  items: [
    SettingItemWidget(
      title: 'Hibernate account',
      subTitle: 'Temporary deactivate your account',
      decoration: BoxDecoration(borderRadius: radius()),
      trailing: Icon(Icons.keyboard_arrow_right_rounded, color: context.dividerColor),
      onTap: () {
        //
      }
    ),
    SettingItemWidget(
      title: 'Close account',
      subTitle: 'Learn about your options, and close your account if you wish',
      decoration: BoxDecoration(borderRadius: radius()),
      trailing: Icon(Icons.keyboard_arrow_right_rounded, color: context.dividerColor),
      onTap: () {
        //
      },
    )
  ],
),

SettingSection

//SettingItem
SettingItemWidget(
   title: "Title",
   onTap: () {
       //Your Logic
   },
   trailing: Icon(Icons.home_sharp), // Optional
   leading: Icon(Icons.arrow_forward_ios_rounded), // Optional
   subTitle: "Subtitle", // Optional
),

SettingItemWidget

/// Default AppButton
/// Use AppButton on your app to try more properties
AppButton(
    text: "Submit",
    color: Colors.green, // Optional
    onTap: () {
        //Your logic
    },
),

AppButton

UL(
   symbolType: SymbolType.Numbered,
   children: [
       Text('Hi', style: primaryTextStyle()),
       Text('Hello', style: primaryTextStyle()),
       Text('How are you?', style: primaryTextStyle()),
   ],
),

UL

/// Use AppTextField on your app to try more properties
AppTextField(
    controller: TextEditingController(), // Optional
    textFieldType: TextFieldType.EMAIL,
    decoration: InputDecoration(labelText: 'Email', border: OutlineInputBorder()),
),
AppTextField(
    controller: TextEditingController(), // Optional
    textFieldType: TextFieldType.ADDRESS,
    decoration: InputDecoration(labelText: 'Address', border: OutlineInputBorder()),
),
AppTextField(
    controller: TextEditingController(), // Optional
    textFieldType: TextFieldType.PASSWORD,
    decoration: InputDecoration(labelText: 'Password', border: OutlineInputBorder()),
),

AppTextField

HoverWidget(
    builder: (context, bool isHovering) {
        return Container(
            /// isHovering will be true when you hover on it.

            color: isHovering ? Colors.yellow : Colors.blue,
        )
    }
),
/// Build Horizontal List widget without giving specific height to it.
HorizontalList(
    itemBuilder: (BuildContext context, int index) {
        return AnyWidget();
    },
    itemCount: 25,
),

HorizontalList

RatingBarWidget(
    rating: initialRating,
    onRatingChanged: (aRating) {
        rating = aRating;
    },
),

RatingBarWidget

/// Make your Flutter App Responsive in any device out there with Responsive widget
Responsive(
    mobile: MobileWidget(),
    tablet: TabletWidget(), // Optional
    web: WebWidget(), // Optional
),

Responsive

TextIcon(
    text: 'Your text',
    prefix: AnyWidget(), // Optional
    suffix: AnyWidget(), // Optional
),
DotIndicator(
    pageController: pageController,
    pages: list,
),

DotIndicator

/// Use SnapHelperWidget to handle loading and error widget automatically
/// Still you can specify custom Loader Widget and Error Widget
SnapHelperWidget<T>(
    future: future,
    onSuccess: (data) {
        return AnyWidget();
    },
),
DottedBorderWidget(
    child: Container(
        height: 100,
        width: 100,
    ),
),

DottedBorderWidget

Marquee(
    direction: Axis.horizontal,
    animationDuration: Duration(milliseconds: 100),
    pauseDuration: Duration(milliseconds: 100),
    child: Text("Please enter a long text to see the effect of the marquee widget"),
),

Show Dialogs

/// Show Dialog with Default Animation
showInDialog(context, builder: (context) => dialogWidget());

/// Show Dialog with Rotate Animation
showInDialog(context, builder: (context) => dialogWidget(), dialogAnimation: DialogAnimation.ROTATE);

/// Show Dialog with Scale Animation
showInDialog(context, builder: (context) => dialogWidget(), dialogAnimation: DialogAnimation.SCALE);

/// Show Dialog with Top to Bottom Animation
showInDialog(context, builder: (context) => dialogWidget(), dialogAnimation: DialogAnimation.SLIDE_TOP_BOTTOM);

/// Show Dialog with Bottom to Top Animation
showInDialog(context, builder: (context) => dialogWidget(), dialogAnimation: DialogAnimation.SLIDE_BOTTOM_TOP);

/// Show Dialog with Left to Right Animation
showInDialog(context, builder: (context) => dialogWidget(), dialogAnimation: DialogAnimation.SLIDE_LEFT_RIGHT);

/// Show Dialog with Right to Left Animation
showInDialog(context, builder: (context) => dialogWidget(), dialogAnimation: DialogAnimation.SLIDE_RIGHT_LEFT);


/// Show Confirmation Dialog
/// Second parameter is title
showConfirmDialog(
  context,
  'Do you want to logout from the app?',
  onAccept: (context) {
    //
  },
);

Useful methods or extensions you will ever need

/// Open a new screen
HomePage().launch(context);

/// Animate the new page (Slide, Rotate, Scale, Fade)
HomePage().launch(context, pageRouteAnimation: PageRouteAnimation.Slide);

/// Remove all screens from back stack and opens new screen
HomePage().launch(context, isNewTask: true);

// Returns to previous Screen
finish(context);

// Returns to previous Screen with a result
finish(context, object);

/// Toast a String
toast('This is a string');

/// Prints only if in debug or profile mode - (parameter is Object)
log('Your string');
// Basic
snackBar(context, title: 'Sample toast'),
// Enhanced
snackBar(
  context,
  title: 'Sample toast',
  textColor: Colors.blue,
  backgroundColor: Colors.white,
  elevation: 8,
  shape: RoundedRectangleBorder(borderRadius: radius(30)),
  margin: EdgeInsets.all(16),
  duration: 3.seconds,
);

Shared Preferences

/// Shared Preferences
/// setValue method has (String key, dynamic value) parameters

/// add a Double in SharedPref
await setValue("key", 20.0);

/// add a bool in SharedPref
await setValue("key", false);

/// add a int in SharedPref
await setValue("key", 10);

/// add a String in SharedPref
await setValue("key", "value");

/// add a String List in SharedPref
await setValue("key", ['value', 'value', 'value']);

/// Returns a Bool if exists in SharedPref

/// You can set a default value if it returns null
getBoolAsync("key");

/// Returns a Double if exists in SharedPref
getDoubleAsync("key");

/// Returns a Int if exists in SharedPref
getIntAsync("key");

/// Returns a String if exists in SharedPref
getStringAsync("key");

/// Returns a JSON if exists in SharedPref
getJSONAsync("key");

/// Remove a key from SharedPref
await removeKey("key");

/// Returns List of Keys that matches with given Key
getMatchingSharedPrefKeys('key')

Widgets Extensions, Methods

/// With custom height and width
AnyWidget().withSize(height: 25, width: 50);

/// With custom width
AnyWidget().withWidth(25);

/// With custom height
AnyWidget().withHeight(100);

/// return padding top
AnyWidget().paddingTop(2);

/// return padding left
AnyWidget().paddingLeft(4);

/// return padding right
AnyWidget().paddingRight(8);

/// return padding bottom
AnyWidget().paddingBottom(16);

/// return padding all
AnyWidget().paddingAll(8);

/// return custom padding from each side
AnyWidget().paddingOnly();

/// return padding symmetric
AnyWidget().paddingSymmetric();

/// set visibility
/// true/false
AnyWidget().visible(true);

/// add custom corner radius each side
AnyWidget().cornerRadiusWithClipRRectOnly(topLeft: 10, bottomRight: 12);

/// add corner radius
AnyWidget().cornerRadiusWithClipRRect(20);

/// set widget visibility
/// true/false
AnyWidget().withVisibility(true);

/// add animated opacity to parent widget
AnyWidget().opacity(opacity: 0.2);

/// add rotation to parent widget
AnyWidget().rotate(angle: 1.2);

/// add scaling to parent widget
AnyWidget().scale(scale: 2.0);

/// set parent widget in center
AnyWidget().center();

/// add tap to parent widget
AnyWidget().onTap(() {
  //
});

/// Wrap with ShaderMask widget
AnyWidget().withShaderMask([Colors.black, Colors.red]);

/// Wrap with ShaderMask widget Gradient
AnyWidget().withShaderMaskGradient(LinearGradient(colors: [Colors.black, Colors.red]));

/// add Expanded to parent widget
AnyWidget().expand();

/// add Flexible to parent widget
AnyWidget().flexible();

/// add FittedBox to parent widget
AnyWidget().fit();

/// Validate given widget is not null and returns given value if null.
AnyWidget().validate();

/// Validate given widget is not null and returns given value if null.
AnyWidget().withTooltip(msg: "Hello");

Time formatter formatTime Extensions, Methods

/// Returns how much time ago from timestamp
/// The number of milliseconds that have passed since the timestamp

/// You can use .timeAgo on a DateTime object like this
String result = DateTime.now().timeAgo;


int difference = DateTime.now().millisecondsSinceEpoch;

/// Converts the time difference to a number of seconds.
countSeconds(difference);

/// Converts the time difference to a number of minutes.
countMinutes(difference);

/// Converts the time difference to a number of hours.
countHours(difference);

/// Converts the time difference to a number of days.
countDays(difference);

/// Converts the time difference to a number of weeks.
countWeeks(difference);

/// Converts the time difference to a number of months.
countMonths(difference);

/// Converts the time difference to a number of years.
countYears(difference);

Strings Extensions, Methods

/// Returns True/False

String example = "";

/// Check URL validation
example.validateURL();

/// Check email validation
example.validateEmail();

/// Check phone validation
example.validatePhone();

/// Return true if given String is Digit
example.isDigit();

/// Check weather String is alpha or not
example.isAlpha();

/// Check weather String is Json or not
example.isJson();

/// Copy String to Clipboard
example.copyToClipboard();

/// for ex. add comma in price
example.formatNumberWithComma();

/// Get Color from HEX String
example.toColor();

/// It reverses the String
example.reverse;

/// It return list of single character from String
example.toList();

/// Returns true if given String is null or isEmpty
example.isEmptyOrNull;

/// Check null string, return given value if null
example.validate();

/// Capitalize First letter of a given String
example.capitalizeFirstLetter();

/// Returns if its type image
example.isImage;

/// Returns if its type Audio
example.isAudio;

/// Returns if its type Video
example.isVideo;

/// Returns if its type Txt
example.isTxt;

/// Returns if its type Doc
example.isDoc;

/// Returns if its type Excel
example.isExcel;

/// Returns if its type PPT
example.isPPT;

/// Returns if its type Apk
example.isApk;

/// Returns if its type Pdf
example.isPdf;

/// Returns if its type Html
example.isHtml;

/// Pass the Pattern

/// Splits from a [pattern] and returns remaining String after that
example.splitAfter(Patterns.apk);

/// Splits from a [pattern] and returns String before that
example.splitBefore(Patterns.audio);

/// It matches the String and returns between [startPattern] and [endPattern]
example.splitBetween("d", "g");

/// Return int value of given string
example.toInt();

/// Get YouTube Video ID
example.toYouTubeId();

/// Returns YouTube thumbnail for given video id
example.getYouTubeThumbnail();

/// Removes white space from given String
example.removeAllWhiteSpace();

/// Returns only numbers from a string
example.getNumericOnly(example);

/// Return average read time duration of given String in seconds
example.calculateReadTime();

/// Return number of words in a given String
example.countWords();

/// Generate slug of a given String
example.toSlug();

/// returns searchable array for Firebase Database
example.setSearchParam();

Scroll Controller Extensions

ScrollController scrollController = ScrollController();

/// animate to top
scrollController.animToTop();
/// animate to Bottom
scrollController.animToBottom();
/// animate to specific position
scrollController.animateToPosition(20.0);
/// jump to the start of the list without animation
scrollController.jumpToTop();
/// jump to the end of the list without animation
scrollController.jumpToBottom();

TextStyles/ Decorations/ FocusNodes/ Context Methods

 
/// Apply Bold TextStyle
Text(item.title.validate(), style: boldTextStyle())
    
/// Apply Primary TextStyle
Text(item.title.validate(), style: primaryTextStyle())
    
/// Apply Secondary TextStyle
Text(item.title.validate(), style: secondaryTextStyle())


/// Apply default BoxDecoration with default shadow and border radius
Container(
    decoration: boxDecorationDefault(), // You can modify based on your preference
),

/// FocusNode
requestFocus(NODE_VARIABLE);
nextFocus(NODE_VARIABLE);

///  Handle error and loading widget when using FutureBuilder or StreamBuilder
/// "snap" is the snapShot value we get from FutureBuilder or StreamBuilder
return snapWidgetHelper(snap);

/// See the example below. You can user FutureBuilder or StreamBuilder.

FutureBuilder(
    builder(_, snap) {
        if (snap.hasData) {
            return YourWidget();
        } else {
            /// This function will handle loading and error automatically.
            /// You can modify loading and error widget in parameters.

            return snapWidgetHelper(snap);
        }
    }
)

/// return screen width
context.width();

/// return screen height
context.height();
    
/// Theme color or value from context
context.primaryColor;
context.theme.text.subtitle.color;

DateTime Extensions, Methods

/// return current time in milliseconds
int currentMillisecondTimeStamp = currentMillisecondsTimeStamp();

/// return current timestamp
int currentTimeStamps = currentTimeStamp();

/// return true if given year is an leap year
/// leapYear(year)
bool isLeapYear = leapYear(2000);

/// returns number of days in given month
/// daysInMonth(monthNum, year)
int dayInMonthTotal = daysInMonth(2, 2000);

/// Returns Time Ago
/// only on datetime object
/// Just Now, 2 minutes ago, 1 hour ago, 1 day ago

String timeAgo = DateTime.now().timeAgo;

Systems Methods

/// Change status bar Color and Brightness
setStatusBarColor(Colors.blue);
    
/// Show Status Bar
showStatusBar();

/// Hide Status Bar
hideStatusBar();

/// Set orientation to portrait
setOrientationPortrait();

/// Set orientation to landscape
setOrientationLandscape();

/// Get current PlatformName as a String
platformName();

/// Invoke Native method and get result
var data = await invokeNativeMethod(CHANNEL_NAME, METHOD_NAME, [dynamic arguments]);
AppButton(
  text: "Add",
  onTap: () {
    showConfirmDialogCustom(
      context,
      title: "Do you want to add this item?",
      dialogType: DialogType.ADD,
      onAccept: () {
        snackBar(context, title: 'Added');
      },
    );
  },
),

Add Confirmation Dialog

AppButton(
  text: "Delete",
  onTap: () {
    showConfirmDialogCustom(
      context,
      title: "Delete 89 files permanent?",
      dialogType: DialogType.DELETE,
      onAccept: () {
        snackBar(context, title: 'Deleted');
      },
    );
  },
),

Delete Confirmation Dialog

AppButton(
  text: "Update",
  onTap: () {
    showConfirmDialogCustom(
      context,
      title: "Do you want to update this item?",
      dialogType: DialogType.UPDATE,
      onAccept: () {
        snackBar(context, title: 'Updated');
      },
    );
  },
),

Update Confirmation Dialog

AppButton(
  text: "Confirmation with Custom Image",
  onTap: () async {
    showConfirmDialogCustom(
      context,
      title: "Do you want to logout from the app?",
      dialogType: DialogType.CONFIRMATION,
      centerImage: 'URL',
      onAccept: () {
        //
      },
      onCancel: () {
        //
      },
      height: 300,
      width: 400,
    );
  },
),

Custom Confirmation Dialog

AppButton(
  text: "Confirmation",
  onTap: () {
    showConfirmDialogCustom(
      context,
      onAccept: () {
        snackBar(
          context,
          title: 'Confirmed',
          snackBarAction: SnackBarAction(label: 'label', onPressed: () {}),
        );
      },
    );
  },
),

Default Confirmation Dialog

Features and bugs

Please file feature requests and bugs at the issue tracker.

If you want to give suggestion, please contact me via email - [email protected]

Thank you :)

Comments
  • Missing Null Safety on WidgetsBinding & SchedulerBinding

    Missing Null Safety on WidgetsBinding & SchedulerBinding

    The image_editor_plus: ^0.1.3 package in our project, is using the latest version of nb_utils: 4.5.1. Our Flutter project's environment sdk contraints are:

    environment:
      sdk: ">=2.16.2 <3.0.0"
    

    When building the app for Android, the build fails with the following error:

    ../../Flutter%20SDK/Flutter%20Git%20Repository/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.5.1/lib/src/utils/common.dart:200:29: Error: Method 'addPostFrameCallback' cannot be called on 'SchedulerBinding?' because it is potentially null.
     - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('../../Flutter%20SDK/Flutter%20Git%20Repository/flutter/packages/flutter/lib/src/scheduler/binding.dart').
    Try calling using ?. instead.
      SchedulerBinding.instance.addPostFrameCallback((_) => onCreated?.call());
                                ^^^^^^^^^^^^^^^^^^^^
    ../../Flutter%20SDK/Flutter%20Git%20Repository/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.5.1/lib/src/utils/after_layout.dart:12:10: Error: Method 'addPostFrameCallback' cannot be called on 'WidgetsBinding?' because it is potentially null.
     - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Flutter%20SDK/Flutter%20Git%20Repository/flutter/packages/flutter/lib/src/widgets/binding.dart').
    Try calling using ?. instead.
            .addPostFrameCallback((_) => afterFirstLayout(context));
             ^^^^^^^^^^^^^^^^^^^^
    ../../Flutter%20SDK/Flutter%20Git%20Repository/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.5.1/lib/src/widgets/OverlayCustomWidget.dart:59:31: Error: Method 'addPostFrameCallback' cannot be called on 'WidgetsBinding?' because it is potentially null.
     - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Flutter%20SDK/Flutter%20Git%20Repository/flutter/packages/flutter/lib/src/widgets/binding.dart').
    Try calling using ?. instead.
          WidgetsBinding.instance.addPostFrameCallback((_) => showOverlay());
                                  ^^^^^^^^^^^^^^^^^^^^
    ../../Flutter%20SDK/Flutter%20Git%20Repository/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.5.1/lib/src/widgets/OverlayCustomWidget.dart:66:29: Error: Method 'addPostFrameCallback' cannot be called on 'WidgetsBinding?' because it is potentially null.
     - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Flutter%20SDK/Flutter%20Git%20Repository/flutter/packages/flutter/lib/src/widgets/binding.dart').
    Try calling using ?. instead.
        WidgetsBinding.instance.addPostFrameCallback((_) => syncWidgetAndOverlay());
                                ^^^^^^^^^^^^^^^^^^^^
    ../../Flutter%20SDK/Flutter%20Git%20Repository/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.5.1/lib/src/widgets/OverlayCustomWidget.dart:72:29: Error: Method 'addPostFrameCallback' cannot be called on 'WidgetsBinding?' because it is potentially null.
     - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Flutter%20SDK/Flutter%20Git%20Repository/flutter/packages/flutter/lib/src/widgets/binding.dart').
    Try calling using ?. instead.
        WidgetsBinding.instance.addPostFrameCallback((_) => syncWidgetAndOverlay());
                                ^^^^^^^^^^^^^^^^^^^^
    ../../Flutter%20SDK/Flutter%20Git%20Repository/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.5.1/lib/src/widgets/TimerWidget.dart:44:29: Error: Method 'addObserver' cannot be called on 'WidgetsBinding?' because it is potentially null.
     - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Flutter%20SDK/Flutter%20Git%20Repository/flutter/packages/flutter/lib/src/widgets/binding.dart').
    Try calling using ?. instead.
        WidgetsBinding.instance.addObserver(this);
                                ^^^^^^^^^^^
    ../../Flutter%20SDK/Flutter%20Git%20Repository/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.5.1/lib/src/widgets/TimerWidget.dart:59:29: Error: Method 'removeObserver' cannot be called on 'WidgetsBinding?' because it is potentially null.
     - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Flutter%20SDK/Flutter%20Git%20Repository/flutter/packages/flutter/lib/src/widgets/binding.dart').
    Try calling using ?. instead.
        WidgetsBinding.instance.removeObserver(this);
                                ^^^^^^^^^^^^^^
    
    
    FAILURE: Build failed with an exception.
    

    It seems you have missed null safety on WidgetsBinding and SchedulerBinding methods, causing the exception to be thrown. Can you get please provide a fix for this asap?

    opened by Rishabh-Invizio 12
  • isYesterday is wrong

    isYesterday is wrong

    Hello, First of all; great package. It's very useful!

    I noticed a mistake.

    /// Returns true if given date is yesterday
      bool get isYesterday {
        final now = DateTime.now();
        final yesterday = DateTime(now.year, now.month, now.day - 1);
    
        return DateTime(now.year, now.month, now.day - 1) == yesterday;
      }
    

    I think it should be something like this.

    /// Returns true if given date is yesterday
      bool get isYesterday {
        final now = DateTime.now();
        final yesterday = DateTime(now.year, now.month, now.day - 1);
    
        return DateTime(this.year, this.month, this.day) == yesterday;
      }
    

    Thanks!

    opened by altayevrim 10
  • Type 'Color' not found: version 4.6.22

    Type 'Color' not found: version 4.6.22

    ../programs/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.6.22/lib/src/extensions/string_extensions.dart:112:3: Error: Type 'Color' not found. Color toColor({Color? defaultColor}) { ^^^^^ ../programs/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.6.22/lib/src/extensions/string_extensions.dart:112:18: Error: Type 'Color' not found. Color toColor({Color? defaultColor}) { ^^^^^ ../programs/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.6.22/lib/src/extensions/string_extensions.dart:112:18: Error: 'Color' isn't a type. Color toColor({Color? defaultColor}) { ^^^^^

    opened by nblauren 6
  • Request dependency increment

    Request dependency increment

    Hi, I am getting this error when using the latest packages.

    Because nb_utils 4.6.22 depends on connectivity_plus ^2.3.9 and no versions of nb_utils match >4.6.22 <5.0.0, nb_utils ^4.6.22 requires connectivity_plus ^2.3.9.
    
    opened by saropa 3
  • IOS duration issue

    IOS duration issue

    Error when trying to run flutter on iOS. ../flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.6.21/lib/src/utils/common.dart:67:20: Error: The argument type 'Duration?' can't be assigned to the parameter type 'Duration' because 'Duration?' is nullable and 'Duration' isn't. - 'Duration' is from 'dart:core'. toastDuration: duration,

    opened by SHELA 3
  • Error: No named parameter with the name 'useMaterial3'

    Error: No named parameter with the name 'useMaterial3'

    Hi, thank you for your efforts.. I am depending on v 4.5.2 because of this issue Flutter 2.8.1

    I am facing an error on app run :

    /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.5.2/lib/src/utils/system_utils.dart:156:5: Error: No named parameter with the name 'useMaterial3'.
        useMaterial3: true,
        ^^^^^^^^^^^^
    /C:/src/flutter/packages/flutter/lib/src/material/theme_data.dart:222:11: Context: Found this candidate, but the arguments don't match.
      factory ThemeData({
              ^
    

    and build is failed. This is showing with the last version as well.

    opened by AlaaMarawi 3
  • Can't access this in a field initializer to read IconData

    Can't access this in a field initializer to read IconData

    /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-4.4.12/lib/src/utils/line_icons.dart:3052:13: Error: Can't access 'this' in a field initializer to read 'IconData'. const IconData(0xf879, fontFamily: _kFontFam, fontPackage: _kFontPackage); image

    opened by arupnaskarbkp 3
  • log('Your string'); Not print full data android studio console

    log('Your string'); Not print full data android studio console

    log('Your string'); //Big Data Full print problem

    import nb_utils package any page .. than not add import 'dart:developer';

    example ---

    import 'package:nb_utils/nb_utils.dart'; import 'dart:developer'; // import problem log('data: $data');

    opened by arupnaskarbkp 3
  • Shared preferences

    Shared preferences

    [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: LateInitializationError: Field 'sharedPreferences' has not been initialized. E/flutter ( 7771): #0 sharedPreferences (package:nb_utils/nb_utils.dart) E/flutter ( 7771): #1 getStringAsync (package:nb_utils/src/utils/shared_pref.dart:68:10)

    opened by jacky501 2
  • Running Windows having this type of error

    Running Windows having this type of error

    D:\Portfolio\Project\auto_localization_maker\windows\flutter\generated_plugin_registrant.cc(13,3): error C3861: 'nb_utils_pluginRegisterWithRegistrar': identifier not found [D:\Portfolio\Project\auto_localization_maker\build\windows\runner\auto_localization_maker.vcxproj] Exception: Build process failed.

    opened by dev-ankit1207 2
  • isToday() gives true even on different year and month

    isToday() gives true even on different year and month

    the function is expected to return true only if the dateTime refers to Today only, while it returns true for same day but different month and year. I know it is a simple thing but the function name gives that expectation. Thank You.

    opened by AlaaMarawi 1
  • ScrollController Extensions scroll to item

    ScrollController Extensions scroll to item

    Hi friends, thanks for your great package, I'm using AnimatedListView and I want to scrollTo specific item in list, how can I get the specific item position in list, I tried a lot of things nothing seems to work :( if I'm using jumpTo how I can get the "item pos" when my items in list have different heights? Thanks in advanced!

    opened by RoyalCoder88 0
  • 'main class' issue

    'main class' issue

    Hello, I'm facing an issue with this package. This is the error I'm getting. Kindly, help me asap.

    The plugin nb_utils doesn't have a main class defined in E:\development\flutter.pub-cache\hosted\pub.dartlang.org\nb_utils-4.4.9\android\src\main\java\com\nb\nb_utils\NbUtilsPlugin.java or E:\development\flutter.pub-cache\hosted\pub.dartlang.org\nb_utils-4.4.9\android\src\main\kotlin\com\nb\nb_utils\NbUtilsPlugin.kt. This is likely to due to an incorrect androidPackage: com.nb.nb_utils or mainClass entry inthe plugin's pubspec.yaml. If you are the author of this plugin, fix the androidPackage entry or move the main class to any of locations
    used above. Otherwise, please contact the author of this plugin and consider using a different plugin in the
    meanwhile.

    opened by syedgulahmed 4
Releases(4.4.12)
Owner
Bhoomin Naik
💻 Flutter Head | Android | Kotlin | IoT
Bhoomin Naik
A collection of Screens and attractive UIs built with Flutter ready to be used in your applications. No external libraries are used. Just download, add to your project and use.

Flutter Screens A collection of Login Screens, Buttons, Loaders and Widgets with attractive UIs, built with Flutter, ready to be used in your applicat

Samarth Agarwal 5k Dec 31, 2022
A Flutter package allows you to Showcase/Highlight your widgets step by step.

ShowCaseView A Flutter package allows you to Showcase/Highlight your widgets step by step. Preview Installing Add dependency to pubspec.yaml Get the l

kirill 0 Dec 8, 2022
Widgets for creating Hero-like animations between two widgets within the same screen.

flutter_sidekick Widgets for creating Hero-like animations between two widgets within the same screen. Features Hero-like animations. Allow you to spe

Romain Rastel 291 Oct 21, 2022
Loading widget based on a Flare animation, allow you to create beautiful custom loading widgets or dialogs

flare_loading Loading widget based on a Flare animation, allow you to create custom loading widgets or dialogs If you're using Rive instead of Flare p

Jimmy Aumard 25 Apr 16, 2021
A Flutter package that two widgets switch with clipper.

Flutter Switch Clipper A Flutter package that two widgets switch with clipper. 使用 使用FillClipper并自定义相关参数 View code SwitchCipper( initSelect: true,

FlutterCandies 23 Jan 3, 2023
A light weight library to easily manage a progress dialog with simple steps whenever you need to do it. You can easily show and hide it.

progress_dialog A light weight package to show progress dialog. As it is a stateful widget, you can change the text shown on the dialog dynamically. T

Mohammad Fayaz 202 Dec 11, 2022
Like Button is a flutter library that allows you to create a button with animation effects similar to Twitter's heart when you like something and animation effects to increase like count.

like_button Language: English | 中文简体 Like Button is a flutter library that allows you to create a button with animation effects similar to Twitter's h

FlutterCandies 357 Dec 27, 2022
A flutter package which will help you to generate pin code fields with beautiful design and animations

A flutter package which will help you to generate pin code fields with beautiful design and animations. Can be useful for OTP or pin code inputs ?? ??

Adar 550 Dec 23, 2022
This repository demonstrates use of various widgets in flutter and tricks to create beautiful UI elements in flutter for Android and IOS

AwesomeFlutterUI The purpose of this repository is to demonstrate the use of different widgets and tricks in flutter and how to use them in your proje

Subir Chakraborty 132 Nov 13, 2022
A beautiful animated flutter widget package library. The tab bar will attempt to use your current theme out of the box, however you may want to theme it.

Motion Tab Bar A beautiful animated widget for your Flutter apps Preview: | | Getting Started Add the plugin: dependencies: motion_tab_bar: ^0.1.5 B

Rezaul Islam 237 Nov 15, 2022
A customizable and easy to use UI widgets to help develop apps faster

Lenore UI Beautiful, customizable and easy to use UI widgets to help me (or maybe you) develop my (or maybe your) apps faster. This is my personal pac

Lenore 3 Nov 4, 2022
Flutter ListView and GridView that shows Loading Widgets before the real data is loaded.

loadinglistview This package provide an easy way to show loading indicator(Widget) in a listview or a gridview while the app is still fetching the rea

null 3 Dec 8, 2021
A growing collection of cool, elegant, efficient and performance-optimized animation widgets.

im_animations About A growing collection of cool, elegant, efficient and performance-optimized animation widgets. Feedback For any feedback please fil

iMujtaba Nazki 17 Nov 13, 2022
🔔 A flutter package to create cool and beautiful text animations. [Flutter Favorite Package]

Animated Text Kit A flutter package which contains a collection of some cool and awesome text animations. Recommended package for text animations in C

Ayush Agarwal 1.4k Jan 6, 2023
Simple to use yet powerfull style widgets with syntax inspired by CSS.

Division Simple to use yet powerfull style widgets with syntax inspired by CSS. Please check out styled_widget which is a replacement of Division! The

Rein Gundersen Bentdal 266 Nov 20, 2022
Writing custom Widgets in Flutter

Flutter - Custom Widgets Part 1 - EllipsizedText / LeafRenderObjectWidget Writing custom Widgets in Flutter (Part 1) — EllipsizedText Part 2 - ChildSi

Rostyslav Lesovyi 23 Dec 9, 2022
Clip your widgets with custom shapes provided.

clippy_flutter Clip your widgets with custom shapes provided. #Arc, #Arrow, #Bevel, #ButtCheek, #Chevron, #Diagonal, #Label, #Message, #Paralellogram,

Figen Güngör 238 Dec 11, 2022
Flutter Login interface using basic widgets such as Row, Column

Login UI - Flutter Descrição do Projeto ?? Interface de login utilizando widgets

null 2 Oct 25, 2022
Dart package that converts number to words (English language)A Flutter/Dart package that converts number to words (English language)

flutter_number_to_words_english A Flutter/Dart package that converts number to words (English language) Flutter (Null Safety) Flutter (Channel stable,

Ke Nguyen 4 Dec 9, 2022