server_driven_ui 0.0.5 copy "server_driven_ui: ^0.0.5" to clipboard
server_driven_ui: ^0.0.5 copied to clipboard

Server Driven UI Package for Flutter. New features to be deployed on all platforms simultaneously via a backend change, without releasing new versions of the native apps.

Flutter Server Driven UI #

🚀 Server Driven UI Package for Flutter. New features to be deployed on all platforms simultaneously via a backend change, without releasing new versions of the native apps.

🚀 Quick Start #

Download the package:

flutter pub add server_driven_ui

Get JSON & Parsing json to widget:

void main() {
  String json = """
  {
    "widgetName": "Scaffold"
  }
  """;

  runApp(MyApp(json: json));
}

class MyApp extends StatelessWidget {
  late String json;

  MyApp({required this.json});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: RouteWidget(
        provider: StaticContentProvider(content: json),
      ),
    );
  }
}

Also can create and use custom widget:

class CustomWidget extends BaseWidget {
  @override
  Widget build(BuildContext context) {
    return Text("Hello, World!");
  }
}

void main() {
  // Argument = WidgetName, WidgetFactory
  WidgetRegistry.register('CustomWidget', () => CustomWidget()); // Registering your custom widget into server-driven-ui widget factory storage.

  String json = """
  {
    "widgetName": "Scaffold"
    "child": {
      "widgetName": "CustomWidget"
    }
  }
  """;

  runApp(MyApp(json: json));
}

🖼️ Architecture (Core logic) #

image

📄 Documentation #

Go to flutter-server-driven-ui GitHub Wiki.

📄 License #

flutter-server-driven-ui is BSD-3-Clause Licensed.

6
likes
130
points
52
downloads

Publisher

unverified uploader

Weekly Downloads

Server Driven UI Package for Flutter. New features to be deployed on all platforms simultaneously via a backend change, without releasing new versions of the native apps.

Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

License

BSD-3-Clause (license)

Dependencies

flutter, http, http_parser

More

Packages that depend on server_driven_ui