@@ -82,14 +82,15 @@ ModelScreenConfiguration? currentUrlToConfiguration({
82
82
required bool loggedIn,
83
83
required bool verified,
84
84
}) {
85
- return findScreenFromConfigurationAndAuthService(
86
- configuration: ModelScreenConfiguration(
87
- args: Uri.base.queryParameters,
88
- path: Uri.base.path,
89
- ),
90
- loggedIn: loggedIn,
91
- verified: verified,
92
- )?.configuration;
85
+ return letAsOrNull<ModelScreenConfiguration>(
86
+ findScreenFromConfigurationAndAuthService(
87
+ configuration: ModelScreenConfiguration(
88
+ args: Uri.base.queryParameters,
89
+ path: Uri.base.path,
90
+ ),
91
+ loggedIn: loggedIn,
92
+ verified: verified,
93
+ )?.extra,
93
94
}
94
95
95
96
/// Translates the current URL into a [ModelScreenConfiguration] under the
@@ -99,15 +100,17 @@ ModelScreenConfiguration? currentUrlToConfiguration({
99
100
/// screen is accessible, its configuration is returned; otherwise, `null` is
100
101
/// returned.
101
102
ModelScreenConfiguration? currentUrlToLoginConfiguration() {
102
- return findScreenFromConfiguration(
103
- configuration: ModelScreenConfiguration(
104
- args: Uri.base.queryParameters,
105
- path: Uri.base.path,
106
- ),
107
- isLoggedInAndVerified: true,
108
- isLoggedIn: true,
109
- isLoggedOut: false,
110
- )?.configuration;
103
+ return letAsOrNull<ModelScreenConfiguration>(
104
+ findScreenFromConfiguration(
105
+ configuration: ModelScreenConfiguration(
106
+ args: Uri.base.queryParameters,
107
+ path: Uri.base.path,
108
+ ),
109
+ isLoggedInAndVerified: true,
110
+ isLoggedIn: true,
111
+ isLoggedOut: false,
112
+ )?.extra,
113
+ );
111
114
}
112
115
113
116
/// Translates the current URL into a [ModelScreenConfiguration] under the
@@ -116,14 +119,16 @@ ModelScreenConfiguration? currentUrlToLoginConfiguration() {
116
119
/// logged out. If a corresponding screen is accessible, its configuration is
117
120
/// returned; otherwise, `null` is returned.
118
121
ModelScreenConfiguration? currentUrlToLogoutConfiguration() {
119
- return findScreenFromConfiguration(
120
- configuration: ModelScreenConfiguration(
121
- args: Uri.base.queryParameters,
122
- path: Uri.base.path,
123
- ),
124
- isLoggedInAndVerified: false,
125
- isLoggedIn: false,
126
- isLoggedOut: true,
127
- )?.configuration;
122
+ return letAsOrNull<ModelScreenConfiguration>(
123
+ findScreenFromConfiguration(
124
+ configuration: ModelScreenConfiguration(
125
+ args: Uri.base.queryParameters,
126
+ path: Uri.base.path,
127
+ ),
128
+ isLoggedInAndVerified: false,
129
+ isLoggedIn: false,
130
+ isLoggedOut: true,
131
+ )?.extra,
132
+ );
128
133
}
129
134
```
0 commit comments