@@ -254,7 +254,7 @@ The configuration command guides you through the following processes:
254
254
255
255
Flutter on macOS builds fully sandboxed apps. As this app integrates with the network to communicate with the Firebase servers, you need to configure your app with network client privileges.
256
256
257
- #### [ macos/Runner/DebugProfile.entitlements] ( https://github.com/flutter/codelabs/blob/master /firebase-get-to-know-flutter/step_04/macos/Runner/DebugProfile.entitlements )
257
+ #### [ macos/Runner/DebugProfile.entitlements] ( https://github.com/flutter/codelabs/blob/main /firebase-get-to-know-flutter/step_04/macos/Runner/DebugProfile.entitlements )
258
258
``` xml
259
259
<?xml version =" 1.0" encoding =" UTF-8" ?>
260
260
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
@@ -273,7 +273,7 @@ Flutter on macOS builds fully sandboxed apps. As this app integrates with the ne
273
273
</plist >
274
274
```
275
275
276
- #### [ macos/Runner/Release.entitlements] ( https://github.com/flutter/codelabs/blob/master /firebase-get-to-know-flutter/step_04/macos/Runner/Release.entitlements )
276
+ #### [ macos/Runner/Release.entitlements] ( https://github.com/flutter/codelabs/blob/main /firebase-get-to-know-flutter/step_04/macos/Runner/Release.entitlements )
277
277
``` xml
278
278
<?xml version =" 1.0" encoding =" UTF-8" ?>
279
279
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
@@ -303,7 +303,7 @@ Use the [`provider` package](https://pub.dev/packages/provider) to make a centr
303
303
304
304
1 . Create a new file named ` app_state.dart ` with the following content:
305
305
306
- #### [ lib/app_state.dart] ( https://github.com/flutter/codelabs/blob/master /firebase-get-to-know-flutter/step_05/lib/app_state.dart#L1 )
306
+ #### [ lib/app_state.dart] ( https://github.com/flutter/codelabs/blob/main /firebase-get-to-know-flutter/step_05/lib/app_state.dart#L1 )
307
307
308
308
``` dart
309
309
import 'package:firebase_auth/firebase_auth.dart'
@@ -352,7 +352,7 @@ You only use a provider to communicate the state of a user's login status to the
352
352
353
353
1 . Modify the imports at the top of the ` lib/main.dart ` file:
354
354
355
- #### [ lib/main.dart] ( https://github.com/flutter/codelabs/blob/master /firebase-get-to-know-flutter/step_05/lib/main.dart#L1 )
355
+ #### [ lib/main.dart] ( https://github.com/flutter/codelabs/blob/main /firebase-get-to-know-flutter/step_05/lib/main.dart#L1 )
356
356
357
357
``` dart
358
358
import 'package:firebase_ui_auth/firebase_ui_auth.dart'; // new
@@ -367,7 +367,7 @@ import 'home_page.dart';
367
367
368
368
2 . Connect the app state with the app initialization and then add the authentication flow to ` HomePage ` :
369
369
370
- #### [ lib/main.dart] ( https://github.com/flutter/codelabs/blob/master /firebase-get-to-know-flutter/step_05/lib/main.dart#L14 )
370
+ #### [ lib/main.dart] ( https://github.com/flutter/codelabs/blob/main /firebase-get-to-know-flutter/step_05/lib/main.dart#L14 )
371
371
372
372
``` dart
373
373
void main() {
@@ -386,7 +386,7 @@ The modification to the `main()` function makes the provider package responsible
386
386
387
387
3 . Update your app to handle navigation to different screens that FirebaseUI provides for you, by creating a ` GoRouter ` configuration:
388
388
389
- #### [ lib/main.dart] ( https://github.com/flutter/codelabs/blob/master /firebase-get-to-know-flutter/step_05/lib/main.dart#L23 )
389
+ #### [ lib/main.dart] ( https://github.com/flutter/codelabs/blob/main /firebase-get-to-know-flutter/step_05/lib/main.dart#L23 )
390
390
391
391
``` dart
392
392
// Add GoRouter configuration outside the App class
@@ -438,7 +438,7 @@ final _router = GoRouter(
438
438
GoRoute(
439
439
path: 'forgot-password',
440
440
builder: (context, state) {
441
- final arguments = state.queryParameters;
441
+ final arguments = state.uri. queryParameters;
442
442
return ForgotPasswordScreen(
443
443
email: arguments['email'],
444
444
headerMaxExtent: 200,
@@ -495,7 +495,7 @@ Each screen has a different type of action associated with it based on the new s
495
495
496
496
4 . In the ` HomePage ` class's build method, integrate the app state with the ` AuthFunc ` widget:
497
497
498
- #### [ lib/home_page.dart] ( https://github.com/flutter/codelabs/blob/master /firebase-get-to-know-flutter/step_05/lib/home_page.dart#L14 )
498
+ #### [ lib/home_page.dart] ( https://github.com/flutter/codelabs/blob/main /firebase-get-to-know-flutter/step_05/lib/home_page.dart#L14 )
499
499
500
500
``` dart
501
501
import 'package:firebase_auth/firebase_auth.dart' // new
@@ -596,7 +596,7 @@ In this section, you add the functionality for users to write messages to the da
596
596
597
597
1 . Create a new file named ` guest_book.dart ` , add a ` GuestBook ` stateful widget to construct the UI elements of a message field and a send button:
598
598
599
- #### [ lib/guest_book.dart] ( https://github.com/flutter/codelabs/blob/master /firebase-get-to-know-flutter/step_06/lib/guest_book.dart )
599
+ #### [ lib/guest_book.dart] ( https://github.com/flutter/codelabs/blob/main /firebase-get-to-know-flutter/step_06/lib/guest_book.dart )
600
600
601
601
``` dart
602
602
import 'dart:async';
@@ -696,7 +696,7 @@ Note that `FirebaseAuth.instance.currentUser.uid` is a reference to the autogene
696
696
697
697
* In the ` lib/app_state.dart ` file, add the ` addMessageToGuestBook ` method. You connect this capability with the user interface in the next step.
698
698
699
- #### [ lib/app_state.dart] ( https://github.com/flutter/codelabs/blob/master /firebase-get-to-know-flutter/step_06/lib/app_state.dart#L41 )
699
+ #### [ lib/app_state.dart] ( https://github.com/flutter/codelabs/blob/main /firebase-get-to-know-flutter/step_06/lib/app_state.dart#L41 )
700
700
701
701
``` dart
702
702
import 'package:cloud_firestore/cloud_firestore.dart'; // new
@@ -737,7 +737,7 @@ You have a UI where the user can enter the text they want to add to the Guest Bo
737
737
738
738
* In the ` lib/home_page.dart ` file, make the following change to the ` HomePage ` widget:
739
739
740
- #### [ lib/home_page.dart] ( https://github.com/flutter/codelabs/blob/master /firebase-get-to-know-flutter/step_06/lib/home_page.dart#L15 )
740
+ #### [ lib/home_page.dart] ( https://github.com/flutter/codelabs/blob/main /firebase-get-to-know-flutter/step_06/lib/home_page.dart#L15 )
741
741
742
742
``` dart
743
743
import 'package:firebase_auth/firebase_auth.dart'
@@ -830,7 +830,7 @@ To display messages, you need to add listeners that trigger when data changes an
830
830
831
831
1 . Create a new file ` guest_book_message.dart ` , add the following class to expose a structured view of the data that you store in Firestore.
832
832
833
- #### [ lib/guest_book_message.dart] ( https://github.com/flutter/codelabs/blob/master /firebase-get-to-know-flutter/step_07/lib/guest_book_message.dart )
833
+ #### [ lib/guest_book_message.dart] ( https://github.com/flutter/codelabs/blob/main /firebase-get-to-know-flutter/step_07/lib/guest_book_message.dart )
834
834
835
835
``` dart
836
836
class GuestBookMessage {
@@ -843,7 +843,7 @@ class GuestBookMessage {
843
843
844
844
2 . In the ` lib/app_state.dart ` file, add the following imports:
845
845
846
- #### [ lib/app_state.dart] ( https://github.com/flutter/codelabs/blob/master /firebase-get-to-know-flutter/step_07/lib/app_state.dart#L1 )
846
+ #### [ lib/app_state.dart] ( https://github.com/flutter/codelabs/blob/main /firebase-get-to-know-flutter/step_07/lib/app_state.dart#L1 )
847
847
848
848
``` dart
849
849
import 'dart:async'; // new
@@ -861,7 +861,7 @@ import 'guest_book_message.dart'; // new
861
861
862
862
3 . In section of ` ApplicationState ` where you define state and getters, add the following lines:
863
863
864
- #### [ lib/app_state.dart] ( https://github.com/flutter/codelabs/blob/master /firebase-get-to-know-flutter/step_07/lib/app_state.dart#L22 )
864
+ #### [ lib/app_state.dart] ( https://github.com/flutter/codelabs/blob/main /firebase-get-to-know-flutter/step_07/lib/app_state.dart#L22 )
865
865
866
866
``` dart
867
867
bool _loggedIn = false;
@@ -876,7 +876,7 @@ import 'guest_book_message.dart'; // new
876
876
877
877
4 . In the initialization section of ` ApplicationState ` , add the following lines to subscribe to a query over the document collection when a user logs in and unsubscribe when they log out:
878
878
879
- #### [ lib/app_state.dart] ( https://github.com/flutter/codelabs/blob/master /firebase-get-to-know-flutter/step_07/lib/app_state.dart#L29 )
879
+ #### [ lib/app_state.dart] ( https://github.com/flutter/codelabs/blob/main /firebase-get-to-know-flutter/step_07/lib/app_state.dart#L29 )
880
880
881
881
``` dart
882
882
Future<void> init() async {
@@ -930,7 +930,7 @@ import 'guest_book_message.dart';
930
930
931
931
6 . In the ` GuestBook ` widget, add a list of messages as part of the configuration to connect this changing state to the user interface:
932
932
933
- #### [ lib/guest_book.dart] ( https://github.com/flutter/codelabs/blob/master /firebase-get-to-know-flutter/step_07/lib/guest_book.dart#L12 )
933
+ #### [ lib/guest_book.dart] ( https://github.com/flutter/codelabs/blob/main /firebase-get-to-know-flutter/step_07/lib/guest_book.dart#L12 )
934
934
935
935
``` dart
936
936
class GuestBook extends StatefulWidget {
@@ -951,7 +951,7 @@ class GuestBook extends StatefulWidget {
951
951
952
952
7 . In ` _GuestBookState ` , modify the ` build ` method as follows to expose this configuration:
953
953
954
- #### [ lib/guest_book.dart] ( https://github.com/flutter/codelabs/blob/master /firebase-get-to-know-flutter/step_07/lib/guest_book.dart#L26 )
954
+ #### [ lib/guest_book.dart] ( https://github.com/flutter/codelabs/blob/main /firebase-get-to-know-flutter/step_07/lib/guest_book.dart#L26 )
955
955
956
956
``` dart
957
957
class _GuestBookState extends State<GuestBook> {
@@ -1021,7 +1021,7 @@ You wrap the previous content of the `build()` method with a `Column` widget and
1021
1021
1022
1022
8 . Update the body of ` HomePage ` to correctly construct ` GuestBook ` with the new ` messages ` parameter:
1023
1023
1024
- #### [ lib/home_page.dart] ( https://github.com/flutter/codelabs/blob/master /firebase-get-to-know-flutter/step_07/lib/home_page.dart#L48 )
1024
+ #### [ lib/home_page.dart] ( https://github.com/flutter/codelabs/blob/main /firebase-get-to-know-flutter/step_07/lib/home_page.dart#L48 )
1025
1025
1026
1026
``` dart
1027
1027
Consumer<ApplicationState>(
@@ -1140,7 +1140,7 @@ In this step, you get organized and let people know how many people are coming.
1140
1140
1141
1141
1. In the ` lib/ app_state .dart ` file, add the following lines to the accessors section of the ` ApplicationState` so that the UI code can interact with this state:
1142
1142
1143
- #### [lib/app_state.dart](https://github.com/flutter/codelabs/blob/master /firebase-get-to-know-flutter/step_09/lib/app_state.dart#L37)
1143
+ #### [lib/app_state.dart](https://github.com/flutter/codelabs/blob/main /firebase-get-to-know-flutter/step_09/lib/app_state.dart#L37)
1144
1144
1145
1145
` ` ` dart
1146
1146
int _attendees = 0 ;
@@ -1163,7 +1163,7 @@ set attending(Attending attending) {
1163
1163
1164
1164
2. Update the ` ApplicationState` 's ` init ()` method as follows:
1165
1165
1166
- #### [lib/app_state.dart](https://github.com/flutter/codelabs/blob/master /firebase-get-to-know-flutter/step_09/lib/app_state.dart#L80)
1166
+ #### [lib/app_state.dart](https://github.com/flutter/codelabs/blob/main /firebase-get-to-know-flutter/step_09/lib/app_state.dart#L80)
1167
1167
1168
1168
` ` ` dart
1169
1169
Future< void > init () async {
@@ -1237,15 +1237,15 @@ This code adds an always-subscribed query to determine the number of attendees a
1237
1237
1238
1238
3. Add the following enumeration at the top of the ` lib/ app_state .dart ` file.
1239
1239
1240
- #### [lib/app_state.dart](https://github.com/flutter/codelabs/blob/master /firebase-get-to-know-flutter/step_09/lib/app_state.dart#L5)
1240
+ #### [lib/app_state.dart](https://github.com/flutter/codelabs/blob/main /firebase-get-to-know-flutter/step_09/lib/app_state.dart#L5)
1241
1241
1242
1242
` ` ` dart
1243
1243
enum Attending { yes, no, unknown }
1244
1244
` ` `
1245
1245
1246
1246
4. Create a new file ` yes_no_selection .dart ` , define a new widget that acts like radio buttons:
1247
1247
1248
- #### [lib/yes_no_selection.dart](https://github.com/flutter/codelabs/blob/master /firebase-get-to-know-flutter/step_09/lib/yes_no_selection.dart)
1248
+ #### [lib/yes_no_selection.dart](https://github.com/flutter/codelabs/blob/main /firebase-get-to-know-flutter/step_09/lib/yes_no_selection.dart)
1249
1249
1250
1250
` ` ` dart
1251
1251
import ' package:flutter/material.dart' ;
@@ -1322,7 +1322,7 @@ It starts in an indeterminate state with neither **Yes** nor **No** selected. On
1322
1322
1323
1323
5. Update ` HomePage` 's ` build ()` method to take advantage of ` YesNoSelection` , enable a logged-in user to nominate whether they're attending, and display the number of attendees for the event:
1324
1324
1325
- #### [lib/home_page.dart](https://github.com/flutter/codelabs/blob/master /firebase-get-to-know-flutter/step_09/lib/home_page.dart#L56)
1325
+ #### [lib/home_page.dart](https://github.com/flutter/codelabs/blob/main /firebase-get-to-know-flutter/step_09/lib/home_page.dart#L56)
1326
1326
1327
1327
` ` ` dart
1328
1328
Consumer< ApplicationState> (
0 commit comments