restage_shared 2.0.0 copy "restage_shared: ^2.0.0" to clipboard
restage_shared: ^2.0.0 copied to clipboard

Pure-Dart Remote Flutter Widget (RFW) catalog format, schemas, validation, and shared value types used across the Restage packages.

example/README.md

restage_shared example #

restage_shared is the pure-Dart spine shared between the Restage SDK and the build-time toolchain: catalog format types, surface/flow documents, value types, the analytics taxonomy, plus validation and codecs. There is no Flutter dependency, so the same types compile in a Flutter app, in a command-line tool, or in a pure-Dart server.

Decode and inspect a catalog (pure Dart) #

Because there is no Flutter dependency, you can decode and walk a catalog anywhere, for example in a command-line tool or a server:

import 'dart:io';

import 'package:restage_shared/restage_shared.dart';

void main(List<String> args) {
  final json = File(args.first).readAsStringSync();

  // decodeCatalog validates the canonical JSON as it parses; an invalid
  // catalog throws rather than producing a malformed Catalog.
  final Catalog catalog = decodeCatalog(json);

  for (final WidgetEntry widget in catalog.widgets) {
    stdout.writeln(widget.name);
  }
}

The package also carries the SurfaceDocument / FlowDocument wire formats and the analytics event taxonomy. Both sides read the same definitions, so a surface authored on one decodes byte-for-byte on the other.

See the package README for the full type inventory.

0
likes
160
points
129
downloads

Documentation

API reference

Publisher

verified publisherrestage.dev

Weekly Downloads

Pure-Dart Remote Flutter Widget (RFW) catalog format, schemas, validation, and shared value types used across the Restage packages.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

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

License

BSD-3-Clause (license)

Dependencies

crypto, meta, rfw_catalog_schema

More

Packages that depend on restage_shared