flutter_carousel_slider
flutter_carousel_slider copied to clipboard
Unhandled Exception: NoSuchMethodError: The method 'round' was called on null.
Apparently the package runs on other pages even if you are not using it on these
E/flutter (14394): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: NoSuchMethodError: The method 'round' was called on null.
E/flutter (14394): Receiver: null
E/flutter (14394): Tried calling: round()
E/flutter (14394): #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
E/flutter (14394): #1 PageController.nextPage
package:flutter/…/widgets/page_view.dart:227
E/flutter (14394): #2 CarouselSliderState.getTimer.<anonymous closure>
package:carousel_slider/carousel_slider.dart:106
E/flutter (14394): #3 _rootRunUnary (dart:async/zone.dart:1134:38)
E/flutter (14394): #4 _CustomZone.runUnary (dart:async/zone.dart:1031:19)
E/flutter (14394): #5 _CustomZone.runUnaryGuarded (dart:async/zone.dart:933:7)
E/flutter (14394): #6 _CustomZone.bindUnaryCallbackGuarded.<anonymous closure> (dart:async/zone.dart:970:26)
E/flutter (14394): #7 _rootRunUnary (dart:async/zone.dart:1138:13)
E/flutter (14394): #8 _CustomZone.runUnary (dart:async/zone.dart:1031:19)
E/flutter (14394): #9 _CustomZone.bindUnaryCallback.<anonymous closure> (dart:async/zone.dart:954:26)
E/flutter (14394): #10 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398:19)
E/flutter (14394): #11 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429:5)
E/flutter (14394): #12 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
I'm just using it at home like this
CarouselSlider(
options: CarouselOptions(
autoPlay: true,
aspectRatio: 2.3,
//enlargeCenterPage: true,
autoPlayInterval: Duration(seconds: 5),
),
items: _listSliders(),
),
List<Widget> _listSliders() {
List<Widget> list = [
SliderCardSeeMore(
pathImg: 'assets/img/cards/slider/slider_01.png',
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'For all your \nsummer clothing \nneeds',
style: TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.w300
),
),
Container(
padding: EdgeInsets.only(top: 10),
child: BtnTextIcon(
width: 130,
title: Text(
'SEE MORE',
style: TextStyle(
fontWeight: FontWeight.w400
),
),
icon: Icon(
Icons.keyboard_arrow_right,
color: Colors.white,
),
iconBg: Vars.colorPrimary,
background: Colors.white,
),
)
],
),
),
SliderCardSeeMore(
pathImg: 'assets/img/cards/slider/slider_02.png',
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'For all your \nsummer clothing \nneeds',
style: TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.w300
),
),
Container(
padding: EdgeInsets.only(top: 10),
child: BtnTextIcon(
width: 130,
title: Text(
'SEE MORE',
style: TextStyle(
fontWeight: FontWeight.w400
),
),
icon: Icon(
Icons.keyboard_arrow_right,
color: Colors.white,
),
iconBg: Vars.colorPrimary,
background: Colors.white,
),
)
],
),
),
];
return list;
}
and every so often it shows the following error in the console: Unhandled Exception: NoSuchMethodError: The method 'round' was called on null.
anyone solve this issuse
@zkmark i have this same issue, did you find a solution ?
i have that too
And add me to the list. Got this too.
me toooooo ...
me too..
September 2, 2020 this has not been solved
any new about above error ??
Any solution @zkmark ?
no solution?