hrk_batteries 2.1.0 hrk_batteries: ^2.1.0 copied to clipboard
A library to accumulate required dart helper and utility codes
A library to accumulate required dart helper and utility codes
Features #
isDartOrFlutterTest()
isFlutterTest()
isFlutterIntegrationTest()
- Build Modes
Unit
HrkDateTime
HrkString
NetworkState
Getting started #
dart pub add hrk_batteries
Usage #
import 'package:hrk_batteries/hrk_batteries.dart';
void main() {
// Logger log = Logger();
// late Level level;
if (isDartOrFlutterTest()) {
// level = Level.INFO;
} else {
// level = Level.SEVERE;
}
// log.log(level, 'Needs Attention');
final DateTime today = HrkDateTime.today();
final DateTime todayUtc = HrkDateTime.todayUtc();
final DateTime date = DateTime.now().toDate();
// A०१२३४५६७८९Z
final String enToMrLocalizedString = 'A0123456789Z'.localizeDigits(
toZeroDigit: '\u0966', // toZeroDigit: '०',
);
}