helpers/helper library

Classes

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 on String
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), Map<Type, dynamic> apiDecoders = const {}, BuildContext? context, Map<String, dynamic> headers = const {}, String? bearerToken, String? baseUrl}) 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.