restage 1.3.0 copy "restage: ^1.3.0" to clipboard
restage: ^1.3.0 copied to clipboard

Server-driven UI for Flutter. Build any surface — onboarding, messages, surveys, paywalls — in your own Flutter widgets and ship updates over the air. Content, not code.

example/README.md

Restage example #

Write a surface in vanilla Flutter, compile it to a render blob, and render it — all offline, no account.

1. Author a surface #

A surface is an ordinary Flutter widget annotated with its surface type (@PaywallSource here; @ScreenSource / @FlowSource for onboarding, messages, surveys, and full screens). It uses your own widgets and your app's theme.

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

@PaywallSource(id: 'pro')
class ProPaywall extends StatelessWidget {
  const ProPaywall({super.key});

  @override
  Widget build(BuildContext context) {
    return Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: [
        Text('Go Pro', style: Theme.of(context).textTheme.headlineMedium),
        const SizedBox(height: 8),
        Text(paywallPriceFor(slot: 'annual')),
        FilledButton(
          onPressed: paywallPurchase(slot: 'annual'),
          child: const Text('Start free trial'),
        ),
      ],
    );
  }
}

2. Compile it #

dart run build_runner build

This writes a small, inert .rfw render blob next to your source — commit it.

3. Render it #

void main() {
  Restage.configure(apiKey: 'local-dev', resolver: const AssetVariantResolver());
  runApp(const MaterialApp(
    home: Scaffold(body: RestagePaywall(id: 'pro', resolver: AssetVariantResolver())),
  ));
}

RestagePaywall decodes the blob and renders it as real Flutter widgets, in your own widget tree.

Full, runnable examples #

A complete gallery — paywalls, onboarding, a permission prompt, an in-app message, a survey, and custom widgets — lives in apps/examples. Copy one to start. The full walkthrough is in QUICKSTART.md.

0
likes
160
points
527
downloads

Documentation

API reference

Publisher

verified publisherrestage.dev

Weekly Downloads

Server-driven UI for Flutter. Build any surface — onboarding, messages, surveys, paywalls — in your own Flutter widgets and ship updates over the air. Content, not code.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

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

License

BSD-3-Clause (license)

Dependencies

animations, flutter, http, in_app_purchase, in_app_purchase_android, in_app_purchase_storekit, meta, restage_core, restage_cupertino, restage_material, restage_shared, rfw, shared_preferences, web_socket_channel

More

Packages that depend on restage