Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Android] PageViewanimateTo andnextPage do not work when PageView.index is 0 #95461

Open
Labels
P2Important issues not at the top of the work lista: animationAnimation APIsd: api docsIssues with https://api.flutter.dev/d: examplesSample code and demosf: scrollingViewports, list views, slivers, etc.found in release: 2.8Found to occur in 2.8found in release: 2.9Found to occur in 2.9frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team
@Mayank-9018

Description

@Mayank-9018

Steps to Reproduce

  1. Run this code :
import'package:flutter/material.dart';voidmain() {runApp(MyApp());}classMyAppextendsStatelessWidget {finalPageController _pageController=PageController();@overrideWidgetbuild(BuildContext context) {returnMaterialApp(      home:Scaffold(        body:PageView(          controller: _pageController,          children: [Container(color:Colors.red),Container(color:Colors.green),Container(color:Colors.blue),          ],        ),        floatingActionButton:FloatingActionButton.large(          child:constIcon(Icons.navigate_next),          onPressed: () {            _pageController.nextPage(                duration:constDuration(                  milliseconds:250,                ),                curve:Curves.easeInOutBack);          },        ),      ),    );  }}
  1. On android, scroll to page 2 using FAB and come back to page 1 and use FAB to scroll to next page.
  2. On linux and web, press the FAB to scroll to next page.

Expected results:
PageView should scroll to the next page on clicking the FAB.

Actual results:
On Android: The page scrolls at first. but after coming back to the 1st page, it won't scroll to the next page. From the overscroll glow indicator it seems like it's trying to go in the wrong direction. This happens only on the 1st page.
On Linux and Web: The 1st page wont scroll using FAB.

This only happens on using the PageController.animateTo() and nextPage() method, jump() seems to work fine.

Details
[✓] Flutter (Channel stable, 2.8.0, on Pop!_OS 21.10 5.15.5-76051505-generic,    locale en_US.UTF-8)    • Flutter version 2.8.0 at /home/mayank-pop/flutter    • Upstream repository https://github.com/flutter/flutter.git    • Framework revision cf44000065 (9 days ago), 2021-12-08 14:06:50 -0800    • Engine revision 40a99c5951    • Dart version 2.15.0[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)    • Android SDK at /home/mayank-pop/Android/Sdk    • Platform android-31, build-tools 31.0.0    • Java binary at: /opt/android-studio/jre/bin/java    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)    • All Android licenses accepted.[✓] Chrome - develop for the web    • Chrome at google-chrome[✓] Linux toolchain - develop for Linux desktop    • Ubuntu clang version 13.0.0-2    • cmake version 3.18.4    • ninja version 1.10.1    • pkg-config version 0.29.2[✓] Android Studio (version 2020.3)    • Android Studio at /opt/android-studio    • Flutter plugin version 63.2.1    • Dart plugin version 203.8452    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)[✓] VS Code (version 1.63.2)    • VS Code at /usr/share/code    • Flutter extension version 3.29.0[✓] Connected device (3 available)    • Redmi 4 (mobile) • 6b0b6837d440 • android-arm64  • Android 10 (API 29)    • Linux (desktop)  • linux        • linux-x64      • Pop!_OS 21.10 5.15.5-76051505-generic    • Chrome (web)     • chrome       • web-javascript • Google Chrome 96.0.4664.110• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: animationAnimation APIsd: api docsIssues with https://api.flutter.dev/d: examplesSample code and demosf: scrollingViewports, list views, slivers, etc.found in release: 2.8Found to occur in 2.8found in release: 2.9Found to occur in 2.9frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp