ISearchable class abstract

Class to make data searchable To use this class, extend it and implement the abstract methods searchId and data searchId is a unique identifier for the data data is the data to be searched Example:

class User extends ISearchable {
 final String name;
final String email;
final String id;
User({required this.name, required this.email, required this.id});
@override
String searchId() => id;
@override
Map<String,dynamic> data() => {"name": name, "email": email};
}

The above example will make the User class searchable The searchId is the unique identifier for the user The data is the user's name and email The data is what will be searched The searchId is used to identify the user

Constructors

ISearchable()

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

data() Map<String, dynamic>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
searchId() String
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited