我制作了一个充当图像传送带的PageView。我如何让它在Flutter中延迟一段时间后,自动无限地在页面之间滚动? new PageView(
children: List<Widget> {
new Container(
decoration: BoxDecoration(
image: DecorationImage(image: new
我是新来的flutter。我在flutter PageView文档的帮助下实现了它: /// Flutter code sample for PageView
// Here is an example of [PageView]. It creates a centered [Text] in each of the three pages
// which scroll horizontally.
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
///
在观看了一段关于创建自定义PageView的教程视频之后,我遇到了一个问题。为了实现自定义页面视图的页面位置,我使用了一个项堆栈,它根据放置在堆栈中所有其他元素之上的PageView ()向左/右滑动。
下面是代码的示例:
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
W
由于我引入了一个PageView小部件,我得到了以下错误:
════════ Exception caught by widgets library ═══════════════════════════════════ The following assertion was thrown while applying parent data.: Incorrect use of ParentDataWidget.
The ParentDataWidget Expanded(flex: 1) wants to apply ParentData of type FlexParentData t
我运行了这段代码,后来删除了it.After,无论控制台中打印的是什么无限循环:
I/flutter ( 7472): Yeah, this line is printed
I/flutter ( 7472): Yeah, this line is printed
I/flutter ( 7472): Yeah, this line is printed
I/flutter ( 7472): Yeah, this line is printed
I/flutter ( 7472): Yeah, this line is printed
I/flutter ( 7472): Yeah,
我有里面有SliverFixedExtentList和SliverList的CustomScrollView。我在SliverFixedExtentList的委托中放了一个PageView。问题是,在滚动到底部并打开一个详细信息页面并返回后,它给了我一个我不太理解的异常:
══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter (25339): The following assertion was thrown while f