cloudbase_database_nullsafety 0.0.2
cloudbase_database_nullsafety: ^0.0.2 copied to clipboard

Modify the tencent_cloudbase_database, to support null safety.

Cloudbase Database Nullsafety for Flutter #

Pub

⚠️特别注意(warning)
目前所有空安全版本均为测试版本,请勿在生产使用

腾讯云·云开发的 Flutter空安全(民间改制) 插件,更多的云开发 Flutter 插件请见云开发文档

安装 #

在 flutter 项目的 pubspec.yaml 文件的 dependencies 中添加

dependencies:
  cloudbase_core_nullsafety: ^0.0.2
  cloudbase_database_nullsafety: ^0.0.2

简单示例 #

import 'package:cloudbase_core_nullsafety/cloudbase_core_nullsafety.dart';
import 'package:cloudbase_auth_nullsafety/cloudbase_auth_nullsafety.dart';
import 'package:cloudbase_database_nullsafety/cloudbase_database_nullsafety.dart';

void main() async {
  CloudBaseCore core = CloudBaseCore.init({'env': 'your-env-id'});

  // 匿名登录
  CloudBaseAuth auth = CloudBaseAuth(core);
  CloudBaseAuthState authState = await auth.getAuthState();

  if (authState == null) {
      await auth.signInAnonymously();
  }

  // 数据库查询
  CloudBaseDatabase database = CloudBaseDatabase(core);
  String myOpenID = 'xxx';
  database.collection('user').where({
    '_openid': myOpenID
  });
}

详细文档 #

云开发·数据库

0
likes
100
pub points
5%
popularity

Modify the tencent_cloudbase_database, to support null safety.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

cloudbase_core_nullsafety, flutter

More

Packages that depend on cloudbase_database_nullsafety