@@ -35,9 +35,6 @@ Future<void> genScreenApp(
3535 'For contributions, error reports and information, visit: https://github.com/DevCetra.' ,
3636 params: [
3737 DefaultFlags .HELP .flag,
38- DefaultOptions .INPUT_PATH .option.copyWith (
39- defaultsTo: FileSystemUtility .i.currentDir,
40- ),
4138 DefaultMultiOptions .TEMPLATES .multiOption.copyWith (
4239 defaultsTo: defaultTemplates,
4340 ),
@@ -70,12 +67,10 @@ Future<void> genScreenApp(
7067
7168 // ---------------------------------------------------------------------------
7269
73- late final String inputPath;
7470 late final String name;
7571 late final List <String > templates;
7672 late final String outputPath;
7773 try {
78- inputPath = argResults.option (DefaultOptions .INPUT_PATH .name)! ;
7974 name = argResults.option ('name' )! ;
8075 templates = argResults.multiOption (DefaultMultiOptions .TEMPLATES .name);
8176 outputPath = argResults.option (DefaultOptions .OUTPUT_PATH .name)! ;
@@ -94,35 +89,6 @@ Future<void> genScreenApp(
9489
9590 // ---------------------------------------------------------------------------
9691
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-
12692 final templateData = < String , String > {};
12793 for (final template in templates) {
12894 _print (
@@ -187,10 +153,6 @@ void _print(
187153 Spinner ? spinner,
188154]) {
189155 spinner? .stop ();
190- print ('[gen-screen-bindings ] $message ' );
156+ print ('[gen-screen] $message ' );
191157 spinner? .start ();
192- }
193-
194- bool _isAllowedFileName (String e) {
195- return ! e.endsWith ('.g.dart' ) && e.endsWith ('.dart' );
196- }
158+ }
0 commit comments