I see that there's a package in flutter that would let me use binarySearch
and lowerBound
https://api.flutter.dev/flutter/package-collection_collection/lowerBound.html
At first, binarySearch
and lowerBound
were undefined and using my IDE, I was told to import
import 'package:flutter/foundation.dart';
I did and I'm now able to use binarySearch
, but I am still not able to use lowerBound
and there are no suggested imports for this.
The goal is to insert a value into a List<int>
sorted by descending.
And I would like to do this.
Any ideas on why I'm not able to using lowerBound
?