run method
Runs this command.
The return value is wrapped in a Future
if necessary and returned by
CommandRunner.runCommand
.
Implementation
@override
Future<void> run() async {
Logger.success(
'When making changes to the flutter app, run this command to rebuild the project.\n');
//Flutter build web --web-renderer html --csp
//HELPS TO BUILD THE PROJECT WITH THE REQUIRED SECURITY HEADERS.
Process.start(
'flutter',
["build", "web", "--web-renderer", "html", "--csp"],
runInShell: true,
).then((value) {
//GIVE THE OUTPUT OF THE PROCESS TO THE USER.
value.stdout.transform(utf8.decoder).listen((data) {
Logger.normal(data);
});
});
}