Basic Structure
Key Files
default_stac_options.dart
Contains theStacOptions configuration for your project, including project name and ID.
main.dart
Entry point for the Flutter app where Stac is initialized. Custom parsers are registered here:stac/ folder
Contains your Stac widget definitions written in Dart. Each file can contain one or more@StacScreen annotated functions.
Extended Structure
For larger projects, here’s a recommended structure:Build Output
When you runstac build or stac deploy, the Dart files are converted to JSON and placed in stac/.build/:
The
.build folder is automatically created and should typically be added to .gitignore since it’s generated from your Dart source files.Custom Parsers
Custom widget and action parsers extend Stac’s capabilities. Place them in a dedicated folder and register them inStac.initialize:
Theme Configuration
Themes can be configured through Stac Cloud or locally viaStacApp:
Multiple Screens Organization
For apps with many screens, organize by feature or route:@StacScreen annotation: