Skip to content

Commit 3043300

Browse files
committed
Cleanup and bump to 3.1.1
1 parent be008a4 commit 3043300

28 files changed

+93
-118
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 3.1.1
2+
3+
### Fixed
4+
* An issue when having only one action pane set [#311](https://github.com/letsar/flutter_slidable/issues/311)
5+
* An issue with delete threshold [#230](https://github.com/letsar/flutter_slidable/issues/230)
6+
17
## 3.1.0
28

39
### Added

analysis_options.yaml

-12
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ linter:
1717
# We prefer having parameters in the same order as fields https://github.com/flutter/flutter/issues/10219
1818
always_put_required_named_parameters_first: false
1919

20-
# Depends on your needs
21-
always_require_non_null_named_parameters: false
22-
2320
# Conflicts with `omit_local_variable_types` and other rules.
2421
# As per Dart guidelines, we want to avoid unnecessary types to make the code
2522
# more readable.
@@ -48,9 +45,6 @@ linter:
4845
# We prefer having typedef (discussion in https://github.com/flutter/flutter/pull/16356)
4946
avoid_private_typedef_functions: false
5047

51-
# Useful in a lot of cases
52-
avoid_returning_null: false
53-
5448
# Can be useful to have a more readable code
5549
avoid_types_on_closure_parameters: false
5650

@@ -72,9 +66,6 @@ linter:
7266

7367
# This project doesn't use Flutter-style todos
7468
flutter_style_todos: false
75-
76-
# Experimental: Too many false positives: https://github.com/dart-lang/linter/issues/811
77-
invariant_booleans: false
7869

7970
# Can be useful to have a more readable code
8071
join_return_with_assignment: false
@@ -115,9 +106,6 @@ linter:
115106
# return, but that return is still complex enough that a "body" is worth it.
116107
prefer_expression_function_bodies: false
117108

118-
# False positives
119-
top_level_function_literal_block: false
120-
121109
# We don't want to enforce this rule now.
122110
sort_pub_dependencies: false
123111

example/ios/Flutter/AppFrameworkInfo.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>11.0</string>
24+
<string>12.0</string>
2525
</dict>
2626
</plist>

example/ios/Runner.xcodeproj/project.pbxproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
97C146E61CF9000F007C117D /* Project object */ = {
128128
isa = PBXProject;
129129
attributes = {
130-
LastUpgradeCheck = 1430;
130+
LastUpgradeCheck = 1510;
131131
ORGANIZATIONNAME = "";
132132
TargetAttributes = {
133133
97C146ED1CF9000F007C117D = {
@@ -275,7 +275,7 @@
275275
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
276276
GCC_WARN_UNUSED_FUNCTION = YES;
277277
GCC_WARN_UNUSED_VARIABLE = YES;
278-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
278+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
279279
MTL_ENABLE_DEBUG_INFO = NO;
280280
SDKROOT = iphoneos;
281281
SUPPORTED_PLATFORMS = iphoneos;
@@ -357,7 +357,7 @@
357357
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
358358
GCC_WARN_UNUSED_FUNCTION = YES;
359359
GCC_WARN_UNUSED_VARIABLE = YES;
360-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
360+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
361361
MTL_ENABLE_DEBUG_INFO = YES;
362362
ONLY_ACTIVE_ARCH = YES;
363363
SDKROOT = iphoneos;
@@ -406,7 +406,7 @@
406406
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
407407
GCC_WARN_UNUSED_FUNCTION = YES;
408408
GCC_WARN_UNUSED_VARIABLE = YES;
409-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
409+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
410410
MTL_ENABLE_DEBUG_INFO = NO;
411411
SDKROOT = iphoneos;
412412
SUPPORTED_PLATFORMS = iphoneos;

example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1430"
3+
LastUpgradeVersion = "1510"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

example/lib/main.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class _MyAppState extends State<MyApp> with SingleTickerProviderStateMixin {
5555
),
5656

5757
// The end action pane is the one at the right or the bottom side.
58-
endActionPane: ActionPane(
58+
endActionPane: ActionPane(
5959
motion: const ScrollMotion(),
6060
children: [
6161
SlidableAction(

example/lib/main_issue_251.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ class Item extends StatelessWidget {
193193
child: Column(
194194
crossAxisAlignment: CrossAxisAlignment.start,
195195
children: [
196-
Expanded(child: Text(title, style: textTheme.bodyText1)),
197-
Expanded(child: Text(subtitle, style: textTheme.bodyText2)),
196+
Expanded(child: Text(title, style: textTheme.bodySmall)),
197+
Expanded(child: Text(subtitle, style: textTheme.bodyMedium)),
198198
],
199199
),
200200
);

example/test/widget_test.dart

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
// gestures. You can also use WidgetTester to find child widgets in the widget
66
// tree, read text, and verify that the values of widget properties are correct.
77

8+
import 'package:example/main.dart';
89
import 'package:flutter/material.dart';
910
import 'package:flutter_test/flutter_test.dart';
1011

11-
import 'package:example/main.dart';
12-
1312
void main() {
1413
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
1514
// Build our app and trigger a frame.

lib/src/action_pane.dart

+4-6
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class ActionPane extends StatefulWidget {
4545
/// (both exclusives).
4646
/// The [children] argument must not be null.
4747
const ActionPane({
48-
Key? key,
48+
super.key,
4949
this.extentRatio = _defaultExtentRatio,
5050
required this.motion,
5151
this.dismissible,
@@ -57,8 +57,7 @@ class ActionPane extends StatefulWidget {
5757
assert(
5858
openThreshold == null || (openThreshold > 0 && openThreshold < 1)),
5959
assert(closeThreshold == null ||
60-
(closeThreshold > 0 && closeThreshold < 1)),
61-
super(key: key);
60+
(closeThreshold > 0 && closeThreshold < 1));
6261

6362
/// The total extent of this [ActionPane] relatively to the enclosing
6463
/// [Slidable] widget.
@@ -245,10 +244,9 @@ class _ActionPaneState extends State<ActionPane> implements RatioConfigurator {
245244

246245
class _ActionPaneScope extends InheritedWidget {
247246
const _ActionPaneScope({
248-
Key? key,
249247
this.actionPaneData,
250-
required Widget child,
251-
}) : super(key: key, child: child);
248+
required super.child,
249+
});
252250

253251
final ActionPaneData? actionPaneData;
254252

lib/src/action_pane_configuration.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import 'package:flutter/widgets.dart';
55

66
class ActionPaneConfiguration extends InheritedWidget {
77
const ActionPaneConfiguration({
8-
Key? key,
8+
super.key,
99
required this.alignment,
1010
required this.direction,
1111
required this.isStartActionPane,
12-
required Widget child,
13-
}) : super(key: key, child: child);
12+
required super.child,
13+
});
1414

1515
final Alignment alignment;
1616
final Axis direction;

lib/src/action_pane_motions.dart

+8-8
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ class BehindMotion extends StatelessWidget {
1111
///
1212
/// {@animation 664 200 https://raw.githubusercontent.com/letsar/flutter_slidable/assets/behind_motion.mp4}
1313
const BehindMotion({
14-
Key? key,
15-
}) : super(key: key);
14+
super.key,
15+
});
1616

1717
@override
1818
Widget build(BuildContext context) {
@@ -31,8 +31,8 @@ class StretchMotion extends StatelessWidget {
3131
///
3232
/// {@animation 664 200 https://raw.githubusercontent.com/letsar/flutter_slidable/assets/stretch_motion.mp4}
3333
const StretchMotion({
34-
Key? key,
35-
}) : super(key: key);
34+
super.key,
35+
});
3636

3737
@override
3838
Widget build(BuildContext context) {
@@ -63,8 +63,8 @@ class ScrollMotion extends StatelessWidget {
6363
///
6464
/// {@animation 664 200 https://raw.githubusercontent.com/letsar/flutter_slidable/assets/scroll_motion.mp4}
6565
const ScrollMotion({
66-
Key? key,
67-
}) : super(key: key);
66+
super.key,
67+
});
6868

6969
@override
7070
Widget build(BuildContext context) {
@@ -91,8 +91,8 @@ class DrawerMotion extends StatelessWidget {
9191
///
9292
/// {@animation 664 200 https://raw.githubusercontent.com/letsar/flutter_slidable/assets/drawer_motion.mp4}
9393
const DrawerMotion({
94-
Key? key,
95-
}) : super(key: key);
94+
super.key,
95+
});
9696

9797
@override
9898
Widget build(BuildContext context) {

lib/src/actions.dart

+4-6
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class CustomSlidableAction extends StatelessWidget {
1818
///
1919
/// The [flex] argument must also be greater than 0.
2020
const CustomSlidableAction({
21-
Key? key,
21+
super.key,
2222
this.flex = _kFlex,
2323
this.backgroundColor = _kBackgroundColor,
2424
this.foregroundColor,
@@ -27,8 +27,7 @@ class CustomSlidableAction extends StatelessWidget {
2727
this.padding,
2828
required this.onPressed,
2929
required this.child,
30-
}) : assert(flex > 0),
31-
super(key: key);
30+
}) : assert(flex > 0);
3231

3332
/// {@template slidable.actions.flex}
3433
/// The flex factor to use for this child.
@@ -131,7 +130,7 @@ class SlidableAction extends StatelessWidget {
131130
///
132131
/// The [flex] argument must also be greater than 0.
133132
const SlidableAction({
134-
Key? key,
133+
super.key,
135134
this.flex = _kFlex,
136135
this.backgroundColor = _kBackgroundColor,
137136
this.foregroundColor,
@@ -143,8 +142,7 @@ class SlidableAction extends StatelessWidget {
143142
this.borderRadius = BorderRadius.zero,
144143
this.padding,
145144
}) : assert(flex > 0),
146-
assert(icon != null || label != null),
147-
super(key: key);
145+
assert(icon != null || label != null);
148146

149147
/// {@macro slidable.actions.flex}
150148
final int flex;

0 commit comments

Comments
 (0)