Skip to content

Commit 6e7f99d

Browse files
author
github-actions
committed
Prepare version 0.1.0+3
1 parent 43c4231 commit 6e7f99d

File tree

2 files changed

+35
-18
lines changed

2 files changed

+35
-18
lines changed

lib/src/generate_screen_bindings/_insight_mappers.dart

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ final _screenSegmentMapper = _InsightMapper(
3131
final path = insight.annotation.path ?? '';
3232
final screenSegment = p.joinAll(
3333
[
34-
path.isNotEmpty && path.startsWith(RegExp(r'[\\/]')) ? path.substring(1) : path,
34+
path.isNotEmpty && path.startsWith(RegExp(r'[\\/]'))
35+
? path.substring(1)
36+
: path,
3537
screenKey,
3638
],
3739
);
@@ -77,7 +79,8 @@ final insightMappers = [
7779
_InsightMapper(
7880
placeholder: Placeholders.IS_ACCESSIBLE_ONLY_IF_LOGGED_IN_AND_VERIFIED,
7981
mapInsights: (insight) async {
80-
final b = insight.annotation.isAccessibleOnlyIfLoggedInAndVerified ?? false;
82+
final b =
83+
insight.annotation.isAccessibleOnlyIfLoggedInAndVerified ?? false;
8184
return b.toString();
8285
},
8386
),
@@ -98,7 +101,8 @@ final insightMappers = [
98101
_InsightMapper(
99102
placeholder: Placeholders.IS_ALWAYS_ACCESSIBLE,
100103
mapInsights: (insight) async {
101-
final a = insight.annotation.isAccessibleOnlyIfLoggedInAndVerified ?? false;
104+
final a =
105+
insight.annotation.isAccessibleOnlyIfLoggedInAndVerified ?? false;
102106
final b = insight.annotation.isAccessibleOnlyIfLoggedIn ?? false;
103107
final c = insight.annotation.isAccessibleOnlyIfLoggedOut ?? false;
104108
if (a && b) {
@@ -141,8 +145,10 @@ final insightMappers = [
141145
_InsightMapper(
142146
placeholder: Placeholders.IP0,
143147
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+
{};
146152
if (params.isNotEmpty) {
147153
final a = params.map((e) {
148154
final fieldName = e.fieldPath!.join('_').toCamelCase();
@@ -170,8 +176,10 @@ final insightMappers = [
170176
_InsightMapper(
171177
placeholder: Placeholders.IP1,
172178
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+
{};
175183
if (params.isNotEmpty) {
176184
final a = params.map((e) {
177185
final fieldName = e.fieldPath!.join('_').toCamelCase();
@@ -191,8 +199,10 @@ final insightMappers = [
191199
_InsightMapper(
192200
placeholder: Placeholders.IP2,
193201
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+
{};
196206
if (params.isNotEmpty) {
197207
final a = params.map((e) {
198208
final fieldName = e.fieldPath!.join('_').toCamelCase();
@@ -210,8 +220,10 @@ final insightMappers = [
210220
_InsightMapper(
211221
placeholder: Placeholders.QP0,
212222
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+
{};
215227
if (params.isNotEmpty) {
216228
final a = params.map((e) {
217229
final fieldName = e.fieldPath!.join('_').toCamelCase();
@@ -239,8 +251,10 @@ final insightMappers = [
239251
_InsightMapper(
240252
placeholder: Placeholders.QP1,
241253
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+
{};
244258
if (params.isNotEmpty) {
245259
final a = params.map((e) {
246260
final fieldName = e.fieldPath!.join('_').toCamelCase();
@@ -257,8 +271,10 @@ final insightMappers = [
257271
_InsightMapper(
258272
placeholder: Placeholders.QP2,
259273
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+
{};
262278
if (params.isNotEmpty) {
263279
final a = params.map((e) {
264280
final fieldName = e.fieldPath!.join('_').toCamelCase();
@@ -300,4 +316,5 @@ enum Placeholders {
300316
TITLE,
301317
}
302318

303-
typedef _InsightMapper = InsightMapper<ClassInsight<ModelGenerateScreenBindings>, Placeholders>;
319+
typedef _InsightMapper
320+
= InsightMapper<ClassInsight<ModelGenerateScreenBindings>, Placeholders>;

lib/src/generate_screen_bindings/generate.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ Future<void> generateScreenBindings({
6868
final insights = <ClassInsight<ModelGenerateScreenBindings>>[];
6969

7070
// For each file...
71-
for (final filePathResult
72-
in sourceFileExplorerResults.filePathResults.where((e) => e.category == _Categories.DART)) {
71+
for (final filePathResult in sourceFileExplorerResults.filePathResults
72+
.where((e) => e.category == _Categories.DART)) {
7373
final filePath = filePathResult.path;
7474

7575
// Extract insights from the file.

0 commit comments

Comments
 (0)