rfw_catalog_schema 1.0.2 copy "rfw_catalog_schema: ^1.0.2" to clipboard
rfw_catalog_schema: ^1.0.2 copied to clipboard

Public schema, annotations, wire identity, and JSON codecs for a Remote Flutter Widgets (RFW) widget catalog. Pure-Dart — used to produce, transmit, or decode catalogs.

example/README.md

rfw_catalog_schema example #

rfw_catalog_schema is the public schema, annotations, wire-identity types, and JSON codecs for an RFW widget catalog — the durable contract shared between catalog producers, consumers, and any tooling that decodes or transmits a catalog.

Annotate a custom widget for the catalog #

Mark a widget with @RestageWidget and its configurable inputs with @RestageProperty so the build-time toolchain can include it in a catalog:

import 'package:flutter/material.dart';
import 'package:rfw_catalog_schema/rfw_catalog_schema.dart';

@RestageWidget()
class PriceBadge extends StatelessWidget {
  const PriceBadge({super.key, required this.label});

  @RestageProperty()
  final String label;

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
      child: Text(label),
    );
  }
}

This package defines only the schema — the annotations, the Catalog / WidgetEntry / PropertyEntry data types, the WireId identity model, and the encodeCatalog / decodeCatalog codecs. The compiler that reads these annotations and emits the catalog is the companion compiler package.

See the package README for the full type and annotation inventory.

1
likes
0
points
54
downloads

Publisher

verified publisherrestage.dev

Weekly Downloads

Public schema, annotations, wire identity, and JSON codecs for a Remote Flutter Widgets (RFW) widget catalog. Pure-Dart — used to produce, transmit, or decode catalogs.

Homepage
Repository (GitHub)
View/report issues

Topics

#server-driven-ui #remote-ui #flutter

License

unknown (license)

Dependencies

meta

More

Packages that depend on rfw_catalog_schema