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

Introduce SliverWoltModalSheetPage and WoltModalSheetPage classes to construct modal sheet pages #95

Merged

Conversation

ulusoyca
Copy link
Collaborator

@ulusoyca ulusoyca commented Nov 10, 2023

Description

This PR marks a significant enhancement to the WoltModalSheet library with the introduction of two new classes, SliverWoltModalSheetPage and WoltModalSheetPage. Alongside these additions, the PR also includes updates to the README file, ensuring necessary documentation and guidance for these new features.

This PR also addresses the issue: #72

Introduction of New Classes:

SliverWoltModalSheetPage: This class is designed for creating complex and dynamic modal sheet pages using Flutter's Sliver widgets. It enables advanced use cases requiring custom scroll behaviors and efficient rendering for large or complex lists.

WoltModalSheetPage: A simpler alternative for modal sheets with straightforward content, this class automatically wraps a single widget in a SliverToBoxAdapter. It's perfect for single-widget content or basic layouts without the need for elaborate scrolling effects.

Enhanced README File:

The README has been updated to include detailed sections on the usage of SliverWoltModalSheetPage and WoltModalSheetPage. These sections offer clear instructions, benefits, and example code snippets, providing developers with all the information needed to utilize these classes effectively. Additional emphasis has been placed on the distinction between these two classes, guiding developers on choosing the appropriate class based on their specific requirements.

Example Application Update:

The example application has been updated to demonstrate the practical implementation of both classes. This includes showcasing the capabilities of SliverWoltModalSheetPage with sliver effects and the straightforward usage of WoltModalSheetPage.

multiple_slivers.mp4

Comment on lines 47 to 49
Widget? pageTitle,
double? navBarHeight,
Widget? topBarTitle,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Widget? pageTitle,
double? navBarHeight,
Widget? topBarTitle,
super.pageTitle,
super.navBarHeight,
super.topBarTitle,

Use super for these and follow up properties

  WoltModalSheetPage({
    required this.child,
    super.pageTitle,
    super.navBarHeight,
    super.topBarTitle,
    super.heroImage,
    super.heroImageHeight,
    super.backgroundColor,
    super.hasSabGradient,
    super.sabGradientColor,
    super.enableDrag,
    super.forceMaxHeight = false,
    super.isTopBarLayerAlwaysVisible,
    super.hasTopBarLayer,
    super.scrollController,
    super.stickyActionBar,
    super.leadingNavBarWidget,
    super.trailingNavBarWidget,
    super.topBar,
  }) : super(mainContentSlivers: [SliverToBoxAdapter(child: child)]);

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update follow up properties for super too

@TahaTesser
Copy link
Collaborator

Also there some analyzer issues

@ulusoyca ulusoyca force-pushed the use-different-wolt-modal-sheet-page-class-for-sliver-usage branch 2 times, most recently from 0f0b8cc to 895edde Compare November 14, 2023 08:37
@ulusoyca ulusoyca force-pushed the use-different-wolt-modal-sheet-page-class-for-sliver-usage branch from 895edde to 2aa9103 Compare November 14, 2023 08:54
@ulusoyca ulusoyca merged commit 4246667 into main Nov 14, 2023
@ulusoyca ulusoyca deleted the use-different-wolt-modal-sheet-page-class-for-sliver-usage branch November 14, 2023 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants