mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-29 04:49:51 +00:00
Move bitcoin and monero parts into self modules.
This commit is contained in:
parent
e6b1da376d
commit
4535a1aaa8
126 changed files with 25452 additions and 0 deletions
54
cw_core/lib/sync_status.dart
Normal file
54
cw_core/lib/sync_status.dart
Normal file
|
@ -0,0 +1,54 @@
|
|||
abstract class SyncStatus {
|
||||
const SyncStatus();
|
||||
double progress();
|
||||
}
|
||||
|
||||
class SyncingSyncStatus extends SyncStatus {
|
||||
SyncingSyncStatus(this.blocksLeft, this.ptc);
|
||||
|
||||
final double ptc;
|
||||
final int blocksLeft;
|
||||
|
||||
@override
|
||||
double progress() => ptc;
|
||||
|
||||
@override
|
||||
String toString() => '$blocksLeft';
|
||||
}
|
||||
|
||||
class SyncedSyncStatus extends SyncStatus {
|
||||
@override
|
||||
double progress() => 1.0;
|
||||
}
|
||||
|
||||
class NotConnectedSyncStatus extends SyncStatus {
|
||||
const NotConnectedSyncStatus();
|
||||
|
||||
@override
|
||||
double progress() => 0.0;
|
||||
}
|
||||
|
||||
class StartingSyncStatus extends SyncStatus {
|
||||
@override
|
||||
double progress() => 0.0;
|
||||
}
|
||||
|
||||
class FailedSyncStatus extends SyncStatus {
|
||||
@override
|
||||
double progress() => 1.0;
|
||||
}
|
||||
|
||||
class ConnectingSyncStatus extends SyncStatus {
|
||||
@override
|
||||
double progress() => 0.0;
|
||||
}
|
||||
|
||||
class ConnectedSyncStatus extends SyncStatus {
|
||||
@override
|
||||
double progress() => 0.0;
|
||||
}
|
||||
|
||||
class LostConnectionSyncStatus extends SyncStatus {
|
||||
@override
|
||||
double progress() => 1.0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue