follow-app-development

Installation
SKILL.md

Develop Flutter apps with Follow

Use the public package:follow/follow.dart API. Check the app's resolved Follow version before using an API: shell branches and built-in transitions require Follow 0.5.0 or newer. For details, consult the README and example/lib/src/ of the matching Follow package source. In a Follow source checkout, these are at the repository root. An installed copy of this skill may live outside that checkout, so do not resolve package documentation relative to this SKILL.md.

Structure features and dependencies

  • Describe each area with an immutable Feature. Declare its bindings and choose either routes or shell. Feature.builder wraps content in UI or providers; it does not create a navigation stack.
  • Start the root with FollowApp(feature: ..., builder: (_, config) => MaterialApp.router(routerConfig: config)). Use FeatureScope for a local feature only when it declares neither routes nor shell.
  • Register dependencies with Bind.value, Bind.factory, Bind.singleton, or Bind.async. An unnamed Token<T>() is the default key for that exact type. Create named tokens once and reuse the same instances when multiple bindings share a type. Choose Activation and AsyncPolicy according to when a binding must be ready; do not watch a factory binding.
  • Render the supplied child in a feature builder, or outlet in a shell builder, exactly once. Keep wrappers inside the intended feature scope.

Define and navigate routes

  • Use StaticRouteSpec for destinations without data and DataRouteSpec<T> with a decoder and encoder for typed data. Route paths are absolute. Build pages with FeatureRoute.page and mount child features with FeatureRoute.mount.
  • Navigate through context.follow.push, replace, or go with a location produced by a route spec; use pop to return. Keep URL serialization in the spec so deep links and browser history can reconstruct route data.
  • Put access decisions in typed guards. Handle allow, deny, and redirect outcomes without creating redirect loops.

Use a shell for independent stacks

Installs
2
Repository
lucasnsa/follow
First Seen
10 days ago