Skip to content

Commit a63d607

Browse files
Merge pull request #49 from bahricanyesil/develop
Ready to publish v1.4.0
2 parents 214da95 + 4da8c81 commit a63d607

20 files changed

Lines changed: 868 additions & 484 deletions

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
# Versions
2+
3+
## [1.4.0] - 12.02.2022
4+
5+
* Extracted main components as widgets
6+
* Enabled custom ordering of the screen elements
7+
* Wrapped most elements with padding to enable custom margins around the components
8+
* Collected auth operations in auth provider and minimized business on view files
9+
* Optimizations on example app
10+
* Screen size adjustments
11+
212
## [1.3.0] - 28.01.2022
313

414
* Loading indicators are integrated to the buttons instead of dialogs.

analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ linter:
6666
- empty_statements
6767
- exhaustive_cases
6868
- file_names
69-
- flutter_style_todos
69+
# - flutter_style_todos
7070
- hash_and_equals
7171
- implementation_imports
7272
- invariant_booleans

example/lib/main.dart

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import 'package:flutter/material.dart';
21
import 'package:animated_login/animated_login.dart';
3-
42
import 'package:async/async.dart';
3+
import 'package:flutter/material.dart';
54

65
import 'dialog_builders.dart';
76
import 'login_functions.dart';
@@ -91,11 +90,15 @@ class _LoginScreenState extends State<LoginScreen> {
9190
languageOptions: _languageOptions,
9291
selectedLanguage: language,
9392
initialMode: currentMode,
94-
onAuthModeChange: (AuthMode newMode) => currentMode = newMode,
93+
onAuthModeChange: (AuthMode newMode) async {
94+
currentMode = newMode;
95+
await _operation?.cancel();
96+
},
9597
);
9698
}
9799

98100
Future<String?> _authOperation(Future<String?> func) async {
101+
await _operation?.cancel();
99102
_operation = CancelableOperation.fromFuture(func);
100103
final String? res = await _operation?.valueOrCancellation();
101104
if (_operation?.isCompleted == true && res == null) {
@@ -134,6 +137,8 @@ class _LoginScreenState extends State<LoginScreen> {
134137
languageDialogTheme: LanguageDialogTheme(
135138
optionMargin: EdgeInsets.symmetric(horizontal: 80)),
136139
),
140+
loadingSocialButtonColor: Colors.blue,
141+
loadingButtonColor: Colors.white,
137142
);
138143

139144
/// You can adjust the colors, text styles, button styles, borders
@@ -147,6 +152,19 @@ class _LoginScreenState extends State<LoginScreen> {
147152
// actionButtonStyle: ButtonStyle(
148153
// foregroundColor: MaterialStateProperty.all(Colors.blue),
149154
// ),
155+
// animatedComponentOrder: const <AnimatedComponent>[
156+
// AnimatedComponent(component: LoginComponents.logo),
157+
// AnimatedComponent(component: LoginComponents.title),
158+
// AnimatedComponent(component: LoginComponents.description),
159+
// AnimatedComponent(component: LoginComponents.formTitle),
160+
// AnimatedComponent(component: LoginComponents.socialLogins),
161+
// AnimatedComponent(component: LoginComponents.useEmail),
162+
// AnimatedComponent(component: LoginComponents.form),
163+
// AnimatedComponent(component: LoginComponents.notHaveAnAccount),
164+
// AnimatedComponent(component: LoginComponents.forgotPassword),
165+
// AnimatedComponent(component: LoginComponents.changeActionButton),
166+
// AnimatedComponent(component: LoginComponents.actionButton),
167+
// ],
150168
);
151169

152170
LoginTexts get _loginTexts => LoginTexts(
@@ -179,6 +197,7 @@ class _LoginScreenState extends State<LoginScreen> {
179197
];
180198

181199
Future<String?> _socialCallback(String type) async {
200+
await _operation?.cancel();
182201
_operation = CancelableOperation.fromFuture(
183202
LoginFunctions(context).socialLogin(type));
184203
final String? res = await _operation?.valueOrCancellation();

example/pubspec.lock

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ packages:
77
path: ".."
88
relative: true
99
source: path
10-
version: "1.3.0"
10+
version: "1.4.0"
1111
animations:
1212
dependency: transitive
1313
description:
@@ -102,6 +102,13 @@ packages:
102102
url: "https://pub.dartlang.org"
103103
source: hosted
104104
version: "0.12.11"
105+
material_color_utilities:
106+
dependency: transitive
107+
description:
108+
name: material_color_utilities
109+
url: "https://pub.dartlang.org"
110+
source: hosted
111+
version: "0.1.3"
105112
meta:
106113
dependency: transitive
107114
description:
@@ -176,7 +183,7 @@ packages:
176183
name: test_api
177184
url: "https://pub.dartlang.org"
178185
source: hosted
179-
version: "0.4.3"
186+
version: "0.4.8"
180187
typed_data:
181188
dependency: transitive
182189
description:

0 commit comments

Comments
 (0)