@@ -35,9 +35,6 @@ Future<void> genScreenApp(
35
35
'For contributions, error reports and information, visit: https://github.com/DevCetra.' ,
36
36
params: [
37
37
DefaultFlags .HELP .flag,
38
- DefaultOptions .INPUT_PATH .option.copyWith (
39
- defaultsTo: FileSystemUtility .i.currentDir,
40
- ),
41
38
DefaultMultiOptions .TEMPLATES .multiOption.copyWith (
42
39
defaultsTo: defaultTemplates,
43
40
),
@@ -70,12 +67,10 @@ Future<void> genScreenApp(
70
67
71
68
// ---------------------------------------------------------------------------
72
69
73
- late final String inputPath;
74
70
late final String name;
75
71
late final List <String > templates;
76
72
late final String outputPath;
77
73
try {
78
- inputPath = argResults.option (DefaultOptions .INPUT_PATH .name)! ;
79
74
name = argResults.option ('name' )! ;
80
75
templates = argResults.multiOption (DefaultMultiOptions .TEMPLATES .name);
81
76
outputPath = argResults.option (DefaultOptions .OUTPUT_PATH .name)! ;
@@ -94,35 +89,6 @@ Future<void> genScreenApp(
94
89
95
90
// ---------------------------------------------------------------------------
96
91
97
- _print (
98
- printWhite,
99
- 'Looking for files..' ,
100
- );
101
- final filePathStream0 = PathExplorer (inputPath).exploreFiles ();
102
- final filePathStream1 =
103
- filePathStream0.where ((e) => _isAllowedFileName (e.path));
104
- List <FilePathExplorerFinding > findings;
105
- try {
106
- findings = await filePathStream1.toList ();
107
- } catch (e) {
108
- spinner.stop ();
109
- _print (
110
- printRed,
111
- 'Failed to read file tree!' ,
112
- );
113
- exit (ExitCodes .FAILURE .code);
114
- }
115
- if (findings.isEmpty) {
116
- spinner.stop ();
117
- _print (
118
- printYellow,
119
- 'No files found in $inputPath !' ,
120
- );
121
- exit (ExitCodes .SUCCESS .code);
122
- }
123
-
124
- // ---------------------------------------------------------------------------
125
-
126
92
final templateData = < String , String > {};
127
93
for (final template in templates) {
128
94
_print (
@@ -187,10 +153,6 @@ void _print(
187
153
Spinner ? spinner,
188
154
]) {
189
155
spinner? .stop ();
190
- print ('[gen-screen-bindings ] $message ' );
156
+ print ('[gen-screen] $message ' );
191
157
spinner? .start ();
192
- }
193
-
194
- bool _isAllowedFileName (String e) {
195
- return ! e.endsWith ('.g.dart' ) && e.endsWith ('.dart' );
196
- }
158
+ }
0 commit comments