The running time is variable maybe 1 minute。Throwing an exception,The information is as follows:
════════ Exception caught by scheduler library ═════════════════════════════════
The following assertion was thrown during a scheduler callback:
'package:flutter/src/animation/animation_controller.dart': Failed assertion: line 829 pos 12: 'elapsedInSeconds >= 0.0': is not true.
This exception was thrown in the context of a scheduler callback. When the scheduler callback was registered (as opposed to when the exception was thrown), this was the stack
I also encountered this problem, I was using Android 7, and it was no problem to switch to Android 9. Might be an issue with the Android version or the emulator.
Here's how I use it:
return Container( width: double.infinity, //swiper高度由父组件决定 child: AspectRatio( aspectRatio: 16 / 9, child: Swiper( itemBuilder: (BuildContext context, int index) { return Image.network( imageList[index]["url"], fit: BoxFit.fill, ); }, autoplay: true, itemCount: imageList.length, //分页指示器 pagination: const SwiperPagination(), control: const SwiperControl(color: Colors.orange), ), ), );
The running time is variable maybe 1 minute。Throwing an exception,The information is as follows:
════════ Exception caught by scheduler library ═════════════════════════════════ The following assertion was thrown during a scheduler callback: 'package:flutter/src/animation/animation_controller.dart': Failed assertion: line 829 pos 12: 'elapsedInSeconds >= 0.0': is not true.
When the exception was thrown, this was the stack
2 AnimationController._tick
package:flutter/…/animation/animation_controller.dart:829
3 Ticker._tick
package:flutter/…/scheduler/ticker.dart:249
4 SchedulerBinding._invokeFrameCallback
package:flutter/…/scheduler/binding.dart:1175
5 SchedulerBinding.handleBeginFrame.
package:flutter/…/scheduler/binding.dart:1079
6 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:617:13)
7 SchedulerBinding.handleBeginFrame
package:flutter/…/scheduler/binding.dart:1077
8 SchedulerBinding._handleBeginFrame
package:flutter/…/scheduler/binding.dart:994
9 _invoke1 (dart:ui/hooks.dart:167:13)
10 PlatformDispatcher._beginFrame (dart:ui/platform_dispatcher.dart:296:5)
11 _beginFrame (dart:ui/hooks.dart:104:31)
(elided 2 frames from class _AssertionError)
This exception was thrown in the context of a scheduler callback. When the scheduler callback was registered (as opposed to when the exception was thrown), this was the stack
2 SchedulerBinding.scheduleFrameCallback
package:flutter/…/scheduler/binding.dart:538
3 Ticker.scheduleTick
package:flutter/…/scheduler/ticker.dart:265
4 Ticker.start
package:flutter/…/scheduler/ticker.dart:171
5 AnimationController._startSimulation
package:flutter/…/animation/animation_controller.dart:752
6 AnimationController._animateToInternal
package:flutter/…/animation/animation_controller.dart:619
7 AnimationController.animateTo
package:flutter/…/animation/animation_controller.dart:538
Hope it can be repaired!thanks!