Skip to content

Commit

Permalink
style(example): fix lint issue for line length exceeding 80 characters
Browse files Browse the repository at this point in the history
  • Loading branch information
hm21 committed Oct 23, 2024
1 parent 2369523 commit 87f9446
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions example/lib/pages/movable_background_image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 87f9446

Please sign in to comment.