diff --git a/templates/mutable/bloc.tmpl b/templates/mutable/bloc.tmpl index 52e1ae7..7ae35ab 100644 --- a/templates/mutable/bloc.tmpl +++ b/templates/mutable/bloc.tmpl @@ -6,6 +6,7 @@ import 'package:${appName}${relative}/index.dart'; class ${upperName}Bloc extends Bloc<${upperName}Event, ${upperName}State> { // todo: check singleton for logic in project + // use GetIt for DI in projct static final ${upperName}Bloc _${privateName}BlocSingleton = ${upperName}Bloc._internal(); factory ${upperName}Bloc() { return _${privateName}BlocSingleton; diff --git a/templates/mutable/screen.tmpl b/templates/mutable/screen.tmpl index 3c87ae9..c9e4301 100644 --- a/templates/mutable/screen.tmpl +++ b/templates/mutable/screen.tmpl @@ -34,7 +34,7 @@ class ${upperName}ScreenState extends State<${upperName}Screen> { @override Widget build(BuildContext context) { return BlocBuilder<${upperName}Bloc, ${upperName}State>( - bloc: widget._${privateName}Bloc, + cubit: widget._${privateName}Bloc, builder: ( BuildContext context, ${upperName}State currentState, diff --git a/templates/simple/screen.tmpl b/templates/simple/screen.tmpl index 8c86fef..5e7cc63 100644 --- a/templates/simple/screen.tmpl +++ b/templates/simple/screen.tmpl @@ -34,7 +34,7 @@ class ${upperName}ScreenState extends State<${upperName}Screen> { @override Widget build(BuildContext context) { return BlocBuilder<${upperName}Bloc, ${upperName}State>( - bloc: widget._${privateName}Bloc, + cubit: widget._${privateName}Bloc, builder: ( BuildContext context, ${upperName}State currentState,