bmob-database-flutter

Solid

Use when implementing Bmob NoSQL database CRUD in a Flutter / Dart project with the official bmob_plugin package. Triggers: flutter pub add bmob_plugin, package:bmob_plugin/bmob_plugin.dart, Bmob.initialize, BmobQuery, BmobObject, BmobUser, BmobFile, BmobGeoPoint, BmobRelation, BmobAcl, BmobError.convert, blog.save(), query.queryObjects(), query.setInclude, Dart Bmob, Flutter Bmob. NOT for JavaScript / Web / Mini Program (use bmob-database-javascript), Android native without Flutter (use bmob-database-android), iOS native without Flutter (use bmob-database-ios), or server-side HTTP only (use bmob-database-restful). If Bmob MCP is configured, call get_project_tables via bmob-mcp before writing code.

API & Backend 2 stars 0 forks Updated today MIT

Install

View on GitHub

Quality Score: 78/100

Stars 20%
16
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Bmob Database — Flutter / Dart SDK 官方 Flutter 插件 **[`bmob_plugin`](https://pub.dev/packages/bmob_plugin)**(源码 [`bmob-flutter-sdk/data_plugin`](https://github.com/bmob/bmob-flutter-sdk/tree/master/data_plugin))。数据模型 **继承 `BmobObject` + JSON 序列化**(与 Android 类似),查询用泛型 **`BmobQuery<T>`**,异步返回 **`Future`** + `.then` / `.catchError`。 完整 API 以 [BmobDocs Flutter 文档](https://github.com/bmob/BmobDocs/blob/master/mds/data/flutter/index.md) 为准;agent 可直接 WebFetch `metadata.docs_raw`。 ## 核心原则 **1. 安装与引用** ```bash flutter pub add bmob_plugin ``` ```dart import 'package:bmob_plugin/bmob_plugin.dart'; ``` **2. 初始化** — 控制台 → 设置 → 应用密钥 → **Secret Key**、**API 安全码**;**不要**在客户端填 `masterKey`(第三个可选参数仅服务端场景)。 ```dart // main() 或 App 启动最早处 Bmob.initialize(secretKey, apiSafe); // 不推荐:Bmob.initialize(secretKey, apiSafe, masterKey); ``` **3. 上线换备案域名** — `resetDomain` 必须在 `initialize` **之前**(开发期内置测试域名有请求次数限制): ```dart Bmob.resetDomain("http://api.yourdomain.com"); Bmob.initialize(secretKey, apiSafe); ``` **4. 自定义表模型** — 每张业务表一个 Dart 类 **extends `BmobObject`**,并实现 `fromJson` / `toJson`(见 [`references/model-and-init.md`](references/model-and-init.md))。表名默认与类名一致(如 `Blog` → 表 `Blog`)。 **5. 错误处理** — 统一用 `BmobError.convert(e)` 取 `code` / `error`: ```dart }).catchError((e) { final err = BmobError.convert(e); print('${err.code}: ${err.error}'); }); ``` **6. 保留字段** — `objectId`、`createdAt`、`updatedAt`、`ACL` 由 SDK / 服务端维护;业务代码在更新 / 删除时必须设置 `objectId`。 ## 安全清单 - [ ] **客户端不要传 Master Key** 给 `Bmo...

Details

Author
bmob
Repository
bmob/agent-skills
Created
2 months ago
Last Updated
today
Language
Java
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

API & Backend Solid

bmob-database-android

Use when implementing Bmob NoSQL database CRUD in an Android Native project (Java or Kotlin). Triggers: io.github.bmob:android-sdk, Bmob.initialize(this, ...), BmobObject, BmobQuery, BmobUser, BmobInstallation, BmobFile, BmobRelation, BmobGeoPoint, BmobDate, SaveListener, UpdateListener, FindListener, QueryListener, BmobException, BmobContentProvider, AndroidManifest Bmob 配置. NOT for cross-platform JavaScript / WeChat Mini Program / Cocos Creator JS (use bmob-database-javascript), iOS / Swift (use bmob-database-ios), Flutter / Dart (use bmob-database-flutter), or raw HTTP from any other language (use bmob-database-restful). If Bmob MCP is configured, call get_project_tables via bmob-mcp before writing code.

2 Updated today
bmob
API & Backend Solid

bmob-database-ios

Use when implementing Bmob NoSQL database CRUD in an iOS native project — both Objective-C and Swift / SwiftUI / UIKit. Triggers: BmobSDK, BmobSDK.xcframework, pod 'BmobSDK', #import <BmobSDK/Bmob.h>, Bmob registerWithAppKey, [Bmob register(withAppKey:)], BmobObject objectWithClassName, BmobQuery queryWithClassName, BmobUser, BmobInstallation, BmobFile, BmobGeoPoint, BmobRelation, saveInBackgroundWithResultBlock, getObjectInBackgroundWithId, findObjectsInBackground, Bridging-Header.h. NOT for cross-platform JavaScript / WeChat Mini Program (use bmob-database-javascript), Android (use bmob-database-android), Flutter / Dart (use bmob-database-flutter), or any other language via REST (use bmob-database-restful). If Bmob MCP is configured, call get_project_tables via bmob-mcp before writing code.

2 Updated today
bmob
API & Backend Solid

bmob-database-swift

Use when implementing Bmob NoSQL database CRUD with the pure Swift BmobSwiftSDK for iOS 15+ / macOS 12+ using Swift Package Manager or CocoaPods, import BmobSDK, async/await, Bmob.initialize(appKey:), BmobObject, BmobQuery, BmobUser, BmobFile, BmobPointer, BmobRelation, BmobGeoPoint, BmobACL, CloudFunction. NOT for legacy Objective-C BmobSDK / Bridging Header projects (use bmob-database-ios), JavaScript / WeChat Mini Program (use bmob-database-javascript), Android (use bmob-database-android), Flutter / Dart (use bmob-database-flutter), or raw HTTP from other languages (use bmob-database-restful). If Bmob MCP is configured, call get_project_tables via bmob-mcp before writing code.

2 Updated today
bmob