A Very Good Project created by Very Good CLI.
❗ In order to start using Lean Extensions you must have the Dart SDK installed on your machine.
Add lean_extensions
to your pubspec.yaml
:
dependencies:
lean_extensions:
Install it:
dart pub get
// some python-like functionality
for (final i in range(10)) {
await sleep(i);
}
// some converters for easy (de)serialization
const converter = AnyDateConverter();
final date1 = converter.fromJson('25 Nov 2023');
if (date1 == DateTime(2023, 11, 25)) {
// easily deserializes common types
}
// some extensions with common functionality
final anInt = '1'.toInt(); // resolves to 1
// and a touch of magic
final anotherInt = 'one'.toInt(); // resolves to 1 as well