@@ -31,9 +31,7 @@ final _screenSegmentMapper = _InsightMapper(
31
31
final path = insight.annotation.path ?? '' ;
32
32
final screenSegment = p.joinAll (
33
33
[
34
- path.isNotEmpty && path.startsWith (RegExp (r'[\\/]' ))
35
- ? path.substring (1 )
36
- : path,
34
+ path.isNotEmpty && path.startsWith (RegExp (r'[\\/]' )) ? path.substring (1 ) : path,
37
35
screenKey,
38
36
],
39
37
);
@@ -79,15 +77,14 @@ final insightMappers = [
79
77
_InsightMapper (
80
78
placeholder: Placeholders .IS_ACCESSIBLE_ONLY_IF_LOGGED_IN_AND_VERIFIED ,
81
79
mapInsights: (insight) async {
82
- final b =
83
- insight.annotation.isAccessibleOnlyIfLoggedInAndVerified ?? false ;
80
+ final b = insight.annotation.isAccessibleOnlyIfLoggedInAndVerified ?? false ;
84
81
return b.toString ();
85
82
},
86
83
),
87
84
_InsightMapper (
88
85
placeholder: Placeholders .IS_ACCESSIBLE_ONLY_IF_LOGGED_IN ,
89
86
mapInsights: (insight) async {
90
- final b = insight.annotation.isAccessibleOnlyIfLoggedIn ?? true ;
87
+ final b = insight.annotation.isAccessibleOnlyIfLoggedIn ?? false ;
91
88
return b.toString ();
92
89
},
93
90
),
@@ -101,8 +98,7 @@ final insightMappers = [
101
98
_InsightMapper (
102
99
placeholder: Placeholders .IS_ALWAYS_ACCESSIBLE ,
103
100
mapInsights: (insight) async {
104
- final a =
105
- insight.annotation.isAccessibleOnlyIfLoggedInAndVerified ?? false ;
101
+ final a = insight.annotation.isAccessibleOnlyIfLoggedInAndVerified ?? false ;
106
102
final b = insight.annotation.isAccessibleOnlyIfLoggedIn ?? false ;
107
103
final c = insight.annotation.isAccessibleOnlyIfLoggedOut ?? false ;
108
104
if (a && b) {
@@ -145,10 +141,8 @@ final insightMappers = [
145
141
_InsightMapper (
146
142
placeholder: Placeholders .IP0 ,
147
143
mapInsights: (insight) async {
148
- final params = insight.annotation.internalParameters
149
- ? .map ((e) => FieldUtils .ofOrNull (e))
150
- .nonNulls ??
151
- {};
144
+ final params =
145
+ insight.annotation.internalParameters? .map ((e) => FieldUtils .ofOrNull (e)).nonNulls ?? {};
152
146
if (params.isNotEmpty) {
153
147
final a = params.map ((e) {
154
148
final fieldName = e.fieldPath! .join ('_' ).toCamelCase ();
@@ -176,10 +170,8 @@ final insightMappers = [
176
170
_InsightMapper (
177
171
placeholder: Placeholders .IP1 ,
178
172
mapInsights: (insight) async {
179
- final params = insight.annotation.internalParameters
180
- ? .map ((e) => FieldUtils .ofOrNull (e))
181
- .nonNulls ??
182
- {};
173
+ final params =
174
+ insight.annotation.internalParameters? .map ((e) => FieldUtils .ofOrNull (e)).nonNulls ?? {};
183
175
if (params.isNotEmpty) {
184
176
final a = params.map ((e) {
185
177
final fieldName = e.fieldPath! .join ('_' ).toCamelCase ();
@@ -199,10 +191,8 @@ final insightMappers = [
199
191
_InsightMapper (
200
192
placeholder: Placeholders .IP2 ,
201
193
mapInsights: (insight) async {
202
- final params = insight.annotation.internalParameters
203
- ? .map ((e) => FieldUtils .ofOrNull (e))
204
- .nonNulls ??
205
- {};
194
+ final params =
195
+ insight.annotation.internalParameters? .map ((e) => FieldUtils .ofOrNull (e)).nonNulls ?? {};
206
196
if (params.isNotEmpty) {
207
197
final a = params.map ((e) {
208
198
final fieldName = e.fieldPath! .join ('_' ).toCamelCase ();
@@ -220,10 +210,8 @@ final insightMappers = [
220
210
_InsightMapper (
221
211
placeholder: Placeholders .QP0 ,
222
212
mapInsights: (insight) async {
223
- final params = insight.annotation.queryParameters
224
- ? .map ((e) => FieldUtils .ofOrNull (e))
225
- .nonNulls ??
226
- {};
213
+ final params =
214
+ insight.annotation.queryParameters? .map ((e) => FieldUtils .ofOrNull (e)).nonNulls ?? {};
227
215
if (params.isNotEmpty) {
228
216
final a = params.map ((e) {
229
217
final fieldName = e.fieldPath! .join ('_' ).toCamelCase ();
@@ -251,10 +239,8 @@ final insightMappers = [
251
239
_InsightMapper (
252
240
placeholder: Placeholders .QP1 ,
253
241
mapInsights: (insight) async {
254
- final params = insight.annotation.queryParameters
255
- ? .map ((e) => FieldUtils .ofOrNull (e))
256
- .nonNulls ??
257
- {};
242
+ final params =
243
+ insight.annotation.queryParameters? .map ((e) => FieldUtils .ofOrNull (e)).nonNulls ?? {};
258
244
if (params.isNotEmpty) {
259
245
final a = params.map ((e) {
260
246
final fieldName = e.fieldPath! .join ('_' ).toCamelCase ();
@@ -271,10 +257,8 @@ final insightMappers = [
271
257
_InsightMapper (
272
258
placeholder: Placeholders .QP2 ,
273
259
mapInsights: (insight) async {
274
- final params = insight.annotation.queryParameters
275
- ? .map ((e) => FieldUtils .ofOrNull (e))
276
- .nonNulls ??
277
- {};
260
+ final params =
261
+ insight.annotation.queryParameters? .map ((e) => FieldUtils .ofOrNull (e)).nonNulls ?? {};
278
262
if (params.isNotEmpty) {
279
263
final a = params.map ((e) {
280
264
final fieldName = e.fieldPath! .join ('_' ).toCamelCase ();
@@ -316,5 +300,4 @@ enum Placeholders {
316
300
TITLE ,
317
301
}
318
302
319
- typedef _InsightMapper
320
- = InsightMapper <ClassInsight <ModelGenerateScreenBindings >, Placeholders >;
303
+ typedef _InsightMapper = InsightMapper <ClassInsight <ModelGenerateScreenBindings >, Placeholders >;
0 commit comments