package com.example.base.utils

import com.example.base.MvvmApplication


/**
 * @date 2021-08-15 09:10
 * @desc 在application 初始化
 */

object Utils {

    private var instance: MvvmApplication? = null


    fun init(application: MvvmApplication) {

        instance = application
    }

    @JvmStatic
    fun getApp(): MvvmApplication {
        if (instance == null) {
            throw RuntimeException("Utils::Init::Invoke init(context) first!")
        }
        return instance!!
    }



}