Skip to content

Commit ad193e3

Browse files
committed
added export in asyncBind
1 parent 62a782e commit ad193e3

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

flutter_modular/lib/src/core/models/bind.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ class BindEmpty extends Bind<Object> {
6464
class AsyncBind<T extends Object> extends Bind<Future<T>> {
6565
final Future<T> Function(Inject i) asyncInject;
6666

67-
AsyncBind(this.asyncInject) : super(asyncInject);
67+
///export bind for others modules
68+
final bool export;
69+
70+
AsyncBind(this.asyncInject, {this.export = false}) : super(asyncInject, export: export);
6871

6972
Future<T> resolveAsyncBind() async {
7073
final bind = await asyncInject(Inject());
@@ -73,6 +76,6 @@ class AsyncBind<T extends Object> extends Bind<Future<T>> {
7376

7477
Future<Bind<T>> converToAsyncBind() async {
7578
final bindValue = await resolveAsyncBind();
76-
return Bind<T>((i) => bindValue);
79+
return Bind<T>((i) => bindValue, export: export);
7780
}
7881
}

flutter_modular/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_modular
22
description: Smart project structure with dependency injection and route management
3-
version: 3.1.1
3+
version: 3.2.0
44
homepage: https://github.com/Flutterando/modular
55

66
environment:

0 commit comments

Comments
 (0)