mirror of
https://github.com/foss42/apidash.git
synced 2025-12-05 04:18:56 +08:00
28 lines
672 B
Dart
28 lines
672 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class AutocompleteQuery {
|
|
/// Creates a [AutocompleteQuery] with the specified [query] and
|
|
/// [selection].
|
|
const AutocompleteQuery({
|
|
required this.query,
|
|
required this.selection,
|
|
});
|
|
|
|
/// The query string.
|
|
final String query;
|
|
|
|
/// The selection in the text field.
|
|
final TextSelection selection;
|
|
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
other is AutocompleteQuery &&
|
|
runtimeType == other.runtimeType &&
|
|
query == other.query &&
|
|
selection == other.selection;
|
|
|
|
@override
|
|
int get hashCode => query.hashCode ^ selection.hashCode;
|
|
}
|