Skip to content

Commit

Permalink
made requested changes for animated Header
Browse files Browse the repository at this point in the history
  • Loading branch information
Umair-Manzoor-47 committed Feb 17, 2025
1 parent 8d49575 commit 13c9a09
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
11 changes: 5 additions & 6 deletions modules/ensemble/lib/framework/view/page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,9 @@ class PageState extends State<Page>
scrollableView: true,
showNavigationIcon: pageModel.runtimeStyles?['showNavigationIcon'],
);
// if (appBar is SliverAppBar) {
if (appBar is SliverAppBar) {
return appBar;
//r }
}
}
if (hasDrawer) {
return const SliverAppBar();
Expand Down Expand Up @@ -435,11 +435,11 @@ class PageState extends State<Page>
flexibleSpace: wrapsInFlexible(backgroundWidget),
expandedHeight: flexibleMaxHeight,
collapsedHeight: flexibleMinHeight,
floating: floating ?? false,
pinned: pinned ?? false,
floating: floating,
pinned: pinned,

// Only enable snap if floating is true
snap: (floating ?? false) ? (snapped ?? false) : false,
snap: floating ? snapped : false,
);
} else {
return AppBar(
Expand Down Expand Up @@ -904,7 +904,6 @@ class RenderStickySliver extends RenderSliverSingleBoxAdapter {
void performLayout() {
final double scrollOffset = constraints.scrollOffset;
final double maxExtent = height;
bool repaint = false;

// Progress of the scroll (from 0 to 1)
double progress = (scrollOffset / maxExtent).clamp(0.0, 1.0);
Expand Down
1 change: 0 additions & 1 deletion modules/ensemble/lib/page_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,6 @@ class HeaderModel extends Object with HasStyles {

WidgetModel? flexibleBackground;
}

class FooterItems extends Object with HasStyles {
final List<WidgetModel> children;
Map<String, dynamic>? inlineStyles;
Expand Down

0 comments on commit 13c9a09

Please sign in to comment.