Hi - I answer from the OpenSmartRoute documentation: routing, the API, plans and quotas, self-hosting. Ask away, or open a support ticket if you need a person.
Grounded in the docs - follow a source before acting on it.
flutter-widgets - Skill - OpenSmartRoute
Skillv1.0.0
flutter-widgets
Prefer extracting UI into separate widget classes instead of `_build*` helper methods.
Instruction file imported from polylina/event_map_flutter (.github/instructions/flutter-widgets.instructions.md). Copyright stays with the author.
Widgets over builder methods
Prefer extracting UI into separate widget classes instead of _build* helper methods.
When a build method grows a non-trivial section, create a dedicated widget:
Private widget class (class _FooBar extends StatelessWidget) in the same file, after the main widget, or a public widget in its own file under components/ when reused.
Pass needed data via constructor parameters, not by capturing state fields.
_build* methods are allowed only for trivial one-liners; anything with its own layout or logic becomes a widget.
Benefits: const constructors, widget tree caching, no full-State rebuilds, State private members stay encapsulated.
Use it
Copy one of these into your project. Installing also returns the manifest and these snippets.
yaml
targets:
- https://api.opensmartroute.ai/api/v1/registry/polylina-event-map-flutter-flutter-widgets-instructions/manifest # or paste the manifest below
Manifest
An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.
{
"ocm": "1",
"id": "polylina-event-map-flutter-flutter-widgets-instructions",
"kind": "skill",
"name": "flutter-widgets",
"description": "Prefer extracting UI into separate widget classes instead of `_build*` helper methods.",
"publisher": "polylina",
"version": "1.0.0",
"capabilities": {
"domains": [
"general"
],
"tags": [
"skill-md",
"github-instructions"
],
"languages": [
"en"
]
},
"quality_prior": 0.6,
"examples": [
"Prefer extracting UI into separate widget classes instead of `_build*` helper methods."
],
"primary": false,
"metadata": {
"source": {
"provider": "github-instructions",
"repository": "https://github.com/polylina/event_map_flutter",
"path": ".github/instructions/flutter-widgets.instructions.md",
"ref": "84a1263e627c9f7cdbf3c837c52c4fcf826abeec",
"url": "https://github.com/polylina/event_map_flutter/blob/84a1263e627c9f7cdbf3c837c52c4fcf826abeec/.github/instructions/flutter-widgets.instructions.md",
"key": "polylina/event_map_flutter/.github/instructions/flutter-widgets.instructions.md"
},
"applies_to": "**/*.dart"
},
"instructions": "# Widgets over builder methods\n\nPrefer extracting UI into separate widget classes instead of `_build*` helper methods.\n\nWhen a build method grows a non-trivial section, create a dedicated widget:\n\n- Private widget class (`class _FooBar extends StatelessWidget`) in the same file, after the main widget, or a public widget in its own file under `components/` when reused.\n- Pass needed data via constructor parameters, not by capturing state fields.\n- `_build*` methods are allowed only for trivial one-liners; anything with its own layout or logic becomes a widget.\n\nBenefits: const constructors, wid",
"cost": {
"context_tokens": 171
}
}
Fetch it by URL: GET /api/v1/registry/polylina-event-map-flutter-flutter-widgets-instructions/manifest?version=1.0.0
Reviews
Star ratings from people who tried it. One review per account; edit yours any time.
No reviews yet. Install it, try it, and be the first to rate it.