Initial commit
This commit is contained in:
24
android/app/src/main/kotlin/com/follow/clash/GlobalState.kt
Normal file
24
android/app/src/main/kotlin/com/follow/clash/GlobalState.kt
Normal file
@@ -0,0 +1,24 @@
|
||||
package com.follow.clash
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.follow.clash.plugins.TilePlugin
|
||||
import io.flutter.embedding.engine.FlutterEngine
|
||||
import java.util.Date
|
||||
|
||||
enum class RunState {
|
||||
START,
|
||||
PENDING,
|
||||
STOP
|
||||
}
|
||||
|
||||
class GlobalState {
|
||||
companion object {
|
||||
val runState: MutableLiveData<RunState> = MutableLiveData<RunState>(RunState.STOP)
|
||||
var runTime: Date? = null
|
||||
var flutterEngine: FlutterEngine? = null
|
||||
fun getCurrentTilePlugin(): TilePlugin? =
|
||||
flutterEngine?.plugins?.get(TilePlugin::class.java) as TilePlugin?
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user