Skip to content

Commit

Permalink
4.6.3
Browse files Browse the repository at this point in the history
- New - PlaceHolderWidget - Set nicely colored PlaceHolder while image is loading

4.6.2
- New - Animated ListView
- New - Animated Wrap
  • Loading branch information
bhoominn committed Jun 23, 2022
1 parent 637c379 commit 7f0018f
Show file tree
Hide file tree
Showing 9 changed files with 163 additions and 88 deletions.
49 changes: 35 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
## 4.6.3

- New - PlaceHolderWidget - Set nicely colored PlaceHolder while image is loading

## 4.6.2

- New - Animated ListView
- New - Animated Wrap

## 4.6.1

- Get Package Info

## 4.6.0

- New - Blur Widget
- New - Read More Text Widget
- New - Rounded Check Box Widget
Expand Down Expand Up @@ -45,8 +57,9 @@
- Added afterBuildCreated method get context after BuildContext created
- AfterLayout mixin deprecated now
## 4.4.2
- Added Gradient Border Widget
- Added Animation in Custom Dialog

- New - Gradient Border Widget
- New - Animation in Custom Dialog
## 4.4.1
- Added highlight color in onTap extension
- Added height property in all TextStyles
Expand All @@ -58,46 +71,54 @@
## 4.3.0
- Added Circular Progress with Gradient Widget
## 4.2.14

- Help widget for FutureBuilder & StreamBuilder with loading and error handling inbuilt
- Added Overlay widget
- Added JWT Decoder
- New - Overlay widget
- New - JWT Decoder
- Added builder in showInDialog method to fix context issue (Migrated from child to builder)
## 4.2.12
- Added page route animation
- Added default input decoration
## 4.2.11
- Added Theme Selection Dialog
- Added SnackBar function

- New - Theme Selection Dialog
- New - SnackBar function
- Dark Mode support for LanguageList DropDown
## 4.2.10

- Updated ReadMe
- Added Language DropDown Widget
- New - Language DropDown Widget
- Added onAccept in show confirm dialog
- Added get selected language function
- AppButton Scale animation
## 4.2.9
- Added HoverWidget
- Added DottedBorderWidget

- New - HoverWidget
- New - DottedBorderWidget
- Make onTap optional in TextIcon
- Added customAccentColor in Loader
## 4.2.8
- Added Rating Item Widget, Common Model Class

- New - Rating Item Widget, Common Model Class
## 4.2.5
- Added Setting Section widget
- Added TextButton Widget

- New - Setting Section widget
- New - TextButton Widget
- Added DateTime Extensions
- Added Default BoxDecoration
- Added currency symbols
## 4.2.2
- Added Persistent Tabs widget

- New - Persistent Tabs widget
## 4.1.0
- Added new int extensions
## 4.0.0
- Migrated to dart null safety
## 3.3.0+13
- Global AppButton background color, validate null widget, useful Color ext, automatic status bar color brightness, show toast only if string is not empty
## 3.3.0+8
- Added DotsIndicator, Buttons, TextFields, Loader, Setting Item

- New - DotsIndicator, Buttons, TextFields, Loader, Setting Item
## 3.2.11+4
- Update connectivity package version
## 3.2.9
Expand Down
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
[![Pub Package](https://img.shields.io/pub/v/nb_utils.svg)](https://pub.dartlang.org/packages/nb_utils)
<a href="https://opensource.org/licenses/MIT" target="_blank">
<img src="https://img.shields.io/badge/License-MIT-yellow.svg"/>
</a>
<a href="https://saythanks.io/to/bhoominn%40gmail.com" target="_blank">
<img src="https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg"/>
<img src="https://img.shields.io/badge/License-MIT-yellow.svg"/>
</a>
<a href="https://opensource.org/licenses/Apache-2.0" target="_blank">
<img src="https://badges.frapsoft.com/os/v1/open-source.svg?v=102"/>
<img src="https://badges.frapsoft.com/os/v1/open-source.svg?v=102"/>
</a>
<a href="https://github.com/bhoominn/nb_utils/issues" target="_blank">
<img alt="GitHub: bhoominn" src="https://img.shields.io/github/issues-raw/bhoominn/nb_utils?style=flat" />
<img alt="GitHub: bhoominn" src="https://img.shields.io/github/issues-raw/bhoominn/nb_utils?style=flat" />
</a>
<img src="https://img.shields.io/tokei/lines/github/bhoominn/nb_utils" />
<img src="https://img.shields.io/github/last-commit/bhoominn/nb_utils" />
<a href="https://discord.com/channels/854023838136533063/854023838576672839" target="_blank">
<img src="https://img.shields.io/discord/854023838136533063" />
<img src="https://img.shields.io/discord/854023838136533063" />
</a>
<a href="https://pub.dev/packages/nb_utils/score"><img src="https://badges.bar/nb_utils/likes"></a>
<a href="https://pub.dev/packages/nb_utils/pub%20points"><img src="https://badges.bar/nb_utils/pub%20points"></a>
<a href="https://pub.dev/packages/nb_utils/score"><img src="https://badges.bar/nb_utils/likes"></a>

<a href="https://saythanks.io/to/bhoominn%40gmail.com" target="_blank">
<img src="https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg"/>
</a>
<a href="https://github.com/bhoominn">
<img alt="GitHub: bhoominn" src="https://img.shields.io/github/followers/bhoominn?label=Follow&style=social" target="_blank" />
<img alt="GitHub: bhoominn" src="https://img.shields.io/github/followers/bhoominn?label=Follow&style=social" />
</a>
<a href="https://github.com/bhoominn/nb_utils">
<img src="https://img.shields.io/github/stars/bhoominn/nb_utils?style=social" />
</a>
<a href="https://twitter.com/bhoominnaik" target="_blank">
<img src="https://img.shields.io/twitter/follow/bhoominnaik?color=1DA1F2&label=Followers&logo=twitter"/>
<img src="https://img.shields.io/twitter/follow/bhoominnaik?color=1DA1F2&label=Followers&logo=twitter" />
</a>
<a href="https://github.com/sponsors/bhoominn"><img src="https://img.shields.io/github/sponsors/bhoominn" /></a>

<a href="https://www.buymeacoffee.com/bhoominn"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=&slug=bhoominn&button_colour=5F7FFF&font_colour=ffffff&font_family=Cookie&outline_colour=000000&coffee_colour=FFDD00"></a>

## Show some love and like to support the project

## Documentation
Expand Down
3 changes: 1 addition & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ class _HomePageState extends State<HomePage> {
onChange: (size) {
log(size);
},
child: Container(
color: blueColor,
child: PlaceHolderWidget(
height: 50.dynamicHeight,
width: 100.dynamicWidth,
),
Expand Down
25 changes: 11 additions & 14 deletions lib/nb_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export 'package:connectivity_plus/connectivity_plus.dart';
export 'package:fluttertoast/fluttertoast.dart';
export 'package:shared_preferences/shared_preferences.dart';

export 'src/live_stream.dart';
export 'src/customPaints/google_logo_painter.dart';
export 'src/deprecated_widgets.dart';
export 'src/extensions/bool_extensions.dart';
Expand All @@ -32,12 +31,14 @@ export 'src/extensions/num_extensions.dart';
export 'src/extensions/scroll_extensions.dart';
export 'src/extensions/string_extensions.dart';
export 'src/extensions/widget_extensions.dart';
export 'src/live_stream.dart';
export 'src/models/language_data_model.dart';
export 'src/models/package_info_model.dart';
export 'src/models/walkthrough_model.dart';
export 'src/utils/after_layout.dart';
export 'src/utils/colors.dart';
export 'src/utils/common.dart';
export 'src/utils/confirmation_dialog.dart';
export 'src/utils/constants.dart';
export 'src/utils/date_time_utils.dart';
export 'src/utils/decorations.dart';
Expand All @@ -50,11 +51,14 @@ export 'src/utils/size_config.dart';
export 'src/utils/system_utils.dart';
export 'src/utils/text_styles.dart';
export 'src/utils/time_formatter.dart';
export 'src/widgets/PersistentTabs.dart';
export 'src/widgets/animatedList/animated_configurations.dart';
export 'src/widgets/animatedList/animated_list_view.dart';
export 'src/widgets/animatedList/animated_wrap.dart';
export 'src/widgets/app_button.dart';
export 'src/widgets/app_text_field.dart';
export 'src/widgets/blur_widget.dart';
export 'src/widgets/circular_progress_gradient.dart';
export 'src/utils/confirmation_dialog.dart';
export 'src/widgets/dot_indicator.dart';
export 'src/widgets/dotted_border_widget.dart';
export 'src/widgets/gradient_border.dart';
Expand All @@ -64,7 +68,7 @@ export 'src/widgets/language_list_widget.dart';
export 'src/widgets/loader_widget.dart';
export 'src/widgets/marquee_widget.dart';
export 'src/widgets/overlay_custom_widget.dart';
export 'src/widgets/PersistentTabs.dart';
export 'src/widgets/placeholder_widget.dart';
export 'src/widgets/rating_bar_widget.dart';
export 'src/widgets/read_more_text.dart';
export 'src/widgets/responsive_widget.dart';
Expand All @@ -80,9 +84,6 @@ export 'src/widgets/timer_widget.dart';
export 'src/widgets/ul_widget.dart';
export 'src/widgets/version_info_widget.dart';
export 'src/widgets/widgets.dart';
export 'src/widgets/animatedList/animated_configurations.dart';
export 'src/widgets/animatedList/animated_list_view.dart';
export 'src/widgets/animatedList/animated_wrap.dart';

//region Global variables - This variables can be changed.
Color textPrimaryColorGlobal = textPrimaryColor;
Expand Down Expand Up @@ -159,15 +160,13 @@ Future<void> initialize({
}) async {
sharedPreferences = await SharedPreferences.getInstance();

defaultAppButtonShapeBorder =
RoundedRectangleBorder(borderRadius: radius(defaultAppButtonRadius));
defaultAppButtonShapeBorder = RoundedRectangleBorder(borderRadius: radius(defaultAppButtonRadius));

defaultDialogShape = dialogShape(defaultDialogBorderRadius);

localeLanguageList = aLocaleLanguageList ?? [];

selectedLanguageDataModel =
getSelectedLanguageModel(defaultLanguage: defaultLanguage);
selectedLanguageDataModel = getSelectedLanguageModel(defaultLanguage: defaultLanguage);
}

/// nb_utils class
Expand All @@ -189,14 +188,12 @@ Future<T?> push<T>(
}) async {
if (isNewTask) {
return await Navigator.of(getContext).pushAndRemoveUntil(
buildPageRoute(
widget, pageRouteAnimation ?? pageRouteAnimationGlobal, duration),
buildPageRoute(widget, pageRouteAnimation ?? pageRouteAnimationGlobal, duration),
(route) => false,
);
} else {
return await Navigator.of(getContext).push(
buildPageRoute(
widget, pageRouteAnimation ?? pageRouteAnimationGlobal, duration),
buildPageRoute(widget, pageRouteAnimation ?? pageRouteAnimationGlobal, duration),
);
}
}
Expand Down
66 changes: 26 additions & 40 deletions lib/src/widgets/animatedList/animated_configurations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ class AnimatedItemWidget extends StatelessWidget {
final ListAnimationType listAnimationType;
final Widget child;

final SlideConfiguration slideConfiguration;
final FadeInConfiguration fadeInConfiguration;
final ScaleConfiguration scaleConfiguration;
final FlipConfiguration flipConfiguration;
final SlideConfiguration? slideConfiguration;
final FadeInConfiguration? fadeInConfiguration;
final ScaleConfiguration? scaleConfiguration;
final FlipConfiguration? flipConfiguration;

AnimatedItemWidget({
Key? key,
Expand All @@ -25,61 +25,45 @@ class AnimatedItemWidget extends StatelessWidget {
FadeInConfiguration? fadeInConfiguration,
ScaleConfiguration? scaleConfiguration,
FlipConfiguration? flipConfiguration,
}) : slideConfiguration = (listAnimationType == ListAnimationType.Slide && slideConfiguration == null)
? SlideConfiguration.init()
: slideConfiguration != null
? slideConfiguration
: SlideConfiguration(),
fadeInConfiguration = (listAnimationType == ListAnimationType.FadeIn && fadeInConfiguration == null)
? FadeInConfiguration.init()
: fadeInConfiguration != null
? fadeInConfiguration
: FadeInConfiguration(),
scaleConfiguration = (listAnimationType == ListAnimationType.Scale && scaleConfiguration == null)
? ScaleConfiguration.init()
: scaleConfiguration != null
? scaleConfiguration
: ScaleConfiguration(),
flipConfiguration = (listAnimationType == ListAnimationType.Flip && flipConfiguration == null)
? FlipConfiguration.init()
: flipConfiguration != null
? flipConfiguration
: FlipConfiguration(),
}) : slideConfiguration = (listAnimationType == ListAnimationType.Slide && slideConfiguration == null) ? SlideConfiguration.init() : slideConfiguration!,
fadeInConfiguration = (listAnimationType == ListAnimationType.FadeIn && fadeInConfiguration == null) ? FadeInConfiguration.init() : fadeInConfiguration!,
scaleConfiguration = (listAnimationType == ListAnimationType.Scale && scaleConfiguration == null) ? ScaleConfiguration.init() : scaleConfiguration!,
flipConfiguration = (listAnimationType == ListAnimationType.Flip && flipConfiguration == null) ? FlipConfiguration.init() : flipConfiguration!,
super(key: key);

@override
Widget build(BuildContext context) {
if (listAnimationType == ListAnimationType.FadeIn) {
return FadeInAnimation(
child: child,
duration: fadeInConfiguration.duration,
curve: fadeInConfiguration.curve,
delay: fadeInConfiguration.delay,
duration: fadeInConfiguration!.duration,
curve: fadeInConfiguration!.curve,
delay: fadeInConfiguration!.delay,
);
} else if (listAnimationType == ListAnimationType.Flip) {
return FlipAnimation(
child: child,
delay: flipConfiguration.delay,
curve: flipConfiguration.curve,
duration: flipConfiguration.duration,
flipAxis: flipConfiguration.flipAxis,
delay: flipConfiguration!.delay,
curve: flipConfiguration!.curve,
duration: flipConfiguration!.duration,
flipAxis: flipConfiguration!.flipAxis,
);
} else if (listAnimationType == ListAnimationType.Slide) {
return SlideAnimation(
child: child,
delay: slideConfiguration.delay,
curve: slideConfiguration.curve,
duration: slideConfiguration.duration,
horizontalOffset: slideConfiguration.horizontalOffset,
verticalOffset: slideConfiguration.verticalOffset,
delay: slideConfiguration!.delay,
curve: slideConfiguration!.curve,
duration: slideConfiguration!.duration,
horizontalOffset: slideConfiguration!.horizontalOffset,
verticalOffset: slideConfiguration!.verticalOffset,
);
} else if (listAnimationType == ListAnimationType.Scale) {
return ScaleAnimation(
child: child,
delay: scaleConfiguration.delay,
curve: scaleConfiguration.curve,
duration: scaleConfiguration.duration,
scale: scaleConfiguration.scale,
delay: scaleConfiguration!.delay,
curve: scaleConfiguration!.curve,
duration: scaleConfiguration!.duration,
scale: scaleConfiguration!.scale,
);
} else {
return child;
Expand Down Expand Up @@ -179,6 +163,7 @@ class FlipConfiguration {
}
}

//region flutter_staggered_animation library
/// In the context of a scrollable view, your children's animations are only built
/// as the user scrolls and they appear on the screen.
///
Expand Down Expand Up @@ -770,3 +755,4 @@ class SlideAnimation extends StatelessWidget {
);
}
}
//endregion
2 changes: 1 addition & 1 deletion lib/src/widgets/blur_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Blur extends StatelessWidget {
this.width,
this.blur = 5,
this.elevation = 0,
this.padding = const EdgeInsets.all(8),
this.padding = const EdgeInsets.only(),
this.color = Colors.transparent,
this.borderRadius = const BorderRadius.all(Radius.circular(20)),
this.clipBehavior = Clip.antiAlias,
Expand Down
Loading

0 comments on commit 7f0018f

Please sign in to comment.