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

Migrate to flutter 3.20.0.pre #57

Merged
merged 3 commits into from
Feb 24, 2024
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
4 changes: 4 additions & 0 deletions package/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.0.1 Feb 25, 2024

- Small refactoring (no functional changes).

## 1.0.0 Feb 24, 2024

- Dart3 is now required.
Expand Down
4 changes: 1 addition & 3 deletions package/lib/src/addon/modal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,7 @@ class ModalExprollableScrollPhysics extends ScrollPhysics {
/// This physics will delegate its logic to a [BouncingScrollPhysics]
/// while the user is overscrolling, so that the *drag down to dismiss* action is available
/// on every platform. Otherwise, it delegates to the given [parent].
const ModalExprollableScrollPhysics({
ScrollPhysics? parent,
}) : super(parent: parent);
const ModalExprollableScrollPhysics({super.parent});

@override
ModalExprollableScrollPhysics applyTo(ScrollPhysics? ancestor) {
Expand Down
28 changes: 16 additions & 12 deletions package/lib/src/internal/paging.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/// Copied and modified from:
/// - https://github.com/flutter/flutter/tree/master/packages/flutter/lib/src/widgets/page_view.dart
/// - https://github.com/flutter/flutter/tree/master/packages/flutter/lib/src/rendering/sliver_fill.dart
///
/// Changes done:
/// - Replace [SliverFillViewport] with [_SliverFillViewport] in [_PageViewState.build]
/// - In [_RenderSliverFillViewport.performLayout], force the children to always occupy the parent viewport,
/// regardless of [_RenderSliverFillViewport.itemExtent].
// Copied and modified from:
// - https://github.com/flutter/flutter/tree/master/packages/flutter/lib/src/widgets/page_view.dart
// - https://github.com/flutter/flutter/tree/master/packages/flutter/lib/src/rendering/sliver_fill.dart
//
// Changes done:
// - Replace [SliverFillViewport] with [_SliverFillViewport] in [_PageViewState.build]
// - In [_RenderSliverFillViewport.performLayout], force the children to always occupy the parent viewport,
// regardless of [_RenderSliverFillViewport.itemExtent].

// Copyright 2014 The Flutter Authors. All rights reserved.
//
Expand Down Expand Up @@ -376,7 +376,7 @@ class OverflowPageView extends PageView {
super.key,
super.scrollDirection,
super.reverse,
super.controller,
required PageController controller,
super.physics,
super.pageSnapping,
super.onPageChanged,
Expand All @@ -390,7 +390,7 @@ class OverflowPageView extends PageView {
super.scrollBehavior,
super.padEnds,
required this.childConstraints,
}) : super.builder();
}) : super.builder(controller: controller);

final BoxConstraints childConstraints;

Expand All @@ -408,7 +408,9 @@ class _PageViewState extends State<OverflowPageView> {
@override
void initState() {
super.initState();
_lastReportedPage = widget.controller.initialPage;
// FIXME: Workaround to pass the static analysis on pub.dev
// ignore: unnecessary_non_null_assertion
_lastReportedPage = widget.controller!.initialPage;
}

AxisDirection _getDirection(BuildContext context) {
Expand Down Expand Up @@ -469,7 +471,9 @@ class _PageViewState extends State<OverflowPageView> {
clipBehavior: widget.clipBehavior,
slivers: <Widget>[
_SliverFillViewport(
viewportFraction: widget.controller.viewportFraction,
// FIXME: Workaround to pass the static analysis on pub.dev
// ignore: unnecessary_non_null_assertion
viewportFraction: widget.controller!.viewportFraction,
delegate: widget.childrenDelegate,
padEnds: widget.padEnds,
childConstraints: widget.childConstraints,
Expand Down
2 changes: 1 addition & 1 deletion package/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: exprollable_page_view
description: Yet another PageView widget that expands its page while scrolling it. Exprollable is a coined word combining the words expandable and scrollable.
version: 1.0.0
version: 1.0.1
repository: https://github.com/fujidaiti/exprollable_page_view

environment:
Expand Down
Loading