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

SDKDart
unlisted

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
140
points
14
downloads

Publisher

unverified uploader

Weekly Downloads

add lazy load with future annotation

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

analyzer, build, lc_lazy_future, meta, source_gen, source_helper

More

Packages that depend on lc_lazy_future_builder