mini_bmob

Last updated:

0 purchases

mini_bmob Image
mini_bmob Images
Add to Cart

Description:

mini bmob

mini_bmob #

Bmob API 接口封装,包含加密传输,包含用户管理、ACL和角色、地理位置、条件查询、数据关联、数组、对象操作。

Bmob API interface encapsulation, including encrypted transmission, including user management, ACL and role, geographic location, conditional query, data association, array and object operation.

安装 #
flutter pub add mini_bmob
copied to clipboard
引用 #
import 'package:mini_bmob/mini_bmob.dart';
copied to clipboard
初始化 #

非加密形式


可查看测试代码no_safe_test.dart

BmobConfig.init(
appId,
apiKey,
masterKey: masterKey,
printError: (object, extra) =>L.e(object),
printResponse: (object, extra) =>L.d(object)
);
copied to clipboard

加密形式


可查看测试代码safe_test.dart

BmobConfig.initSafe(
secretKey,
'JsonYe-',
masterKey: masterKey,
printError: (object, extra) => L.e(object),
printResponse: (object, extra) => L.d(object),
);
copied to clipboard
登陆 #
BmobUserTable _user = BmobUserTable(username:'JsonYe',password:'123456');
await _user.login(); // 登陆后会自动更新sessionToken
copied to clipboard
创建表类 #
class BookTable extends BmobTable{}
copied to clipboard
新增对象 #
BookTable _table = BookTable();
await _table.install();
copied to clipboard
修改对象 #
await _table.update();
copied to clipboard
删除对象 #
await _table.delete();
copied to clipboard
查询列表 #
BmobWhereBuilder _where = BmobWhereBuilder();
_where.whereBasic('name').contain(['Flutter']);
await BmobQueryHelper.list(BookTable(),(json)=>BmobTable().fromJson(json),where:_where);
copied to clipboard
查询对象详情 #
BookTable _book = BookTable()..objectId='69a8a68a10';
await _book.getInfo();
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.