getInstance static method

AppP2PApi getInstance()

获取单例

Implementation

static AppP2PApi getInstance() {
  //如果单例为空则创建单例
  if (_instance == null) {
    _instance = new AppP2PApi._internal();
  }
  return _instance!;
}