Skip to content

Commit

Permalink
Merge pull request #55 from cedvdb/fix_alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-melnyk authored Nov 5, 2024
2 parents aaf5702 + ffc2c93 commit 581f676
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 43 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.3.7

* Align child window to the left even when scaled.

## 1.3.6

* Check context mount status.
Expand Down
26 changes: 9 additions & 17 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
url: "https://pub.dev"
source: hosted
version: "1.17.2"
version: "1.19.0"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -28,28 +28,28 @@ packages:
path: ".."
relative: true
source: path
version: "1.3.5"
version: "1.3.6"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
url: "https://pub.dev"
source: hosted
version: "0.5.0"
version: "0.11.1"
meta:
dependency: transitive
description:
name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.15.0"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
version: "0.0.0"
vector_math:
dependency: transitive
description:
Expand All @@ -58,14 +58,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
web:
dependency: transitive
description:
name: web
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
url: "https://pub.dev"
source: hosted
version: "0.1.4-beta"
sdks:
dart: ">=3.1.0-185.0.dev <4.0.0"
dart: ">=3.4.0 <4.0.0"
flutter: ">=3.7.3"
17 changes: 10 additions & 7 deletions lib/src/widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ class _AdvancedDrawerState extends State<AdvancedDrawer>
textDirection:
widget.rtlOpening ? TextDirection.rtl : TextDirection.ltr,
child: ScaleTransition(
alignment: widget.rtlOpening
? Alignment.centerRight
: Alignment.centerLeft,
scale: _childScaleAnimation,
child: Builder(
builder: (_) {
Expand Down Expand Up @@ -246,14 +249,14 @@ class _AdvancedDrawerState extends State<AdvancedDrawer>
}

void _handleControllerChanged() {
// Check if the widget is still mounted
if (context.mounted) {
// If the value of _controller is visible, forward the animation; otherwise, reverse it
_controller.value.visible
? _animationController.forward()
: _animationController.reverse();
// Check if the widget is still mounted
if (context.mounted) {
// If the value of _controller is visible, forward the animation; otherwise, reverse it
_controller.value.visible
? _animationController.forward()
: _animationController.reverse();
}
}
}

void _handleDragStart(DragStartDetails details) {
_captured = true;
Expand Down
28 changes: 10 additions & 18 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ packages:
dependency: transitive
description:
name: characters
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
url: "https://pub.dev"
source: hosted
version: "1.2.1"
version: "1.3.0"
collection:
dependency: transitive
description:
name: collection
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
url: "https://pub.dev"
source: hosted
version: "1.17.0"
version: "1.19.0"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -30,14 +30,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.4"
js:
dependency: transitive
description:
name: js
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
url: "https://pub.dev"
source: hosted
version: "0.6.5"
lints:
dependency: transitive
description:
Expand All @@ -50,23 +42,23 @@ packages:
dependency: transitive
description:
name: material_color_utilities
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
url: "https://pub.dev"
source: hosted
version: "0.2.0"
version: "0.11.1"
meta:
dependency: transitive
description:
name: meta
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
url: "https://pub.dev"
source: hosted
version: "1.8.0"
version: "1.15.0"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
version: "0.0.0"
vector_math:
dependency: transitive
description:
Expand All @@ -76,4 +68,4 @@ packages:
source: hosted
version: "2.1.4"
sdks:
dart: ">=2.17.0-0 <3.0.0"
dart: ">=3.4.0 <4.0.0"
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_advanced_drawer
description: An advanced drawer widget, that can be fully customized with size, text, color, radius of corners.
version: 1.3.6
version: 1.3.7
homepage: https://github.com/alex-melnyk/flutter_advanced_drawer
repository: https://github.com/alex-melnyk/flutter_advanced_drawer
issue_tracker: https://github.com/alex-melnyk/flutter_advanced_drawer/issues
Expand Down

0 comments on commit 581f676

Please sign in to comment.