best-flutter / flutter_swiper Goto Github PK
View Code? Open in Web Editor NEWThe best swiper for flutter , with multiple layouts, infinite loop. Compatible with Android & iOS.
License: MIT License
The best swiper for flutter , with multiple layouts, infinite loop. Compatible with Android & iOS.
License: MIT License
Just a simple request, please update this plugin so it completely compatible with a project that has been migrated to androidX. Thanks!
Delay ?
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 dim the below widgets and make the top one only show its content
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:
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)
如题。当ajax请求到的图片只有一个的时候,能否增加判断去显示隐藏pagination,阻止滚动
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.
Your package is great, Thank you !
https://github.com/Solido/awesome-flutter
To make the swiper can swipe linearly without breaking off
Specifying Index number of initial slide through "index" in Swiper() is not working. Everytime opens image at index = 0
it has no effect when loop is setting to false. it still looping
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
现在的方案是,每隔3秒(默认) 滑动一次,不管期间发生了什么。
有时候我左滑一半的时候就强行右滑了。
希望每次手动滑动/点击的时候 重新计时。
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?
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 ?
[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!
如何跳转到指定的索引 我设置index属性没什么作用
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.
Swiper param - physics: new BouncingScrollPhysics doesn't seem to work when the looping is disabled.
How to implement a feature to disable swiping in a specific direction and if swiped in that direction I want the scroll physics animation to be shown.
Regards,
Lavan
如果在任意一个tab跳转到新的页面,当finish新的页面后,activeIndex变为0
RT: 我在CustomScrollView中的嵌套使用,在自动滚动的过程中会抛出如下异常:
flutter: Another exception was thrown: ScrollController not attached to any scroll views.
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?
必须等等滚动完全停止之后点击才能触发事件
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)
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?
swiperController.next()
doesnt change the view to next.
scrollDirection -> vertical doesn't seem to work for layouts STACK and TINDER.
Please do tell how organize the Stacks vertically if the scroll direction is made vertical.
Regards
Lavan
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'),
),
),
);
},
),
图二是想要的效果。但是在用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个'),
));
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
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?
To reproduce:
Why do whe need 3 call to this method to navigate to next page ?
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...
"loop: false" works as expected on swipe gesture, but has no effect if we're tapping on iconPrevious or iconNext button.
works on Android only
final SwiperController _swiperController = SwiperController();
_swiperController.next(animation: true);
在使用底层基于PageView的Swiper时, 由于默认PageView只加载一个页面导致Swiper翻页之后才开始构建新页面.
这通常会带来瞬间的闪烁, 即使是通过动画来过渡, 效果也并不理想.
如果能将 PageView 中 Viewport
的 cacheExtent
属性注释掉就能够让PageView同时加载两个页面, 从而解决这个问题.
希望作者能够留意这一问题, 最好能够加入允许提前缓存的机制. 感谢.
I'd like to know if there is any way to detect which direction user scrolled horizontally.
Is there any?
Thank you for the great plugin!
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.
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
onIndexChanged: (int index) {
setState(() {
_title = _pageviewList[index]['title'];
});
}
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),
),
),
),
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.