Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
ulusoyca committed Dec 16, 2024
1 parent 3123cfe commit 376c3b1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
17 changes: 8 additions & 9 deletions examples/playground/lib/home/pages/root_sheet_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,14 @@ class RootSheetPage {
destinationPage = SheetPageWithNonScrollingLayout.build();
break;
case ModalPageName.inAppNavigation:
WoltModalSheet.of(context).addOrReplacePages(
[
SheetPageWithInAppNavigation.build(),
ProductWithSkuPage(1),
ProductWithSkuPage(2),
ProductWithSkuPage(3),
]
);
isButtonEnabledNotifier.value = selectedItemData.isSelected;
WoltModalSheet.of(context).addOrReplacePages([
SheetPageWithInAppNavigation.build(),
ProductWithSkuPage(1),
ProductWithSkuPage(2),
ProductWithSkuPage(3),
]);
isButtonEnabledNotifier.value =
selectedItemData.isSelected;
return;
case null:
WoltModalSheet.of(context).addOrReplacePages(
Expand Down
7 changes: 5 additions & 2 deletions lib/src/wolt_modal_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -941,8 +941,11 @@ class WoltModalSheetState extends State<WoltModalSheet> {
/// print("No MyCustomPage with the specified ID found in the stack.");
/// }
/// ```
bool showPage<T extends SliverWoltModalSheetPage>({bool Function(T page)? where}) {
final index = _pages.indexWhere(where == null ? (p) => p is T : (p) => p is T && where(p));
bool showPage<T extends SliverWoltModalSheetPage>({
bool Function(T page)? where,
}) {
final index = _pages
.indexWhere(where == null ? (p) => p is T : (p) => p is T && where(p));
if (index != -1) {
_currentPageIndex = index;
return true;
Expand Down

0 comments on commit 376c3b1

Please sign in to comment.