Files are routes
Plain widgets and functions in small files under lib/app/. No base classes or interfaces to implement — the file name says what a file is, and its constructor says what it needs.
File kinds
In the spirit of Next.js. An espalier is a tree trained flat against a frame; here the frame is lib/app/.
Plain widgets and functions in small files under lib/app/. No base classes or interfaces to implement — the file name says what a file is, and its constructor says what it needs.
File kinds
The fsp generator reads every file and writes one typed, mountable lib/app.g.dart. An error points at the parameter at fault, and app.g.dart is left untouched while there is one.
Typed navigation
The generated file is typed go_router routes and Riverpod providers, with no build_runner. Use it with MaterialApp.router, or mount it inside a GoRouter you already have with AppRoutes.mount(at:).
Adopting fespalier
Packages for authentication, forms, HTTP clients, responsive images, translations, maps, downloads, push, analytics and telemetry. Many plug into the generated main() as adapters, with one line in pubspec.yaml.
Adapters
You write plain widgets and functions in small files under lib/app/, and fsp gen, fsp watch or fsp dev turns them into lib/app.g.dart:
lib/main.dart Future<void> main() => AppMain.run();
lib/app/
layout.dart AppLayout({required Widget child}) the shell around everything below
page.dart HomePage() → /
products/
page.dart ProductsPage({required List<Product> products}) → /products
$id/
data.dart Future<Product> data(Ref ref, {required int id})
page.dart ProductPage({required Product product}) → /products/:id
action.dart Future<void> action(Ref ref, {required int id, required Refund input})
checkout/guard.dart GuardResult guard(Ref ref) guards this folder and below
(account)/ a group: a shared layout, nothing added to the URLs
_components/ private: never routesFuture<void> main() => AppMain.run(); // the whole main()
ProductRoute(id: 42).go(context); // typed navigation
ProductRoute.watch(ref, id: 42); // the route's data: AsyncValue<Product>
await ProductRoute.submit(ref, id: 42, input: refund); // its write, with pending and error stateStart with Installation and setup, then File kinds and Routing. All pages lists every topic, one page each. fespalier is an early version (pre-1.0): what changed per release is in the changelog, and what it does not do yet is in the roadmap.