helper library Null safety

Classes

Backpack
Backpack class for storing data This class is not designed to store huge amounts of data.
NyLogger
Logger used for messages you want to print to the console.
NyStorage
Base class to help manage local storage
Storable
Storable class to implement local storage for Models. This class can be used to then storage models using the NyStorage class.
StorageManager

Extensions

StringExtension
Extensions for String

Functions

getAppTextTheme(TextStyle appThemeFont, TextTheme textTheme) TextTheme
Returns a text theme for a app font. Returns a TextTheme.
getEnv(String key, {dynamic defaultValue}) → dynamic
Returns a value from the .env file the key must exist as a string value e.g. APP_NAME.
getImageAsset(String imageName) String
Returns the full image path for a image in /public/assets/images/ directory. Provide the name of the image, using imageName parameter.
getPublicAsset(String asset) String
Returns the full path for an asset in /public/assets directory. Usage e.g. getPublicAsset('videos/welcome.mp4');
nyApi<T>({required dynamic request(T), required Map<Type, dynamic> apiDecoders, BuildContext? context}) Future
API helper
nyEvent<T>({Map? params, Map<Type, NyEvent> events = const {}}) → dynamic
Event helper
trans(String key, {Map<String, String>? arguments}) String
Returns the translation value from the key you provide. E.g. trans("hello") lang translation will be returned for the app locale.