From 90543b3f43c998cf3c647811217337b0a3eabd76 Mon Sep 17 00:00:00 2001 From: shinriyo Date: Tue, 27 Dec 2022 10:18:33 +0900 Subject: [PATCH] const doesn't work for doNothing method `onPressed` property refers to `doNothing` method. So, `const` doesn't work correctly. --- example/lib/main.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index 97415b3b..69883610 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -79,9 +79,9 @@ class MyApp extends StatelessWidget { key: const ValueKey(1), // The start action pane is the one at the left or the top side. - startActionPane: const ActionPane( + startActionPane: ActionPane( // A motion is a widget used to control how the pane animates. - motion: ScrollMotion(), + motion: const ScrollMotion(), // All actions are defined in the children parameter. children: [ @@ -107,7 +107,7 @@ class MyApp extends StatelessWidget { endActionPane: ActionPane( motion: const ScrollMotion(), dismissible: DismissiblePane(onDismissed: () {}), - children: const [ + children: [ SlidableAction( // An action can be bigger than the others. flex: 2,