Last updated:
0 purchases
scaffolding
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;
}
copied to clipboard
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
copied to clipboard
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);
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.