You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 20, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: src/pages/guides/dart/flutter.mdx
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ export const title_meta = 'Building your first Flutter application with Nitric'
7
7
8
8
In this guide we'll go over how to create a basic Flutter application using the Nitric framework as the backend. Dart does not have native support on AWS, GCP, or Azure, so by using the Nitric framework you can use your skills in Dart to create an API and interact with cloud services in an intuitive way.
9
9
10
-
The application will have a Flutter frontend that will generate wordpairs that can be added to a list of favourites. The backend will be a Nitric API with a key value store that can store favourited wordpairs. This application will be simple, but requires that you know the basics of Flutter and Nitric.
10
+
The application will have a Flutter frontend that will generate word pairs that can be added to a list of favourites. The backend will be a Nitric API with a key value store that can store liked word pairs. This application will be simple, but requires that you know the basics of Flutter and Nitric.
11
11
12
12
## Getting started
13
13
@@ -80,7 +80,7 @@ dependencies:
80
80
81
81
### Building the API
82
82
83
-
Define the API and the key value store in the `main.dart` service file. This will create an API named `main` and a kv store named `favourites` and give the function permissions to get, set, and delete documents. The `favourites` store will contain keys with the name of the favourite and then a value with the favourites object.
83
+
Define the API and the key value store in the `main.dart` service file. This will create an API named `main`, a key value store named `favourites`, and the function permissions to get, set, and delete documents. The `favourites` store will contain keys with the name of the favourite and then a value with the favourites object.
84
84
85
85
```dart {{ label: "lib/services/main.dart"}}
86
86
import 'package:nitric_sdk/nitric.dart';
@@ -249,7 +249,7 @@ The first will show the current generated word along with a history of all previ
@@ -308,7 +308,7 @@ class FavouritesProvider extends ChangeNotifier {
308
308
}
309
309
```
310
310
311
-
We'll then add a method for getting a list of favourites and notifying the listeneres. For this we require the `http` package to make requests to our API.
311
+
We'll then add a method for getting a list of favourites and notifying the listeners. For this we require the `http` package to make requests to our API.
We can then make a function for listeners to check if a word pair has been favourited. This requires the `english_words` package for importing the `WordPair` typing.
344
+
We can then make a function for listeners to check if a word pair has been liked. This requires the `english_words` package for importing the `WordPair` typing.
/// Toggles whether a favourite being liked or unliked.
@@ -481,7 +481,7 @@ class GeneratorPage extends StatelessWidget {
481
481
}
482
482
```
483
483
484
-
To test this generation we can build the application entrypoint to run our paplication. In this application we use a `MultiProvider` to supply the child pages with the ability to listen to the `FavouritesProvider` and the `WordProvider`.
484
+
To test this generation we can build the application entrypoint to run our application. In this application we use a `MultiProvider` to supply the child pages with the ability to listen to the `FavouritesProvider` and the `WordProvider`.
485
485
486
486
```dart {{ label: "lib/main.dart" }}
487
487
import 'package:flutter/material.dart';
@@ -660,7 +660,7 @@ If you reload the flutter app it should now display your history when you click
660
660
661
661
### Favourites Page
662
662
663
-
The favourites page will simply list all the favourites and the number that have been favourited:
663
+
The favourites page will simply list all the favourites and the number that have been liked:
664
664
665
665
```dart {{ label: "lib/pages/favourites.dart" }}
666
666
import 'package:flutter/material.dart';
@@ -798,7 +798,7 @@ class Application extends StatelessWidget {
798
798
}
799
799
```
800
800
801
-
For now, you can test both pages by swapping the `selectedIndex` manually. We'll then want to build out a navigation bar for desktop and for mobile. For this we will use a `LayoutBuilder` to check if the screen width is less than 450px.
801
+
For now, you can test both pages by swapping the `selectedIndex` manually. We'll then want to build out a navigation bar for desktop and for mobile. For this we will use a `LayoutBuilder` to check if the screen width is less than `450px`.
0 commit comments