add doc comments

Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
Sahil Kumar
2021-04-28 15:45:08 +05:30
parent 8735901c75
commit 75b59f0b51
@@ -164,19 +164,25 @@ class Filter extends Equatable {
String? key, String? key,
}) = Filter.__; }) = Filter.__;
/// Operator to use in filter. /// An operator used for the filter. The operator string must start with `$`
final String operator; final String operator;
/// The "left-hand" side of the filter.
/// Specifies the name of the field the filter should match.
/// ///
/// Some operators like `and` or `or`,
/// don't require the key value to be present.
/// see-more : [_groupOperators]
final String? key; final String? key;
/// /// The "right-hand" side of the filter.
/// Specifies the [value] the filter should match.
final Object /*List<Object>|List<Filter>|String*/ value; final Object /*List<Object>|List<Filter>|String*/ value;
@override @override
List<Object?> get props => [operator, key, value]; List<Object?> get props => [operator, key, value];
/// /// Serializes to json object
Map<String, Object> toJson() { Map<String, Object> toJson() {
final json = <String, Object>{}; final json = <String, Object>{};
final groupOperators = _groupOperators.map((it) => it.rawValue); final groupOperators = _groupOperators.map((it) => it.rawValue);