extension 0.6.0 copy "extension: ^0.6.0" to clipboard
extension: ^0.6.0 copied to clipboard

Package including lot helpers for easy developing on dart language

0.6.0 #

  • Renamed: DateUtils -> DateExtension, ListUtils -> ListExtension, StringUtils -> StringExtension
  • Added IterableExtension with chunk method
  • Added NumExtension with methods: padLeft, padRight, between, outside
  • Added Time class

0.5.0 #

  • Removed enum entity with Enum<T> & enumValueByString but enhanced enums added in dart 2.17

0.4.0 #

  • Replaced multiple imports by one
-// Or by entity. Available: string, date, list, enum
-import 'package:extension/<ENTITY NAME>.dart';

+import 'package:extension/extension.dart';
  • Changed api's:
- plural(1, 'дом', 'дома', 'домов');
- pluralize(1, 'дом', 'дома', 'домов');

- DateExtension.isSameWeek(DateTime(2017, 3, 5), DateTime(2017, 3, 6));
+ DateTime(2017, 3, 5).isSameWeek(DateTime(2017, 3, 6));

- DateExtension.isSameDay(DateTime.now(), DateTime.now());
+ DateTime.now().isSameDay(DateTime.now());
  • Added date utils
/// Tomorrow at same hour / minute / second than now
DateExtension.tomorrow;

/// Yesterday at same hour / minute / second than now
DateExtension.yesterday;

/// Current date (Same as [Date.now])
DateExtension.today;

// Returns a [DateTime] with the date of the original
DateTime(2017, 3, 6, 12, 30, 15).dateOnly; // DateTime(2017, 3, 6)

/// The day after this [DateTime]
DateTime(2017, 3, 5).nextDay; // return DateTime(2017, 3, 6)

/// The day previous this [DateTime]
DateTime(2017, 3, 5).previousDay; // return DateTime(2017, 3, 4)
  • Provide more docs at readme

0.3.0 #

  • Added ListUtils with thunks splitting
  • Added isTomorrow in date utils
  • Mark enumValueByString in enum utils deprecated. But dart add it feature from v2.15

0.2.0 #

  • Stable release

0.2.0-nullsafety.0 #

0.1.1 #

  • Fixed isSameDay in date utils

0.1.0 #

  • Rewrite with extension methods
  • Added date with isToday & isYesterday extension methods
  • in enumValueByString added orElse property
  • added plural in strings

0.0.5 #

  • Added operator == to Enum<T>

0.0.4 #

  • Added string entity with capitalizeFirstLetter function
  • enumValueByString returns null if can't find the value

0.0.3 #

  • enumValueByString now throws EnumValueInvalideParamsException instead simple Exception

0.0.2 #

Breaking Changes #

  • enumValueByString now throws EnumValueNotFoundException if can't find the value

0.0.1 #

  • Initial commit
43
likes
140
pub points
86%
popularity

Publisher

verified publisherserge.software

Package including lot helpers for easy developing on dart language

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

meta

More

Packages that depend on extension