Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit dccaa84

Browse files
spellchecker
1 parent 1fe57de commit dccaa84

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

dictionary.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,11 @@ monorepos
201201
decrypts
202202
deploytf
203203
href
204+
colour
205+
favourite
206+
favourites
207+
preflight
208+
nav
204209

205210
^.+[-:_]\w+$
206211
[a-z]+([A-Z0-9]|[A-Z0-9]\w+)

src/pages/guides/dart/flutter.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const title_meta = 'Building your first Flutter application with Nitric'
77

88
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.
99

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.
1111

1212
## Getting started
1313

@@ -80,7 +80,7 @@ dependencies:
8080
8181
### Building the API
8282
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.
8484

8585
```dart {{ label: "lib/services/main.dart" }}
8686
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
249249

250250
![main flutter page](/docs/images/guides/flutter/main_page_final.png)
251251

252-
The second page will show the list of favourites if there are any, otherwise it will display that there are no word pairs currently favourited.
252+
The second page will show the list of favourites if there are any, otherwise it will display that there are no word pairs currently liked.
253253

254254
![favourites flutter page](/docs/images/guides/flutter/favourites_page_final.png)
255255

@@ -308,7 +308,7 @@ class FavouritesProvider extends ChangeNotifier {
308308
}
309309
```
310310

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.
312312

313313
```bash
314314
flutter pub add http
@@ -341,7 +341,7 @@ Future<List<Favourite>> fetchData() async {
341341
}
342342
```
343343

344-
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.
345345

346346
```dart {{ label: "lib/providers/favourites.dart" }}
347347
/// Add english words import
@@ -359,7 +359,7 @@ bool hasFavourite(WordPair pair) {
359359
}
360360
```
361361

362-
Finally, we'll define a function for toggling a word pair as being liked or unliked.
362+
Finally, we'll define a function for toggling a word pair as being liked or not.
363363

364364
```dart {{ label: "lib/providers/favourites.dart" }}
365365
/// Toggles whether a favourite being liked or unliked.
@@ -481,7 +481,7 @@ class GeneratorPage extends StatelessWidget {
481481
}
482482
```
483483

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`.
485485

486486
```dart {{ label: "lib/main.dart" }}
487487
import 'package:flutter/material.dart';
@@ -660,7 +660,7 @@ If you reload the flutter app it should now display your history when you click
660660

661661
### Favourites Page
662662

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:
664664

665665
```dart {{ label: "lib/pages/favourites.dart" }}
666666
import 'package:flutter/material.dart';
@@ -798,7 +798,7 @@ class Application extends StatelessWidget {
798798
}
799799
```
800800

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`.
802802

803803
```dart {{ label: "lib/pages/home.dart" }}
804804
Widget build(BuildContext context) {
@@ -1079,7 +1079,7 @@ COPY --from=build /app/bin/main /app/bin/
10791079
ENTRYPOINT ["/app/bin/main"]
10801080
```
10811081

1082-
We can also add a `.dockerignore` to optimise our image further:
1082+
We can also add a `.dockerignore` to optimize our image further:
10831083

10841084
```txt {{ label: "docker/flutter.dockerignore" }}
10851085
build

0 commit comments

Comments
 (0)