Skip to content

Commit

Permalink
Merge pull request #736 from Flutterando/publish-modular-5.0.3
Browse files Browse the repository at this point in the history
feat: prepare to publish
  • Loading branch information
AlvaroVasconcelos authored Jun 3, 2022
2 parents 48c3a8d + fc406ce commit 3567303
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 11 deletions.
5 changes: 5 additions & 0 deletions flutter_modular/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
16 changes: 16 additions & 0 deletions flutter_modular/lib/src/presenter/models/bind.dart
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,22 @@ class AsyncBind<T extends Object> extends Bind<Future<T>>
return Bind<T>((i) => bindValue,
export: export, alwaysSerialized: true, onDispose: _localOnDispose);
}

@override
AsyncBind<T> copyWith(
{Future<T> Function(Injector i)? factoryFunction,
bool? isSingleton,
bool? isLazy,
bool? export,
bool? isScoped,
bool? alwaysSerialized,
void Function(Future<T> value)? onDispose,
Function(Future<T> value)? selector}) {
return AsyncBind(
factoryFunction ?? this.factoryFunction,
export: export ?? this.export,
);
}
}

/// Specific instance for modular_codegen
Expand Down
10 changes: 2 additions & 8 deletions flutter_modular/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
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:
sdk: ">=2.12.0 <3.0.0"

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
Expand Down
6 changes: 6 additions & 0 deletions flutter_modular/test/src/presenter/models/bind_test.dart
Original file line number Diff line number Diff line change
@@ -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', () {
Expand Down Expand Up @@ -42,4 +43,9 @@ void main() {
final bind = BindInject((i) => 'instance');
expect(bind.copyWith(), isA<Bind>());
});

test('copyWith asyncBind', () async {
final asyncBind = AsyncBind((i) async => 'instance');
expect(asyncBind.copyWith(), isA<AsyncBindContract>());
});
}
3 changes: 3 additions & 0 deletions modular_core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions modular_core/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions modular_interfaces/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion modular_interfaces/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 3567303

Please sign in to comment.