@@ -13,6 +13,12 @@ import '_insight.dart';
13
13
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
14
14
15
15
final insightMappers = [
16
+ _InsightMapper (
17
+ placeholder: Placeholders .TITLE ,
18
+ mapInsights: (insight) async {
19
+ return insight.title;
20
+ },
21
+ ),
16
22
_InsightMapper (
17
23
placeholder: Placeholders .SCREEN_CLASS ,
18
24
mapInsights: (insight) async {
@@ -57,9 +63,8 @@ final insightMappers = [
57
63
_InsightMapper (
58
64
placeholder: Placeholders .I1 ,
59
65
mapInsights: (insight) async {
60
- final q1 = insight.queryParameters
61
- .map ((e) => 'late final $e = this.configuration.$e ;' )
62
- .join ('\n ' );
66
+ final q1 =
67
+ insight.queryParameters.map ((e) => 'late final $e = this.configuration.$e ;' ).join ('\n ' );
63
68
return q1;
64
69
},
65
70
),
@@ -83,17 +88,13 @@ final insightMappers = [
83
88
final generateScreenBindingsArgs = [
84
89
if (insight.path.isNotEmpty) "path: '${insight .path }'" ,
85
90
if (insight.title.isNotEmpty) "defaultTitle: '${insight .title }'" ,
86
- if (insight.isAccessibleOnlyIfLoggedIn)
87
- 'isAccessibleOnlyIfLoggedIn: true' ,
91
+ if (insight.isAccessibleOnlyIfLoggedIn) 'isAccessibleOnlyIfLoggedIn: true' ,
88
92
if (insight.isAccessibleOnlyIfLoggedInAndVerified)
89
93
'isAccessibleOnlyIfLoggedInAndVerified: true' ,
90
- if (insight.isAccessibleOnlyIfLoggedOut)
91
- 'isAccessibleOnlyIfLoggedOut: true' ,
94
+ if (insight.isAccessibleOnlyIfLoggedOut) 'isAccessibleOnlyIfLoggedOut: true' ,
92
95
if (insight.isRedirectable) 'isRedirectable: true' ,
93
- if (insight.internalParameters.isNotEmpty && a.isNotEmpty)
94
- 'internalParameters: {$a ,}' ,
95
- if (insight.queryParameters.isNotEmpty && b.isNotEmpty)
96
- 'queryParameters: {$b ,}' ,
96
+ if (insight.internalParameters.isNotEmpty && a.isNotEmpty) 'internalParameters: {$a ,}' ,
97
+ if (insight.queryParameters.isNotEmpty && b.isNotEmpty) 'queryParameters: {$b ,}' ,
97
98
].join (',' );
98
99
return generateScreenBindingsArgs;
99
100
},
@@ -111,6 +112,7 @@ final insightMappers = [
111
112
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
112
113
113
114
enum Placeholders {
115
+ TITLE ,
114
116
SCREEN_CLASS ,
115
117
BINDINGS_FILE ,
116
118
CONTROLLER_FILE ,
0 commit comments