diff --git a/flutter_modular/CHANGELOG.md b/flutter_modular/CHANGELOG.md index fa8a1bc1..cbc9ff9b 100644 --- a/flutter_modular/CHANGELOG.md +++ b/flutter_modular/CHANGELOG.md @@ -1,3 +1,8 @@ +## [5.0.3] - 2022-06-03 +- Fix [#713](https://github.com/Flutterando/modular/issues/713) +- Fix [#676](https://github.com/Flutterando/modular/issues/676) +- Fix [#632](https://github.com/Flutterando/modular/issues/632) + ## [5.0.2] - 2022-04-22 - Fix: Parse params in RouteOutlet ## [5.0.1] - 2022-04-22 diff --git a/flutter_modular/lib/src/presenter/models/bind.dart b/flutter_modular/lib/src/presenter/models/bind.dart index a53d7505..ed5174c5 100644 --- a/flutter_modular/lib/src/presenter/models/bind.dart +++ b/flutter_modular/lib/src/presenter/models/bind.dart @@ -126,6 +126,22 @@ class AsyncBind extends Bind> return Bind((i) => bindValue, export: export, alwaysSerialized: true, onDispose: _localOnDispose); } + + @override + AsyncBind copyWith( + {Future Function(Injector i)? factoryFunction, + bool? isSingleton, + bool? isLazy, + bool? export, + bool? isScoped, + bool? alwaysSerialized, + void Function(Future value)? onDispose, + Function(Future value)? selector}) { + return AsyncBind( + factoryFunction ?? this.factoryFunction, + export: export ?? this.export, + ); + } } /// Specific instance for modular_codegen diff --git a/flutter_modular/pubspec.yaml b/flutter_modular/pubspec.yaml index e646633d..d611f7ff 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: 5.0.2 +version: 5.0.3 homepage: https://github.com/Flutterando/modular environment: @@ -8,17 +8,11 @@ environment: dependencies: flutter_modular_annotations: ^0.0.2 - modular_core: ">=2.0.1 <3.0.0" + modular_core: ">=2.0.3+1 <3.0.0" meta: ">=1.3.0 <2.0.0" flutter: sdk: flutter -dependency_overrides: - modular_core: - path: ../modular_core - modular_interfaces: - path: ../modular_interfaces - dev_dependencies: flutter_lints: ^1.0.4 mocktail: ^0.1.4 diff --git a/flutter_modular/test/src/presenter/models/bind_test.dart b/flutter_modular/test/src/presenter/models/bind_test.dart index 2a88a7e4..8eb0a9d9 100644 --- a/flutter_modular/test/src/presenter/models/bind_test.dart +++ b/flutter_modular/test/src/presenter/models/bind_test.dart @@ -1,5 +1,6 @@ import 'package:flutter_modular/src/presenter/models/bind.dart'; import 'package:flutter_test/flutter_test.dart'; +import 'package:modular_core/modular_core.dart'; void main() { test('bind instance', () { @@ -42,4 +43,9 @@ void main() { final bind = BindInject((i) => 'instance'); expect(bind.copyWith(), isA()); }); + + test('copyWith asyncBind', () async { + final asyncBind = AsyncBind((i) async => 'instance'); + expect(asyncBind.copyWith(), isA()); + }); } diff --git a/modular_core/CHANGELOG.md b/modular_core/CHANGELOG.md index b7cdfe32..48607c84 100644 --- a/modular_core/CHANGELOG.md +++ b/modular_core/CHANGELOG.md @@ -1,3 +1,6 @@ +## 2.0.3+1 - 2022/06/02 +* feat: Added type propertie in removeBindContext + ## 2.0.1 - 2022/05/12 * Fix: Inject.get should return instance diff --git a/modular_core/pubspec.yaml b/modular_core/pubspec.yaml index b70be033..4e894c82 100644 --- a/modular_core/pubspec.yaml +++ b/modular_core/pubspec.yaml @@ -1,6 +1,6 @@ name: modular_core description: Smart project structure with dependency injection and route management -version: 2.0.1 +version: 2.0.3+1 homepage: https://github.com/Flutterando/modular environment: @@ -9,7 +9,7 @@ environment: dependencies: characters: ">=1.1.0 <2.0.0" meta: ">=1.3.0 <2.0.0" - modular_interfaces: ">=2.0.1 <3.0.0" + modular_interfaces: ">=2.0.2 <3.0.0" dev_dependencies: diff --git a/modular_interfaces/CHANGELOG.md b/modular_interfaces/CHANGELOG.md index bf019609..30a03ee7 100644 --- a/modular_interfaces/CHANGELOG.md +++ b/modular_interfaces/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.2 - 2022/06/02 + +- feat: Added Type propertie in removeBindContext(); + ## 2.0.1 - 2022/05/12 - Fix: Inject.get returns instance diff --git a/modular_interfaces/pubspec.yaml b/modular_interfaces/pubspec.yaml index 26960024..a72920f9 100644 --- a/modular_interfaces/pubspec.yaml +++ b/modular_interfaces/pubspec.yaml @@ -1,6 +1,6 @@ name: modular_interfaces description: Smart project structure with dependency injection and route management -version: 2.0.1 +version: 2.0.2 homepage: https://github.com/Flutterando/modular # homepage: https://www.example.com