update method

Future<bool> update([
  1. Map<String, dynamic>? body
])

更新某条记录

Implementation

Future<bool> update([Map<String, dynamic>? body]) async {
  if (objectId.isEmpty) throw Exception('objectId is empty');
  var data = await BmobNetHelper.init().put(
      '/1/classes/${getBmobTabName()}/$objectId',
      body: body ?? createJson());
  if (data != null && data.containsKey('updatedAt')) {
    updatedAt = data['updatedAt'];
    return true;
  }
  return false;
}