Giter Club home page Giter Club logo

flutter_swiper's Introduction

Logo

Build Status Coverage Status PRs Welcome pub package best-flutter

中文说明

flutter_swiper

The best swiper for flutter , with multiple layouts, infinite loop. Compatible with Android & iOS.

✨✨ New Features:Layout for pagination.

We are using this project flutter_page_indicator now .

✨✨ New Features:PageTransformer

Finally, we have PageTransformer like android, just set a transformer to Swiper, it returns a widget that has been transformed. For now, only support for layout DEFAULT. Thanks to @FlutterRocks ,you've done great job 👏.

We are using this project transformer_page_view now .

✨✨ New Features:Layout

See More

Showcases

Horizontal

Vertical

Custom Pagination

Custom Pagination

Phone

Example

See More

Roadmap

see:ROADMAP.md

Changelogs

see:CHANGELOG.md

Getting Started

Installation

Add

flutter_swiper : ^lastest_version

to your pubspec.yaml ,and run

flutter packages get 

in your project's root directory.

Basic Usage

Create a new project with command

flutter create myapp

Edit lib/main.dart like this:


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:  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(),
      ),
    );
  }
}

Constructor

Basic

Parameter Default Description
scrollDirection Axis.horizontal If Axis.horizontal, the scroll view's children are arranged horizontally in a row instead of vertically in a column.
loop true Set to false to disable continuous loop mode.
index 0 Index number of initial slide.
autoplay false Set to true enable auto play mode.
onIndexChanged void onIndexChanged(int index) Called with the new index when the user swiped or autoplay
onTap void onTap(int index) Called when user tap ui.
duration 300.0 The milliscends of every transaction animation costs
pagination null set new SwiperPagination() to show default pagination
control null set new SwiperControl() to show default control buttons

Pagination

The pagination extends from SwiperPlugin,the SwiperPlugin provides extra ui for Swiper.Set new SwiperPagination() to show default pagination.

Parameter Default Description
alignment Alignment.bottomCenter Change this value if you what to put pagination in other place
margin const EdgeInsets.all(10.0) The distance between inner side of the parent container.
builder SwiperPagination.dots There are two default styles SwiperPagination.dots and SwiperPagination.fraction,both can be customized.

If you'd like to customize your own pagination, you can do like this:

new Swiper(
    ...,
    pagination:new SwiperCustomPagination(
        builder:(BuildContext context, SwiperPluginConfig config){
            return new YourOwnPaginatipon();
        }
    )
);

Control buttons

The control also extends from SwiperPlugin,set new SwiperControl() to show default control buttons.

Parameter Default Description
iconPrevious Icons.arrow_back_ios The icon data to display previous control button
iconNext Icons.arrow_forward_ios The icon data to display next.
color Theme.of(context).primaryColor Control button color
size 30.0 Control button size
padding const EdgeInsets.all(5.0) Control button padding

Controller

The Controller is used to control the index of the Swiper, start or stop autoplay.You can create a controller by new SwiperController() and save the instance by futher usage.

Method Description
void move(int index, {bool animation: true}) Move to the spicified index,with animation or not
void next({bool animation: true}) Move to next
void previous({bool animation: true}) Move to previous
void startAutoplay() Start autoplay
void stopAutoplay() Stop autoplay

Autoplay

Parameter Default Description
autoplayDelay 3000 Autoplay delay milliseconds.
autoplayDisableOnInteraction true If set true, autoplay is disabled when use swipes.

Build in layouts

new Swiper(
  itemBuilder: (BuildContext context, int index) {
    return new Image.network(
      "http://via.placeholder.com/288x188",
      fit: BoxFit.fill,
    );
  },
  itemCount: 10,
  viewportFraction: 0.8,
  scale: 0.9,
)

new Swiper(
  itemBuilder: (BuildContext context, int index) {
    return new Image.network(
      "http://via.placeholder.com/288x188",
      fit: BoxFit.fill,
    );
  },
  itemCount: 10,
  itemWidth: 300.0,
  layout: SwiperLayout.STACK,
)

new Swiper(
    itemBuilder: (BuildContext context, int index) {
      return new Image.network(
        "http://via.placeholder.com/288x188",
        fit: BoxFit.fill,
      );
    },
    itemCount: 10,
    itemWidth: 300.0,
    itemHeight: 400.0,
    layout: SwiperLayout.TINDER,
 )

Very easy to create you own custom animation:


 new Swiper(
  layout: SwiperLayout.CUSTOM,
  customLayoutOption: new CustomLayoutOption(
      startIndex: -1,
      stateCount: 3
  ).addRotate([
    -45.0/180,
    0.0,
    45.0/180
  ]).addTranslate([
    new Offset(-370.0, -40.0),
    new Offset(0.0, 0.0),
    new Offset(370.0, -40.0)
  ]),
  itemWidth: 300.0,
  itemHeight: 200.0,
  itemBuilder: (context, index) {
    return new Container(
      color: Colors.grey,
      child: new Center(
        child: new Text("$index"),
      ),
    );
  },
  itemCount: 10)

The CustomLayoutOption is designed to describe animations. It is very easy to specify every state of items in Swiper.

new CustomLayoutOption(
      startIndex: -1,  /// Which index is the first item of array below      
      stateCount: 3    /// array length 
  ).addRotate([        // rotation of every item 
    -45.0/180,
    0.0,
    45.0/180
  ]).addTranslate([           /// offset of every item
    new Offset(-370.0, -40.0),
    new Offset(0.0, 0.0),
    new Offset(370.0, -40.0)
  ])

Codes

Example

new ConstrainedBox(
  child: new Swiper(
    outer:false,
    itemBuilder: (c, i) {
      return new Wrap(
        runSpacing:  6.0,
        children: [0,1,2,3,4,5,6,7,8,9].map((i){
          return new SizedBox(
            width: MediaQuery.of(context).size.width/5,
            child: new Column(
              mainAxisSize: MainAxisSize.min,
              children: <Widget>[
                new SizedBox(
                  child:  new Container(
                    child: new Image.network("https://fuss10.elemecdn.com/c/db/d20d49e5029281b9b73db1c5ec6f9jpeg.jpeg%3FimageMogr/format/webp/thumbnail/!90x90r/gravity/Center/crop/90x90"),
                  ),
                  height: MediaQuery.of(context).size.width * 0.12,
                  width: MediaQuery.of(context).size.width * 0.12,
                ),
                new Padding(padding: new EdgeInsets.only(top:6.0),child: new Text("$i"),)
              ],
            ),
          );
        }).toList(),
      );
    },
    pagination: new SwiperPagination(
      margin: new EdgeInsets.all(5.0)
    ),
    itemCount: 10,
  ),
    constraints:new BoxConstraints.loose(new Size(screenWidth, 170.0))
),

You can find all custom options here:

https://github.com/jzoom/flutter_swiper/blob/master/example/lib/src/ExampleCustom.dart

flutter_swiper's People

Contributors

ichenlei avatar jogboms avatar jzoom avatar pepsighan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flutter_swiper's Issues

outer doesn't work with alignment.

new Swiper(
itemBuilder: (BuildContext context, int index) {
return Image.network("http://via.placeholder.com/350x220");
},
itemCount: 5,
itemWidth: 300.0,
itemHeight: 220.0,
layout: SwiperLayout.STACK,
outer: true,
pagination: new SwiperPagination(
alignment: Alignment.topCenter,
),
),

if I didn't set outer = true, the alignment in pagination would always work; but as long as I set outer = true, the indicators would not be on the topCenter of the swiper any more.

Any suggestions?

How to change the swipe direction of the stack layout to the reverse of the default one?

Swiper(
layout: SwiperLayout.STACK,

              itemBuilder: (BuildContext context, int index) {
                return Stack(
                  alignment: Alignment.topCenter,
                  children: <Widget>[
                    Image.network(
                      "http://via.placeholder.com/288x188",
                      fit: BoxFit.fill,
                    ),
                    Text(
                      index.toString(),
                      style: TextStyle(fontSize: 20),
                    )
                  ],
                );
              },
              itemCount: 10,
              itemWidth: 300.0,
              // viewportFraction: 0.85,
              // scale: 0.9,
            ),

Please can anyone help me to understand how can I change the default card swiping direction?

轮播图嵌套在ListView中listView加上滚动监听会报错

new ListView( children: <Widget>[ new Container( key: Key('banner'), child: new Swiper( itemBuilder: (BuildContext context, int index) { return images[index]; }, pagination: new SwiperPagination(), itemCount: 3, autoplay: true, autoplayDelay: 5000, layout: SwiperLayout.DEFAULT, scale: 1, ), height: 170.0 + MediaQuery.of(context).padding.top, ), new Text('aaaa'), new Text('aaaa'), new Text('aaaa'), new Text('aaaa'), new Text('aaaa'), new Text('aaaa'), new Text('aaaa'), new Text('aaaa'), new Text('aaaa'), new Text('aaaa'), new Text('aaaa'), new Text('aaaa'), new Text('aaaa'), new Text('aaaa'), new Text('aaaa'), new Text('aaaa'), new Text('aaaa'), new Text('aaaa'), new Text('aaaa'), new Text('aaaa'), new Text('aaaa'), new Text('aaaa'), new Text('aaaa'), new Text('aaaa'), new Text('aaaa'), ], ), ScrollController sc = new ScrollController(); @override void initState() { //监听滚动事件,打印滚动位置 sc.addListener(() { _setOpacity(sc.offset); }); super.initState(); }
错误信息:
══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════
flutter: The following NoSuchMethodError was thrown during a scheduler callback:
flutter: The method 'findRenderObject' was called on null.
flutter: Receiver: null
flutter: Tried calling: findRenderObject()
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #0 Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:50:5)
flutter: #1 _TransformerPageViewState._onGetSize (package:transformer_page_view/transformer_page_view.dart:455:41)
flutter: #2 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
flutter: #3 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:938:9)
flutter: #4 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:842:5)
flutter: #5 _invoke (dart:ui/hooks.dart:154:13)
flutter: #6 _drawFrame (dart:ui/hooks.dart:143:3)
flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════
flutter: Another exception was thrown: NoSuchMethodError: The method 'findRenderObject' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'findRenderObject' was called on null.

flutter_swiper: ^1.1.4

Issue with initial index

Specifying Index number of initial slide through "index" in Swiper() is not working. Everytime opens image at index = 0

CUSTOM Layout tap on card, receive slide event and move

HI Guys,

that's great library. When I use a custom layout and autoplay = true, if I touch on slide, and stay some seconds, receive the event and go to the next with the finger on same card. That's not good. But in Defaut layout not slide if I touch in on card.

new Swiper(
onTap: (int index) {
final item = dataModel.elementAt(index);
goToSection(context, item.section);
},
autoplay: true,
autoplayDisableOnInteraction:true,
itemCount: 3,
itemHeight: screenHeight * 0.9,
itemWidth: screenWidght * 0.9,
layout: SwiperLayout.CUSTOM,
customLayoutOption: new CustomLayoutOption(
startIndex: 0,
stateCount: 3,
).addRotate([-45.0 / 180, 0.0, 45.0 / 180]).addTranslate([
new Offset(-screenWidght * 0.9, -40.0),
new Offset(0.0, 0.0),
new Offset(screenWidght * 0.9, -40.0)
]),
itemBuilder: (BuildContext context, int index) {
final item = dataModel.elementAt(index);
return getContainerItemCarousel(context,
item);
},
),

BR

J

error and can't swipe and white while init

[ERROR:flutter/shell/common/shell.cc(181)] Dart Error: Unhandled exception:
E/flutter (29329): NoSuchMethodError: The method '>' was called on null.
E/flutter (29329): Receiver: null
E/flutter (29329): Tried calling: >(411428571428.5715)
E/flutter (29329): #0      Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:48:5)
E/flutter (29329): #1      double.< (dart:core/runtime/libdouble.dart:65:18)
E/flutter (29329): #2      double.<= (dart:core/runtime/libdouble.dart:78:37)
E/flutter (29329): #3      PageScrollPhysics.createBallisticSimulation (package:flutter/src/widgets/page_view.dart:366:45)
E/flutter (29329): #4      ScrollPositionWithSingleContext.goBallistic (package:flutter/src/widgets/scroll_position_with_single_context.dart:147:43)
E/flutter (29329): #5      DrivenScrollActivity._end (package:flutter/src/widgets/scroll_activity.dart:634:15)
E/flutter (29329): #6      _RootZone.run (dart:async/zone.dart:1374:54)
E/flutter (29329): #7      _FutureListener.handleWhenComplete (dart:async/future_impl.dart:153:18)
E/flutter (29329): #8      Future._propagateToListeners.handleWhenCompleteCallback (dart:async/future_impl.dart:612:39)
E/flutter (29329): #9      Future._propagateToListeners (dart:async/future_impl.dart:668:37)
E/flutter (29329): #10     Future._completeWithValue (dart:async/future_impl.dart:486:5)
E/flutter (29329): #11     Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:516:7)
E/flutter (29329): #12     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
E/flutter (29329): #13     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
I/flutter (29329): Another exception was thrown: NoSuchMethodError: The method '<=' was called on null.
I/chatty  (29329): uid=10517(com.yimaguquan) 2.ui identical 17 lines
I/flutter (29329): Another exception was thrown: NoSuchMethodError: The method '<=' was called on null.
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel unknown, v0.8.3, on Mac OS X 10.12.6 16G29, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.2)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.2)
[✓] Android Studio
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] Android Studio (version 3.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2017.1.4)
[✓] Connected devices (1 available)

• No issues found!

activeIndex问题

如果在任意一个tab跳转到新的页面,当finish新的页面后,activeIndex变为0

Attempted to use type '_SwiperState' as a function.

This is the part of my code that use swiper.

@override
  Widget build (BuildContext context) {
    return new Center(
      child: new Container(
        child: new Container(
          height: 280.0,
          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(),
          ),
        ),
      )
    );
  }

And cause exception:

I/flutter ( 4576): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter ( 4576): The following NoSuchMethodError was thrown building Container(constraints:
I/flutter ( 4576): BoxConstraints(0.0<=w<=Infinity, h=280.0)):
I/flutter ( 4576): Attempted to use type '_SwiperState' as a function. Since types do not define a method 'call', this
I/flutter ( 4576): is not possible. Did you intend to call the _SwiperState constructor and forget the 'new' operator?
I/flutter ( 4576): Receiver: _SwiperState
I/flutter ( 4576): Tried calling: _SwiperState()
I/flutter ( 4576): 
I/flutter ( 4576): When the exception was thrown, this was the stack:
I/flutter ( 4576): #0      Object.noSuchMethod (dart:core-patch/dart:core/object_patch.dart:46)
I/flutter ( 4576): #1      Swiper.createState (package:flutter_swiper/src/swiper.dart:260:24)
I/flutter ( 4576): #2      new StatefulElement (package:flutter/src/widgets/framework.dart:3693:23)
I/flutter ( 4576): #3      StatefulWidget.createElement (package:flutter/src/widgets/framework.dart:781:42)
I/flutter ( 4576): #4      Element.inflateWidget (package:flutter/src/widgets/framework.dart:2888:40)
...

What happend...

flutter_swiper: ^1.0.6里面的点击事件onTap怎么不执行啊.没反应

class _ClassifyPage extends State {
@OverRide
Widget build(BuildContext context) {
return new Container(
width: MediaQuery
.of(context)
.size
.width,
height: 200.0,
child: new Swiper(
itemBuilder: _swiperBuilder,
itemCount: 2,
pagination: new SwiperPagination(
builder: DotSwiperPaginationBuilder(
color: Colors.white,
activeColor: Colors.red
),
margin: EdgeInsets.all(30.0)
),
control: new SwiperControl(
iconNext: null,
iconPrevious: null,
),
scrollDirection: Axis.horizontal,
autoplay: true,
onTap: (index) => print('点击了第个')
),
);
}

能帮我解答下么?

How to get rid of the white border around the image?

I put the Swiper inside a Container and my background color of the Scaffold is not white. So I can see a white border around the image. I am unable to get rid of the white border. Anyone have any ideas? Thanks a lot.

Container(
              height: 350,
              color: someColor,
              child: Swiper(
                itemBuilder: (BuildContext context, int index) {
                  return carouselImageList[index];
                },
                itemCount: 4,
                autoplay: true,
                autoplayDelay: 7000,
                pagination: SwiperPagination(
                  alignment: Alignment(0, 1.0),
                ),
              ),
            ),

change direction of stack widget

new Swiper(
  itemBuilder: (BuildContext context, int index) {
    return new Image.network(
      "http://via.placeholder.com/288x188",
      fit: BoxFit.fill,
    );
  },
  itemCount: 10,
  itemWidth: 300.0,
  layout: SwiperLayout.STACK,
)

In the built-in Layout ( layout: SwiperLayout.STACK), the default behavior is to swipe the top widget to the right to see the next one, and the the shadows of the below widgets is shown on the left. i want the reverse, swipe the top widget to left to see the next one and the shadow becomes in the right.
how to achieve this?

loop issue

it has no effect when loop is setting to false. it still looping

基础使用报错。

code

new Container(
    height: 120.0,
    child: new Swiper(
      itemBuilder: (BuildContext context,int index){
        return new Image.network("http://img.jandan.net/news/2018/09/2d5ff15b73f85dbd9ff302b9d4f85d4b.jpg", fit: BoxFit.fill,);
      },
      itemCount: 3,
      pagination: new SwiperPagination(),
      control: new SwiperControl(),
    ),
  );

错误信息(error):

I/flutter ( 1831): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter ( 1831): The following NoSuchMethodError was thrown building AnimatedBuilder(animation:
I/flutter ( 1831): PageController#fda49(one client, offset 384000000000.0), dirty, state: _AnimatedState#b0c65):
I/flutter ( 1831): No top-level method 'Transform.scale' declared.
I/flutter ( 1831): Receiver: top-level
I/flutter ( 1831): Tried calling: Transform.scale(scale: 1.0, child: Instance of 'Image')
I/flutter ( 1831):
I/flutter ( 1831): When the exception was thrown, this was the stack:
I/flutter ( 1831): #0 _NoneloopPageViewState._buildAnimationItem. (package:flutter_swiper/src/swiper.dart)
I/flutter ( 1831): #1 AnimatedBuilder.build (package:flutter/src/widgets/transitions.dart:634:12)
I/flutter ( 1831): #2 _AnimatedState.build (package:flutter/src/widgets/transitions.dart:97:48)
I/flutter ( 1831): #3 StatefulElement.build (package:flutter/src/widgets/framework.dart:3722:27)
I/flutter ( 1831): #4 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3634:15)
I/flutter ( 1831): #5 Element.rebuild (package:flutter/src/widgets/framework.dart:3487:5)
I/flutter ( 1831): #6 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3614:5)
I/flutter ( 1831): #7 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3761:11)
I/flutter ( 1831): #8 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3609:5)
I/flutter ( 1831): #9 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2899:14)
I/flutter ( 1831): #10 Element.updateChild (package:flutter/src/widgets/framework.dart:2702:12)
I/flutter ( 1831): #11 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4646:14)
I/flutter ( 1831): #12 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2899:14)
I/flutter ( 1831): #13 Element.updateChild (package:flutter/src/widgets/framework.dart:2702:12)
I/flutter ( 1831): #14 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3645:16)
I/flutter ( 1831): #15 Element.rebuild (package:flutter/src/widgets/framework.dart:3487:5)
I/flutter ( 1831): #16 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3614:5)
I/flutter ( 1831): #17 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3609:5)
I/flutter ( 1831): #18 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2899:14)
I/flutter ( 1831): #19 Element.updateChild (package:flutter/src/widgets/framework.dart:2702:12)
I/flutter ( 1831): #20 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3645:16)
I/flutter ( 1831): #21 Element.rebuild (package:flutter/src/widgets/framework.dart:3487:5)
I/flutter ( 1831): #22 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3614:5)
I/flutter ( 1831): #23 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3609:5)
I/flutter ( 1831): #24 ParentDataElement.mount (package:flutter/src/widgets/framework.dart:3947:11)
I/flutter ( 1831): #25 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2899:14)
I/flutter ( 1831): #26 Element.updateChild (package:flutter/src/widgets/framework.dart:2702:12)

Add support for async/future

Any plan to add support for async calls, or perhaps FutureBuilder?

Suppose I am getting a list of images from an api with
Future<List> loadData() async{
...
return List data;
}

Rather than having to specify itemCount, perhaps I could simply call:

new Swiper(
futureBuilder: (c, i){
....
}
)

Is there a way to do this now?

希望支持预加载

在使用底层基于PageView的Swiper时, 由于默认PageView只加载一个页面导致Swiper翻页之后才开始构建新页面.
这通常会带来瞬间的闪烁, 即使是通过动画来过渡, 效果也并不理想.
如果能将 PageView 中 ViewportcacheExtent属性注释掉就能够让PageView同时加载两个页面, 从而解决这个问题.
希望作者能够留意这一问题, 最好能够加入允许提前缓存的机制. 感谢.

用Navigator.pushNamed切换到swiper所在页面的时,swiper出现闪烁bug

图一:
12 45

图二:
12 46

图二是想要的效果。但是在用Navigator.pushNamed切换到swiper所在页面的时,swiper会先显示图一,然后快速闪烁成图二。
以下是创建swiper的代码:

recommendationSwiper = Container(
height: 140,
child: Swiper(
itemBuilder: _swiperBuilder,
itemCount: 3,
layout: SwiperLayout.DEFAULT,
pagination: new SwiperPagination(
builder: DotSwiperPaginationBuilder(
color: Colors.black54,
activeColor: Colors.white,
)),
control: new SwiperControl(),
autoplayDisableOnInteraction: true,
scrollDirection: Axis.horizontal,
viewportFraction: 0.85,
scale: 0.9,
autoplay: true,
onTap: (index) => print('点击了第$index个'),
));

add dynamic widget

hello, i search to add card horizontal caroussel to my current vertical card listview. my cards are dynamics with some widgets. flutter swiper can make an horizontal caroussel in this case ? or can it be add to your plugin ? thank you

Change position of SwiperControl

Improvement request:
It would be great to being able to put the swiper control arrows somewhere else on the screen.
In my case, I don't want them to be centered, instead I need them somewhere more to the top of the screen.

ontap not working when a page has index 1

i am trying to use ontap and I am having a wired issue where it does not work when i am on page 0 and i click on page 1

child: Swiper(
              autoplay: false,
              controller: controller,
              index: data,
              onIndexChanged: (index) {
                setState(() {
                  data = index;
                });
              },
              physics: BouncingScrollPhysics(),
              itemCount: 10,
              loop: false,
              viewportFraction: 0.7,
              scale: 0.7,
              containerHeight: 200,
              itemBuilder: (context, index) {
                return GestureDetector(
                  onTap: () {
                    if (index > data) {
                      controller.next();
                    } else if (index < data) {
                      controller.previous();
                    }
                  },
                  child: Container(
                    color: Colors.primaries[index],
                    child: Center(
                      widthFactor: 0,
                      child: Text('$data $index'),
                    ),
                  ),
                );
              },
            ),

Swiping Event

This is a feature request.

It will be great to have a listener to get SwiperPluginConfig and how much have been swiped while user are swiping which will enable developers to do some animation in other widgets.

Adding and Removing pages in Swiper

I need to add / remove page in the Swiper with an Action Button (button on the bottom of the page).
-> Action add: Add a page at the end of the Swiper and move the Swiper to the index of the new created page => seems OK
-> Action remove: Remove current page and display Swiper without the deleted page
=> OK but NOT when the last page of the Swiper is deleted (see exception in the traces)

Implementation used:

  • StreamController to control the pages to be displayted in the Swiper
  • The Swiper included as builder of the Stream controller is created each time page is removed/added

Traces when last page is removed:

flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════ flutter: The following assertion was thrown building Swiper(state: _SwiperState#25085): flutter: ScrollController not attached to any scroll views. flutter: 'package:flutter/src/widgets/scroll_controller.dart': Failed assertion: line 110 pos 12: flutter: '_positions.isNotEmpty' flutter: flutter: Either the assertion indicates an error in the framework itself, or we should provide substantially flutter: more information in this error message to help you determine and fix the underlying cause. flutter: In either case, please report this assertion by filing a bug on GitHub: flutter: https://github.com/flutter/flutter/issues/new flutter: flutter: When the exception was thrown, this was the stack: flutter: #2 ScrollController.position (package:flutter/src/widgets/scroll_controller.dart:110:12) flutter: #3 PageController.animateToPage (package:flutter/src/widgets/page_view.dart:118:41) flutter: #4 _TransformerPageViewState.didUpdateWidget (package:transformer_page_view/transformer_page_view.dart:508:25) flutter: #5 StatefulElement.update (package:flutter/src/widgets/framework.dart:3820:58) flutter: #6 Element.updateChild (package:flutter/src/widgets/framework.dart:2729:15) flutter: #7 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4521:32) flutter: #8 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4911:17) flutter: #9 Element.updateChild (package:flutter/src/widgets/framework.dart:2729:15) flutter: #10 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16) flutter: #11 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5) flutter: #12 StatefulElement.update (package:flutter/src/widgets/framework.dart:3835:5) flutter: #13 Element.updateChild (package:flutter/src/widgets/framework.dart:2729:15) flutter: #14 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16) flutter: #15 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5) flutter: #16 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2273:33) flutter: #17 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:673:20) flutter: #18 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:208:5) flutter: #19 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15) flutter: #20 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9) flutter: #21 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:842:5) flutter: #22 _invoke (dart:ui/hooks.dart:139:13) flutter: #23 _drawFrame (dart:ui/hooks.dart:128:3)

Text disappear when keyboard collapse

I try to type something on the textfield, then i click on back button to hide the keyboard and text value of the textfield has been removed immediately. I think the cause of this situation is swiper. This is my code:
Swiper screen
image
Texfield page
image
My textfield
image

Option to disable Swiping

My application is using the Swiper component to display Cards.
Cards can be added or removed from the Swiper.

When there is only 1 Card, i need to disable Swiping.
Is there an option for that or a generic solution provided by Widget component ?

异常

Performing hot reload...
Syncing files to device iPhone XR...
flutter: ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
flutter: The following assertion was thrown during performResize():
flutter: Horizontal viewport was given unbounded height.
flutter: Viewports expand in the cross axis to fill their container and constrain their children to match
flutter: their extent in the cross axis. In this case, a horizontal viewport was given an unlimited amount of
flutter: vertical space in which to expand.
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #0 RenderViewport.performResize. (package:flutter/src/rendering/viewport.dart:1170:15)
flutter: #1 RenderViewport.performResize (package:flutter/src/rendering/viewport.dart:1182:6)
flutter: #2 RenderObject.layout (package:flutter/src/rendering/object.dart:1619:9)
flutter: #3 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
flutter: #4 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #5 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
flutter: #6 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #7 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
flutter: #8 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #9 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
flutter: #10 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #11 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
flutter: #12 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #13 RenderStack.performLayout (package:flutter/src/rendering/stack.dart:510:15)
flutter: #14 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #15 RenderFlex.performLayout (package:flutter/src/rendering/flex.dart:738:15)
flutter: #16 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #17 RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:199:11)
flutter: #18 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #19 _RenderSingleChildViewport.performLayout (package:flutter/src/widgets/single_child_scroll_view.dart:479:13)
flutter: #20 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #21 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
flutter: #22 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #23 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
flutter: #24 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #25 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
flutter: #26 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #27 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
flutter: #28 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #29 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
flutter: #30 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #31 MultiChildLayoutDelegate.layoutChild (package:flutter/src/rendering/custom_layout.dart:142:11)
flutter: #32 _ScaffoldLayout.performLayout (package:flutter/src/material/scaffold.dart:339:7)
flutter: #33 MultiChildLayoutDelegate._callPerformLayout (package:flutter/src/rendering/custom_layout.dart:212:7)
flutter: #34 RenderCustomMultiChildLayoutBox.performLayout (package:flutter/src/rendering/custom_layout.dart:356:14)
flutter: #35 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #36 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
flutter: #37 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #38 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
flutter: #39 _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1203:11)
flutter: #40 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #41 MultiChildLayoutDelegate.layoutChild (package:flutter/src/rendering/custom_layout.dart:142:11)
flutter: #42 _ScaffoldLayout.performLayout (package:flutter/src/material/scaffold.dart:339:7)
flutter: #43 MultiChildLayoutDelegate._callPerformLayout (package:flutter/src/rendering/custom_layout.dart:212:7)
flutter: #44 RenderCustomMultiChildLayoutBox.performLayout (package:flutter/src/rendering/custom_layout.dart:356:14)
flutter: #45 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #46 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
flutter: #47 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #48 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
flutter: #49 _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1203:11)
flutter: #50 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #51 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
flutter: #52 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #53 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
flutter: #54 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #55 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
flutter: #56 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #57 RenderStack.performLayout (package:flutter/src/rendering/stack.dart:510:15)
flutter: #58 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #59 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
flutter: #60 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #61 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
flutter: #62 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #63 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
flutter: #64 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #65 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
flutter: #66 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #67 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
flutter: #68 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #69 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
flutter: #70 RenderOffstage.performLayout (package:flutter/src/rendering/proxy_box.dart:2900:13)
flutter: #71 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #72 RenderStack.performLayout (package:flutter/src/rendering/stack.dart:510:15)
flutter: #73 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #74 __RenderTheatre&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
flutter: #75 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #76 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
flutter: #77 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #78 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
flutter: #79 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #80 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
flutter: #81 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #82 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
flutter: #83 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
flutter: #84 RenderView.performLayout (package:flutter/src/rendering/view.dart:147:13)
flutter: #85 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1509:7)
flutter: #86 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:768:18)
flutter: #87 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:281:19)
flutter: #88 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:677:13)
flutter: #89 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:219:5)
flutter: #90 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
flutter: #91 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9)
flutter: #92 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.scheduleWarmUpFrame. (package:flutter/src/scheduler/binding.dart:751:7)
flutter: #94 _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
flutter: #95 _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
flutter: #96 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)
flutter: (elided one frame from package dart:async)
flutter:
flutter: The following RenderObject was being processed when the exception was fired:
flutter: RenderViewport#5a6c0 NEEDS-LAYOUT NEEDS-PAINT
flutter: creator: Viewport ← _ScrollableScope ← IgnorePointer-[GlobalKey#56e75] ← Semantics ← Listener ←
flutter: _GestureSemantics ← RawGestureDetector-[LabeledGlobalKey#def13] ←
flutter: _ScrollSemantics-[GlobalKey#7e946] ← Scrollable ← NotificationListener ←
flutter: PageView ← TransformerPageView ← ⋯
flutter: parentData: (can use size)
flutter: constraints: BoxConstraints(0.0<=w<=414.0, 0.0<=h<=Infinity)
flutter: size: MISSING
flutter: axisDirection: right
flutter: crossAxisDirection: down
flutter: offset: _PagePosition#8ec34(offset: null, range: null..null, viewport: null, ScrollableState,
flutter: PageScrollPhysics -> BouncingScrollPhysics, IdleScrollActivity#59401, ScrollDirection.idle)
flutter: anchor: 0.0
flutter: This RenderObject had the following child:
flutter: RenderSliverFillViewport#f5389 NEEDS-LAYOUT NEEDS-PAINT
flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════
flutter: Another exception was thrown: RenderBox was not laid out: RenderViewport#5a6c0 NEEDS-LAYOUT NEEDS-PAINT
flutter: Another exception was thrown: RenderBox was not laid out: RenderViewport#5a6c0 NEEDS-PAINT
flutter: Another exception was thrown: RenderBox was not laid out: RenderIgnorePointer#cad1a relayoutBoundary=up17 NEEDS-PAINT
Reloaded 2 of 462 libraries in 1,051ms.
flutter: Another exception was thrown: RenderBox was not laid out: RenderSemanticsAnnotations#ff3ae relayoutBoundary=up16 NEEDS-PAINT
flutter: Another exception was thrown: RenderBox was not laid out: RenderPointerListener#de652 relayoutBoundary=up15 NEEDS-PAINT
flutter: Another exception was thrown: RenderBox was not laid out: RenderSemanticsGestureHandler#b7009 relayoutBoundary=up14 NEEDS-PAINT
flutter: Another exception was thrown: RenderBox was not laid out: _RenderScrollSemantics#d3f87 relayoutBoundary=up13 NEEDS-PAINT
flutter: Another exception was thrown: RenderBox was not laid out: RenderStack#d6290 relayoutBoundary=up12 NEEDS-PAINT
flutter: Another exception was thrown: RenderBox was not laid out: RenderViewport#5a6c0 NEEDS-PAINT
flutter: Another exception was thrown: 'package:flutter/src/widgets/scroll_position.dart': Failed assertion: line 683 pos 12: 'pixels != null': is not true.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.
flutter: Another exception was thrown: NoSuchMethodError: The method 'toDouble' was called on null.

Performance issues

When I try to use Swiper, itemBuilder widgets of moderately complexity there is significant lagging.
The GPU thread is giving red bar throughout the swiping scroll and in the UI thread during the start of scroll in profiling mode. I think part of the reason is that each time I try to pan, all the widgets seem to re-rendering throughout the scrolling session. So it's like creating 'itemCount: 4' complex widget tree structure throughout the scrolling.

Is there a way to reduce the lag, My widgets are fairly well written. Is it possible to scrolling animation without rendering it throughout the scrolling action.

I'm using the STACK layout -> _CustomLayoutStateBase<_StackSwiper>

Regards,
Lavan

嵌套在CustomScrollView使用抛出异常

RT: 我在CustomScrollView中的嵌套使用,在自动滚动的过程中会抛出如下异常:

flutter: Another exception was thrown: ScrollController not attached to any scroll views.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.