Skip to content

Commit 5960ec8

Browse files
author
github-actions
committed
Prepare version 0.6.0
1 parent cacc729 commit 5960ec8

File tree

8 files changed

+95
-57
lines changed

8 files changed

+95
-57
lines changed

CHANGELOG.md

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,103 @@
11
# Changelog
22

3+
## [0.6.0]
4+
5+
- Released @ 12/2024 (UTC)
6+
- breaking: Clean up and refactor
7+
38
## [0.5.2]
49

5-
- Released @ 11/2024 (UTC)
10+
- Released @ 12/2024 (UTC)
611
- fix: Annoying bugfix
712

813
## [0.5.1]
914

10-
- Released @ 11/2024 (UTC)
15+
- Released @ 12/2024 (UTC)
1116
- fix: Fix annoying bug
1217

1318
## [0.5.0]
1419

15-
- Released @ 11/2024 (UTC)
20+
- Released @ 12/2024 (UTC)
1621
- breaking: Make improvements to generated output
1722

1823
## [0.4.1]
1924

20-
- Released @ 11/2024 (UTC)
25+
- Released @ 12/2024 (UTC)
2126
- fix: Add missing scripts
2227

2328
## [0.4.0]
2429

25-
- Released @ 11/2024 (UTC)
30+
- Released @ 12/2024 (UTC)
2631
- breaking: Update templates and set default template
2732

2833
## [0.3.1]
2934

30-
- Released @ 11/2024 (UTC)
35+
- Released @ 12/2024 (UTC)
3136
- chore: Update dependencies
3237

3338
## [0.3.0]
3439

35-
- Released @ 11/2024 (UTC)
40+
- Released @ 12/2024 (UTC)
3641
- breaking: Update dependencies
3742

3843
## [0.2.7]
3944

40-
- Released @ 11/2024 (UTC)
45+
- Released @ 12/2024 (UTC)
4146
- fix: Fix another bug with case types
4247

4348
## [0.2.6]
4449

45-
- Released @ 11/2024 (UTC)
50+
- Released @ 12/2024 (UTC)
4651
- fix: Fix issue with key types in screen bindings generator
4752

4853
## [0.2.5]
4954

50-
- Released @ 11/2024 (UTC)
55+
- Released @ 12/2024 (UTC)
5156
- chore: Update default executables
5257

5358
## [0.2.4]
5459

55-
- Released @ 11/2024 (UTC)
60+
- Released @ 12/2024 (UTC)
5661
- fix: Fix issue with executable
5762

5863
## [0.2.3]
5964

60-
- Released @ 11/2024 (UTC)
65+
- Released @ 12/2024 (UTC)
6166
- chore: Update dependencies
6267

6368
## [0.2.2]
6469

65-
- Released @ 11/2024 (UTC)
70+
- Released @ 12/2024 (UTC)
6671
- chore: Update dependencies
6772

6873
## [0.2.1]
6974

70-
- Released @ 11/2024 (UTC)
75+
- Released @ 12/2024 (UTC)
7176
- chore: Update dependencies
7277

7378
## [0.2.0]
7479

75-
- Released @ 11/2024 (UTC)
80+
- Released @ 12/2024 (UTC)
7681
- breaking: Update dependencies and docs
7782

7883
## [0.1.3]
7984

80-
- Released @ 11/2024 (UTC)
85+
- Released @ 12/2024 (UTC)
8186
- fix: Fix dependency issue with analyzer package
8287

8388
## [0.1.2]
8489

85-
- Released @ 11/2024 (UTC)
90+
- Released @ 12/2024 (UTC)
8691
- chore: Removed ScreenTr from bindings
8792

8893
## [0.1.1]
8994

90-
- Released @ 11/2024 (UTC)
95+
- Released @ 12/2024 (UTC)
9196
- chore: Update template
9297

9398
## [0.1.0]
9499

95-
- Released @ 11/2024 (UTC)
100+
- Released @ 12/2024 (UTC)
96101
- Update
97102
- chore: Update templates
98103
- chore: Update dependencies

example/lib/screens/_index.g.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
//.title~
99

1010
export './login_screen/widget.dart';
11-
export './home_screen/widget.dart';
11+
export './home_screen/widget.dart';

example/lib/screens/login_screen/_bindings.g.dart

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ class LoginScreenConfiguration extends ModelScreenConfiguration {
4343
title: null,
4444
path: _PATH,
4545
args: args ?? {},
46-
isAccessibleOnlyIfLoggedInAndVerified: _IS_ACCESSIBLE_ONLY_IF_LOGGED_IN_AND_VERIFIED,
46+
isAccessibleOnlyIfLoggedInAndVerified:
47+
_IS_ACCESSIBLE_ONLY_IF_LOGGED_IN_AND_VERIFIED,
4748
isAccessibleOnlyIfLoggedIn: _IS_ACCESSIBLE_ONLY_IF_LOGGED_IN,
4849
isAccessibleOnlyIfLoggedOut: _IS_ACCESSIBLE_ONLY_IF_LOGGED_OUT,
4950
isRedirectable: _IS_REDIRECTABLE,
@@ -66,14 +67,16 @@ class LoginScreenConfiguration extends ModelScreenConfiguration {
6667
static const TR_KEY = _TR_KEY;
6768

6869
/// Whether the corresponding [Screen] is only accessible if the user is logged in and verified.
69-
static const IS_ACCESSIBLE_ONLY_IF_LOGGED_IN = _IS_ACCESSIBLE_ONLY_IF_LOGGED_IN;
70+
static const IS_ACCESSIBLE_ONLY_IF_LOGGED_IN =
71+
_IS_ACCESSIBLE_ONLY_IF_LOGGED_IN;
7072

7173
/// Whether the corresponding [Screen] is only accessible if the user is logged in.
7274
static const IS_ACCESSIBLE_ONLY_IF_LOGGED_IN_AND_VERIFIED =
7375
_IS_ACCESSIBLE_ONLY_IF_LOGGED_IN_AND_VERIFIED;
7476

7577
/// Whether the corresponding [Screen] is only accessible if the user is logged out.
76-
static const IS_ACCESSIBLE_ONLY_IF_LOGGED_OUT = _IS_ACCESSIBLE_ONLY_IF_LOGGED_OUT;
78+
static const IS_ACCESSIBLE_ONLY_IF_LOGGED_OUT =
79+
_IS_ACCESSIBLE_ONLY_IF_LOGGED_OUT;
7780

7881
/// Whether the corresponding [Screen] is redirectable, i.e., if it can be requested from the browser URL.
7982
static const IS_REDIRECTABLE = _IS_REDIRECTABLE;
@@ -120,9 +123,10 @@ final generatedLoginScreenRoute = GoRoute(
120123
extra: extra ??
121124
urlToScreenConfiguration(
122125
url: state.uri,
123-
isAccessibleOnlyIfLoggedIn: LoginScreenConfiguration.IS_ACCESSIBLE_ONLY_IF_LOGGED_IN,
124-
isAccessibleOnlyIfLoggedInAndVerified:
125-
LoginScreenConfiguration.IS_ACCESSIBLE_ONLY_IF_LOGGED_IN_AND_VERIFIED,
126+
isAccessibleOnlyIfLoggedIn:
127+
LoginScreenConfiguration.IS_ACCESSIBLE_ONLY_IF_LOGGED_IN,
128+
isAccessibleOnlyIfLoggedInAndVerified: LoginScreenConfiguration
129+
.IS_ACCESSIBLE_ONLY_IF_LOGGED_IN_AND_VERIFIED,
126130
isAccessibleOnlyIfLoggedOut:
127131
LoginScreenConfiguration.IS_ACCESSIBLE_ONLY_IF_LOGGED_OUT,
128132
isRedirectable: LoginScreenConfiguration.IS_REDIRECTABLE,
@@ -144,7 +148,8 @@ Screen? makerLoginScreen(
144148
bool isLoggedIn,
145149
bool isLoggedOut,
146150
) {
147-
if ((_IS_ACCESSIBLE_ONLY_IF_LOGGED_IN_AND_VERIFIED && !isLoggedInAndVerified) ||
151+
if ((_IS_ACCESSIBLE_ONLY_IF_LOGGED_IN_AND_VERIFIED &&
152+
!isLoggedInAndVerified) ||
148153
(_IS_ACCESSIBLE_ONLY_IF_LOGGED_IN && !isLoggedIn) ||
149154
(_IS_ACCESSIBLE_ONLY_IF_LOGGED_OUT && !isLoggedOut)) {
150155
return null;
@@ -155,7 +160,8 @@ Screen? makerLoginScreen(
155160
extra: extra,
156161
);
157162
}
158-
if (RegExp(r'^(' + _PATH + r')([?/].*)?$').hasMatch(Uri.decodeComponent(extra.path ?? ''))) {
163+
if (RegExp(r'^(' + _PATH + r')([?/].*)?$')
164+
.hasMatch(Uri.decodeComponent(extra.path ?? ''))) {
159165
final temp = LoginScreenConfiguration.optional(
160166
args: extra.args,
161167
);
@@ -173,8 +179,8 @@ Screen? makerLoginScreen(
173179
typedef TLoginScreenController = _ControllerBroker<LoginScreen, _State>;
174180

175181
/// A [AdaptiveScreenState] type corresponding to [LoginScreen].
176-
typedef TAdaptiveLoginScreenState
177-
= AdaptiveScreenState<LoginScreen, LoginScreenConfiguration, LoginScreenController>;
182+
typedef TAdaptiveLoginScreenState = AdaptiveScreenState<LoginScreen,
183+
LoginScreenConfiguration, LoginScreenController>;
178184

179185
/// A [ScreenState] type corresponding to [LoginScreen].
180186
typedef TLoginScreenState

lib/src/_index.g.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
export './gen_screen_access_app.dart';
1111
export './extract_insights_from_file.dart';
1212
export './gen_screen_bindings_app.dart';
13-
export './gen_screen_app.dart';
13+
export './gen_screen_app.dart';

lib/src/extract_insights_from_file.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ Future<List<ClassInsight<ModelGenerateScreenBindings>>> extractInsightsFromFile(
3333
final insights = <ClassInsight<ModelGenerateScreenBindings>>[];
3434
await analyzer.analyze(
3535
inclClassAnnotations: {ModelGenerateScreenBindings.CLASS_NAME},
36-
onClassAnnotationField: (params) async => temp = _updateFromClassAnnotationField(temp, params),
36+
onClassAnnotationField: (params) async =>
37+
temp = _updateFromClassAnnotationField(temp, params),
3738
onPreAnalysis: (_, __) => temp = const ModelGenerateScreenBindings(),
3839
onPostAnalysis: (params) {
3940
final fullPathName = params.fullFilePath;
@@ -64,7 +65,8 @@ ModelGenerateScreenBindings _updateFromClassAnnotationField(
6465
(k, v) => MapEntry(k?.toStringValue(), v?.toStringValue()),
6566
),
6667
);
67-
case ModelGenerateScreenBindingsFieldNames.isAccessibleOnlyIfLoggedInAndVerified:
68+
case ModelGenerateScreenBindingsFieldNames
69+
.isAccessibleOnlyIfLoggedInAndVerified:
6870
return annotation.copyWith(
6971
isAccessibleOnlyIfLoggedInAndVerified: params.fieldValue.toBoolValue(),
7072
);

lib/src/gen_screen_access_app.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ Future<void> genScreenAccessApp(
9696
'Looking for files..',
9797
);
9898
final filePathStream0 = PathExplorer(inputPath).exploreFiles();
99-
final filePathStream1 = filePathStream0.where((e) => _isAllowedFileName(e.path));
99+
final filePathStream1 =
100+
filePathStream0.where((e) => _isAllowedFileName(e.path));
100101
List<FilePathExplorerFinding> findings;
101102
try {
102103
findings = await filePathStream1.toList();
@@ -239,7 +240,8 @@ class TemplateInterpolator2<T> {
239240
}
240241
}
241242

242-
final _interpolator = TemplateInterpolator2<ClassInsight<GenerateScreenBindings>>(
243+
final _interpolator =
244+
TemplateInterpolator2<ClassInsight<GenerateScreenBindings>>(
243245
{
244246
'___SCREEN_MAKERS___': (insight) {
245247
final a = insight.className.toPascalCase();

lib/src/gen_screen_app.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ Future<void> genScreenApp(
2828
}) async {
2929
final parser = CliParser(
3030
title: 'DevCetra.com/df/tools',
31-
description: 'A tool for generating screen/page files for Flutter projects.',
31+
description:
32+
'A tool for generating screen/page files for Flutter projects.',
3233
example: 'gen-screen -i .',
3334
additional:
3435
'For contributions, error reports and information, visit: https://github.com/DevCetra.',
@@ -98,7 +99,8 @@ Future<void> genScreenApp(
9899
'Looking for files..',
99100
);
100101
final filePathStream0 = PathExplorer(inputPath).exploreFiles();
101-
final filePathStream1 = filePathStream0.where((e) => _isAllowedFileName(e.path));
102+
final filePathStream1 =
103+
filePathStream0.where((e) => _isAllowedFileName(e.path));
102104
List<FilePathExplorerFinding> findings;
103105
try {
104106
findings = await filePathStream1.toList();

0 commit comments

Comments
 (0)