Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename page list builder notifier parameter for WoltModalSheet.show method #16

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions coffee_maker/lib/home/online/store_online_content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class _StoreOnlineContentState extends State<StoreOnlineContent> {
WoltModalSheet.show(
pageIndexNotifier: pageIndexNotifier,
context: context,
pageListBuilderNotifier: GrindModalPageBuilder.build(
pageListBuilder: GrindModalPageBuilder.build(
coffeeOrderId: coffeeOrderId,
goToPreviousPage: () => pageIndexNotifier.value = pageIndexNotifier.value - 1,
goToNextPage: () => pageIndexNotifier.value = pageIndexNotifier.value + 1,
Expand Down Expand Up @@ -117,7 +117,7 @@ class _StoreOnlineContentState extends State<StoreOnlineContent> {
builder: (_, __) => child,
);
},
pageListBuilderNotifier: AddWaterModalPageBuilder.build(
pageListBuilder: AddWaterModalPageBuilder.build(
coffeeOrderId: coffeeOrderId,
goToPreviousPage: () => pageIndexNotifier.value = pageIndexNotifier.value - 1,
goToNextPage: () => pageIndexNotifier.value = pageIndexNotifier.value + 1,
Expand All @@ -133,7 +133,7 @@ class _StoreOnlineContentState extends State<StoreOnlineContent> {
WoltModalSheet.show(
pageIndexNotifier: pageIndexNotifier,
context: context,
pageListBuilderNotifier: ReadyModalPageBuilder.build(
pageListBuilder: ReadyModalPageBuilder.build(
coffeeOrderId: coffeeOrderId,
goToPreviousPage: () => pageIndexNotifier.value = pageIndexNotifier.value - 1,
goToNextPage: () => pageIndexNotifier.value = pageIndexNotifier.value + 1,
Expand Down
2 changes: 1 addition & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Pagination involves a sequence of screens the user navigates sequentially. We ch
WoltModalSheet.show<void>(
pageIndexNotifier: pageIndexNotifier,
context: context,
pageListBuilderNotifier: (modalSheetContext) {
pageListBuilder: (modalSheetContext) {
return [
page1(modalSheetContext),
page2(modalSheetContext),
Expand Down
4 changes: 2 additions & 2 deletions lib/src/wolt_modal_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class WoltModalSheet<T> extends StatefulWidget {

static Future<T?> show<T>({
required BuildContext context,
required WoltModalSheetPageListBuilder pageListBuilderNotifier,
required WoltModalSheetPageListBuilder pageListBuilder,
required WoltModalTypeBuilder modalTypeBuilder,
ValueNotifier<int>? pageIndexNotifier,
Widget Function(Widget)? decorator,
Expand All @@ -78,7 +78,7 @@ class WoltModalSheet<T> extends StatefulWidget {
}) {
return WoltModalSheet.showWithDynamicPath(
context: context,
pageListBuilderNotifier: ValueNotifier(pageListBuilderNotifier),
pageListBuilderNotifier: ValueNotifier(pageListBuilder),
modalTypeBuilder: modalTypeBuilder,
pageIndexNotifier: pageIndexNotifier,
decorator: decorator,
Expand Down