requestLiveGameList method

dynamic requestLiveGameList({
  1. dynamic callback(
    1. List<GameListModel>
    )?,
})

获取直播间游戏列表 callback 有礼物数据时回调方法

Implementation

requestLiveGameList({Function(List<GameListModel>)? callback}) {
  RequestRepositoryLiveGame.apiGetLiveGameList((data) {
    if (data != null) {
      _initGameList(data);
    }
    callback?.call(_gameList);
  }, showErrorToast: _gameList.isEmpty);
}