AndomieUtils class
Utility class for providing common functionality related to data lists.
The AndomieUtils class includes static methods to retrieve the suggested position of an item in a list based on a query. This can be useful, for example, in autocomplete scenarios where you want to suggest a position in the list for a given query.
Example usage:
List<String> fruits = ['Apple', 'Banana', 'Orange', 'Grapes'];
String query = 'Banana';
int suggestedPosition = Provider.getSuggestedPosition(query, fruits);
print('Suggested position for $query: $suggestedPosition');
In this example, the getSuggestedPosition
method will return the index
of the item 'Banana' in the list of fruits. If the item is not found, it
will return the default index, which is the length of the list.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
brightness(
Color? color) → double -
brightnessFromImage(
Uint8List bytes, int width, int height) → double -
getSuggestedPosition<
T> (T query, List< T> ? list) → int - Gets the suggested position of the given query in the provided list.
-
isKeyboardVisible(
BuildContext context) → bool -
isLight(
Color? color) → bool -
isLightImage(
Uint8List bytes, int width, int height) → bool