Official FA Dart core package.
Add following code in pubspec.yaml file in dependencies:
fa_dart_core:
git:
url: https://github.com/FieldAssist/fa_dart_core.git
ref: main
To use add following line as top level variable anywhere in your project
final AppLog logger = AppLogImpl();
logger.d("debug value: $token");
logger.e(e,stacktrace); // Use StackTrace.current in case no stacktrace available
logger.i("Api response: xyz");
Provides basic formatting for DateTime. usage:
DateTime time = DateTime.Now();
String formattedDate = DateTimeUtils.formatDateTime(
dateTime: time,
outputFormat: DateTimeFormat.FORMAT_1_dd_MMMM_yyyy,
);
DateTime dt = DateTimeUtils.parseDateTime(
dateTime: formattedDate,
inputFormat: DateTimeFormat.FORMAT_1_dd_MMMM_yyyy,
);