From ad193e3e14a8f51cd49a559a6d171dfa92092984 Mon Sep 17 00:00:00 2001 From: Jacob Moura Date: Fri, 30 Apr 2021 11:20:20 -0300 Subject: [PATCH] added export in asyncBind --- flutter_modular/lib/src/core/models/bind.dart | 7 +++++-- flutter_modular/pubspec.yaml | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/flutter_modular/lib/src/core/models/bind.dart b/flutter_modular/lib/src/core/models/bind.dart index c82a2ec4..16c10348 100644 --- a/flutter_modular/lib/src/core/models/bind.dart +++ b/flutter_modular/lib/src/core/models/bind.dart @@ -64,7 +64,10 @@ class BindEmpty extends Bind { class AsyncBind extends Bind> { final Future Function(Inject i) asyncInject; - AsyncBind(this.asyncInject) : super(asyncInject); + ///export bind for others modules + final bool export; + + AsyncBind(this.asyncInject, {this.export = false}) : super(asyncInject, export: export); Future resolveAsyncBind() async { final bind = await asyncInject(Inject()); @@ -73,6 +76,6 @@ class AsyncBind extends Bind> { Future> converToAsyncBind() async { final bindValue = await resolveAsyncBind(); - return Bind((i) => bindValue); + return Bind((i) => bindValue, export: export); } } diff --git a/flutter_modular/pubspec.yaml b/flutter_modular/pubspec.yaml index eb35d601..d9316515 100644 --- a/flutter_modular/pubspec.yaml +++ b/flutter_modular/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_modular description: Smart project structure with dependency injection and route management -version: 3.1.1 +version: 3.2.0 homepage: https://github.com/Flutterando/modular environment: