| 1 | enum SyncType { aggresive, hourly, daily } |
| 2 | |
| 3 | class SyncMode { |
| 4 | SyncMode(this.name, this.type, this.frequency); |
| 5 | |
| 6 | final String name; |
| 7 | final SyncType type; |
| 8 | final Duration frequency; |
| 9 | |
| 10 | static final all = [ |
| 11 | // **Technically** we could call aggressive option "15 minutes" but OS may "not feel like it", |
| 12 | // so instead we will call it aggressive so user knows that it will be as frequent as possible. |
| 13 | SyncMode("Aggressive", SyncType.aggresive, Duration(minutes: 15)), |
| 14 | SyncMode("Hourly", SyncType.hourly, Duration(hours: 1)), |
| 15 | SyncMode("Daily", SyncType.daily, Duration(hours: 18)), // yes this is straight up lie. |
| 16 | ]; |
| 17 | } |