GotJimmy / accordion

Other
47 stars 44 forks source link

Old version of scroll_to_index giving warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null. #23

Closed ishaantantra closed 2 years ago

ishaantantra commented 2 years ago

I am getting the bellow mentioned error every time I start my web-application (Flutter-Web).

/C:/flutter/.pub-cache/hosted/pub.dartlang.org/scroll_to_index-2.1.1/lib/scroll_to_index.dart:358:57: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
- 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('/C:/flutter/packages/flutter/lib/src/scheduler/binding.dart').
package:flutter/…/scheduler/binding.dart:1
  Future _waitForWidgetStateBuild() => SchedulerBinding.instance!.endOfFrame;

This issues seems because accordion is using old version of scroll_to_index (2.1.1). Latest release is scroll_to_index: ^3.0.1.

is it possible to update the dependency.

GotJimmy commented 2 years ago

Yes, upgrade coming in the next few days.

GotJimmy commented 2 years ago

Fixed. Thanks @anatolinicolae