mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
opt.: server provider
This commit is contained in:
@@ -22,6 +22,12 @@ class Server implements TagPickable {
|
||||
|
||||
@override
|
||||
String get tagName => spi.id;
|
||||
|
||||
bool get needGenClient => state < ServerState.connecting;
|
||||
|
||||
bool get canViewDetails => state == ServerState.finished;
|
||||
|
||||
String get id => spi.id;
|
||||
}
|
||||
|
||||
enum ServerState {
|
||||
@@ -38,9 +44,5 @@ enum ServerState {
|
||||
/// Status parsing finished
|
||||
finished;
|
||||
|
||||
bool get shouldConnect => this < ServerState.connecting;
|
||||
|
||||
bool get canViewDetails => this == ServerState.finished;
|
||||
|
||||
operator <(ServerState other) => index < other.index;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user