flutter_shared_utilities library
A Dart library that provides shared utilities for Flutter applications. This library includes various utility functions and classes that can be used across different Flutter projects.
Classes
-
BaseDataModel<
R> - An abstract interface class for network data.
- SafeParser
- A class that provides safe JSON encoding and decoding methods.
- SafeUrlLauncher
- A utility class for safely launching URLs with comprehensive error handling and validation.
Enums
- SafeUrlLaunchMode
- The mode in which to launch the URL.
Extensions
- ColorExtensions on Color
- Extension methods for the Color class.
- DateTimeExtensions on DateTime
- Utility extensions for DateTime to provide common formatting and calculation methods used in Flutter apps.
-
IterableUtilExtensions
on Iterable<
T> - Extension methods for the Iterable class.
-
ListParserExtensions
on List<
Object?> - Extension methods for the List class.
-
ListUtilExtensions
on List<
T> - Extension methods for List to provide utility functions such as inserting items if they do not exist, adding items from another list if they do not exist, and removing items if they exist.
- MapParserExtensions on Map
- Extension methods for safely parsing values from maps.
- SafeUrlLaunchModeExtension on SafeUrlLaunchMode
-
Extension to convert SafeUrlLaunchMode to
LaunchMode. - SerializationExtensions on Object?
- Extension methods for serializing and deserializing objects
-
StateExtensions
on State<
T> - Extensions for State classes to provide safe widget operations.
- StringTypeConversionExtensions on String
- Extension methods for the String class.
- StringUtilExtensions on String?
- Utility functions on nullable strings.
Functions
-
safeDebugLog(
Object? e, {StackTrace? stackTrace}) → void - Logs a message to the console if the debug mode is enabled.
Typedefs
-
EqualityChecker<
T> = bool Function(T item1, T item2) -
A type alias for a function that checks equality
between two items of type
T.