leancloud_storage

Last updated:

0 purchases

leancloud_storage Image
leancloud_storage Images
Add to Cart

Description:

leancloud storage

leancloud_storage #



LeanCloud Storage Flutter SDK
Install #
Adding dependency in pubspec.yaml:
dependencies:
...
leancloud_storage: ^0.7.10
copied to clipboard
Then run the following command:
$ flutter pub get
copied to clipboard
Import #
import 'package:leancloud_storage/leancloud.dart';
copied to clipboard
Initialize #
LeanCloud.initialize(
APP_ID, APP_KEY,
server: APP_SERVER, // to use your own custom domain
queryCache: new LCQueryCache() // optinoal, enable cache
);
copied to clipboard
Debug #
Enable debug logs:
LCLogger.setLevel(LCLogger.DebugLevel);
copied to clipboard
Usage #
Objects #
LCObject object = new LCObject('Hello');
object['intValue'] = 123;
await object.save();
copied to clipboard
Queries #
LCQuery<LCObject> query = new LCQuery<LCObject>('Hello');
query.limit(limit);
List<LCObject> list = await query.find();
copied to clipboard
Files #
LCFile file = await LCFile.fromPath('avatar', './avatar.jpg');
await file.save(onProgress: (int count, int total) {
print('$count/$total');
if (count == total) {
print('done');
}
});
copied to clipboard
Users #
await LCUser.login('hello', 'world');
copied to clipboard
GeoPoints #
LCGeoPoint p1 = new LCGeoPoint(20.0059, 110.3665);
copied to clipboard
More #
Refer to LeanStorage Flutter Guide for more usage information.
The guide is also available in Chinese (δΈ­ζ–‡ζŒ‡ε—).
For LeanMessage, check out LeanCloud Official Plugin.

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.