Skip to content

Commit 79ac76f

Browse files
Merge pull request #42 from bahricanyesil/develop
Ready for V1.2.1
2 parents 1db2587 + 1f173e6 commit 79ac76f

File tree

5 files changed

+27
-15
lines changed

5 files changed

+27
-15
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Versions
22

3+
## [1.2.1] - 27.01.2022
4+
5+
* Fixed the auth mode change behavior on mobile.
6+
* Optimized the spaces/paddings between form and action button for mobile.
7+
38
## [1.2.0] - 27.01.2022
49

510
* Optimized the use of AnimatedBuilder to avoid unnecessary rebuilds.

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ packages:
77
path: ".."
88
relative: true
99
source: path
10-
version: "1.2.0"
10+
version: "1.2.1"
1111
animations:
1212
dependency: transitive
1313
description:

lib/animated_login.dart

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -517,20 +517,19 @@ class __ViewState extends State<_View> with SingleTickerProviderStateMixin {
517517
auth.setIsReverse(welcomeTransitionAnimation.value <=
518518
context.read<LoginTheme>().formWidthRatio / 2);
519519
} else if (_forwardCheck) {
520-
auth.setIsReverse(!auth.isReverse);
520+
auth.setIsReverse(false);
521+
} else if (_reverseCheck) {
522+
auth.setIsReverse(true);
521523
}
522524
}
523525
});
524526
}
525527

526-
bool get _forwardCheck => _isLandscape
527-
? welcomeTransitionAnimation.value <=
528-
context.read<LoginTheme>().formWidthRatio / 2
529-
: welcomeTransitionAnimation.value <= -100 && _statusCheck;
528+
bool get _forwardCheck =>
529+
welcomeTransitionAnimation.value > 0 &&
530+
welcomeTransitionAnimation.status == AnimationStatus.forward;
530531

531-
bool get _statusCheck =>
532-
(welcomeTransitionAnimation.status == AnimationStatus.forward &&
533-
_isReverse) ||
534-
(welcomeTransitionAnimation.status == AnimationStatus.reverse &&
535-
!_isReverse);
532+
bool get _reverseCheck =>
533+
welcomeTransitionAnimation.value < 0 &&
534+
welcomeTransitionAnimation.status == AnimationStatus.reverse;
536535
}

lib/src/widgets/form_part.dart

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,14 +214,22 @@ class __FormPartState extends State<_FormPart> {
214214
loginTheme.spacingWithoutSocial ?? dynamicSize.height * 6,
215215
),
216216
_form,
217-
SizedBox(
218-
height: loginTheme.spacingFormAndAction ??
219-
dynamicSize.height * (_isLandscape ? 4 : 3)),
217+
SizedBox(height: loginTheme.spacingFormAndAction ?? _customSpace),
220218
_actionButton,
221219
],
222220
),
223221
);
224222

223+
double get _customSpace {
224+
double factor = 3;
225+
if (_isLandscape) {
226+
factor = 4;
227+
} else if (_isReverse) {
228+
factor = 0.5;
229+
}
230+
return dynamicSize.height * factor;
231+
}
232+
225233
List<Widget> get _socialLoginPart => <Widget>[
226234
SizedBox(height: dynamicSize.height * 2.5),
227235
_socialLoginOptions,

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: animated_login
22
description: Animated Login for Flutter. You can welcome your users with this beautiful animated screen that gives functionality for both login and sign up.
3-
version: 1.2.0
3+
version: 1.2.1
44
homepage: https://github.com/bahricanyesil/flutter-animated-login
55
repository: https://github.com/bahricanyesil/flutter-animated-login
66

0 commit comments

Comments
 (0)