mcrovero / rubber

An elastic material bottom sheet implementation for Flutter.
BSD 2-Clause "Simplified" License
562 stars 88 forks source link

Got error when build the widget tree #14

Open kashlo opened 5 years ago

kashlo commented 5 years ago

Describe the bug flutter: ══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════ flutter: The following assertion was thrown during a scheduler callback: flutter: AnimationController.animateTo() called with no explicit Duration and no default Duration. flutter: Either the "duration" argument to the animateTo() method should be provided, or the "duration" flutter: property should be set, either in the constructor or later, before calling the animateTo() function. flutter: flutter: When the exception was thrown, this was the stack: flutter: #0 RubberAnimationController._animateToInternal. (package:rubber/src/animation_controller.dart:312:11) flutter: #1 RubberAnimationController._animateToInternal (package:rubber/src/animation_controller.dart:320:8) flutter: #2 RubberAnimationController.height= (package:rubber/src/animation_controller.dart:191:5) flutter: #3 _RubberBottomSheetState.afterFirstLayout (package:rubber/src/bottom_sheet.dart:296:17) flutter: #4 __RubberBottomSheetState&State&TickerProviderStateMixin&AfterLayoutMixin.initState. (package:after_layout/after_layout.dart:10:38) flutter: #5 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15) flutter: #6 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:938:9) flutter: #7 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:842:5) flutter: #8 _invoke (dart:ui/hooks.dart:159:13) flutter: #9 _drawFrame (dart:ui/hooks.dart:148:3)

To Reproduce Steps to reproduce the behavior:


  void initState() {
    _controller = RubberAnimationController(
      halfBoundValue: AnimationControllerValue(percentage: 0.5),
      vsync: this,
    );
    super.initState();
}

**Smartphone (please complete the following information):**
 - Device: iPhoneXR Simulator

**Additional context**
Add any other context about the problem here.
mcrovero commented 5 years ago

This should be now fixed, please confirm.