Skip to content

Commit

Permalink
Update dependencies and the README
Browse files Browse the repository at this point in the history
  • Loading branch information
dacharyc committed Dec 20, 2023
1 parent ae42588 commit 423a5df
Show file tree
Hide file tree
Showing 6 changed files with 268 additions and 186 deletions.
53 changes: 43 additions & 10 deletions sync-todo/v2/client/flutter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ For this template app to work, you must ensure that `/assets/config/atlasConfig.

- **appId:** your Atlas App Services App ID.
- **baseUrl:** the App Services backend URL. This should be https://realm.mongodb.com in most cases.
- **atlasExplorerLink:** the App Services Data Explorer URL. This should be similar to https://cloud.mongodb.com/links/<YOUR-ATLAS-PROJECT-ID>/explorer/<YOUR-CLUSTER-NAME>/database/collection/find

### Using the Atlas App Services UI

Expand All @@ -19,26 +20,58 @@ The easiest way to use this template app is to log on to [Atlas App Services](ht
created, you can download this Flutter template app pre-configured for your new
app.

When you download the Flutter template from the Atlas App Services UI,
the `atlasConfig.json` comes pre-populated with the correct values for your
application. You can proceed to **Getting Started** below.

### Cloning from GitHub

If you have cloned this repository from the GitHub
[mongodb/template-app-dart-flutter-todo](https://github.com/mongodb/template-app-dart-flutter-todo.git)
repository, you must create a separate App Services App with Device Sync
enabled to use this client. You can find information about how to do this
in the Atlas App Services documentation page:
repository, you must create an App Services App with Device Sync
enabled to use this client. Then, you must manually populate the values in
the `/assets/config/atlasConfig.json` file that the Flutter client references
when it runs.

#### Create an App Services app

You can find information about how to create an App Services App configured
to run this client as a Real-Time Sync demo in the Atlas App Services
documentation page:
[Template Apps -> Create a Template App](https://www.mongodb.com/docs/atlas/app-services/reference/template-apps/)

Once you have created the App Services App, replace any value in this client's
#### Populate fields in your atlasConfig.json

For this template app to work, you must ensure that
`/assets/config/atlasConfig.json` exists and contains the following properties:

- **appId:** your Atlas App Services App ID.
- **baseUrl:** the App Services backend URL. This should be https://realm.mongodb.com in most cases.
- **atlasExplorerLink:** the App Services Data Explorer URL. This should be similar to https://cloud.mongodb.com/links/<YOUR-ATLAS-PROJECT-ID>/explorer/<YOUR-CLUSTER-NAME>/database/collection/find

Once you have created the App Services App, replace any value in the
`appId` field with your App Services App ID. For help finding this ID, refer
to: [Find Your Project or App Id](https://www.mongodb.com/docs/atlas/app-services/reference/find-your-project-or-app-id/)

### Download the Client as a Zip File
If you do not populate the `appId` field, the app will compile and run but you
won't be able to create users or log in to Atlas.

Replace any value in the `dataExplorerLink` field with your Atlas
Data Explorer link. This link is similar to:

```
https://cloud.mongodb.com/links/YOUR-ATLAS-PROJECT-ID/explorer/YOUR-CLUSTER-NAME/database/collection/find
```

Replace `YOUR-ATLAS-PROJECT-ID` with your Atlas Project ID. For help finding
this ID, refer to: [Find your Atlas Project Id](https://www.mongodb.com/docs/atlas/app-services/apps/metadata/#find-your-atlas-project-id)

Replace `YOUR-CLUSTER-NAME` with the name of your Atlas cluster. If you accept
the default value when you create the cluster, the cluster name is `Cluster0`.

If you have downloaded this client as a .zip file from the Atlas App Services
UI, it does not contain the App Services App ID. You must replace any value
in this client's `appId` field in `/assets/config/atlasConfig.json`
with your App Services App ID. For help finding this ID, refer to:
[Find Your Project or App Id](https://www.mongodb.com/docs/atlas/app-services/reference/find-your-project-or-app-id/)
If you do not populate the `dataExplorerLink` field, the app will compile and
run but you will get an unhandled exception if you tap the link that says
"To see your changes in Atlas, tap here."

## Getting Started

Expand Down
Loading

0 comments on commit 423a5df

Please sign in to comment.