Skip to content

Commit 4336fef

Browse files
committed
chore: Fix issues
1 parent adcdc8a commit 4336fef

File tree

9 files changed

+61
-13
lines changed

9 files changed

+61
-13
lines changed

lib/src/generate_screen.dart

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,14 @@ Future<void> generateScreen({
7878
),
7979
);
8080

81-
final screenClassKey = screenName.toSnakeCase();
82-
8381
final insight = Insight(
8482
screenClassName: screenName.toPascalCase(),
8583
bindingsFileName: '_bindings.g.dart',
8684
controllerFileName: '_controller.dart',
87-
screenFileName: '$screenClassKey.dart',
85+
screenFileName: '${screenName.toSnakeCase()}.dart',
8886
viewFileName: '_view.dart',
8987
isAccessibleOnlyIfLoggedIn: isAccessibleOnlyIfLoggedIn,
90-
isAccessibleOnlyIfLoggedInAndVerified:
91-
isAccessibleOnlyIfLoggedInAndVerified,
88+
isAccessibleOnlyIfLoggedInAndVerified: isAccessibleOnlyIfLoggedInAndVerified,
9289
isAccessibleOnlyIfLoggedOut: isAccessibleOnlyIfLoggedOut,
9390
isRedirectable: isRedirectable,
9491
internalParameters: internalParameters,

templates/bindings.md renamed to templates/bindings.dart.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
//.title
33
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
44
//
5-
// GENERATED BY 🇽🇾🇿 GEN - DO NOT MODIFY BY HAND
6-
// See: https://github.com/robmllze/xyz_gen
5+
// GENERATED - DO NOT MODIFY BY HAND
6+
// See: https://github.com/robmllze/df_generate_screen
77
//
88
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
99
//.title~

templates/controller.dart.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
//.title
33
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
44
//
5-
// GENERATED BY 🇽🇾🇿 GEN
6-
// See: https://github.com/robmllze/xyz_gen
5+
// GENERATED - DO NOT MODIFY BY HAND
6+
// See: https://github.com/robmllze/df_generate_screen
77
//
88
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
99
//.title~

templates/screen.dart.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
//.title
33
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
44
//
5-
// GENERATED BY 🇽🇾🇿 GEN
6-
// See: https://github.com/robmllze/xyz_gen
5+
// GENERATED - DO NOT MODIFY BY HAND
6+
// See: https://github.com/robmllze/df_generate_screen
77
//
88
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
99
//.title~

templates/view.md renamed to templates/view.dart.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
//.title
33
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
44
//
5-
// GENERATED BY 🇽🇾🇿 GEN
6-
// See: https://github.com/robmllze/xyz_gen
5+
// GENERATED - DO NOT MODIFY BY HAND
6+
// See: https://github.com/robmllze/df_generate_screen
77
//
88
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
99
//.title~

test/screen_example/ScreenExample

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
//.title
2+
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
3+
//
4+
// GENERATED BY 🇽🇾🇿 GEN
5+
// See: https://github.com/robmllze/xyz_gen
6+
//
7+
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
8+
//.title~
9+
10+
import 'package:df_screen/df_screen.dart';
11+
12+
part '../template/_bindings.g.dart';
13+
part '../template/_controller.dart';
14+
part '../template/_view.dart';
15+
16+
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
17+
18+
@GenerateScreenBindings(path: '.', defaultTitle: 'Title')
19+
final class ScreenExample extends Screen {
20+
//
21+
//
22+
//
23+
24+
const ScreenExample({
25+
super.key,
26+
super.configuration,
27+
super.controllerCacheTimeout = Duration.zero,
28+
});
29+
30+
//
31+
//
32+
//
33+
34+
@override
35+
_View createState() => _View();
36+
37+
//
38+
//
39+
//
40+
41+
@override
42+
ScreenExampleController createController(
43+
Screen screen,
44+
ScreenView state,
45+
) {
46+
return ScreenExampleController(screen, state);
47+
}
48+
}

test/screen_example/_bindings.g.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

test/screen_example/_controller.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

test/screen_example/_view.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

0 commit comments

Comments
 (0)