We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1、放到ListView中,把swiper滑动到非首个。 2、把ListView滑动到底部。 3、然后把ListView滑到顶部查看swiper。 现象:swiper自动回到第一个! 期望:保持swiper用户滑动的位置。
import 'package:flutter/material.dart'; import 'package:flutter_swiper/flutter_swiper.dart'; void main() => runApp(new MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return new MaterialApp( title: 'Flutter Demo', theme: new ThemeData( primarySwatch: Colors.blue, ), home: new MyHomePage(title: 'Flutter Demo Home Page'), ); } } class MyHomePage extends StatefulWidget { MyHomePage({Key key, this.title}) : super(key: key); final String title; @override _MyHomePageState createState() => new _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> { @override Widget build(BuildContext context) { return new Scaffold( appBar: new AppBar( title: new Text(widget.title), ), body: ListView( children: <Widget>[ Container( width: double.infinity, height: 400, decoration: BoxDecoration( color: Colors.green, ), child: new Swiper( itemBuilder: (BuildContext context,int index){ return new Image.network("http://via.placeholder.com/350x150",fit: BoxFit.fill,); }, itemCount: 3, pagination: new SwiperPagination(), control: new SwiperControl(), ), ), Container( width: double.infinity, height: 1500, decoration: BoxDecoration( color: Colors.blue, ), ), ], ) ); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
1、放到ListView中,把swiper滑动到非首个。
2、把ListView滑动到底部。
3、然后把ListView滑到顶部查看swiper。
现象:swiper自动回到第一个!
期望:保持swiper用户滑动的位置。
The text was updated successfully, but these errors were encountered: