flutter_degen 0.4.4+2 copy "flutter_degen: ^0.4.4+2" to clipboard
flutter_degen: ^0.4.4+2 copied to clipboard

outdated

The Flutter code generator for your delegates

Generates property delegates within classes.

import 'package:flutter_degen/annotations.dart';

class OtherType {
  final String greeting;

  OtherType(this.greeting);
}

class TypeWithDelegate with _OtherTypeMixin {
  @delegate(implementDelegate=true)
  final OtherType _otherType;

  TypeWithDelegate(this._otherType); 
}

/// After generation, you can do this:
final typeWithDelegate = TypeWithDelegate(OtherType("Hello, world"));
assert(typeWithDelegate is OtherType);  
assert(typeWithDelegate.greeting == "Hello, world");
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

The Flutter code generator for your delegates

Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (LICENSE)

Dependencies

analyzer, args, build, build_config, build_runner, color, dart_style, dartx, mime, path, source_gen, xml, yaml

More

Packages that depend on flutter_degen