scaffolding 0.0.1-dev.3 scaffolding: ^0.0.1-dev.3 copied to clipboard
A builder tool based on build_runner and mason for dynamically scaffolding a flutter application.
Scaffolding - a builder tool based on build_runner and mason for dynamically scaffolding a flutter application.
package:scaffolding
contains the dynamic_scaffolding builder and a command line runner for static scaffolding (this uses package:mason_cli behind the scenes).
Screenshots #
Create a template in /lib/features/contact.dart
abstract class Contact {
String firstname = 'Scott';
String lastname = 'Horn';
int age = 21; // :)
bool favourite = true;
}
Ensure the scaffolding plugin is installed
flutter pub install scaffolding
Add the following to your build.yaml in the root of your project
targets:
$default:
builders:
scaffolding|dynamicBuilder:
generate_for: [lib/features/*.dart]
enabled: true
You can then run build_runner once off flutter pub run build_runner build
or in watch mode flutter pub run build_runner watch
Afterwards call the resulting scaffolded main in your main.dart file
import 'features/contact.scaffold.dart' as scaffold;
void main(List<String> args) => scaffold.main(args);