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.

5
likes
110
pub points
53%
popularity

Publisher

unverified uploader

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