viper_gen

Creator: coderz1093

Last updated:

0 purchases

viper_gen Image
viper_gen Images
Add to Cart

Description:

viper gen

VIPER Gen #
A generator for viper package
How to use #
Mark a presenter with @presenter
import 'package:viper/viper.dart';
import 'package:viper/annotation.dart';

part 'presenter.g.dart';

@presenter
class MyPresenterImpl extends MyPresenter
// Add states & bound functions
with _$MyPresenterImpl
implements MyViewDelegate, MyInteractorDelegate {

// Requires to create a new instance
MyPresenterImpl._();

// Bind states with bound functions
factory MyHomePresenterImpl() => _$BoundMyPresenterImpl();

// Manually declare a state, will skip it from generating
final incrementButtonDidTap = BehaviorSubject<void>();

// incrementButtonDidTap state will be bound to this function
void $counterDidIncrement() {}
}
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.