相关疑难解决方法(0)

在 Flutter 中如何让 PageView 滚动得更快?动画似乎很慢,内部 ListView 无法响应我的垂直手势

你可以在视频中看到细节

不知道怎么解决这个问题。 对比Android Native ViewPager,Flutter中PageView的动画好像比较慢,用户只能等这个慢动画完全停止,才能拖动内部ListView。感觉用户体验比原生android ViewPager差。希望有一个完美的解决方案。

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_app/reactive_page_view/reactive_page_view.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Page(),
    );
  }
}

class Page extends StatefulWidget {
  @override
  _PageState createState() => _PageState();
}

PageView view;

class _PageState extends State<Page> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: CupertinoNavigationBar(
        middle: …
Run Code Online (Sandbox Code Playgroud)

android flutter

2
推荐指数
2
解决办法
2834
查看次数

标签 统计

android ×1

flutter ×1