From 87f94466cb2b6da044252824e10c9bfd14d71b6b Mon Sep 17 00:00:00 2001 From: hm21 Date: Wed, 23 Oct 2024 17:02:30 +0200 Subject: [PATCH] style(example): fix lint issue for line length exceeding 80 characters --- .../lib/pages/movable_background_image.dart | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/example/lib/pages/movable_background_image.dart b/example/lib/pages/movable_background_image.dart index 979d0ffb..df75760a 100644 --- a/example/lib/pages/movable_background_image.dart +++ b/example/lib/pages/movable_background_image.dart @@ -212,6 +212,25 @@ class _MovableBackgroundImageExampleState kBottomNavigationBarHeight - MediaQuery.of(context).padding.vertical, ); + + void _openReorderSheet(ProImageEditorState editor) { + showModalBottomSheet( + context: context, + builder: (context) { + return ReorderLayerSheet( + layers: editor.activeLayers, + onReorder: (oldIndex, newIndex) { + editor.moveLayerListPosition( + oldIndex: oldIndex, + newIndex: newIndex, + ); + Navigator.pop(context); + }, + ); + }, + ); + } + @override Widget build(BuildContext context) { return ListTile( @@ -350,25 +369,8 @@ class _MovableBackgroundImageExampleState ), ), child: IconButton( - onPressed: () { - showModalBottomSheet( - context: context, - builder: (context) { - return ReorderLayerSheet( - layers: editor.activeLayers, - onReorder: - (oldIndex, newIndex) { - editor - .moveLayerListPosition( - oldIndex: oldIndex, - newIndex: newIndex, - ); - Navigator.pop(context); - }, - ); - }, - ); - }, + onPressed: () => + _openReorderSheet(editor), icon: const Icon( Icons.reorder, color: Colors.white,