lc_lazy_future 0.1.0 copy "lc_lazy_future: ^0.1.0" to clipboard
lc_lazy_future: ^0.1.0 copied to clipboard

add lazy load with future annotation

What is this? #

Wrap an existing function and regenerate a new asynchronous function

Usage #

import 'package:lc_lazy_future/lc_lazy_future.dart';

/// will generate TODO
@LcLazyGroup()
class Example {
  String? name;

  Example({
    this.name = '',
  });

  /// will generate `Example.create` function
  @LcLazyFuture()
  Future<void> _create() async {
    await Future.delayed(const Duration(seconds: 1));
  }
}
0
likes
150
points
13
downloads

Publisher

unverified uploader

Weekly Downloads

add lazy load with future annotation

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

meta

More

Packages that depend on lc_lazy_future