From 7eafcc74593b8a483e7d0087ce9eddb9345e30f4 Mon Sep 17 00:00:00 2001 From: Gabriel Duss Date: Mon, 21 Oct 2024 16:50:42 +0200 Subject: [PATCH] CupertinoNavigationSplitView padding added --- example/ios/Flutter/AppFrameworkInfo.plist | 2 +- example/ios/Runner.xcodeproj/project.pbxproj | 8 +-- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- example/ios/Runner/AppDelegate.swift | 2 +- example/pubspec.lock | 72 ++++++++++++------- .../cupertino_navigation_split_view.dart | 27 ++++--- pubspec.yaml | 3 +- 7 files changed, 72 insertions(+), 44 deletions(-) diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist index 9625e10..7c56964 100644 --- a/example/ios/Flutter/AppFrameworkInfo.plist +++ b/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 11.0 + 12.0 diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index bfff5d0..a45bb21 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -127,7 +127,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -275,7 +275,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -353,7 +353,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -402,7 +402,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index c87d15a..5e31d3d 100644 --- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ =3.0.0-0 <4.0.0" - flutter: ">=1.17.0" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/lib/widgets/cupertino_navigation_split_view.dart b/lib/widgets/cupertino_navigation_split_view.dart index 7a27b69..702f49b 100644 --- a/lib/widgets/cupertino_navigation_split_view.dart +++ b/lib/widgets/cupertino_navigation_split_view.dart @@ -12,15 +12,17 @@ class CupertinoNavigationSplitView extends StatefulWidget { final CupertinoSidebar? sidebar; final CupertinoSidebar content; final Widget detail; + final EdgeInsetsGeometry sidebarIconPadding; - const CupertinoNavigationSplitView({ - Key? key, - this.sidebar, - required this.content, - this.style = NavigationViewStyle.automatic, - this.visibility = NavigationSplitViewVisibility.automatic, - required this.detail, - }) : super(key: key); + const CupertinoNavigationSplitView( + {Key? key, + this.sidebar, + required this.content, + this.style = NavigationViewStyle.automatic, + this.visibility = NavigationSplitViewVisibility.automatic, + required this.detail, + this.sidebarIconPadding = const EdgeInsets.all(0)}) + : super(key: key); @override State createState() => _CupertinoNavigationSplitViewState(); @@ -154,9 +156,12 @@ class _CupertinoNavigationSplitViewState extends State=2.17.1 <3.0.0"