Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update flutter-app.md #3653

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/tutorials/control/flutter-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ class _HomeScreenState extends State<HomeScreen> {

Notice in the file the following line:

```dart {class="line-numbers linkable-line-numbers"}
```dart {class="line-numbers linkable-line-numbers" data-start="28"}
_viam = await Viam.withApiKey(dotenv.env['API_KEY_ID']?? '', dotenv.env['API_KEY']?? '');
```

Expand Down Expand Up @@ -463,7 +463,7 @@ import 'home_screen.dart';

Change `ElevatedButton` in the `Column` to the following:

```dart {class="line-numbers linkable-line-numbers"}
```dart {class="line-numbers linkable-line-numbers" data-start="35"}
ElevatedButton(
onPressed: () => Navigator.of(context)
.push(MaterialPageRoute(builder: (_) => HomeScreen())),
Expand Down Expand Up @@ -673,7 +673,7 @@ Now that you have the code for the screens in place, you can enable navigation b

Connect the home screen to the locations screen by un-commenting the following two lines in <file>home_screen.dart</file>:

```dart {class="line-numbers linkable-line-numbers" data-line="3-4"}
```dart {class="line-numbers linkable-line-numbers" data-line="3-4" data-start="42"}
/// This method will navigate to a specific [Location]. <-- Leave this commented!
void _navigateToLocation(Location location) {
Navigator.of(context) // <-- Un-comment this
Expand Down
Loading