flutter_helper_utils 1.3.5
flutter_helper_utils: ^1.3.5 copied to clipboard
The Flutter Helper Package offers various extensions and helper methods that can make development more efficient.
1.3.5 #
-
NEW: Added
showMaterialBanner,showSnackBar,hideCurrentMaterialBanner,hideCurrentSnackBar,removeCurrentMaterialBanner,removeCurrentSnackBar,clearMaterialBanners,clearSnackBarsonBuildContext. Usage example could be as easy ascontext.removeCurrentSnackBar. -
NEW: Added
focusScope,hasFocus,unFocus, andrequestFocuscall back on BuildContext.requestFocusis commonly used to hide keyboard on onTap/onPress call. Usage could beonTap: () => context.requestFocusoronTap: context.requestFocusCall. -
NEW: Added new enum called
HttpResStatusthat contains all http response codes with description to each one, and also some helper getters such asisSuccessful. Usage with http package could be:final res = await http.post(...); // assume it retrun res code 505 print(res.statusCode.toHttpResStatus); // will print "Insufficient Storage" -
UPDATE: Used MediaQuery as InheritedModel to improve performance, see this pull in flutter for more info.
1.3.4 #
- NEW: Added
isValidHttpCodeinnum?extension that returns true if the http response code is 200 or 201. - NEW: Added
toDateWithFormatin String extension that converts string toDateTimewith specific format e.g,d-M-y.
Usage:
final dateTime = '14-12-2030'.toDateWithFormat('d-M-y');
1.3.3 #
- NEW: Added
binaryin bool extension that returns1if true and0if false asint.
1.3.2 #
- FIX: Fixed a bug when detecting
isIOSWebandisAndroidWebusingTargetPlatform. - NEW: Added
isApplethat detects if the running device is made by apple e.g. MacOS, iPadOS, or iOS.
Usage:
context.isApple
// OR without context
defaultTargetPlatform.isApple // import 'package:flutter/foundation.dart';
1.3.1 #
- NEW: Added
toBoolto nullableObject?.
Rules:
- Object is true only if
- Object is bool and true.
- Object is num and is greater than zero.
- Object is string and is equal to 'yes', 'true', or '1'.
- any other conditions including null will return false.
1.3.0 #
- HOT FIX: Fixed bool extension is not exported.
1.2.9 #
- NEW: Added
isTrue, andisFalseon nullable boolean, now if bool? is null the check will always return false instead of showing compile error.
1.2.8 #
- UPDATE: replace
isNegativeOrNull,isPositiveOrNull,isNotNegativeOrNull,isNotPositiveOrNull, andisNotZeroOrNullwith justisNegative,isPositive, andisZeroOrNullin nullable numbers.
1.2.7 #
- NEW: Added an option to check the device type when running on web, e.g.
isMobileWeborisDesktopWeb.
1.2.6 #
- NEW: Added
localgetter in datetime that call toLocal() on any dat, but it respects null safety.
1.2.5 #
- NEW: Added
tryRemoveAt,indexOfOrNull,indexWhereOrNull, andtryRemoveWhereonList<T>?extension. - UPDATE: Update the package to FlutterSDK 3.10.
- FIX: Fixed a bug with
isNotNullonObjectextension.
1.2.4 #
- NEW: Added
DatesHelperclass that provide a set of static methods for DateTime such asisSameHour,diffInDays, anddaysInRange. - NEW: Added the getters
isPresent,isPast,passedDuration,remainingDays, and more to theDateTimeextension.- Now you can get formatted date using the format method directly in any date e.g
DateTime.now().format('EEE')
- Now you can get formatted date using the format method directly in any date e.g
1.2.3 #
- NEW: Added
scaffoldMessengergetter in theBuildContextextension to easily callScaffoldMessenger.of(context) - UPDATE: Improved implementation of the
toListandtryToListin theConvertObjectclass.
1.2.2 #
- NEW: Added
toUtcIso(supports null safety) that convert any datetoUtc()andtoIso8601String()in the Date extensions.
1.2.1 #
- NEW: Added
isEmptyOrNullandisNotEmptyOrNullto Map and Set extensions.
1.2.0 #
- UPDATE: Update documentation.
1.1.9 #
- FIX: Fixed a bug with
isZerobool in numbers extensions. - UPDATE:
asBoolsupport null safety on numbers extensions. - UPDATE: Updated
ParsingExceptionimplementation.
1.1.8 #
- NEW: Added
isPositiveOrNull,isZeroOrNull, andisNegativeOrNullto all numbers extensions. - UPDATE: on String extension,
isEmptyOrNullnow returns true if string has only empty lines.
1.1.7 #
- NEW: Added
toDateTimeandtryToDateTimeinConvertObjectclass.
1.1.6 #
- NEW: Added
toMapandtryToMapinConvertObjectclass, and addisValidSVGin String extension.
1.1.5 #
- NEW: Added
toBoolandtryToBoolinConvertObjectclass. - UPDATE: Improved all implementations of static methods in
ConvertObjectclass.
1.1.4 #
- NEW: Supported converting timestamp milliseconds to
DateTimeand addedtryToStringinConvertObjectclass.
1.1.3 #
- FIX: Added missing
pushNamedAndRemoveUntilin the navigation extension.
1.1.2 #
- UPDATE: Improved
asBoolimplementation in the string extension.
1.1.1 #
- FIX: Fixed a bug in
camelCaseconversion algorithm.
1.1.0 #
- FIX: Fixed logo does not appear in readme file.
1.0.9 #
- UPDATE: Re-organized changelog and updated readme file.
1.0.8 #
- FIX: Fixed bug with
isHexColorin color extension.
1.0.7 #
- NEW: Added new color extension to support converting hex string to color and checking if string is a hex color.
1.0.6 #
- UPDATE: Supported null safety to ThemeMode and Brightness.
1.0.5 #
- UPDATE: Changed
poptopopPageto solve conflicts withgo_routerpackage extensions.
1.0.4 #
- UPDATE: Updated readme file.
1.0.3 #
- NEW: Added
capitalizeFirstLetter,toPascalCase,toTitleCase, andtoCamelCaseto String extension.
1.0.2 #
- UPDATE: Renamed some getters to fix conflicts with the
getpackage.
1.0.1 #
- UPDATE: Updated readme file.
1.0.0 #
- INITIAL: Initial release.