arcane_helper_utils 1.4.7
arcane_helper_utils: ^1.4.7 copied to clipboard
Provides a variety of helpful utilities and extensions for Flutter and Dart.
1.4.7 #
- Added the
isExpired
andexpiresSoon
getters to JWT tokens.
Example:
String token = "your.jwt.token";
bool isExpired = token.isExpired;
bool expiresSoon = token.expiresSoon;
1.4.6 #
- Updated dependencies to the latest versions
1.4.5 #
- Added a
FixedSizeList.filled
constructor
1.4.4 #
- Updated
FixedSizeList
to act more like a properList
1.4.3 #
- [FIX] Ensure that
FixedSizeList
takes any type of object.
1.4.2 #
- Added the
isLeapYear
extension to theDateTime
andint
objects. - Added the
FixedSizeList
class. See the README and examples for details.
1.4.1 #
- Added a
List
equality extension,equals
. - Fixed an issue with the
List
extensionunique
that may have caused null-safety issues.
1.4.0 #
- [BREAKING] JWT-related extensions have been reworked.
Old:
String token = "your.jwt.token";
DateTime? expiry = token.jwtExpiryTime();
String? userId = token.jwtUserId();
String? email = token.jwtEmail();
New:
String token = "your.jwt.token";
DateTime? expiry = token.jwt.expiryTime;
String? userId = token.jwt.userId;
String? email = token.jwt.email;
// Added:
JwtPayload? token.jwt;
String? givenName = token.jwt.givenName;
String? familyName = token.jwt.familyName;
Additionally, the exceptions thrown when parsing an invalid JWT have been updated.
String email = "invalid".jwtEmail() // Previously threw Exception("invalid token")
String email = "invalid".jwt.email // Now throws InvalidTokenException()
String email = "".jwtEmail() // Previously threw Exception("invalid payload")
String email = "".jwt.email // Now throws InvalidPayloadException()
1.3.2 #
- Added
isEmptyOrNull
andisNotEmptyOrNull
extensions forList
andString
objects. These extensions are identical toisNullOrEmpty
andisNotNullOrEmpty
, respectively. - Fixed a bug in the
DateTime
extension that caused incorrect results when comparing dates usingisToday
.
1.3.1 #
- Added the
isNullOrEmpty
andisNotNullOrEmpty
extensions forList
objects. - Fixed a bug in the
Ticker
extension that prevented intervals shorter than 1 second from being used. - [chore] Added unit tests for all extensions and utilities in the package.
1.3.0 #
- Added a non-breaking space character to
CommonString
asCommonString.nbsp
- Updated package dependencies
1.2.6 #
-
Added the
printValue()
extension. TheprintValue()
extension can be used to print a value to the console before returning that same value.Example:
// Print the `textTheme` object to the console before returning it Text( 'Hello, world', style: Theme.of(context).textTheme.printValue().headlineMedium, ),
1.2.5 #
- Null
String
s being manipulated should returnnull
instead of an emptyString
1.2.4 #
- Made
String
manipulation utilities available for nullable objects
1.2.3 #
- Adjusted
capitalize
extension to convert remaining letters to lowercase
1.2.2 #
- Added additional
String
manipulation utilities, including:capitalizeWords
: Capitalizes the first letter of each word in the string.spacePascalCase
: Adds spaces between words in a PascalCase string.
1.2.1 #
- Added additional documentation and examples for new extension.
1.2.0 #
- Added the
unique
extension forList
objects.
1.1.3 #
- Removes
Color
extension due to an incompatibility with Flutter. Sorry, @rania-run!
1.1.2 #
- Ensure new
Color
extensions are exported from the package.
1.1.1 #
- Added
Color
extension for luminance. Thanks, @rania-run! - Fixed a bug in the
splitByLength
extension onString
1.1.0 #
- [BREAKING] Removed
Unfocuser
widget to ensure pure Dart compatibility.
To continue using Unfocuser
, add unfocuser: ^1.0.0
to your pubspec.yaml.
1.0.4 #
- Added
yesterday
andtomorrow
extensions toDateTime
1.0.3+2 #
- Added an example project
1.0.3+1 #
- Updated documentation
1.0.3 #
- Updated linting rules to use arcane_analysis
1.0.2 #
- Added bulletPoint to CommonString
1.0.1 #
- Added Unfocuser widget and JSON converters
1.0.0 #
- Initial release