update method

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

更新某条记录

Implementation

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