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