webf-native-ui-dev
SKILL.md
WebF Native UI Dev
This skill guides the development of custom native UI components for WebF (Web on Flutter). It bridges Flutter widgets to standard HTML custom elements.
Concept
WebF allows you to render HTML/CSS using Flutter's rendering engine. This skill helps you expose complex Flutter widgets as <custom-element> tags usable in HTML.
Workflow
- Create Flutter Widget: Build the widget using standard Flutter code.
- Define Element Class: Create a class extending
WidgetElement. - Register Custom Element: Use
defineCustomElementto map the tag name to the class.
Example
import 'package:webf/webf.dart';
import 'package:flutter/material.dart';