From 2cd85a861a55220eda6971c085ab74a39858ad4e Mon Sep 17 00:00:00 2001 From: Vittor Date: Thu, 22 Feb 2024 00:47:18 -0400 Subject: [PATCH 1/6] feat: useGestures or remove gestures --- example/pubspec.lock | 124 +++++++++++++++++++++--------- lib/src/slider.dart | 92 +++++++++++++---------- pubspec.lock | 175 ++++++++++++++++++++++--------------------- pubspec.yaml | 2 +- 4 files changed, 231 insertions(+), 162 deletions(-) diff --git a/example/pubspec.lock b/example/pubspec.lock index 7a806b9..6335f14 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,49 +5,56 @@ packages: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" source: hosted - version: "2.9.0" + version: "2.11.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.3.0" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted version: "1.1.1" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.18.0" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.dartlang.org" + sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be + url: "https://pub.dev" source: hosted version: "1.0.5" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted version: "1.3.1" flutter: @@ -59,7 +66,8 @@ packages: dependency: "direct dev" description: name: flutter_lints - url: "https://pub.dartlang.org" + sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c + url: "https://pub.dev" source: hosted version: "2.0.1" flutter_slider_drawer: @@ -68,47 +76,76 @@ packages: path: ".." relative: true source: path - version: "2.1.1" + version: "2.1.3" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.dev" + source: hosted + version: "10.0.0" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.dev" + source: hosted + version: "2.0.1" lints: dependency: transitive description: name: lints - url: "https://pub.dartlang.org" + sha256: "5cfd6509652ff5e7fe149b6df4859e687fca9048437857cb2e65c8d780f396e3" + url: "https://pub.dev" source: hosted version: "2.0.0" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" source: hosted - version: "0.12.12" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - url: "https://pub.dartlang.org" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + url: "https://pub.dev" source: hosted - version: "0.1.5" + version: "0.8.0" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.11.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.9.0" sky_engine: dependency: transitive description: flutter @@ -118,50 +155,65 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.10.0" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted version: "1.2.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + url: "https://pub.dev" source: hosted - version: "0.4.12" + version: "0.6.1" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + url: "https://pub.dev" + source: hosted + version: "13.0.0" sdks: - dart: ">=2.17.6 <3.0.0" + dart: ">=3.2.0-0 <4.0.0" diff --git a/lib/src/slider.dart b/lib/src/slider.dart index 1ac125c..9af9785 100644 --- a/lib/src/slider.dart +++ b/lib/src/slider.dart @@ -92,20 +92,26 @@ class SliderDrawer extends StatefulWidget { /// final bool isCupertino; - const SliderDrawer( - {Key? key, - required this.slider, - required this.child, - this.isDraggable = true, - this.animationDuration = 400, - this.sliderOpenSize = 265, - this.splashColor = const Color(0xffffff), - this.sliderCloseSize = 0, - this.slideDirection = SlideDirection.LEFT_TO_RIGHT, - this.sliderBoxShadow, - this.appBar = const SliderAppBar(), - this.isCupertino = false}) - : super(key: key); + ///[bool] choose whether to use the gestures, if there is a conflict in the application body. + /// + /// The default is true + final bool useGestures; + + const SliderDrawer({ + Key? key, + required this.slider, + required this.child, + this.isDraggable = true, + this.animationDuration = 400, + this.sliderOpenSize = 265, + this.splashColor = const Color(0xffffff), + this.sliderCloseSize = 0, + this.slideDirection = SlideDirection.LEFT_TO_RIGHT, + this.sliderBoxShadow, + this.appBar = const SliderAppBar(), + this.isCupertino = false, + this.useGestures = true, + }) : super(key: key); @override SliderDrawerState createState() => SliderDrawerState(); @@ -163,6 +169,28 @@ class SliderDrawerState extends State @override Widget build(BuildContext context) { return LayoutBuilder(builder: (context, constrain) { + Widget mainBody = Container( + width: double.infinity, + height: double.infinity, + color: _appBarColor, + child: Column( + children: [ + if (widget.appBar != null && widget.appBar is SliderAppBar) + SAppBar( + isCupertino: widget.isCupertino, + slideDirection: widget.slideDirection, + onTap: () => toggle(), + animationController: _animationDrawerController, + splashColor: widget.splashColor, + sliderAppBar: widget.appBar as SliderAppBar, + ), + if (widget.appBar != null && widget.appBar is! SliderAppBar) + widget.appBar!, + Expanded(child: widget.child), + ], + ), + ); + return SizedBox( child: Stack(children: [ ///Menu @@ -193,33 +221,15 @@ class SliderDrawerState extends State child: child, ); }, - child: GestureDetector( - onHorizontalDragStart: _onHorizontalDragStart, - onHorizontalDragEnd: _onHorizontalDragEnd, - onHorizontalDragUpdate: (detail) => - _onHorizontalDragUpdate(detail, constrain), - child: Container( - width: double.infinity, - height: double.infinity, - color: _appBarColor, - child: Column( - children: [ - if (widget.appBar != null && widget.appBar is SliderAppBar) - SAppBar( - isCupertino: widget.isCupertino, - slideDirection: widget.slideDirection, - onTap: () => toggle(), - animationController: _animationDrawerController, - splashColor: widget.splashColor, - sliderAppBar: widget.appBar as SliderAppBar, - ), - if (widget.appBar != null && widget.appBar is! SliderAppBar) - widget.appBar!, - Expanded(child: widget.child), - ], - ), - ), - ), + child: (widget.useGestures) + ? GestureDetector( + onHorizontalDragStart: _onHorizontalDragStart, + onHorizontalDragEnd: _onHorizontalDragEnd, + onHorizontalDragUpdate: (detail) => + _onHorizontalDragUpdate(detail, constrain), + child: mainBody, + ) + : mainBody, ), ])); }); diff --git a/pubspec.lock b/pubspec.lock index 97283e8..6e9c9b3 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,62 +1,54 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: - archive: - dependency: transitive - description: - name: archive - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.13" - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "1.6.0" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.11.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.0.0" - charcode: + version: "2.1.1" + characters: dependency: transitive description: - name: charcode - url: "https://pub.dartlang.org" + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" source: hosted - version: "1.1.3" - collection: + version: "1.3.0" + clock: dependency: transitive description: - name: collection - url: "https://pub.dartlang.org" + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted - version: "1.14.12" - convert: + version: "1.1.1" + collection: dependency: transitive description: - name: convert - url: "https://pub.dartlang.org" + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" source: hosted - version: "2.1.1" - crypto: + version: "1.18.0" + fake_async: dependency: transitive description: - name: crypto - url: "https://pub.dartlang.org" + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "1.3.1" flutter: dependency: "direct main" description: flutter @@ -67,48 +59,62 @@ packages: description: flutter source: sdk version: "0.0.0" - image: + leak_tracker: dependency: transitive description: - name: image - url: "https://pub.dartlang.org" + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.dev" source: hosted - version: "2.1.12" - matcher: + version: "10.0.0" + leak_tracker_flutter_testing: dependency: transitive description: - name: matcher - url: "https://pub.dartlang.org" + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.dev" source: hosted - version: "0.12.6" - meta: + version: "2.0.1" + leak_tracker_testing: dependency: transitive description: - name: meta - url: "https://pub.dartlang.org" + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.dev" source: hosted - version: "1.1.8" - path: + version: "2.0.1" + matcher: dependency: transitive description: - name: path - url: "https://pub.dartlang.org" + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + url: "https://pub.dev" source: hosted - version: "1.6.4" - petitparser: + version: "0.8.0" + meta: dependency: transitive description: - name: petitparser - url: "https://pub.dartlang.org" + name: meta + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + url: "https://pub.dev" source: hosted - version: "2.4.0" - quiver: + version: "1.11.0" + path: dependency: transitive description: - name: quiver - url: "https://pub.dartlang.org" + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "1.9.0" sky_engine: dependency: transitive description: flutter @@ -118,64 +124,65 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" source: hosted - version: "1.7.0" + version: "1.10.0" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" source: hosted - version: "1.9.3" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.1.2" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.2.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + url: "https://pub.dev" source: hosted - version: "0.2.15" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.6" + version: "0.6.1" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.0.8" - xml: + version: "2.1.4" + vm_service: dependency: transitive description: - name: xml - url: "https://pub.dartlang.org" + name: vm_service + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + url: "https://pub.dev" source: hosted - version: "3.6.1" + version: "13.0.0" sdks: - dart: ">=2.6.0 <3.0.0" + dart: ">=3.2.0-0 <4.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 92b8e20..1635c5e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_slider_drawer description: A Flutter package with custom implementation of the Slider Drawer Menu -version: 2.1.3 +version: 2.1.4 homepage: https://github.com/NikhilVadoliya/Flutter_slider_drawer issue_tracker: https://github.com/NikhilVadoliya/Flutter_slider_drawer/issues maintainer: Nikhil Vadoliya From 6ab13db6ac93a9bf45e3d9a6df76bb34a2f018e6 Mon Sep 17 00:00:00 2001 From: Vittor Date: Fri, 1 Mar 2024 01:29:09 -0400 Subject: [PATCH 2/6] fix: status bar padding wrong --- lib/src/helper/slider_app_bar.dart | 15 ++++++++++----- lib/src/slider.dart | 5 +++++ 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/lib/src/helper/slider_app_bar.dart b/lib/src/helper/slider_app_bar.dart index 598f177..0df4dbb 100644 --- a/lib/src/helper/slider_app_bar.dart +++ b/lib/src/helper/slider_app_bar.dart @@ -3,7 +3,7 @@ import 'package:flutter/widgets.dart'; class SliderAppBar extends StatelessWidget { /// [double] you can change appBar height by this parameter [appBarHeight] /// - final double appBarHeight; + final double? appBarHeight; /// [Widget] you can set appbar title by this parameter [title] /// @@ -39,12 +39,17 @@ class SliderAppBar extends StatelessWidget { final double drawerIconSize; const SliderAppBar({ - this.appBarHeight = 70, - this.title = const Text('AppBar', - style: TextStyle(fontWeight: FontWeight.w500, fontSize: 20)), + this.appBarHeight, + this.title = const Text( + 'AppBar', + style: TextStyle( + fontWeight: FontWeight.w500, + fontSize: 20, + ), + ), this.isTitleCenter = true, this.appBarColor = const Color(0xffffffff), - this.appBarPadding = const EdgeInsets.only(top: 24), + this.appBarPadding = EdgeInsets.zero, this.trailing, this.drawerIconColor = const Color(0xff2c2b2b), this.drawerIcon, diff --git a/lib/src/slider.dart b/lib/src/slider.dart index 9af9785..e8a19bb 100644 --- a/lib/src/slider.dart +++ b/lib/src/slider.dart @@ -175,6 +175,11 @@ class SliderDrawerState extends State color: _appBarColor, child: Column( children: [ + // Remove space status bar + SizedBox( + height: MediaQuery.of(context).viewPadding.top, + width: double.infinity, + ), if (widget.appBar != null && widget.appBar is SliderAppBar) SAppBar( isCupertino: widget.isCupertino, From c6bd76668a7511ba883e7313c77d0f3147783324 Mon Sep 17 00:00:00 2001 From: Vittor Date: Fri, 1 Mar 2024 01:29:30 -0400 Subject: [PATCH 3/6] fix: update gradle --- example/android/app/build.gradle | 67 +++++++++++++++++++ .../android/app/src/main/AndroidManifest.xml | 1 + example/android/build.gradle | 17 +---- .../gradle/wrapper/gradle-wrapper.properties | 2 +- example/android/settings.gradle | 31 ++++++--- pubspec.yaml | 2 +- 6 files changed, 95 insertions(+), 25 deletions(-) create mode 100644 example/android/app/build.gradle diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle new file mode 100644 index 0000000..3578f3e --- /dev/null +++ b/example/android/app/build.gradle @@ -0,0 +1,67 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +android { + namespace "com.example.example" + compileSdkVersion flutter.compileSdkVersion + ndkVersion flutter.ndkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "com.example.example" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + minSdkVersion 23 + targetSdkVersion flutter.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies {} diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 9b3997f..49f30d1 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -12,6 +12,7 @@ properties.load(reader) } + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "7.3.0" apply false + id "org.jetbrains.kotlin.android" version "1.7.10" apply false +} + +include ":app" diff --git a/pubspec.yaml b/pubspec.yaml index 1635c5e..70a5348 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_slider_drawer description: A Flutter package with custom implementation of the Slider Drawer Menu -version: 2.1.4 +version: 2.1.5 homepage: https://github.com/NikhilVadoliya/Flutter_slider_drawer issue_tracker: https://github.com/NikhilVadoliya/Flutter_slider_drawer/issues maintainer: Nikhil Vadoliya From 7ee626ae876978038749f320300f2fc2f47f12e0 Mon Sep 17 00:00:00 2001 From: Vittor Date: Fri, 1 Mar 2024 01:42:10 -0400 Subject: [PATCH 4/6] fix: appbar safe area --- lib/src/slider.dart | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/src/slider.dart b/lib/src/slider.dart index e8a19bb..aaa240d 100644 --- a/lib/src/slider.dart +++ b/lib/src/slider.dart @@ -181,13 +181,15 @@ class SliderDrawerState extends State width: double.infinity, ), if (widget.appBar != null && widget.appBar is SliderAppBar) - SAppBar( - isCupertino: widget.isCupertino, - slideDirection: widget.slideDirection, - onTap: () => toggle(), - animationController: _animationDrawerController, - splashColor: widget.splashColor, - sliderAppBar: widget.appBar as SliderAppBar, + SafeArea( + child: SAppBar( + isCupertino: widget.isCupertino, + slideDirection: widget.slideDirection, + onTap: () => toggle(), + animationController: _animationDrawerController, + splashColor: widget.splashColor, + sliderAppBar: widget.appBar as SliderAppBar, + ), ), if (widget.appBar != null && widget.appBar is! SliderAppBar) widget.appBar!, From 9c0c59282b4a82dd0b1e0d96c3b0b76e51c3a1a4 Mon Sep 17 00:00:00 2001 From: Vittor Date: Fri, 1 Mar 2024 01:52:08 -0400 Subject: [PATCH 5/6] fix: safearea --- lib/src/slider.dart | 5 ----- pubspec.yaml | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/src/slider.dart b/lib/src/slider.dart index aaa240d..ad5ff77 100644 --- a/lib/src/slider.dart +++ b/lib/src/slider.dart @@ -175,11 +175,6 @@ class SliderDrawerState extends State color: _appBarColor, child: Column( children: [ - // Remove space status bar - SizedBox( - height: MediaQuery.of(context).viewPadding.top, - width: double.infinity, - ), if (widget.appBar != null && widget.appBar is SliderAppBar) SafeArea( child: SAppBar( diff --git a/pubspec.yaml b/pubspec.yaml index 70a5348..72dd15f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_slider_drawer description: A Flutter package with custom implementation of the Slider Drawer Menu -version: 2.1.5 +version: 2.1.6 homepage: https://github.com/NikhilVadoliya/Flutter_slider_drawer issue_tracker: https://github.com/NikhilVadoliya/Flutter_slider_drawer/issues maintainer: Nikhil Vadoliya From d78441e1fbf47c50199937487e78abbfb4625187 Mon Sep 17 00:00:00 2001 From: Vittor Feitosa Date: Sat, 28 Dec 2024 18:29:52 -0400 Subject: [PATCH 6/6] chore: sync lib --- example/pubspec.lock | 47 ++++++++++++++++++++++---------------------- pubspec.lock | 45 +++++++++++++++++++++--------------------- 2 files changed, 47 insertions(+), 45 deletions(-) diff --git a/example/pubspec.lock b/example/pubspec.lock index 6335f14..d67ee8b 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -37,10 +37,10 @@ packages: dependency: transitive description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.0" cupertino_icons: dependency: "direct main" description: @@ -76,7 +76,7 @@ packages: path: ".." relative: true source: path - version: "2.1.3" + version: "2.1.6" flutter_test: dependency: "direct dev" description: flutter @@ -86,26 +86,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.7" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.8" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" lints: dependency: transitive description: @@ -126,18 +126,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.15.0" path: dependency: transitive description: @@ -150,7 +150,7 @@ packages: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_span: dependency: transitive description: @@ -163,10 +163,10 @@ packages: dependency: transitive description: name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "1.12.0" stream_channel: dependency: transitive description: @@ -179,10 +179,10 @@ packages: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" term_glyph: dependency: transitive description: @@ -195,10 +195,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.3" vector_math: dependency: transitive description: @@ -211,9 +211,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.3.0" sdks: - dart: ">=3.2.0-0 <4.0.0" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/pubspec.lock b/pubspec.lock index 6e9c9b3..461388f 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -37,10 +37,10 @@ packages: dependency: transitive description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.0" fake_async: dependency: transitive description: @@ -63,26 +63,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.7" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.8" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" matcher: dependency: transitive description: @@ -95,18 +95,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.15.0" path: dependency: transitive description: @@ -119,7 +119,7 @@ packages: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_span: dependency: transitive description: @@ -132,10 +132,10 @@ packages: dependency: transitive description: name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "1.12.0" stream_channel: dependency: transitive description: @@ -148,10 +148,10 @@ packages: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" term_glyph: dependency: transitive description: @@ -164,10 +164,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.3" vector_math: dependency: transitive description: @@ -180,9 +180,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.3.0" sdks: - dart: ">=3.2.0-0 <4.0.0" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54"