PageView should preload pages
Page view should preload at least its next page otherwise user can experience delay when changing pages. In the following example I'm using larger images ~5mb. I'm aware that there are already topics that image load is slow, but I can imagine there are other examples to demonstrate this problem with page view as well. Did try release, still an issue. Tested on iOS device + simulator. ## Steps to Reproduce ``` import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( primarySwatch: Colors.blue, ), home: MyHomePage(title: 'Flutter Demo Home Page'), ); } } class MyHomePage extends StatefulWidget { MyHomePage({Key key, this.title}) : super(key: key); final String title; @override _MyHomePageState createState() => _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> { @override void initState() { super.initState(); } @override Widget build(BuildContext context) { return PageView.builder( itemBuilder: (context, index) { return Image.asset( 'lib/photo$index.png', fit: BoxFit.cover, ); }, itemCount: 4, ); } } ``` ## Logs ``` Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel beta, v1.4.9-hotfix.1, on Mac OS X 10.14.3 18D109, locale en-US
Posted by fralways on Apr 17, 2019, 9:31 AM
Tags
Related issues
Raise real-world problems, find people facing the same issue, and discuss solutions.4,000 issues0 comments
github (Healthcare)
Add setting to disable the auto-resolve in 60 seconds for questions
Slower development continuing for forseeable future
[dagster_k8s] code location gRPC timeout
Health of Linkerd project
Project status updates and roadmap
PageView should preload pages
Can't resolve symbol io.flutter.plugin dependency
PageView should preload pages
Page view should preload at least its next page otherwise user can experience delay when changing pages. In the following example I'm using larger images ~5mb. I'm aware that there are already topics that image load is slow, but I can imagine there are other examples to demonstrate this problem with page view as well. Did try release, still an issue. Tested on iOS device + simulator. ## Steps to Reproduce ``` import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( primarySwatch: Colors.blue, ), home: MyHomePage(title: 'Flutter Demo Home Page'), ); } } class MyHomePage extends StatefulWidget { MyHomePage({Key key, this.title}) : super(key: key); final String title; @override _MyHomePageState createState() => _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> { @override void initState() { super.initState(); } @override Widget build(BuildContext context) { return PageView.builder( itemBuilder: (context, index) { return Image.asset( 'lib/photo$index.png', fit: BoxFit.cover, ); }, itemCount: 4, ); } } ``` ## Logs ``` Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel beta, v1.4.9-hotfix.1, on Mac OS X 10.14.3 18D109, locale en-US
Comments (0)
No comments yet. Start the discussion.