This repository contains example Flutter projects that use the brainCloud Dart client. This is a good place to start learning how the various brainCloud APIs can be used.
- Flutter SDK (each sample's
pubspec.yamllists its minimum Dart SDK underenvironment: sdk:) - A brainCloud app — sign up and create one at the brainCloud portal. You'll need the app's App ID and App Secret (Design > Core App Info).
None of these samples ship with real credentials. Each one reads its connection info from a bc_config.json file that you create in the sample's root folder (it's gitignored, so your credentials won't be committed):
{
"serverUrl": "https://api.braincloudservers.com/dispatcherv2",
"secretKey": "<app secret from brainCloud portal>",
"appId": "<app id from brainCloud portal>",
"version": "1.0.0"
}Point every sample at its own brainCloud app — don't reuse one app across samples.
| Sample | Description |
|---|---|
| AceyDeucey | Casino-style card betting game — bet on whether a drawn card falls between two others, with cloud code scripts settling the virtual currency. |
| bc_chat | Real-time chat demo built on brainCloud's Messaging service. |
| spider_solitaire | Spider Solitaire with anonymous auth, player stats, and a cloud code script for username claims. |
cd <SampleName>
flutter pub get
flutter run --dart-define-from-file=bc_config.jsonSee each sample's README for anything specific to it (enabling Chat, uploading cloud code, etc).
For more on brainCloud, check out the brainCloud Docs and the Dart client repository.