Skip to content

Commit

Permalink
Flutter 2.5.0 (#17)
Browse files Browse the repository at this point in the history
* deps

* readme
  • Loading branch information
hoc081098 authored Sep 12, 2021
1 parent 9088177 commit 90e2af1
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 54 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@

## Download apk [here](https://nightly.link/hoc081098/node-auth-flutter-BLoC-pattern-RxDart/workflows/flutter/master/app.zip)

## Flutter version: channel beta
## Flutter version: channel stable

```yaml
environment:
sdk: ">=2.14.0-0 <3.0.0"
flutter: ">=2.4.0-0"
sdk: ">=2.14.0 <3.0.0"
flutter: ">=2.5.0"
```
```shell
Flutter 2.4.0-4.2.pre • channel beta • https://github.com/flutter/flutter.git
Framework • revision f18b9281c2 (4 weeks ago) • 2021-07-22 14:08:30 -0700
Engine • revision 844c29f42a
Tools • Dart 2.14.0 (build 2.14.0-301.2.beta)
Flutter 2.5.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 4cc385b4b8 (5 days ago) • 2021-09-07 23:01:49 -0700
Engine • revision f0826da7ef
Tools • Dart 2.14.0
```

## Screenshots
Expand Down
7 changes: 6 additions & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@ analyzer:

linter:
rules:
- prefer_final_locals
- prefer_final_locals
# https://github.com/dart-lang/lints#migrating-from-packagepedantic
- always_declare_return_types
- prefer_single_quotes
- unawaited_futures
- unsafe_html
5 changes: 2 additions & 3 deletions lib/pages/home/change_password/change_password_bloc.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'dart:async';

import 'package:disposebag/disposebag.dart';
import 'package:distinct_value_connectable_stream/distinct_value_connectable_stream.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_bloc_pattern/flutter_bloc_pattern.dart';
import 'package:node_auth/domain/usecases/change_password_use_case.dart';
Expand All @@ -27,7 +26,7 @@ class ChangePasswordBloc extends DisposeCallbackBaseBloc {
final Function1<String, void> newPasswordChanged;

/// Output stream
final DistinctValueStream<ChangePasswordState> changePasswordState$;
final StateStream<ChangePasswordState> changePasswordState$;
final Stream<String?> passwordError$;
final Stream<String?> newPasswordError$;

Expand Down Expand Up @@ -72,7 +71,7 @@ class ChangePasswordBloc extends DisposeCallbackBaseBloc {
.where((isValid) => isValid)
.withLatestFrom(both$, (_, Tuple2<String, String> both) => both)
.exhaustMap((both) => _performChangePassword(changePassword, both))
.publishValueDistinct(ChangePasswordState((b) => b..isLoading = false));
.publishState(ChangePasswordState((b) => b..isLoading = false));

final passwordError$ = both$
.map((tuple) {
Expand Down
5 changes: 2 additions & 3 deletions lib/pages/home/home_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import 'dart:async';
import 'dart:io';

import 'package:disposebag/disposebag.dart';
import 'package:distinct_value_connectable_stream/distinct_value_connectable_stream.dart';
import 'package:flutter_bloc_pattern/flutter_bloc_pattern.dart';
import 'package:image_picker/image_picker.dart';
import 'package:node_auth/domain/models/auth_state.dart';
Expand All @@ -24,7 +23,7 @@ class HomeBloc extends DisposeCallbackBaseBloc {
final Function0<void> logout;

/// Output stream
final DistinctValueStream<AuthenticationState?> authState$;
final StateStream<AuthenticationState?> authState$;
final Stream<HomeMessage> message$;

HomeBloc._({
Expand Down Expand Up @@ -68,7 +67,7 @@ class HomeBloc extends DisposeCallbackBaseBloc {
.switchMap(uploadImage.call)
.map(_resultToChangeAvatarMessage);

final authState$ = authenticationState$.publishValueDistinct(null);
final authState$ = authenticationState$.publishState(null);

final message$ = Rx.merge([logoutMessage$, updateAvatarMessage$]).publish();

Expand Down
6 changes: 3 additions & 3 deletions lib/pages/reset_password/reset_password_page.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'dart:async';

import 'package:distinct_value_connectable_stream/distinct_value_connectable_stream.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc_pattern/flutter_bloc_pattern.dart';
import 'package:flutter_disposebag/flutter_disposebag.dart';
Expand All @@ -10,6 +9,7 @@ import 'package:node_auth/domain/usecases/send_reset_password_email_use_case.dar
import 'package:node_auth/pages/reset_password/input_token/input_token_and_reset_password.dart';
import 'package:node_auth/pages/reset_password/send_email/send_email.dart';
import 'package:rxdart/rxdart.dart';
import 'package:rxdart_ext/rxdart_ext.dart';

class ResetPasswordPage extends StatefulWidget {
static const routeName = '/reset_password_page';
Expand All @@ -23,7 +23,7 @@ class ResetPasswordPage extends StatefulWidget {
class _ResetPasswordPageState extends State<ResetPasswordPage>
with SingleTickerProviderStateMixin<ResetPasswordPage>, DisposeBagMixin {
final requestEmailS = StreamController<void>(sync: true);
late final DistinctValueStream<bool> requestEmail$;
late final StateStream<bool> requestEmail$;

late final AnimationController animationController;
late final Animation<Offset> animationPosition;
Expand Down Expand Up @@ -84,7 +84,7 @@ class _ResetPasswordPageState extends State<ResetPasswordPage>
.doOnData((requestEmailPage) => requestEmailPage
? animationController.reverse()
: animationController.forward())
.publishValueDistinct(true)
.publishState(true)
..connect().disposedBy(bag);
requestEmailS.disposedBy(bag);
}
Expand Down
43 changes: 18 additions & 25 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ packages:
name: _fe_analyzer_shared
url: "https://pub.dartlang.org"
source: hosted
version: "22.0.0"
version: "25.0.0"
analyzer:
dependency: "direct dev"
description:
name: analyzer
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.2"
version: "2.2.0"
args:
dependency: transitive
description:
Expand All @@ -28,7 +28,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.7.0"
version: "2.8.1"
boolean_selector:
dependency: transitive
description:
Expand Down Expand Up @@ -70,7 +70,7 @@ packages:
name: build_runner
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.2"
build_runner_core:
dependency: transitive
description:
Expand All @@ -91,14 +91,14 @@ packages:
name: built_value
url: "https://pub.dartlang.org"
source: hosted
version: "8.1.1"
version: "8.1.2"
built_value_generator:
dependency: "direct dev"
description:
name: built_value_generator
url: "https://pub.dartlang.org"
source: hosted
version: "8.1.1"
version: "8.1.2"
characters:
dependency: transitive
description:
Expand Down Expand Up @@ -182,7 +182,7 @@ packages:
name: dart_style
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.1.0"
did_change_dependencies:
dependency: "direct main"
description:
Expand All @@ -197,13 +197,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.0"
distinct_value_connectable_stream:
dependency: "direct main"
description:
name: distinct_value_connectable_stream
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
fake_async:
dependency: transitive
description:
Expand Down Expand Up @@ -337,7 +330,7 @@ packages:
name: image_picker
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.3+1"
version: "0.8.4"
image_picker_for_web:
dependency: transitive
description:
Expand All @@ -351,7 +344,7 @@ packages:
name: image_picker_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.0"
version: "2.4.1"
io:
dependency: transitive
description:
Expand Down Expand Up @@ -512,35 +505,35 @@ packages:
name: rx_shared_preferences
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.2.0"
rx_storage:
dependency: transitive
description:
name: rx_storage
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0"
rxdart:
dependency: "direct main"
description:
name: rxdart
url: "https://pub.dartlang.org"
source: hosted
version: "0.27.1"
version: "0.27.2"
rxdart_ext:
dependency: "direct main"
description:
name: rxdart_ext
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.1"
version: "0.1.2"
shared_preferences:
dependency: "direct main"
description:
name: shared_preferences
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.6"
version: "2.0.7"
shared_preferences_linux:
dependency: transitive
description:
Expand Down Expand Up @@ -601,7 +594,7 @@ packages:
name: source_gen
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
version: "1.1.0"
source_span:
dependency: transitive
description:
Expand Down Expand Up @@ -650,7 +643,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.1"
version: "0.4.2"
timing:
dependency: transitive
description:
Expand Down Expand Up @@ -715,5 +708,5 @@ packages:
source: hosted
version: "3.1.0"
sdks:
dart: ">=2.14.0-0 <3.0.0"
flutter: ">=2.4.0-0"
dart: ">=2.14.0 <3.0.0"
flutter: ">=2.5.0"
23 changes: 11 additions & 12 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ publish_to: 'none'
version: 3.1.1+5

environment:
sdk: ">=2.14.0-0 <3.0.0"
flutter: ">=2.4.0-0"
sdk: ">=2.14.0 <3.0.0"
flutter: ">=2.5.0"

dependencies:
flutter:
Expand All @@ -16,29 +16,28 @@ dependencies:

path: ^1.8.0
http: ^0.13.3
built_value: ^8.1.1
built_value: ^8.1.2
tuple: ^2.0.0
rxdart: ^0.27.1
image_picker: ^0.8.3+1
shared_preferences: ^2.0.6
rxdart: ^0.27.2
image_picker: ^0.8.4
shared_preferences: ^2.0.7
octo_image: ^1.0.0+1

distinct_value_connectable_stream: ^1.3.0
flutter_provider: ^2.0.0
rx_shared_preferences: ^2.1.0
rx_shared_preferences: ^2.2.0
disposebag: ^1.5.0
flutter_disposebag: ^1.1.0
flutter_bloc_pattern: ^2.1.1
rxdart_ext: ^0.1.1
rxdart_ext: ^0.1.2
did_change_dependencies: ^1.0.0

dev_dependencies:
plugin_platform_interface: ^2.0.1
flutter_test:
sdk: flutter
build_runner: ^2.0.0
built_value_generator: ^8.1.1
analyzer: ^2.0.0
build_runner: ^2.1.2
built_value_generator: ^8.1.2
analyzer: ^2.2.0
flutter_lints: ^1.0.4

flutter:
Expand Down

0 comments on commit 90e2af1

Please sign in to comment.