diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist index 4f8d4d24..8c6e5614 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 701e41f7..19943f7f 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 = 1430; + 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; @@ -357,7 +357,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; @@ -406,7 +406,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 b52b2e69..e67b2808 100644 --- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ with SingleTickerProviderStateMixin { // A SlidableAction can have an icon and/or a label. SlidableAction( onPressed: doNothing, - backgroundColor: Color(0xFFFE4A49), - foregroundColor: Colors.white, - icon: Icons.delete, + // backgroundColor: Color(0xFFFE4A49), + // foregroundColor: Colors.white, + // icon: Icons.delete, label: 'Delete', + labelStyle: TextStyle(color: Colors.red), ), SlidableAction( onPressed: doNothing, diff --git a/lib/src/actions.dart b/lib/src/actions.dart index 418a9fb8..9489df16 100644 --- a/lib/src/actions.dart +++ b/lib/src/actions.dart @@ -140,6 +140,8 @@ class SlidableAction extends StatelessWidget { this.icon, this.spacing = 4, this.label, + this.widget, + this.labelStyle, this.borderRadius = BorderRadius.zero, this.padding, }) : assert(flex > 0), @@ -164,6 +166,9 @@ class SlidableAction extends StatelessWidget { /// An icon to display above the [label]. final IconData? icon; + ///Custom Icon "widget" instead of icon + final Widget? widget; + /// The space between [icon] and [label] if both set. /// /// Defaults to 4. @@ -172,6 +177,9 @@ class SlidableAction extends StatelessWidget { /// A label to display below the [icon]. final String? label; + /// label style + final TextStyle? labelStyle; + /// Padding of the OutlinedButton final BorderRadius borderRadius; @@ -198,10 +206,14 @@ class SlidableAction extends StatelessWidget { children.add( Text( label!, + style: labelStyle, overflow: TextOverflow.ellipsis, ), ); } + if (widget != null) { + children.add(widget!); + } final child = children.length == 1 ? children.first