Skip to content

Commit

Permalink
docs(custom_widgets): emphasize importance of bottombar key in docume…
Browse files Browse the repository at this point in the history
…ntation

Updated documentation in `movable_background_image.dart` and `custom_widgets_main_editor.dart` to highlight the critical role of the bottombar key.
  • Loading branch information
hm21 committed Jun 22, 2024
1 parent cb6a39c commit 931370a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions example/lib/pages/movable_background_image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,8 @@ class _MoveableBackgroundImageExampleState
editor.selectedLayerIndex < 0
? ReactiveCustomWidget(
stream: rebuildStream,
key: key,
builder: (_) => _bottomNavigationBar(
key,
editor,
constraints,
),
Expand Down Expand Up @@ -425,7 +425,9 @@ class _MoveableBackgroundImageExampleState
}

Widget _bottomNavigationBar(
Key key, ProImageEditorState editor, BoxConstraints constraints) {
ProImageEditorState editor,
BoxConstraints constraints,
) {
return Scrollbar(
controller: _bottomBarScrollCtrl,
scrollbarOrientation: ScrollbarOrientation.top,
Expand Down
3 changes: 3 additions & 0 deletions lib/models/custom_widgets/custom_widgets_main_editor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ class CustomWidgetsMainEditor {

/// A custom bottom bar widget.
///
/// **IMPORTANT:** You must add the `key` to your bottombar widget that the
/// editor calculate layer movements correctly.
///
/// **Example:**
/// ```dart
/// bottomBar: (editor, rebuildStream, key) {
Expand Down

0 comments on commit 931370a

Please sign in to comment.