setFirebaseToken static method

Future<DataResult> setFirebaseToken(
  1. String? token
)

设置FCM token

Implementation

static Future<DataResult> setFirebaseToken(String? token) async {
  Map other = {'token': token};
  var res = await BaseDao.fromBaseJson(other, Address.setFirebaseToken());
  if (res.result) {
    var entity = TokenEntity.fromJson(res.data);
    return DataResult(entity, true);
  }
  return res;
}