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

discontinued

Package to generate blop method call boilerplate code

example/lib/example.dart

// ignore_for_file: unused_element
import 'dart:async';

import 'package:blop/blop.dart';

part 'example.g.dart';

@blopProcessor
class BlopTestClass extends SimpleBlop<String> with _$BlopTestClass {
  BlopTestClass(initialState) : super(initialState);

  @override
  @blopProcess
  String _optional<T>(Stream<T> v, [int num = 0, Future<int>? f]) => '';
  @override
  @blopProcess
  String _empty() => '';

  @override
  @blopProcess
  String _emptyGeneric<T>() => '';

  @override
  @blopProcess
  String _emptyGeneric2<T extends num, E>() => '';

  @override
  @blopProcess
  String _optionalOnly([int n = 2]) => '';

  @override
  @blopProcess
  String _optionalOnly2([int n = 2, int? h]) => '';

  @override
  @blopProcess
  String _namedOnly({int n = 2}) => '';

  @override
  @blopProcess
  String _namedOnly2({int n = 2, int? h}) => '';

  @override
  @blopProcess
  FutureOr<String> _named(int v, {int n = 2, int? h}) => '';

  @override
  @BlopProcess(name: 'wtf')
  Stream<String> flow(List<String> data) async* {
    for (final v in data) {
      await Future.delayed(Duration(seconds: 2));
      yield v;
    }
  }

  @override
  @blopProcess
  Stream<String> _implicitStream() async* {}

  @override
  @blopProcess
  Future<String> _implicitFuture() async {
    return 'string';
  }

  @override
  @blopProcess
  String _implicitState() => 'string';
}
0
likes
80
pub points
0%
popularity

Publisher

unverified uploader

Package to generate blop method call boilerplate code

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

analyzer, blop, build, flutter, source_gen

More

Packages that depend on blop_generator