From 331f8bac8e9055afeb37180b34180f5e44976fee Mon Sep 17 00:00:00 2001 From: fujidaiti Date: Sun, 25 Feb 2024 00:24:01 +0900 Subject: [PATCH 1/3] Migrate to flutter 3.20 --- package/lib/src/internal/paging.dart | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/package/lib/src/internal/paging.dart b/package/lib/src/internal/paging.dart index 212b0dd..7f9c762 100644 --- a/package/lib/src/internal/paging.dart +++ b/package/lib/src/internal/paging.dart @@ -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, @@ -390,7 +390,7 @@ class OverflowPageView extends PageView { super.scrollBehavior, super.padEnds, required this.childConstraints, - }) : super.builder(); + }) : super.builder(controller: controller); final BoxConstraints childConstraints; @@ -408,7 +408,9 @@ class _PageViewState extends State { @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) { @@ -469,7 +471,9 @@ class _PageViewState extends State { clipBehavior: widget.clipBehavior, slivers: [ _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, From fbd83ea1eeecaa7a8d2fcf3c7777eff5298fe788 Mon Sep 17 00:00:00 2001 From: fujidaiti Date: Sun, 25 Feb 2024 00:25:07 +0900 Subject: [PATCH 2/3] Fix lint errors --- package/lib/src/addon/modal.dart | 4 +--- package/lib/src/internal/paging.dart | 16 ++++++++-------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/package/lib/src/addon/modal.dart b/package/lib/src/addon/modal.dart index f9a0041..8563278 100644 --- a/package/lib/src/addon/modal.dart +++ b/package/lib/src/addon/modal.dart @@ -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) { diff --git a/package/lib/src/internal/paging.dart b/package/lib/src/internal/paging.dart index 7f9c762..65eb896 100644 --- a/package/lib/src/internal/paging.dart +++ b/package/lib/src/internal/paging.dart @@ -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. // From dbec8bbd60f29ab5d7b058f8f6ae671dff520e6e Mon Sep 17 00:00:00 2001 From: fujidaiti Date: Sun, 25 Feb 2024 00:27:13 +0900 Subject: [PATCH 3/3] Bump to 1.0.1 --- package/CHANGELOG.md | 4 ++++ package/pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package/CHANGELOG.md b/package/CHANGELOG.md index 40be4af..8500340 100644 --- a/package/CHANGELOG.md +++ b/package/CHANGELOG.md @@ -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. diff --git a/package/pubspec.yaml b/package/pubspec.yaml index 8c995be..92303e6 100644 --- a/package/pubspec.yaml +++ b/package/pubspec.yaml @@ -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: