|
- John Doe
+ Jothish Kamal
-
+
-
+
-
+
diff --git a/build.yaml b/build.yaml
new file mode 100644
index 0000000..9ac3c2c
--- /dev/null
+++ b/build.yaml
@@ -0,0 +1,10 @@
+targets:
+ $default:
+ builders:
+ protoc_plugin: # Using the package name as the builder key
+ enabled: true
+ options:
+ grpc: true # Enable gRPC stub generation
+ output_directory: lib/src/generated # Specify output directory
+ generate_mixins: true # Generate mixins for classes
+ generate_kythe_info: false
diff --git a/example/grpc_example.dart b/example/grpc_example.dart
new file mode 100644
index 0000000..f0b699d
--- /dev/null
+++ b/example/grpc_example.dart
@@ -0,0 +1,118 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_sdui/flutter_sdui.dart';
+
+void main() {
+ runApp(const MyApp());
+}
+
+class MyApp extends StatelessWidget {
+ const MyApp({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return MaterialApp(
+ title: 'SDUI gRPC Demo',
+ theme: ThemeData(
+ colorScheme: ColorScheme.fromSeed(seedColor: Colors.blue),
+ useMaterial3: true,
+ ),
+ home: const GrpcRendererDemo(),
+ );
+ }
+}
+
+class GrpcRendererDemo extends StatefulWidget {
+ const GrpcRendererDemo({super.key});
+
+ @override
+ State createState() => _GrpcRendererDemoState();
+}
+
+class _GrpcRendererDemoState extends State {
+ late SduiGrpcClient _grpcClient;
+ String _screenId = 'home';
+
+ @override
+ void initState() {
+ super.initState();
+ // Connect to your gRPC server
+ _grpcClient = SduiGrpcClient(
+ host: 'localhost', // Replace with your server address
+ port: 50051, // Replace with your server port
+ );
+ }
+
+ @override
+ void dispose() {
+ // Close the gRPC connection when done
+ _grpcClient.dispose();
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: const Text('SDUI gRPC Demo'),
+ ),
+ body: Column(
+ children: [
+ // Screen selector
+ Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Row(
+ children: [
+ const Text('Screen: '),
+ const SizedBox(width: 8),
+ DropdownButton(
+ value: _screenId,
+ items: const [
+ DropdownMenuItem(value: 'home', child: Text('Home')),
+ DropdownMenuItem(value: 'profile', child: Text('Profile')),
+ DropdownMenuItem(
+ value: 'settings', child: Text('Settings')),
+ ],
+ onChanged: (value) {
+ if (value != null) {
+ setState(() {
+ _screenId = value;
+ });
+ }
+ },
+ ),
+ ],
+ ),
+ ),
+
+ // SDUI Renderer that fetches UI from gRPC server
+ Expanded(
+ child: SduiGrpcRenderer(
+ client: _grpcClient,
+ screenId: _screenId,
+ loadingWidget: const Center(
+ child: CircularProgressIndicator(),
+ ),
+ errorBuilder: (context, error) {
+ return Center(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ const Icon(Icons.error, color: Colors.red, size: 48),
+ const SizedBox(height: 16),
+ Text('Error: $error'),
+ const SizedBox(height: 16),
+ ElevatedButton(
+ onPressed: () => setState(() {}),
+ child: const Text('Retry'),
+ ),
+ ],
+ ),
+ );
+ },
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+}
diff --git a/example/grpc_server_example_dart.dart b/example/grpc_server_example_dart.dart
new file mode 100644
index 0000000..fabb3a4
--- /dev/null
+++ b/example/grpc_server_example_dart.dart
@@ -0,0 +1,294 @@
+// Server implementation example (Dart)
+// Note: This is a standalone Dart server, not a Flutter application
+// Run with: dart run example/grpc_server_example.dart
+import 'package:grpc/grpc.dart';
+import 'package:flutter_sdui/src/generated/sdui.pbgrpc.dart';
+
+Future main() async {
+ final server = Server.create(
+ services: [
+ SduiServiceImpl(),
+ ],
+ );
+
+ final port = 50051;
+ await server.serve(port: port);
+ print('Server listening on port $port...');
+ print('Press Ctrl+C to stop');
+}
+
+// Implementation of the SDUI service
+class SduiServiceImpl extends SduiServiceBase {
+ @override
+ Future getSduiWidget(
+ ServiceCall call, SduiRequest request) async {
+ // Based on the requested screen, return different UI definitions
+ print('Received request for screen: ${request.screenId}');
+ switch (request.screenId) {
+ case 'home':
+ return _createHomeScreen();
+ case 'profile':
+ return _createProfileScreen();
+ case 'settings':
+ return _createSettingsScreen();
+ default:
+ // Default or error screen
+ print('Warning: Unknown screen ID requested: ${request.screenId}');
+ return _createErrorScreen();
+ }
+ }
+
+ // Sample screen definitions
+ SduiWidgetData _createHomeScreen() {
+ final homeScreen = SduiWidgetData()
+ ..type = WidgetType.SCAFFOLD
+ ..appBar = (SduiWidgetData()
+ ..type = WidgetType.CONTAINER
+ ..boxDecoration = (BoxDecorationData()
+ ..color = (ColorData()
+ ..red = 25
+ ..green = 118
+ ..blue = 210
+ ..alpha = 255))
+ ..padding = (EdgeInsetsData()
+ ..top = 8
+ ..left = 16
+ ..right = 16
+ ..bottom = 8)
+ ..child = (SduiWidgetData()
+ ..type = WidgetType.TEXT
+ ..stringAttributes['text'] = 'Home Screen'
+ ..textStyle = (TextStyleData()
+ ..fontSize = 20
+ ..fontWeight = 'bold'
+ ..color = (ColorData()
+ ..red = 255
+ ..green = 255
+ ..blue = 255
+ ..alpha = 255))))
+ ..body = (SduiWidgetData()
+ ..type = WidgetType.COLUMN
+ ..children.addAll([
+ SduiWidgetData()
+ ..type = WidgetType.CONTAINER
+ ..padding = (EdgeInsetsData()..all = 16)
+ ..child = (SduiWidgetData()
+ ..type = WidgetType.TEXT
+ ..stringAttributes['text'] = 'Welcome to Server-Driven UI!'
+ ..textStyle = (TextStyleData()
+ ..fontSize = 22
+ ..fontWeight = 'bold')),
+ SduiWidgetData()
+ ..type = WidgetType.CONTAINER
+ ..padding = (EdgeInsetsData()
+ ..left = 16
+ ..right = 16
+ ..bottom = 16)
+ ..child = (SduiWidgetData()
+ ..type = WidgetType.TEXT
+ ..stringAttributes['text'] =
+ 'This UI is rendered from data sent by the server via gRPC.'),
+ SduiWidgetData()
+ ..type = WidgetType.CONTAINER
+ ..padding = (EdgeInsetsData()..all = 16)
+ ..margin = (EdgeInsetsData()
+ ..left = 16
+ ..right = 16)
+ ..boxDecoration = (BoxDecorationData()
+ ..color = (ColorData()
+ ..red = 240
+ ..green = 240
+ ..blue = 240
+ ..alpha = 255))
+ ..child = (SduiWidgetData()
+ ..type = WidgetType.ROW
+ ..children.addAll([
+ SduiWidgetData()
+ ..type = WidgetType.ICON
+ ..icon = (IconDataMessage()
+ ..name = 'info'
+ ..color = (ColorData()
+ ..red = 25
+ ..green = 118
+ ..blue = 210
+ ..alpha = 255)
+ ..size = 24),
+ SduiWidgetData()
+ ..type = WidgetType.SIZED_BOX
+ ..doubleAttributes['width'] = 16,
+ SduiWidgetData()
+ ..type = WidgetType.TEXT
+ ..stringAttributes['text'] =
+ 'Select a screen from the dropdown.'
+ ]))
+ ]));
+
+ return homeScreen;
+ }
+
+ SduiWidgetData _createProfileScreen() {
+ final profileScreen = SduiWidgetData()
+ ..type = WidgetType.SCAFFOLD
+ ..appBar = (SduiWidgetData()
+ ..type = WidgetType.CONTAINER
+ ..boxDecoration = (BoxDecorationData()
+ ..color = (ColorData()
+ ..red = 76
+ ..green = 175
+ ..blue = 80
+ ..alpha = 255))
+ ..padding = (EdgeInsetsData()
+ ..top = 8
+ ..left = 16
+ ..right = 16
+ ..bottom = 8)
+ ..child = (SduiWidgetData()
+ ..type = WidgetType.TEXT
+ ..stringAttributes['text'] = 'Profile Screen'
+ ..textStyle = (TextStyleData()
+ ..fontSize = 20
+ ..fontWeight = 'bold'
+ ..color = (ColorData()
+ ..red = 255
+ ..green = 255
+ ..blue = 255
+ ..alpha = 255))))
+ ..body = (SduiWidgetData()
+ ..type = WidgetType.COLUMN
+ ..children.addAll([
+ SduiWidgetData()
+ ..type = WidgetType.CONTAINER
+ ..padding = (EdgeInsetsData()..all = 16)
+ ..child = (SduiWidgetData()
+ ..type = WidgetType.TEXT
+ ..stringAttributes['text'] = 'User Profile'
+ ..textStyle = (TextStyleData()
+ ..fontSize = 22
+ ..fontWeight = 'bold')),
+ SduiWidgetData()
+ ..type = WidgetType.CONTAINER
+ ..padding = (EdgeInsetsData()
+ ..left = 16
+ ..right = 16
+ ..bottom = 24)
+ ..child = (SduiWidgetData()
+ ..type = WidgetType.TEXT
+ ..stringAttributes['text'] =
+ 'This is a sample profile page rendered from gRPC data.'),
+ ]));
+
+ return profileScreen;
+ }
+
+ SduiWidgetData _createSettingsScreen() {
+ final settingsScreen = SduiWidgetData()
+ ..type = WidgetType.SCAFFOLD
+ ..appBar = (SduiWidgetData()
+ ..type = WidgetType.CONTAINER
+ ..boxDecoration = (BoxDecorationData()
+ ..color = (ColorData()
+ ..red = 121
+ ..green = 85
+ ..blue = 72
+ ..alpha = 255))
+ ..padding = (EdgeInsetsData()
+ ..top = 8
+ ..left = 16
+ ..right = 16
+ ..bottom = 8)
+ ..child = (SduiWidgetData()
+ ..type = WidgetType.TEXT
+ ..stringAttributes['text'] = 'Settings Screen'
+ ..textStyle = (TextStyleData()
+ ..fontSize = 20
+ ..fontWeight = 'bold'
+ ..color = (ColorData()
+ ..red = 255
+ ..green = 255
+ ..blue = 255
+ ..alpha = 255))))
+ ..body = (SduiWidgetData()
+ ..type = WidgetType.COLUMN
+ ..children.addAll([
+ SduiWidgetData()
+ ..type = WidgetType.CONTAINER
+ ..padding = (EdgeInsetsData()..all = 16)
+ ..child = (SduiWidgetData()
+ ..type = WidgetType.TEXT
+ ..stringAttributes['text'] = 'App Settings'
+ ..textStyle = (TextStyleData()
+ ..fontSize = 22
+ ..fontWeight = 'bold')),
+ SduiWidgetData()
+ ..type = WidgetType.CONTAINER
+ ..padding = (EdgeInsetsData()
+ ..left = 16
+ ..right = 16
+ ..bottom = 24)
+ ..child = (SduiWidgetData()
+ ..type = WidgetType.TEXT
+ ..stringAttributes['text'] =
+ 'This is a sample settings page from the gRPC server.'),
+ ]));
+
+ return settingsScreen;
+ }
+
+ SduiWidgetData _createErrorScreen() {
+ final errorScreen = SduiWidgetData()
+ ..type = WidgetType.SCAFFOLD
+ ..appBar = (SduiWidgetData()
+ ..type = WidgetType.CONTAINER
+ ..boxDecoration = (BoxDecorationData()
+ ..color = (ColorData()
+ ..red = 211
+ ..green = 47
+ ..blue = 47
+ ..alpha = 255))
+ ..padding = (EdgeInsetsData()
+ ..top = 8
+ ..left = 16
+ ..right = 16
+ ..bottom = 8)
+ ..child = (SduiWidgetData()
+ ..type = WidgetType.TEXT
+ ..stringAttributes['text'] = 'Error'
+ ..textStyle = (TextStyleData()
+ ..fontSize = 20
+ ..fontWeight = 'bold'
+ ..color = (ColorData()
+ ..red = 255
+ ..green = 255
+ ..blue = 255
+ ..alpha = 255))))
+ ..body = (SduiWidgetData()
+ ..type = WidgetType.COLUMN
+ ..children.addAll([
+ SduiWidgetData()
+ ..type = WidgetType.CONTAINER
+ ..padding = (EdgeInsetsData()..all = 16)
+ ..child = (SduiWidgetData()
+ ..type = WidgetType.TEXT
+ ..stringAttributes['text'] = 'Screen Not Found'
+ ..textStyle = (TextStyleData()
+ ..fontSize = 24
+ ..fontWeight = 'bold'
+ ..color = (ColorData()
+ ..red = 211
+ ..green = 47
+ ..blue = 47
+ ..alpha = 255))),
+ SduiWidgetData()
+ ..type = WidgetType.CONTAINER
+ ..padding = (EdgeInsetsData()
+ ..left = 16
+ ..right = 16)
+ ..child = (SduiWidgetData()
+ ..type = WidgetType.TEXT
+ ..stringAttributes['text'] =
+ 'The requested screen could not be found. Try a different screen ID.'),
+ ]));
+
+ return errorScreen;
+ }
+}
diff --git a/lib/flutter_sdui.dart b/lib/flutter_sdui.dart
index 298576d..a7e5442 100644
--- a/lib/flutter_sdui.dart
+++ b/lib/flutter_sdui.dart
@@ -1,5 +1,29 @@
-/// A Calculator.
-class Calculator {
- /// Returns [value] plus 1.
- int addOne(int value) => value + 1;
-}
+/// Flutter SDUI Package
+///
+/// A Flutter package to render server driven UI.
+library;
+
+// Export the core parser and widget base
+export 'src/parser/sdui_proto_parser.dart'; // New proto parser
+export 'src/widgets/sdui_widget.dart';
+
+// Export individual widget models
+export 'src/widgets/sdui_column.dart';
+export 'src/widgets/sdui_row.dart';
+export 'src/widgets/sdui_text.dart';
+export 'src/widgets/sdui_image.dart';
+export 'src/widgets/sdui_sized_box.dart';
+export 'src/widgets/sdui_container.dart';
+export 'src/widgets/sdui_scaffold.dart';
+export 'src/widgets/sdui_spacer.dart';
+export 'src/widgets/sdui_icon.dart';
+
+// Export gRPC client and renderer
+export 'src/service/sdui_grpc_client.dart';
+export 'src/renderer/sdui_grpc_renderer.dart';
+
+// Export generated Protobuf models for public use
+export 'src/generated/sdui.pb.dart';
+export 'src/generated/sdui.pbgrpc.dart';
+export 'src/generated/sdui.pbenum.dart';
+export 'src/generated/sdui.pbjson.dart';
diff --git a/lib/src/generated/sdui.pb.dart b/lib/src/generated/sdui.pb.dart
new file mode 100644
index 0000000..10caa0e
--- /dev/null
+++ b/lib/src/generated/sdui.pb.dart
@@ -0,0 +1,1680 @@
+//
+// Generated code. Do not modify.
+// source: sdui.proto
+//
+// @dart = 3.3
+
+// ignore_for_file: annotate_overrides, camel_case_types, comment_references
+// ignore_for_file: constant_identifier_names, library_prefixes
+// ignore_for_file: non_constant_identifier_names, prefer_final_fields
+// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
+
+import 'dart:core' as $core;
+
+import 'package:protobuf/protobuf.dart' as $pb;
+
+import 'sdui.pbenum.dart';
+
+export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;
+
+export 'sdui.pbenum.dart';
+
+/// Generic Widget message
+class SduiWidgetData extends $pb.GeneratedMessage {
+ factory SduiWidgetData({
+ WidgetType? type,
+ $core.Iterable<$core.MapEntry<$core.String, $core.String>>? stringAttributes,
+ $core.Iterable<$core.MapEntry<$core.String, $core.double>>? doubleAttributes,
+ $core.Iterable<$core.MapEntry<$core.String, $core.bool>>? boolAttributes,
+ $core.Iterable<$core.MapEntry<$core.String, $core.int>>? intAttributes,
+ TextStyleData? textStyle,
+ EdgeInsetsData? padding,
+ EdgeInsetsData? margin,
+ ColorData? color,
+ IconDataMessage? icon,
+ BoxDecorationData? boxDecoration,
+ $core.Iterable? children,
+ SduiWidgetData? child,
+ SduiWidgetData? appBar,
+ SduiWidgetData? body,
+ SduiWidgetData? floatingActionButton,
+ ColorData? backgroundColor,
+ }) {
+ final $result = create();
+ if (type != null) {
+ $result.type = type;
+ }
+ if (stringAttributes != null) {
+ $result.stringAttributes.addEntries(stringAttributes);
+ }
+ if (doubleAttributes != null) {
+ $result.doubleAttributes.addEntries(doubleAttributes);
+ }
+ if (boolAttributes != null) {
+ $result.boolAttributes.addEntries(boolAttributes);
+ }
+ if (intAttributes != null) {
+ $result.intAttributes.addEntries(intAttributes);
+ }
+ if (textStyle != null) {
+ $result.textStyle = textStyle;
+ }
+ if (padding != null) {
+ $result.padding = padding;
+ }
+ if (margin != null) {
+ $result.margin = margin;
+ }
+ if (color != null) {
+ $result.color = color;
+ }
+ if (icon != null) {
+ $result.icon = icon;
+ }
+ if (boxDecoration != null) {
+ $result.boxDecoration = boxDecoration;
+ }
+ if (children != null) {
+ $result.children.addAll(children);
+ }
+ if (child != null) {
+ $result.child = child;
+ }
+ if (appBar != null) {
+ $result.appBar = appBar;
+ }
+ if (body != null) {
+ $result.body = body;
+ }
+ if (floatingActionButton != null) {
+ $result.floatingActionButton = floatingActionButton;
+ }
+ if (backgroundColor != null) {
+ $result.backgroundColor = backgroundColor;
+ }
+ return $result;
+ }
+ SduiWidgetData._() : super();
+ factory SduiWidgetData.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+ factory SduiWidgetData.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'SduiWidgetData', package: const $pb.PackageName(_omitMessageNames ? '' : 'flutter_sdui'), createEmptyInstance: create)
+ ..e(1, _omitFieldNames ? '' : 'type', $pb.PbFieldType.OE, defaultOrMaker: WidgetType.WIDGET_TYPE_UNSPECIFIED, valueOf: WidgetType.valueOf, enumValues: WidgetType.values)
+ ..m<$core.String, $core.String>(2, _omitFieldNames ? '' : 'stringAttributes', entryClassName: 'SduiWidgetData.StringAttributesEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OS, packageName: const $pb.PackageName('flutter_sdui'))
+ ..m<$core.String, $core.double>(3, _omitFieldNames ? '' : 'doubleAttributes', entryClassName: 'SduiWidgetData.DoubleAttributesEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OD, packageName: const $pb.PackageName('flutter_sdui'))
+ ..m<$core.String, $core.bool>(4, _omitFieldNames ? '' : 'boolAttributes', entryClassName: 'SduiWidgetData.BoolAttributesEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OB, packageName: const $pb.PackageName('flutter_sdui'))
+ ..m<$core.String, $core.int>(5, _omitFieldNames ? '' : 'intAttributes', entryClassName: 'SduiWidgetData.IntAttributesEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.O3, packageName: const $pb.PackageName('flutter_sdui'))
+ ..aOM(6, _omitFieldNames ? '' : 'textStyle', subBuilder: TextStyleData.create)
+ ..aOM(7, _omitFieldNames ? '' : 'padding', subBuilder: EdgeInsetsData.create)
+ ..aOM(8, _omitFieldNames ? '' : 'margin', subBuilder: EdgeInsetsData.create)
+ ..aOM(9, _omitFieldNames ? '' : 'color', subBuilder: ColorData.create)
+ ..aOM(10, _omitFieldNames ? '' : 'icon', subBuilder: IconDataMessage.create)
+ ..aOM(11, _omitFieldNames ? '' : 'boxDecoration', subBuilder: BoxDecorationData.create)
+ ..pc(12, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: SduiWidgetData.create)
+ ..aOM(13, _omitFieldNames ? '' : 'child', subBuilder: SduiWidgetData.create)
+ ..aOM(14, _omitFieldNames ? '' : 'appBar', subBuilder: SduiWidgetData.create)
+ ..aOM(15, _omitFieldNames ? '' : 'body', subBuilder: SduiWidgetData.create)
+ ..aOM(16, _omitFieldNames ? '' : 'floatingActionButton', subBuilder: SduiWidgetData.create)
+ ..aOM(17, _omitFieldNames ? '' : 'backgroundColor', subBuilder: ColorData.create)
+ ..hasRequiredFields = false
+ ;
+
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ SduiWidgetData clone() => SduiWidgetData()..mergeFromMessage(this);
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ SduiWidgetData copyWith(void Function(SduiWidgetData) updates) => super.copyWith((message) => updates(message as SduiWidgetData)) as SduiWidgetData;
+
+ $pb.BuilderInfo get info_ => _i;
+
+ @$core.pragma('dart2js:noInline')
+ static SduiWidgetData create() => SduiWidgetData._();
+ SduiWidgetData createEmptyInstance() => create();
+ static $pb.PbList createRepeated() => $pb.PbList();
+ @$core.pragma('dart2js:noInline')
+ static SduiWidgetData getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create);
+ static SduiWidgetData? _defaultInstance;
+
+ @$pb.TagNumber(1)
+ WidgetType get type => $_getN(0);
+ @$pb.TagNumber(1)
+ set type(WidgetType v) { $_setField(1, v); }
+ @$pb.TagNumber(1)
+ $core.bool hasType() => $_has(0);
+ @$pb.TagNumber(1)
+ void clearType() => $_clearField(1);
+
+ @$pb.TagNumber(2)
+ $pb.PbMap<$core.String, $core.String> get stringAttributes => $_getMap(1);
+
+ @$pb.TagNumber(3)
+ $pb.PbMap<$core.String, $core.double> get doubleAttributes => $_getMap(2);
+
+ @$pb.TagNumber(4)
+ $pb.PbMap<$core.String, $core.bool> get boolAttributes => $_getMap(3);
+
+ @$pb.TagNumber(5)
+ $pb.PbMap<$core.String, $core.int> get intAttributes => $_getMap(4);
+
+ /// Complex nested attributes
+ @$pb.TagNumber(6)
+ TextStyleData get textStyle => $_getN(5);
+ @$pb.TagNumber(6)
+ set textStyle(TextStyleData v) { $_setField(6, v); }
+ @$pb.TagNumber(6)
+ $core.bool hasTextStyle() => $_has(5);
+ @$pb.TagNumber(6)
+ void clearTextStyle() => $_clearField(6);
+ @$pb.TagNumber(6)
+ TextStyleData ensureTextStyle() => $_ensure(5);
+
+ @$pb.TagNumber(7)
+ EdgeInsetsData get padding => $_getN(6);
+ @$pb.TagNumber(7)
+ set padding(EdgeInsetsData v) { $_setField(7, v); }
+ @$pb.TagNumber(7)
+ $core.bool hasPadding() => $_has(6);
+ @$pb.TagNumber(7)
+ void clearPadding() => $_clearField(7);
+ @$pb.TagNumber(7)
+ EdgeInsetsData ensurePadding() => $_ensure(6);
+
+ @$pb.TagNumber(8)
+ EdgeInsetsData get margin => $_getN(7);
+ @$pb.TagNumber(8)
+ set margin(EdgeInsetsData v) { $_setField(8, v); }
+ @$pb.TagNumber(8)
+ $core.bool hasMargin() => $_has(7);
+ @$pb.TagNumber(8)
+ void clearMargin() => $_clearField(8);
+ @$pb.TagNumber(8)
+ EdgeInsetsData ensureMargin() => $_ensure(7);
+
+ @$pb.TagNumber(9)
+ ColorData get color => $_getN(8);
+ @$pb.TagNumber(9)
+ set color(ColorData v) { $_setField(9, v); }
+ @$pb.TagNumber(9)
+ $core.bool hasColor() => $_has(8);
+ @$pb.TagNumber(9)
+ void clearColor() => $_clearField(9);
+ @$pb.TagNumber(9)
+ ColorData ensureColor() => $_ensure(8);
+
+ @$pb.TagNumber(10)
+ IconDataMessage get icon => $_getN(9);
+ @$pb.TagNumber(10)
+ set icon(IconDataMessage v) { $_setField(10, v); }
+ @$pb.TagNumber(10)
+ $core.bool hasIcon() => $_has(9);
+ @$pb.TagNumber(10)
+ void clearIcon() => $_clearField(10);
+ @$pb.TagNumber(10)
+ IconDataMessage ensureIcon() => $_ensure(9);
+
+ @$pb.TagNumber(11)
+ BoxDecorationData get boxDecoration => $_getN(10);
+ @$pb.TagNumber(11)
+ set boxDecoration(BoxDecorationData v) { $_setField(11, v); }
+ @$pb.TagNumber(11)
+ $core.bool hasBoxDecoration() => $_has(10);
+ @$pb.TagNumber(11)
+ void clearBoxDecoration() => $_clearField(11);
+ @$pb.TagNumber(11)
+ BoxDecorationData ensureBoxDecoration() => $_ensure(10);
+
+ /// Children widgets
+ @$pb.TagNumber(12)
+ $pb.PbList get children => $_getList(11);
+
+ @$pb.TagNumber(13)
+ SduiWidgetData get child => $_getN(12);
+ @$pb.TagNumber(13)
+ set child(SduiWidgetData v) { $_setField(13, v); }
+ @$pb.TagNumber(13)
+ $core.bool hasChild() => $_has(12);
+ @$pb.TagNumber(13)
+ void clearChild() => $_clearField(13);
+ @$pb.TagNumber(13)
+ SduiWidgetData ensureChild() => $_ensure(12);
+
+ /// Scaffold specific parts
+ @$pb.TagNumber(14)
+ SduiWidgetData get appBar => $_getN(13);
+ @$pb.TagNumber(14)
+ set appBar(SduiWidgetData v) { $_setField(14, v); }
+ @$pb.TagNumber(14)
+ $core.bool hasAppBar() => $_has(13);
+ @$pb.TagNumber(14)
+ void clearAppBar() => $_clearField(14);
+ @$pb.TagNumber(14)
+ SduiWidgetData ensureAppBar() => $_ensure(13);
+
+ @$pb.TagNumber(15)
+ SduiWidgetData get body => $_getN(14);
+ @$pb.TagNumber(15)
+ set body(SduiWidgetData v) { $_setField(15, v); }
+ @$pb.TagNumber(15)
+ $core.bool hasBody() => $_has(14);
+ @$pb.TagNumber(15)
+ void clearBody() => $_clearField(15);
+ @$pb.TagNumber(15)
+ SduiWidgetData ensureBody() => $_ensure(14);
+
+ @$pb.TagNumber(16)
+ SduiWidgetData get floatingActionButton => $_getN(15);
+ @$pb.TagNumber(16)
+ set floatingActionButton(SduiWidgetData v) { $_setField(16, v); }
+ @$pb.TagNumber(16)
+ $core.bool hasFloatingActionButton() => $_has(15);
+ @$pb.TagNumber(16)
+ void clearFloatingActionButton() => $_clearField(16);
+ @$pb.TagNumber(16)
+ SduiWidgetData ensureFloatingActionButton() => $_ensure(15);
+
+ @$pb.TagNumber(17)
+ ColorData get backgroundColor => $_getN(16);
+ @$pb.TagNumber(17)
+ set backgroundColor(ColorData v) { $_setField(17, v); }
+ @$pb.TagNumber(17)
+ $core.bool hasBackgroundColor() => $_has(16);
+ @$pb.TagNumber(17)
+ void clearBackgroundColor() => $_clearField(17);
+ @$pb.TagNumber(17)
+ ColorData ensureBackgroundColor() => $_ensure(16);
+}
+
+/// Message for Color
+class ColorData extends $pb.GeneratedMessage {
+ factory ColorData({
+ $core.int? alpha,
+ $core.int? red,
+ $core.int? green,
+ $core.int? blue,
+ }) {
+ final $result = create();
+ if (alpha != null) {
+ $result.alpha = alpha;
+ }
+ if (red != null) {
+ $result.red = red;
+ }
+ if (green != null) {
+ $result.green = green;
+ }
+ if (blue != null) {
+ $result.blue = blue;
+ }
+ return $result;
+ }
+ ColorData._() : super();
+ factory ColorData.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+ factory ColorData.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ColorData', package: const $pb.PackageName(_omitMessageNames ? '' : 'flutter_sdui'), createEmptyInstance: create)
+ ..a<$core.int>(1, _omitFieldNames ? '' : 'alpha', $pb.PbFieldType.O3)
+ ..a<$core.int>(2, _omitFieldNames ? '' : 'red', $pb.PbFieldType.O3)
+ ..a<$core.int>(3, _omitFieldNames ? '' : 'green', $pb.PbFieldType.O3)
+ ..a<$core.int>(4, _omitFieldNames ? '' : 'blue', $pb.PbFieldType.O3)
+ ..hasRequiredFields = false
+ ;
+
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ ColorData clone() => ColorData()..mergeFromMessage(this);
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ ColorData copyWith(void Function(ColorData) updates) => super.copyWith((message) => updates(message as ColorData)) as ColorData;
+
+ $pb.BuilderInfo get info_ => _i;
+
+ @$core.pragma('dart2js:noInline')
+ static ColorData create() => ColorData._();
+ ColorData createEmptyInstance() => create();
+ static $pb.PbList createRepeated() => $pb.PbList();
+ @$core.pragma('dart2js:noInline')
+ static ColorData getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create);
+ static ColorData? _defaultInstance;
+
+ @$pb.TagNumber(1)
+ $core.int get alpha => $_getIZ(0);
+ @$pb.TagNumber(1)
+ set alpha($core.int v) { $_setSignedInt32(0, v); }
+ @$pb.TagNumber(1)
+ $core.bool hasAlpha() => $_has(0);
+ @$pb.TagNumber(1)
+ void clearAlpha() => $_clearField(1);
+
+ @$pb.TagNumber(2)
+ $core.int get red => $_getIZ(1);
+ @$pb.TagNumber(2)
+ set red($core.int v) { $_setSignedInt32(1, v); }
+ @$pb.TagNumber(2)
+ $core.bool hasRed() => $_has(1);
+ @$pb.TagNumber(2)
+ void clearRed() => $_clearField(2);
+
+ @$pb.TagNumber(3)
+ $core.int get green => $_getIZ(2);
+ @$pb.TagNumber(3)
+ set green($core.int v) { $_setSignedInt32(2, v); }
+ @$pb.TagNumber(3)
+ $core.bool hasGreen() => $_has(2);
+ @$pb.TagNumber(3)
+ void clearGreen() => $_clearField(3);
+
+ @$pb.TagNumber(4)
+ $core.int get blue => $_getIZ(3);
+ @$pb.TagNumber(4)
+ set blue($core.int v) { $_setSignedInt32(3, v); }
+ @$pb.TagNumber(4)
+ $core.bool hasBlue() => $_has(3);
+ @$pb.TagNumber(4)
+ void clearBlue() => $_clearField(4);
+}
+
+/// Message for EdgeInsets (for padding, margin)
+class EdgeInsetsData extends $pb.GeneratedMessage {
+ factory EdgeInsetsData({
+ $core.double? left,
+ $core.double? top,
+ $core.double? right,
+ $core.double? bottom,
+ $core.double? all,
+ }) {
+ final $result = create();
+ if (left != null) {
+ $result.left = left;
+ }
+ if (top != null) {
+ $result.top = top;
+ }
+ if (right != null) {
+ $result.right = right;
+ }
+ if (bottom != null) {
+ $result.bottom = bottom;
+ }
+ if (all != null) {
+ $result.all = all;
+ }
+ return $result;
+ }
+ EdgeInsetsData._() : super();
+ factory EdgeInsetsData.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+ factory EdgeInsetsData.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'EdgeInsetsData', package: const $pb.PackageName(_omitMessageNames ? '' : 'flutter_sdui'), createEmptyInstance: create)
+ ..a<$core.double>(1, _omitFieldNames ? '' : 'left', $pb.PbFieldType.OD)
+ ..a<$core.double>(2, _omitFieldNames ? '' : 'top', $pb.PbFieldType.OD)
+ ..a<$core.double>(3, _omitFieldNames ? '' : 'right', $pb.PbFieldType.OD)
+ ..a<$core.double>(4, _omitFieldNames ? '' : 'bottom', $pb.PbFieldType.OD)
+ ..a<$core.double>(5, _omitFieldNames ? '' : 'all', $pb.PbFieldType.OD)
+ ..hasRequiredFields = false
+ ;
+
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ EdgeInsetsData clone() => EdgeInsetsData()..mergeFromMessage(this);
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ EdgeInsetsData copyWith(void Function(EdgeInsetsData) updates) => super.copyWith((message) => updates(message as EdgeInsetsData)) as EdgeInsetsData;
+
+ $pb.BuilderInfo get info_ => _i;
+
+ @$core.pragma('dart2js:noInline')
+ static EdgeInsetsData create() => EdgeInsetsData._();
+ EdgeInsetsData createEmptyInstance() => create();
+ static $pb.PbList createRepeated() => $pb.PbList();
+ @$core.pragma('dart2js:noInline')
+ static EdgeInsetsData getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create);
+ static EdgeInsetsData? _defaultInstance;
+
+ @$pb.TagNumber(1)
+ $core.double get left => $_getN(0);
+ @$pb.TagNumber(1)
+ set left($core.double v) { $_setDouble(0, v); }
+ @$pb.TagNumber(1)
+ $core.bool hasLeft() => $_has(0);
+ @$pb.TagNumber(1)
+ void clearLeft() => $_clearField(1);
+
+ @$pb.TagNumber(2)
+ $core.double get top => $_getN(1);
+ @$pb.TagNumber(2)
+ set top($core.double v) { $_setDouble(1, v); }
+ @$pb.TagNumber(2)
+ $core.bool hasTop() => $_has(1);
+ @$pb.TagNumber(2)
+ void clearTop() => $_clearField(2);
+
+ @$pb.TagNumber(3)
+ $core.double get right => $_getN(2);
+ @$pb.TagNumber(3)
+ set right($core.double v) { $_setDouble(2, v); }
+ @$pb.TagNumber(3)
+ $core.bool hasRight() => $_has(2);
+ @$pb.TagNumber(3)
+ void clearRight() => $_clearField(3);
+
+ @$pb.TagNumber(4)
+ $core.double get bottom => $_getN(3);
+ @$pb.TagNumber(4)
+ set bottom($core.double v) { $_setDouble(3, v); }
+ @$pb.TagNumber(4)
+ $core.bool hasBottom() => $_has(3);
+ @$pb.TagNumber(4)
+ void clearBottom() => $_clearField(4);
+
+ @$pb.TagNumber(5)
+ $core.double get all => $_getN(4);
+ @$pb.TagNumber(5)
+ set all($core.double v) { $_setDouble(4, v); }
+ @$pb.TagNumber(5)
+ $core.bool hasAll() => $_has(4);
+ @$pb.TagNumber(5)
+ void clearAll() => $_clearField(5);
+}
+
+/// Message for TextStyle
+class TextStyleData extends $pb.GeneratedMessage {
+ factory TextStyleData({
+ ColorData? color,
+ $core.double? fontSize,
+ $core.String? fontWeight,
+ }) {
+ final $result = create();
+ if (color != null) {
+ $result.color = color;
+ }
+ if (fontSize != null) {
+ $result.fontSize = fontSize;
+ }
+ if (fontWeight != null) {
+ $result.fontWeight = fontWeight;
+ }
+ return $result;
+ }
+ TextStyleData._() : super();
+ factory TextStyleData.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+ factory TextStyleData.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'TextStyleData', package: const $pb.PackageName(_omitMessageNames ? '' : 'flutter_sdui'), createEmptyInstance: create)
+ ..aOM(1, _omitFieldNames ? '' : 'color', subBuilder: ColorData.create)
+ ..a<$core.double>(2, _omitFieldNames ? '' : 'fontSize', $pb.PbFieldType.OD)
+ ..aOS(3, _omitFieldNames ? '' : 'fontWeight')
+ ..hasRequiredFields = false
+ ;
+
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ TextStyleData clone() => TextStyleData()..mergeFromMessage(this);
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ TextStyleData copyWith(void Function(TextStyleData) updates) => super.copyWith((message) => updates(message as TextStyleData)) as TextStyleData;
+
+ $pb.BuilderInfo get info_ => _i;
+
+ @$core.pragma('dart2js:noInline')
+ static TextStyleData create() => TextStyleData._();
+ TextStyleData createEmptyInstance() => create();
+ static $pb.PbList createRepeated() => $pb.PbList();
+ @$core.pragma('dart2js:noInline')
+ static TextStyleData getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create);
+ static TextStyleData? _defaultInstance;
+
+ @$pb.TagNumber(1)
+ ColorData get color => $_getN(0);
+ @$pb.TagNumber(1)
+ set color(ColorData v) { $_setField(1, v); }
+ @$pb.TagNumber(1)
+ $core.bool hasColor() => $_has(0);
+ @$pb.TagNumber(1)
+ void clearColor() => $_clearField(1);
+ @$pb.TagNumber(1)
+ ColorData ensureColor() => $_ensure(0);
+
+ @$pb.TagNumber(2)
+ $core.double get fontSize => $_getN(1);
+ @$pb.TagNumber(2)
+ set fontSize($core.double v) { $_setDouble(1, v); }
+ @$pb.TagNumber(2)
+ $core.bool hasFontSize() => $_has(1);
+ @$pb.TagNumber(2)
+ void clearFontSize() => $_clearField(2);
+
+ @$pb.TagNumber(3)
+ $core.String get fontWeight => $_getSZ(2);
+ @$pb.TagNumber(3)
+ set fontWeight($core.String v) { $_setString(2, v); }
+ @$pb.TagNumber(3)
+ $core.bool hasFontWeight() => $_has(2);
+ @$pb.TagNumber(3)
+ void clearFontWeight() => $_clearField(3);
+}
+
+/// Message for IconData
+class IconDataMessage extends $pb.GeneratedMessage {
+ factory IconDataMessage({
+ $core.String? name,
+ $core.int? codePoint,
+ $core.String? fontFamily,
+ ColorData? color,
+ $core.double? size,
+ }) {
+ final $result = create();
+ if (name != null) {
+ $result.name = name;
+ }
+ if (codePoint != null) {
+ $result.codePoint = codePoint;
+ }
+ if (fontFamily != null) {
+ $result.fontFamily = fontFamily;
+ }
+ if (color != null) {
+ $result.color = color;
+ }
+ if (size != null) {
+ $result.size = size;
+ }
+ return $result;
+ }
+ IconDataMessage._() : super();
+ factory IconDataMessage.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+ factory IconDataMessage.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'IconDataMessage', package: const $pb.PackageName(_omitMessageNames ? '' : 'flutter_sdui'), createEmptyInstance: create)
+ ..aOS(1, _omitFieldNames ? '' : 'name')
+ ..a<$core.int>(2, _omitFieldNames ? '' : 'codePoint', $pb.PbFieldType.O3)
+ ..aOS(3, _omitFieldNames ? '' : 'fontFamily')
+ ..aOM(4, _omitFieldNames ? '' : 'color', subBuilder: ColorData.create)
+ ..a<$core.double>(5, _omitFieldNames ? '' : 'size', $pb.PbFieldType.OD)
+ ..hasRequiredFields = false
+ ;
+
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ IconDataMessage clone() => IconDataMessage()..mergeFromMessage(this);
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ IconDataMessage copyWith(void Function(IconDataMessage) updates) => super.copyWith((message) => updates(message as IconDataMessage)) as IconDataMessage;
+
+ $pb.BuilderInfo get info_ => _i;
+
+ @$core.pragma('dart2js:noInline')
+ static IconDataMessage create() => IconDataMessage._();
+ IconDataMessage createEmptyInstance() => create();
+ static $pb.PbList createRepeated() => $pb.PbList();
+ @$core.pragma('dart2js:noInline')
+ static IconDataMessage getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create);
+ static IconDataMessage? _defaultInstance;
+
+ @$pb.TagNumber(1)
+ $core.String get name => $_getSZ(0);
+ @$pb.TagNumber(1)
+ set name($core.String v) { $_setString(0, v); }
+ @$pb.TagNumber(1)
+ $core.bool hasName() => $_has(0);
+ @$pb.TagNumber(1)
+ void clearName() => $_clearField(1);
+
+ @$pb.TagNumber(2)
+ $core.int get codePoint => $_getIZ(1);
+ @$pb.TagNumber(2)
+ set codePoint($core.int v) { $_setSignedInt32(1, v); }
+ @$pb.TagNumber(2)
+ $core.bool hasCodePoint() => $_has(1);
+ @$pb.TagNumber(2)
+ void clearCodePoint() => $_clearField(2);
+
+ @$pb.TagNumber(3)
+ $core.String get fontFamily => $_getSZ(2);
+ @$pb.TagNumber(3)
+ set fontFamily($core.String v) { $_setString(2, v); }
+ @$pb.TagNumber(3)
+ $core.bool hasFontFamily() => $_has(2);
+ @$pb.TagNumber(3)
+ void clearFontFamily() => $_clearField(3);
+
+ @$pb.TagNumber(4)
+ ColorData get color => $_getN(3);
+ @$pb.TagNumber(4)
+ set color(ColorData v) { $_setField(4, v); }
+ @$pb.TagNumber(4)
+ $core.bool hasColor() => $_has(3);
+ @$pb.TagNumber(4)
+ void clearColor() => $_clearField(4);
+ @$pb.TagNumber(4)
+ ColorData ensureColor() => $_ensure(3);
+
+ @$pb.TagNumber(5)
+ $core.double get size => $_getN(4);
+ @$pb.TagNumber(5)
+ set size($core.double v) { $_setDouble(4, v); }
+ @$pb.TagNumber(5)
+ $core.bool hasSize() => $_has(4);
+ @$pb.TagNumber(5)
+ void clearSize() => $_clearField(5);
+}
+
+/// Message for BoxDecoration
+class BoxDecorationData extends $pb.GeneratedMessage {
+ factory BoxDecorationData({
+ ColorData? color,
+ BorderRadiusData? borderRadius,
+ BorderData? border,
+ $core.Iterable? boxShadow,
+ GradientData? gradient,
+ BoxShapeProto? shape,
+ DecorationImageData? image,
+ }) {
+ final $result = create();
+ if (color != null) {
+ $result.color = color;
+ }
+ if (borderRadius != null) {
+ $result.borderRadius = borderRadius;
+ }
+ if (border != null) {
+ $result.border = border;
+ }
+ if (boxShadow != null) {
+ $result.boxShadow.addAll(boxShadow);
+ }
+ if (gradient != null) {
+ $result.gradient = gradient;
+ }
+ if (shape != null) {
+ $result.shape = shape;
+ }
+ if (image != null) {
+ $result.image = image;
+ }
+ return $result;
+ }
+ BoxDecorationData._() : super();
+ factory BoxDecorationData.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+ factory BoxDecorationData.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BoxDecorationData', package: const $pb.PackageName(_omitMessageNames ? '' : 'flutter_sdui'), createEmptyInstance: create)
+ ..aOM(1, _omitFieldNames ? '' : 'color', subBuilder: ColorData.create)
+ ..aOM(2, _omitFieldNames ? '' : 'borderRadius', subBuilder: BorderRadiusData.create)
+ ..aOM(3, _omitFieldNames ? '' : 'border', subBuilder: BorderData.create)
+ ..pc(4, _omitFieldNames ? '' : 'boxShadow', $pb.PbFieldType.PM, subBuilder: BoxShadowData.create)
+ ..aOM(5, _omitFieldNames ? '' : 'gradient', subBuilder: GradientData.create)
+ ..e(6, _omitFieldNames ? '' : 'shape', $pb.PbFieldType.OE, defaultOrMaker: BoxShapeProto.BOX_SHAPE_UNSPECIFIED, valueOf: BoxShapeProto.valueOf, enumValues: BoxShapeProto.values)
+ ..aOM(7, _omitFieldNames ? '' : 'image', subBuilder: DecorationImageData.create)
+ ..hasRequiredFields = false
+ ;
+
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ BoxDecorationData clone() => BoxDecorationData()..mergeFromMessage(this);
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ BoxDecorationData copyWith(void Function(BoxDecorationData) updates) => super.copyWith((message) => updates(message as BoxDecorationData)) as BoxDecorationData;
+
+ $pb.BuilderInfo get info_ => _i;
+
+ @$core.pragma('dart2js:noInline')
+ static BoxDecorationData create() => BoxDecorationData._();
+ BoxDecorationData createEmptyInstance() => create();
+ static $pb.PbList createRepeated() => $pb.PbList();
+ @$core.pragma('dart2js:noInline')
+ static BoxDecorationData getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create);
+ static BoxDecorationData? _defaultInstance;
+
+ @$pb.TagNumber(1)
+ ColorData get color => $_getN(0);
+ @$pb.TagNumber(1)
+ set color(ColorData v) { $_setField(1, v); }
+ @$pb.TagNumber(1)
+ $core.bool hasColor() => $_has(0);
+ @$pb.TagNumber(1)
+ void clearColor() => $_clearField(1);
+ @$pb.TagNumber(1)
+ ColorData ensureColor() => $_ensure(0);
+
+ @$pb.TagNumber(2)
+ BorderRadiusData get borderRadius => $_getN(1);
+ @$pb.TagNumber(2)
+ set borderRadius(BorderRadiusData v) { $_setField(2, v); }
+ @$pb.TagNumber(2)
+ $core.bool hasBorderRadius() => $_has(1);
+ @$pb.TagNumber(2)
+ void clearBorderRadius() => $_clearField(2);
+ @$pb.TagNumber(2)
+ BorderRadiusData ensureBorderRadius() => $_ensure(1);
+
+ @$pb.TagNumber(3)
+ BorderData get border => $_getN(2);
+ @$pb.TagNumber(3)
+ set border(BorderData v) { $_setField(3, v); }
+ @$pb.TagNumber(3)
+ $core.bool hasBorder() => $_has(2);
+ @$pb.TagNumber(3)
+ void clearBorder() => $_clearField(3);
+ @$pb.TagNumber(3)
+ BorderData ensureBorder() => $_ensure(2);
+
+ @$pb.TagNumber(4)
+ $pb.PbList get boxShadow => $_getList(3);
+
+ @$pb.TagNumber(5)
+ GradientData get gradient => $_getN(4);
+ @$pb.TagNumber(5)
+ set gradient(GradientData v) { $_setField(5, v); }
+ @$pb.TagNumber(5)
+ $core.bool hasGradient() => $_has(4);
+ @$pb.TagNumber(5)
+ void clearGradient() => $_clearField(5);
+ @$pb.TagNumber(5)
+ GradientData ensureGradient() => $_ensure(4);
+
+ @$pb.TagNumber(6)
+ BoxShapeProto get shape => $_getN(5);
+ @$pb.TagNumber(6)
+ set shape(BoxShapeProto v) { $_setField(6, v); }
+ @$pb.TagNumber(6)
+ $core.bool hasShape() => $_has(5);
+ @$pb.TagNumber(6)
+ void clearShape() => $_clearField(6);
+
+ @$pb.TagNumber(7)
+ DecorationImageData get image => $_getN(6);
+ @$pb.TagNumber(7)
+ set image(DecorationImageData v) { $_setField(7, v); }
+ @$pb.TagNumber(7)
+ $core.bool hasImage() => $_has(6);
+ @$pb.TagNumber(7)
+ void clearImage() => $_clearField(7);
+ @$pb.TagNumber(7)
+ DecorationImageData ensureImage() => $_ensure(6);
+}
+
+/// Message for BorderRadius
+class BorderRadiusData extends $pb.GeneratedMessage {
+ factory BorderRadiusData({
+ $core.double? all,
+ $core.double? topLeft,
+ $core.double? topRight,
+ $core.double? bottomLeft,
+ $core.double? bottomRight,
+ }) {
+ final $result = create();
+ if (all != null) {
+ $result.all = all;
+ }
+ if (topLeft != null) {
+ $result.topLeft = topLeft;
+ }
+ if (topRight != null) {
+ $result.topRight = topRight;
+ }
+ if (bottomLeft != null) {
+ $result.bottomLeft = bottomLeft;
+ }
+ if (bottomRight != null) {
+ $result.bottomRight = bottomRight;
+ }
+ return $result;
+ }
+ BorderRadiusData._() : super();
+ factory BorderRadiusData.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+ factory BorderRadiusData.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BorderRadiusData', package: const $pb.PackageName(_omitMessageNames ? '' : 'flutter_sdui'), createEmptyInstance: create)
+ ..a<$core.double>(1, _omitFieldNames ? '' : 'all', $pb.PbFieldType.OD)
+ ..a<$core.double>(2, _omitFieldNames ? '' : 'topLeft', $pb.PbFieldType.OD)
+ ..a<$core.double>(3, _omitFieldNames ? '' : 'topRight', $pb.PbFieldType.OD)
+ ..a<$core.double>(4, _omitFieldNames ? '' : 'bottomLeft', $pb.PbFieldType.OD)
+ ..a<$core.double>(5, _omitFieldNames ? '' : 'bottomRight', $pb.PbFieldType.OD)
+ ..hasRequiredFields = false
+ ;
+
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ BorderRadiusData clone() => BorderRadiusData()..mergeFromMessage(this);
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ BorderRadiusData copyWith(void Function(BorderRadiusData) updates) => super.copyWith((message) => updates(message as BorderRadiusData)) as BorderRadiusData;
+
+ $pb.BuilderInfo get info_ => _i;
+
+ @$core.pragma('dart2js:noInline')
+ static BorderRadiusData create() => BorderRadiusData._();
+ BorderRadiusData createEmptyInstance() => create();
+ static $pb.PbList createRepeated() => $pb.PbList();
+ @$core.pragma('dart2js:noInline')
+ static BorderRadiusData getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create);
+ static BorderRadiusData? _defaultInstance;
+
+ @$pb.TagNumber(1)
+ $core.double get all => $_getN(0);
+ @$pb.TagNumber(1)
+ set all($core.double v) { $_setDouble(0, v); }
+ @$pb.TagNumber(1)
+ $core.bool hasAll() => $_has(0);
+ @$pb.TagNumber(1)
+ void clearAll() => $_clearField(1);
+
+ /// For BorderRadius.only or .vertical/.horizontal if needed later
+ @$pb.TagNumber(2)
+ $core.double get topLeft => $_getN(1);
+ @$pb.TagNumber(2)
+ set topLeft($core.double v) { $_setDouble(1, v); }
+ @$pb.TagNumber(2)
+ $core.bool hasTopLeft() => $_has(1);
+ @$pb.TagNumber(2)
+ void clearTopLeft() => $_clearField(2);
+
+ @$pb.TagNumber(3)
+ $core.double get topRight => $_getN(2);
+ @$pb.TagNumber(3)
+ set topRight($core.double v) { $_setDouble(2, v); }
+ @$pb.TagNumber(3)
+ $core.bool hasTopRight() => $_has(2);
+ @$pb.TagNumber(3)
+ void clearTopRight() => $_clearField(3);
+
+ @$pb.TagNumber(4)
+ $core.double get bottomLeft => $_getN(3);
+ @$pb.TagNumber(4)
+ set bottomLeft($core.double v) { $_setDouble(3, v); }
+ @$pb.TagNumber(4)
+ $core.bool hasBottomLeft() => $_has(3);
+ @$pb.TagNumber(4)
+ void clearBottomLeft() => $_clearField(4);
+
+ @$pb.TagNumber(5)
+ $core.double get bottomRight => $_getN(4);
+ @$pb.TagNumber(5)
+ set bottomRight($core.double v) { $_setDouble(4, v); }
+ @$pb.TagNumber(5)
+ $core.bool hasBottomRight() => $_has(4);
+ @$pb.TagNumber(5)
+ void clearBottomRight() => $_clearField(5);
+}
+
+/// Message for BorderSide
+class BorderSideData extends $pb.GeneratedMessage {
+ factory BorderSideData({
+ ColorData? color,
+ $core.double? width,
+ BorderStyleProto? style,
+ }) {
+ final $result = create();
+ if (color != null) {
+ $result.color = color;
+ }
+ if (width != null) {
+ $result.width = width;
+ }
+ if (style != null) {
+ $result.style = style;
+ }
+ return $result;
+ }
+ BorderSideData._() : super();
+ factory BorderSideData.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+ factory BorderSideData.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BorderSideData', package: const $pb.PackageName(_omitMessageNames ? '' : 'flutter_sdui'), createEmptyInstance: create)
+ ..aOM(1, _omitFieldNames ? '' : 'color', subBuilder: ColorData.create)
+ ..a<$core.double>(2, _omitFieldNames ? '' : 'width', $pb.PbFieldType.OD)
+ ..e(3, _omitFieldNames ? '' : 'style', $pb.PbFieldType.OE, defaultOrMaker: BorderStyleProto.BORDER_STYLE_UNSPECIFIED, valueOf: BorderStyleProto.valueOf, enumValues: BorderStyleProto.values)
+ ..hasRequiredFields = false
+ ;
+
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ BorderSideData clone() => BorderSideData()..mergeFromMessage(this);
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ BorderSideData copyWith(void Function(BorderSideData) updates) => super.copyWith((message) => updates(message as BorderSideData)) as BorderSideData;
+
+ $pb.BuilderInfo get info_ => _i;
+
+ @$core.pragma('dart2js:noInline')
+ static BorderSideData create() => BorderSideData._();
+ BorderSideData createEmptyInstance() => create();
+ static $pb.PbList createRepeated() => $pb.PbList();
+ @$core.pragma('dart2js:noInline')
+ static BorderSideData getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create);
+ static BorderSideData? _defaultInstance;
+
+ @$pb.TagNumber(1)
+ ColorData get color => $_getN(0);
+ @$pb.TagNumber(1)
+ set color(ColorData v) { $_setField(1, v); }
+ @$pb.TagNumber(1)
+ $core.bool hasColor() => $_has(0);
+ @$pb.TagNumber(1)
+ void clearColor() => $_clearField(1);
+ @$pb.TagNumber(1)
+ ColorData ensureColor() => $_ensure(0);
+
+ @$pb.TagNumber(2)
+ $core.double get width => $_getN(1);
+ @$pb.TagNumber(2)
+ set width($core.double v) { $_setDouble(1, v); }
+ @$pb.TagNumber(2)
+ $core.bool hasWidth() => $_has(1);
+ @$pb.TagNumber(2)
+ void clearWidth() => $_clearField(2);
+
+ @$pb.TagNumber(3)
+ BorderStyleProto get style => $_getN(2);
+ @$pb.TagNumber(3)
+ set style(BorderStyleProto v) { $_setField(3, v); }
+ @$pb.TagNumber(3)
+ $core.bool hasStyle() => $_has(2);
+ @$pb.TagNumber(3)
+ void clearStyle() => $_clearField(3);
+}
+
+/// Message for Border
+class BorderData extends $pb.GeneratedMessage {
+ factory BorderData({
+ BorderSideData? top,
+ BorderSideData? right,
+ BorderSideData? bottom,
+ BorderSideData? left,
+ BorderSideData? all,
+ }) {
+ final $result = create();
+ if (top != null) {
+ $result.top = top;
+ }
+ if (right != null) {
+ $result.right = right;
+ }
+ if (bottom != null) {
+ $result.bottom = bottom;
+ }
+ if (left != null) {
+ $result.left = left;
+ }
+ if (all != null) {
+ $result.all = all;
+ }
+ return $result;
+ }
+ BorderData._() : super();
+ factory BorderData.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+ factory BorderData.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BorderData', package: const $pb.PackageName(_omitMessageNames ? '' : 'flutter_sdui'), createEmptyInstance: create)
+ ..aOM(1, _omitFieldNames ? '' : 'top', subBuilder: BorderSideData.create)
+ ..aOM(2, _omitFieldNames ? '' : 'right', subBuilder: BorderSideData.create)
+ ..aOM(3, _omitFieldNames ? '' : 'bottom', subBuilder: BorderSideData.create)
+ ..aOM(4, _omitFieldNames ? '' : 'left', subBuilder: BorderSideData.create)
+ ..aOM(5, _omitFieldNames ? '' : 'all', subBuilder: BorderSideData.create)
+ ..hasRequiredFields = false
+ ;
+
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ BorderData clone() => BorderData()..mergeFromMessage(this);
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ BorderData copyWith(void Function(BorderData) updates) => super.copyWith((message) => updates(message as BorderData)) as BorderData;
+
+ $pb.BuilderInfo get info_ => _i;
+
+ @$core.pragma('dart2js:noInline')
+ static BorderData create() => BorderData._();
+ BorderData createEmptyInstance() => create();
+ static $pb.PbList createRepeated() => $pb.PbList();
+ @$core.pragma('dart2js:noInline')
+ static BorderData getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create);
+ static BorderData? _defaultInstance;
+
+ @$pb.TagNumber(1)
+ BorderSideData get top => $_getN(0);
+ @$pb.TagNumber(1)
+ set top(BorderSideData v) { $_setField(1, v); }
+ @$pb.TagNumber(1)
+ $core.bool hasTop() => $_has(0);
+ @$pb.TagNumber(1)
+ void clearTop() => $_clearField(1);
+ @$pb.TagNumber(1)
+ BorderSideData ensureTop() => $_ensure(0);
+
+ @$pb.TagNumber(2)
+ BorderSideData get right => $_getN(1);
+ @$pb.TagNumber(2)
+ set right(BorderSideData v) { $_setField(2, v); }
+ @$pb.TagNumber(2)
+ $core.bool hasRight() => $_has(1);
+ @$pb.TagNumber(2)
+ void clearRight() => $_clearField(2);
+ @$pb.TagNumber(2)
+ BorderSideData ensureRight() => $_ensure(1);
+
+ @$pb.TagNumber(3)
+ BorderSideData get bottom => $_getN(2);
+ @$pb.TagNumber(3)
+ set bottom(BorderSideData v) { $_setField(3, v); }
+ @$pb.TagNumber(3)
+ $core.bool hasBottom() => $_has(2);
+ @$pb.TagNumber(3)
+ void clearBottom() => $_clearField(3);
+ @$pb.TagNumber(3)
+ BorderSideData ensureBottom() => $_ensure(2);
+
+ @$pb.TagNumber(4)
+ BorderSideData get left => $_getN(3);
+ @$pb.TagNumber(4)
+ set left(BorderSideData v) { $_setField(4, v); }
+ @$pb.TagNumber(4)
+ $core.bool hasLeft() => $_has(3);
+ @$pb.TagNumber(4)
+ void clearLeft() => $_clearField(4);
+ @$pb.TagNumber(4)
+ BorderSideData ensureLeft() => $_ensure(3);
+
+ @$pb.TagNumber(5)
+ BorderSideData get all => $_getN(4);
+ @$pb.TagNumber(5)
+ set all(BorderSideData v) { $_setField(5, v); }
+ @$pb.TagNumber(5)
+ $core.bool hasAll() => $_has(4);
+ @$pb.TagNumber(5)
+ void clearAll() => $_clearField(5);
+ @$pb.TagNumber(5)
+ BorderSideData ensureAll() => $_ensure(4);
+}
+
+/// Message for BoxShadow
+class BoxShadowData extends $pb.GeneratedMessage {
+ factory BoxShadowData({
+ ColorData? color,
+ $core.double? offsetX,
+ $core.double? offsetY,
+ $core.double? blurRadius,
+ $core.double? spreadRadius,
+ }) {
+ final $result = create();
+ if (color != null) {
+ $result.color = color;
+ }
+ if (offsetX != null) {
+ $result.offsetX = offsetX;
+ }
+ if (offsetY != null) {
+ $result.offsetY = offsetY;
+ }
+ if (blurRadius != null) {
+ $result.blurRadius = blurRadius;
+ }
+ if (spreadRadius != null) {
+ $result.spreadRadius = spreadRadius;
+ }
+ return $result;
+ }
+ BoxShadowData._() : super();
+ factory BoxShadowData.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+ factory BoxShadowData.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BoxShadowData', package: const $pb.PackageName(_omitMessageNames ? '' : 'flutter_sdui'), createEmptyInstance: create)
+ ..aOM(1, _omitFieldNames ? '' : 'color', subBuilder: ColorData.create)
+ ..a<$core.double>(2, _omitFieldNames ? '' : 'offsetX', $pb.PbFieldType.OD)
+ ..a<$core.double>(3, _omitFieldNames ? '' : 'offsetY', $pb.PbFieldType.OD)
+ ..a<$core.double>(4, _omitFieldNames ? '' : 'blurRadius', $pb.PbFieldType.OD)
+ ..a<$core.double>(5, _omitFieldNames ? '' : 'spreadRadius', $pb.PbFieldType.OD)
+ ..hasRequiredFields = false
+ ;
+
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ BoxShadowData clone() => BoxShadowData()..mergeFromMessage(this);
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ BoxShadowData copyWith(void Function(BoxShadowData) updates) => super.copyWith((message) => updates(message as BoxShadowData)) as BoxShadowData;
+
+ $pb.BuilderInfo get info_ => _i;
+
+ @$core.pragma('dart2js:noInline')
+ static BoxShadowData create() => BoxShadowData._();
+ BoxShadowData createEmptyInstance() => create();
+ static $pb.PbList createRepeated() => $pb.PbList();
+ @$core.pragma('dart2js:noInline')
+ static BoxShadowData getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create);
+ static BoxShadowData? _defaultInstance;
+
+ @$pb.TagNumber(1)
+ ColorData get color => $_getN(0);
+ @$pb.TagNumber(1)
+ set color(ColorData v) { $_setField(1, v); }
+ @$pb.TagNumber(1)
+ $core.bool hasColor() => $_has(0);
+ @$pb.TagNumber(1)
+ void clearColor() => $_clearField(1);
+ @$pb.TagNumber(1)
+ ColorData ensureColor() => $_ensure(0);
+
+ @$pb.TagNumber(2)
+ $core.double get offsetX => $_getN(1);
+ @$pb.TagNumber(2)
+ set offsetX($core.double v) { $_setDouble(1, v); }
+ @$pb.TagNumber(2)
+ $core.bool hasOffsetX() => $_has(1);
+ @$pb.TagNumber(2)
+ void clearOffsetX() => $_clearField(2);
+
+ @$pb.TagNumber(3)
+ $core.double get offsetY => $_getN(2);
+ @$pb.TagNumber(3)
+ set offsetY($core.double v) { $_setDouble(2, v); }
+ @$pb.TagNumber(3)
+ $core.bool hasOffsetY() => $_has(2);
+ @$pb.TagNumber(3)
+ void clearOffsetY() => $_clearField(3);
+
+ @$pb.TagNumber(4)
+ $core.double get blurRadius => $_getN(3);
+ @$pb.TagNumber(4)
+ set blurRadius($core.double v) { $_setDouble(3, v); }
+ @$pb.TagNumber(4)
+ $core.bool hasBlurRadius() => $_has(3);
+ @$pb.TagNumber(4)
+ void clearBlurRadius() => $_clearField(4);
+
+ @$pb.TagNumber(5)
+ $core.double get spreadRadius => $_getN(4);
+ @$pb.TagNumber(5)
+ set spreadRadius($core.double v) { $_setDouble(4, v); }
+ @$pb.TagNumber(5)
+ $core.bool hasSpreadRadius() => $_has(4);
+ @$pb.TagNumber(5)
+ void clearSpreadRadius() => $_clearField(5);
+}
+
+/// Message for Gradient
+class GradientData extends $pb.GeneratedMessage {
+ factory GradientData({
+ GradientData_GradientType? type,
+ $core.Iterable? colors,
+ $core.Iterable<$core.double>? stops,
+ AlignmentData? begin,
+ AlignmentData? end,
+ AlignmentData? center,
+ $core.double? radius,
+ $core.double? startAngle,
+ $core.double? endAngle,
+ }) {
+ final $result = create();
+ if (type != null) {
+ $result.type = type;
+ }
+ if (colors != null) {
+ $result.colors.addAll(colors);
+ }
+ if (stops != null) {
+ $result.stops.addAll(stops);
+ }
+ if (begin != null) {
+ $result.begin = begin;
+ }
+ if (end != null) {
+ $result.end = end;
+ }
+ if (center != null) {
+ $result.center = center;
+ }
+ if (radius != null) {
+ $result.radius = radius;
+ }
+ if (startAngle != null) {
+ $result.startAngle = startAngle;
+ }
+ if (endAngle != null) {
+ $result.endAngle = endAngle;
+ }
+ return $result;
+ }
+ GradientData._() : super();
+ factory GradientData.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+ factory GradientData.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GradientData', package: const $pb.PackageName(_omitMessageNames ? '' : 'flutter_sdui'), createEmptyInstance: create)
+ ..e(1, _omitFieldNames ? '' : 'type', $pb.PbFieldType.OE, defaultOrMaker: GradientData_GradientType.GRADIENT_TYPE_UNSPECIFIED, valueOf: GradientData_GradientType.valueOf, enumValues: GradientData_GradientType.values)
+ ..pc(2, _omitFieldNames ? '' : 'colors', $pb.PbFieldType.PM, subBuilder: ColorData.create)
+ ..p<$core.double>(3, _omitFieldNames ? '' : 'stops', $pb.PbFieldType.KD)
+ ..aOM(4, _omitFieldNames ? '' : 'begin', subBuilder: AlignmentData.create)
+ ..aOM(5, _omitFieldNames ? '' : 'end', subBuilder: AlignmentData.create)
+ ..aOM(6, _omitFieldNames ? '' : 'center', subBuilder: AlignmentData.create)
+ ..a<$core.double>(7, _omitFieldNames ? '' : 'radius', $pb.PbFieldType.OD)
+ ..a<$core.double>(8, _omitFieldNames ? '' : 'startAngle', $pb.PbFieldType.OD)
+ ..a<$core.double>(9, _omitFieldNames ? '' : 'endAngle', $pb.PbFieldType.OD)
+ ..hasRequiredFields = false
+ ;
+
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ GradientData clone() => GradientData()..mergeFromMessage(this);
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ GradientData copyWith(void Function(GradientData) updates) => super.copyWith((message) => updates(message as GradientData)) as GradientData;
+
+ $pb.BuilderInfo get info_ => _i;
+
+ @$core.pragma('dart2js:noInline')
+ static GradientData create() => GradientData._();
+ GradientData createEmptyInstance() => create();
+ static $pb.PbList createRepeated() => $pb.PbList();
+ @$core.pragma('dart2js:noInline')
+ static GradientData getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create);
+ static GradientData? _defaultInstance;
+
+ @$pb.TagNumber(1)
+ GradientData_GradientType get type => $_getN(0);
+ @$pb.TagNumber(1)
+ set type(GradientData_GradientType v) { $_setField(1, v); }
+ @$pb.TagNumber(1)
+ $core.bool hasType() => $_has(0);
+ @$pb.TagNumber(1)
+ void clearType() => $_clearField(1);
+
+ @$pb.TagNumber(2)
+ $pb.PbList get colors => $_getList(1);
+
+ @$pb.TagNumber(3)
+ $pb.PbList<$core.double> get stops => $_getList(2);
+
+ @$pb.TagNumber(4)
+ AlignmentData get begin => $_getN(3);
+ @$pb.TagNumber(4)
+ set begin(AlignmentData v) { $_setField(4, v); }
+ @$pb.TagNumber(4)
+ $core.bool hasBegin() => $_has(3);
+ @$pb.TagNumber(4)
+ void clearBegin() => $_clearField(4);
+ @$pb.TagNumber(4)
+ AlignmentData ensureBegin() => $_ensure(3);
+
+ @$pb.TagNumber(5)
+ AlignmentData get end => $_getN(4);
+ @$pb.TagNumber(5)
+ set end(AlignmentData v) { $_setField(5, v); }
+ @$pb.TagNumber(5)
+ $core.bool hasEnd() => $_has(4);
+ @$pb.TagNumber(5)
+ void clearEnd() => $_clearField(5);
+ @$pb.TagNumber(5)
+ AlignmentData ensureEnd() => $_ensure(4);
+
+ @$pb.TagNumber(6)
+ AlignmentData get center => $_getN(5);
+ @$pb.TagNumber(6)
+ set center(AlignmentData v) { $_setField(6, v); }
+ @$pb.TagNumber(6)
+ $core.bool hasCenter() => $_has(5);
+ @$pb.TagNumber(6)
+ void clearCenter() => $_clearField(6);
+ @$pb.TagNumber(6)
+ AlignmentData ensureCenter() => $_ensure(5);
+
+ @$pb.TagNumber(7)
+ $core.double get radius => $_getN(6);
+ @$pb.TagNumber(7)
+ set radius($core.double v) { $_setDouble(6, v); }
+ @$pb.TagNumber(7)
+ $core.bool hasRadius() => $_has(6);
+ @$pb.TagNumber(7)
+ void clearRadius() => $_clearField(7);
+
+ @$pb.TagNumber(8)
+ $core.double get startAngle => $_getN(7);
+ @$pb.TagNumber(8)
+ set startAngle($core.double v) { $_setDouble(7, v); }
+ @$pb.TagNumber(8)
+ $core.bool hasStartAngle() => $_has(7);
+ @$pb.TagNumber(8)
+ void clearStartAngle() => $_clearField(8);
+
+ @$pb.TagNumber(9)
+ $core.double get endAngle => $_getN(8);
+ @$pb.TagNumber(9)
+ set endAngle($core.double v) { $_setDouble(8, v); }
+ @$pb.TagNumber(9)
+ $core.bool hasEndAngle() => $_has(8);
+ @$pb.TagNumber(9)
+ void clearEndAngle() => $_clearField(9);
+}
+
+enum AlignmentData_AlignmentType {
+ predefined,
+ xy,
+ notSet
+}
+
+/// Message for Alignment (used in Gradient, DecorationImage)
+class AlignmentData extends $pb.GeneratedMessage {
+ factory AlignmentData({
+ AlignmentData_PredefinedAlignment? predefined,
+ XYAlignment? xy,
+ }) {
+ final $result = create();
+ if (predefined != null) {
+ $result.predefined = predefined;
+ }
+ if (xy != null) {
+ $result.xy = xy;
+ }
+ return $result;
+ }
+ AlignmentData._() : super();
+ factory AlignmentData.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+ factory AlignmentData.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+
+ static const $core.Map<$core.int, AlignmentData_AlignmentType> _AlignmentData_AlignmentTypeByTag = {
+ 1 : AlignmentData_AlignmentType.predefined,
+ 2 : AlignmentData_AlignmentType.xy,
+ 0 : AlignmentData_AlignmentType.notSet
+ };
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'AlignmentData', package: const $pb.PackageName(_omitMessageNames ? '' : 'flutter_sdui'), createEmptyInstance: create)
+ ..oo(0, [1, 2])
+ ..e(1, _omitFieldNames ? '' : 'predefined', $pb.PbFieldType.OE, defaultOrMaker: AlignmentData_PredefinedAlignment.PREDEFINED_ALIGNMENT_UNSPECIFIED, valueOf: AlignmentData_PredefinedAlignment.valueOf, enumValues: AlignmentData_PredefinedAlignment.values)
+ ..aOM(2, _omitFieldNames ? '' : 'xy', subBuilder: XYAlignment.create)
+ ..hasRequiredFields = false
+ ;
+
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ AlignmentData clone() => AlignmentData()..mergeFromMessage(this);
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ AlignmentData copyWith(void Function(AlignmentData) updates) => super.copyWith((message) => updates(message as AlignmentData)) as AlignmentData;
+
+ $pb.BuilderInfo get info_ => _i;
+
+ @$core.pragma('dart2js:noInline')
+ static AlignmentData create() => AlignmentData._();
+ AlignmentData createEmptyInstance() => create();
+ static $pb.PbList createRepeated() => $pb.PbList();
+ @$core.pragma('dart2js:noInline')
+ static AlignmentData getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create);
+ static AlignmentData? _defaultInstance;
+
+ AlignmentData_AlignmentType whichAlignmentType() => _AlignmentData_AlignmentTypeByTag[$_whichOneof(0)]!;
+ void clearAlignmentType() => $_clearField($_whichOneof(0));
+
+ @$pb.TagNumber(1)
+ AlignmentData_PredefinedAlignment get predefined => $_getN(0);
+ @$pb.TagNumber(1)
+ set predefined(AlignmentData_PredefinedAlignment v) { $_setField(1, v); }
+ @$pb.TagNumber(1)
+ $core.bool hasPredefined() => $_has(0);
+ @$pb.TagNumber(1)
+ void clearPredefined() => $_clearField(1);
+
+ @$pb.TagNumber(2)
+ XYAlignment get xy => $_getN(1);
+ @$pb.TagNumber(2)
+ set xy(XYAlignment v) { $_setField(2, v); }
+ @$pb.TagNumber(2)
+ $core.bool hasXy() => $_has(1);
+ @$pb.TagNumber(2)
+ void clearXy() => $_clearField(2);
+ @$pb.TagNumber(2)
+ XYAlignment ensureXy() => $_ensure(1);
+}
+
+class XYAlignment extends $pb.GeneratedMessage {
+ factory XYAlignment({
+ $core.double? x,
+ $core.double? y,
+ }) {
+ final $result = create();
+ if (x != null) {
+ $result.x = x;
+ }
+ if (y != null) {
+ $result.y = y;
+ }
+ return $result;
+ }
+ XYAlignment._() : super();
+ factory XYAlignment.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+ factory XYAlignment.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'XYAlignment', package: const $pb.PackageName(_omitMessageNames ? '' : 'flutter_sdui'), createEmptyInstance: create)
+ ..a<$core.double>(1, _omitFieldNames ? '' : 'x', $pb.PbFieldType.OD)
+ ..a<$core.double>(2, _omitFieldNames ? '' : 'y', $pb.PbFieldType.OD)
+ ..hasRequiredFields = false
+ ;
+
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ XYAlignment clone() => XYAlignment()..mergeFromMessage(this);
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ XYAlignment copyWith(void Function(XYAlignment) updates) => super.copyWith((message) => updates(message as XYAlignment)) as XYAlignment;
+
+ $pb.BuilderInfo get info_ => _i;
+
+ @$core.pragma('dart2js:noInline')
+ static XYAlignment create() => XYAlignment._();
+ XYAlignment createEmptyInstance() => create();
+ static $pb.PbList createRepeated() => $pb.PbList();
+ @$core.pragma('dart2js:noInline')
+ static XYAlignment getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create);
+ static XYAlignment? _defaultInstance;
+
+ @$pb.TagNumber(1)
+ $core.double get x => $_getN(0);
+ @$pb.TagNumber(1)
+ set x($core.double v) { $_setDouble(0, v); }
+ @$pb.TagNumber(1)
+ $core.bool hasX() => $_has(0);
+ @$pb.TagNumber(1)
+ void clearX() => $_clearField(1);
+
+ @$pb.TagNumber(2)
+ $core.double get y => $_getN(1);
+ @$pb.TagNumber(2)
+ set y($core.double v) { $_setDouble(1, v); }
+ @$pb.TagNumber(2)
+ $core.bool hasY() => $_has(1);
+ @$pb.TagNumber(2)
+ void clearY() => $_clearField(2);
+}
+
+/// Message for DecorationImage
+class DecorationImageData extends $pb.GeneratedMessage {
+ factory DecorationImageData({
+ $core.String? src,
+ BoxFitProto? fit,
+ AlignmentData? alignment,
+ ImageRepeatProto? repeat,
+ $core.bool? matchTextDirection,
+ $core.double? scale,
+ $core.double? opacity,
+ FilterQualityProto? filterQuality,
+ $core.bool? invertColors,
+ $core.bool? isAntiAlias,
+ }) {
+ final $result = create();
+ if (src != null) {
+ $result.src = src;
+ }
+ if (fit != null) {
+ $result.fit = fit;
+ }
+ if (alignment != null) {
+ $result.alignment = alignment;
+ }
+ if (repeat != null) {
+ $result.repeat = repeat;
+ }
+ if (matchTextDirection != null) {
+ $result.matchTextDirection = matchTextDirection;
+ }
+ if (scale != null) {
+ $result.scale = scale;
+ }
+ if (opacity != null) {
+ $result.opacity = opacity;
+ }
+ if (filterQuality != null) {
+ $result.filterQuality = filterQuality;
+ }
+ if (invertColors != null) {
+ $result.invertColors = invertColors;
+ }
+ if (isAntiAlias != null) {
+ $result.isAntiAlias = isAntiAlias;
+ }
+ return $result;
+ }
+ DecorationImageData._() : super();
+ factory DecorationImageData.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+ factory DecorationImageData.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DecorationImageData', package: const $pb.PackageName(_omitMessageNames ? '' : 'flutter_sdui'), createEmptyInstance: create)
+ ..aOS(1, _omitFieldNames ? '' : 'src')
+ ..e(2, _omitFieldNames ? '' : 'fit', $pb.PbFieldType.OE, defaultOrMaker: BoxFitProto.BOX_FIT_UNSPECIFIED, valueOf: BoxFitProto.valueOf, enumValues: BoxFitProto.values)
+ ..aOM(3, _omitFieldNames ? '' : 'alignment', subBuilder: AlignmentData.create)
+ ..e(4, _omitFieldNames ? '' : 'repeat', $pb.PbFieldType.OE, defaultOrMaker: ImageRepeatProto.IMAGE_REPEAT_UNSPECIFIED, valueOf: ImageRepeatProto.valueOf, enumValues: ImageRepeatProto.values)
+ ..aOB(5, _omitFieldNames ? '' : 'matchTextDirection')
+ ..a<$core.double>(6, _omitFieldNames ? '' : 'scale', $pb.PbFieldType.OD)
+ ..a<$core.double>(7, _omitFieldNames ? '' : 'opacity', $pb.PbFieldType.OD)
+ ..e(8, _omitFieldNames ? '' : 'filterQuality', $pb.PbFieldType.OE, defaultOrMaker: FilterQualityProto.FILTER_QUALITY_UNSPECIFIED, valueOf: FilterQualityProto.valueOf, enumValues: FilterQualityProto.values)
+ ..aOB(9, _omitFieldNames ? '' : 'invertColors')
+ ..aOB(10, _omitFieldNames ? '' : 'isAntiAlias')
+ ..hasRequiredFields = false
+ ;
+
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ DecorationImageData clone() => DecorationImageData()..mergeFromMessage(this);
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ DecorationImageData copyWith(void Function(DecorationImageData) updates) => super.copyWith((message) => updates(message as DecorationImageData)) as DecorationImageData;
+
+ $pb.BuilderInfo get info_ => _i;
+
+ @$core.pragma('dart2js:noInline')
+ static DecorationImageData create() => DecorationImageData._();
+ DecorationImageData createEmptyInstance() => create();
+ static $pb.PbList createRepeated() => $pb.PbList();
+ @$core.pragma('dart2js:noInline')
+ static DecorationImageData getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create);
+ static DecorationImageData? _defaultInstance;
+
+ @$pb.TagNumber(1)
+ $core.String get src => $_getSZ(0);
+ @$pb.TagNumber(1)
+ set src($core.String v) { $_setString(0, v); }
+ @$pb.TagNumber(1)
+ $core.bool hasSrc() => $_has(0);
+ @$pb.TagNumber(1)
+ void clearSrc() => $_clearField(1);
+
+ @$pb.TagNumber(2)
+ BoxFitProto get fit => $_getN(1);
+ @$pb.TagNumber(2)
+ set fit(BoxFitProto v) { $_setField(2, v); }
+ @$pb.TagNumber(2)
+ $core.bool hasFit() => $_has(1);
+ @$pb.TagNumber(2)
+ void clearFit() => $_clearField(2);
+
+ @$pb.TagNumber(3)
+ AlignmentData get alignment => $_getN(2);
+ @$pb.TagNumber(3)
+ set alignment(AlignmentData v) { $_setField(3, v); }
+ @$pb.TagNumber(3)
+ $core.bool hasAlignment() => $_has(2);
+ @$pb.TagNumber(3)
+ void clearAlignment() => $_clearField(3);
+ @$pb.TagNumber(3)
+ AlignmentData ensureAlignment() => $_ensure(2);
+
+ @$pb.TagNumber(4)
+ ImageRepeatProto get repeat => $_getN(3);
+ @$pb.TagNumber(4)
+ set repeat(ImageRepeatProto v) { $_setField(4, v); }
+ @$pb.TagNumber(4)
+ $core.bool hasRepeat() => $_has(3);
+ @$pb.TagNumber(4)
+ void clearRepeat() => $_clearField(4);
+
+ @$pb.TagNumber(5)
+ $core.bool get matchTextDirection => $_getBF(4);
+ @$pb.TagNumber(5)
+ set matchTextDirection($core.bool v) { $_setBool(4, v); }
+ @$pb.TagNumber(5)
+ $core.bool hasMatchTextDirection() => $_has(4);
+ @$pb.TagNumber(5)
+ void clearMatchTextDirection() => $_clearField(5);
+
+ @$pb.TagNumber(6)
+ $core.double get scale => $_getN(5);
+ @$pb.TagNumber(6)
+ set scale($core.double v) { $_setDouble(5, v); }
+ @$pb.TagNumber(6)
+ $core.bool hasScale() => $_has(5);
+ @$pb.TagNumber(6)
+ void clearScale() => $_clearField(6);
+
+ @$pb.TagNumber(7)
+ $core.double get opacity => $_getN(6);
+ @$pb.TagNumber(7)
+ set opacity($core.double v) { $_setDouble(6, v); }
+ @$pb.TagNumber(7)
+ $core.bool hasOpacity() => $_has(6);
+ @$pb.TagNumber(7)
+ void clearOpacity() => $_clearField(7);
+
+ @$pb.TagNumber(8)
+ FilterQualityProto get filterQuality => $_getN(7);
+ @$pb.TagNumber(8)
+ set filterQuality(FilterQualityProto v) { $_setField(8, v); }
+ @$pb.TagNumber(8)
+ $core.bool hasFilterQuality() => $_has(7);
+ @$pb.TagNumber(8)
+ void clearFilterQuality() => $_clearField(8);
+
+ @$pb.TagNumber(9)
+ $core.bool get invertColors => $_getBF(8);
+ @$pb.TagNumber(9)
+ set invertColors($core.bool v) { $_setBool(8, v); }
+ @$pb.TagNumber(9)
+ $core.bool hasInvertColors() => $_has(8);
+ @$pb.TagNumber(9)
+ void clearInvertColors() => $_clearField(9);
+
+ @$pb.TagNumber(10)
+ $core.bool get isAntiAlias => $_getBF(9);
+ @$pb.TagNumber(10)
+ set isAntiAlias($core.bool v) { $_setBool(9, v); }
+ @$pb.TagNumber(10)
+ $core.bool hasIsAntiAlias() => $_has(9);
+ @$pb.TagNumber(10)
+ void clearIsAntiAlias() => $_clearField(10);
+}
+
+class SduiRequest extends $pb.GeneratedMessage {
+ factory SduiRequest({
+ $core.String? screenId,
+ }) {
+ final $result = create();
+ if (screenId != null) {
+ $result.screenId = screenId;
+ }
+ return $result;
+ }
+ SduiRequest._() : super();
+ factory SduiRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+ factory SduiRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'SduiRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'flutter_sdui'), createEmptyInstance: create)
+ ..aOS(1, _omitFieldNames ? '' : 'screenId')
+ ..hasRequiredFields = false
+ ;
+
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ SduiRequest clone() => SduiRequest()..mergeFromMessage(this);
+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
+ SduiRequest copyWith(void Function(SduiRequest) updates) => super.copyWith((message) => updates(message as SduiRequest)) as SduiRequest;
+
+ $pb.BuilderInfo get info_ => _i;
+
+ @$core.pragma('dart2js:noInline')
+ static SduiRequest create() => SduiRequest._();
+ SduiRequest createEmptyInstance() => create();
+ static $pb.PbList createRepeated() => $pb.PbList();
+ @$core.pragma('dart2js:noInline')
+ static SduiRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create);
+ static SduiRequest? _defaultInstance;
+
+ @$pb.TagNumber(1)
+ $core.String get screenId => $_getSZ(0);
+ @$pb.TagNumber(1)
+ set screenId($core.String v) { $_setString(0, v); }
+ @$pb.TagNumber(1)
+ $core.bool hasScreenId() => $_has(0);
+ @$pb.TagNumber(1)
+ void clearScreenId() => $_clearField(1);
+}
+
+
+const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names');
+const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names');
diff --git a/lib/src/generated/sdui.pbenum.dart b/lib/src/generated/sdui.pbenum.dart
new file mode 100644
index 0000000..5cb6cab
--- /dev/null
+++ b/lib/src/generated/sdui.pbenum.dart
@@ -0,0 +1,208 @@
+//
+// Generated code. Do not modify.
+// source: sdui.proto
+//
+// @dart = 3.3
+
+// ignore_for_file: annotate_overrides, camel_case_types, comment_references
+// ignore_for_file: constant_identifier_names, library_prefixes
+// ignore_for_file: non_constant_identifier_names, prefer_final_fields
+// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
+
+import 'dart:core' as $core;
+
+import 'package:protobuf/protobuf.dart' as $pb;
+
+/// Enum for Widget Types
+class WidgetType extends $pb.ProtobufEnum {
+ static const WidgetType WIDGET_TYPE_UNSPECIFIED = WidgetType._(0, _omitEnumNames ? '' : 'WIDGET_TYPE_UNSPECIFIED');
+ static const WidgetType COLUMN = WidgetType._(1, _omitEnumNames ? '' : 'COLUMN');
+ static const WidgetType ROW = WidgetType._(2, _omitEnumNames ? '' : 'ROW');
+ static const WidgetType TEXT = WidgetType._(3, _omitEnumNames ? '' : 'TEXT');
+ static const WidgetType IMAGE = WidgetType._(4, _omitEnumNames ? '' : 'IMAGE');
+ static const WidgetType SIZED_BOX = WidgetType._(5, _omitEnumNames ? '' : 'SIZED_BOX');
+ static const WidgetType CONTAINER = WidgetType._(6, _omitEnumNames ? '' : 'CONTAINER');
+ static const WidgetType SCAFFOLD = WidgetType._(7, _omitEnumNames ? '' : 'SCAFFOLD');
+ static const WidgetType SPACER = WidgetType._(8, _omitEnumNames ? '' : 'SPACER');
+ static const WidgetType ICON = WidgetType._(9, _omitEnumNames ? '' : 'ICON');
+
+ static const $core.List values = [
+ WIDGET_TYPE_UNSPECIFIED,
+ COLUMN,
+ ROW,
+ TEXT,
+ IMAGE,
+ SIZED_BOX,
+ CONTAINER,
+ SCAFFOLD,
+ SPACER,
+ ICON,
+ ];
+
+ static final $core.List _byValue = $pb.ProtobufEnum.$_initByValueList(values, 9);
+ static WidgetType? valueOf($core.int value) => value < 0 || value >= _byValue.length ? null : _byValue[value];
+
+ const WidgetType._(super.v, super.n);
+}
+
+/// Message for BoxFit
+class BoxFitProto extends $pb.ProtobufEnum {
+ static const BoxFitProto BOX_FIT_UNSPECIFIED = BoxFitProto._(0, _omitEnumNames ? '' : 'BOX_FIT_UNSPECIFIED');
+ static const BoxFitProto FILL = BoxFitProto._(1, _omitEnumNames ? '' : 'FILL');
+ static const BoxFitProto CONTAIN = BoxFitProto._(2, _omitEnumNames ? '' : 'CONTAIN');
+ static const BoxFitProto COVER = BoxFitProto._(3, _omitEnumNames ? '' : 'COVER');
+ static const BoxFitProto FIT_WIDTH = BoxFitProto._(4, _omitEnumNames ? '' : 'FIT_WIDTH');
+ static const BoxFitProto FIT_HEIGHT = BoxFitProto._(5, _omitEnumNames ? '' : 'FIT_HEIGHT');
+ static const BoxFitProto NONE = BoxFitProto._(6, _omitEnumNames ? '' : 'NONE');
+ static const BoxFitProto SCALE_DOWN = BoxFitProto._(7, _omitEnumNames ? '' : 'SCALE_DOWN');
+
+ static const $core.List values = [
+ BOX_FIT_UNSPECIFIED,
+ FILL,
+ CONTAIN,
+ COVER,
+ FIT_WIDTH,
+ FIT_HEIGHT,
+ NONE,
+ SCALE_DOWN,
+ ];
+
+ static final $core.List _byValue = $pb.ProtobufEnum.$_initByValueList(values, 7);
+ static BoxFitProto? valueOf($core.int value) => value < 0 || value >= _byValue.length ? null : _byValue[value];
+
+ const BoxFitProto._(super.v, super.n);
+}
+
+/// Enum for BorderStyle
+class BorderStyleProto extends $pb.ProtobufEnum {
+ static const BorderStyleProto BORDER_STYLE_UNSPECIFIED = BorderStyleProto._(0, _omitEnumNames ? '' : 'BORDER_STYLE_UNSPECIFIED');
+ static const BorderStyleProto SOLID = BorderStyleProto._(1, _omitEnumNames ? '' : 'SOLID');
+ static const BorderStyleProto NONE_BORDER = BorderStyleProto._(2, _omitEnumNames ? '' : 'NONE_BORDER');
+
+ static const $core.List values = [
+ BORDER_STYLE_UNSPECIFIED,
+ SOLID,
+ NONE_BORDER,
+ ];
+
+ static final $core.List _byValue = $pb.ProtobufEnum.$_initByValueList(values, 2);
+ static BorderStyleProto? valueOf($core.int value) => value < 0 || value >= _byValue.length ? null : _byValue[value];
+
+ const BorderStyleProto._(super.v, super.n);
+}
+
+/// Enum for BoxShape
+class BoxShapeProto extends $pb.ProtobufEnum {
+ static const BoxShapeProto BOX_SHAPE_UNSPECIFIED = BoxShapeProto._(0, _omitEnumNames ? '' : 'BOX_SHAPE_UNSPECIFIED');
+ static const BoxShapeProto RECTANGLE = BoxShapeProto._(1, _omitEnumNames ? '' : 'RECTANGLE');
+ static const BoxShapeProto CIRCLE = BoxShapeProto._(2, _omitEnumNames ? '' : 'CIRCLE');
+
+ static const $core.List values = [
+ BOX_SHAPE_UNSPECIFIED,
+ RECTANGLE,
+ CIRCLE,
+ ];
+
+ static final $core.List _byValue = $pb.ProtobufEnum.$_initByValueList(values, 2);
+ static BoxShapeProto? valueOf($core.int value) => value < 0 || value >= _byValue.length ? null : _byValue[value];
+
+ const BoxShapeProto._(super.v, super.n);
+}
+
+/// Enum for ImageRepeat
+class ImageRepeatProto extends $pb.ProtobufEnum {
+ static const ImageRepeatProto IMAGE_REPEAT_UNSPECIFIED = ImageRepeatProto._(0, _omitEnumNames ? '' : 'IMAGE_REPEAT_UNSPECIFIED');
+ static const ImageRepeatProto REPEAT = ImageRepeatProto._(1, _omitEnumNames ? '' : 'REPEAT');
+ static const ImageRepeatProto REPEAT_X = ImageRepeatProto._(2, _omitEnumNames ? '' : 'REPEAT_X');
+ static const ImageRepeatProto REPEAT_Y = ImageRepeatProto._(3, _omitEnumNames ? '' : 'REPEAT_Y');
+ static const ImageRepeatProto NO_REPEAT = ImageRepeatProto._(4, _omitEnumNames ? '' : 'NO_REPEAT');
+
+ static const $core.List values = [
+ IMAGE_REPEAT_UNSPECIFIED,
+ REPEAT,
+ REPEAT_X,
+ REPEAT_Y,
+ NO_REPEAT,
+ ];
+
+ static final $core.List _byValue = $pb.ProtobufEnum.$_initByValueList(values, 4);
+ static ImageRepeatProto? valueOf($core.int value) => value < 0 || value >= _byValue.length ? null : _byValue[value];
+
+ const ImageRepeatProto._(super.v, super.n);
+}
+
+/// Enum for FilterQuality
+class FilterQualityProto extends $pb.ProtobufEnum {
+ static const FilterQualityProto FILTER_QUALITY_UNSPECIFIED = FilterQualityProto._(0, _omitEnumNames ? '' : 'FILTER_QUALITY_UNSPECIFIED');
+ static const FilterQualityProto NONE_FQ = FilterQualityProto._(1, _omitEnumNames ? '' : 'NONE_FQ');
+ static const FilterQualityProto LOW = FilterQualityProto._(2, _omitEnumNames ? '' : 'LOW');
+ static const FilterQualityProto MEDIUM = FilterQualityProto._(3, _omitEnumNames ? '' : 'MEDIUM');
+ static const FilterQualityProto HIGH = FilterQualityProto._(4, _omitEnumNames ? '' : 'HIGH');
+
+ static const $core.List values = [
+ FILTER_QUALITY_UNSPECIFIED,
+ NONE_FQ,
+ LOW,
+ MEDIUM,
+ HIGH,
+ ];
+
+ static final $core.List _byValue = $pb.ProtobufEnum.$_initByValueList(values, 4);
+ static FilterQualityProto? valueOf($core.int value) => value < 0 || value >= _byValue.length ? null : _byValue[value];
+
+ const FilterQualityProto._(super.v, super.n);
+}
+
+class GradientData_GradientType extends $pb.ProtobufEnum {
+ static const GradientData_GradientType GRADIENT_TYPE_UNSPECIFIED = GradientData_GradientType._(0, _omitEnumNames ? '' : 'GRADIENT_TYPE_UNSPECIFIED');
+ static const GradientData_GradientType LINEAR = GradientData_GradientType._(1, _omitEnumNames ? '' : 'LINEAR');
+ static const GradientData_GradientType RADIAL = GradientData_GradientType._(2, _omitEnumNames ? '' : 'RADIAL');
+ static const GradientData_GradientType SWEEP = GradientData_GradientType._(3, _omitEnumNames ? '' : 'SWEEP');
+
+ static const $core.List values = [
+ GRADIENT_TYPE_UNSPECIFIED,
+ LINEAR,
+ RADIAL,
+ SWEEP,
+ ];
+
+ static final $core.List _byValue = $pb.ProtobufEnum.$_initByValueList(values, 3);
+ static GradientData_GradientType? valueOf($core.int value) => value < 0 || value >= _byValue.length ? null : _byValue[value];
+
+ const GradientData_GradientType._(super.v, super.n);
+}
+
+/// Predefined alignments
+class AlignmentData_PredefinedAlignment extends $pb.ProtobufEnum {
+ static const AlignmentData_PredefinedAlignment PREDEFINED_ALIGNMENT_UNSPECIFIED = AlignmentData_PredefinedAlignment._(0, _omitEnumNames ? '' : 'PREDEFINED_ALIGNMENT_UNSPECIFIED');
+ static const AlignmentData_PredefinedAlignment BOTTOM_CENTER = AlignmentData_PredefinedAlignment._(1, _omitEnumNames ? '' : 'BOTTOM_CENTER');
+ static const AlignmentData_PredefinedAlignment BOTTOM_LEFT = AlignmentData_PredefinedAlignment._(2, _omitEnumNames ? '' : 'BOTTOM_LEFT');
+ static const AlignmentData_PredefinedAlignment BOTTOM_RIGHT = AlignmentData_PredefinedAlignment._(3, _omitEnumNames ? '' : 'BOTTOM_RIGHT');
+ static const AlignmentData_PredefinedAlignment CENTER = AlignmentData_PredefinedAlignment._(4, _omitEnumNames ? '' : 'CENTER');
+ static const AlignmentData_PredefinedAlignment CENTER_LEFT = AlignmentData_PredefinedAlignment._(5, _omitEnumNames ? '' : 'CENTER_LEFT');
+ static const AlignmentData_PredefinedAlignment CENTER_RIGHT = AlignmentData_PredefinedAlignment._(6, _omitEnumNames ? '' : 'CENTER_RIGHT');
+ static const AlignmentData_PredefinedAlignment TOP_CENTER = AlignmentData_PredefinedAlignment._(7, _omitEnumNames ? '' : 'TOP_CENTER');
+ static const AlignmentData_PredefinedAlignment TOP_LEFT = AlignmentData_PredefinedAlignment._(8, _omitEnumNames ? '' : 'TOP_LEFT');
+ static const AlignmentData_PredefinedAlignment TOP_RIGHT = AlignmentData_PredefinedAlignment._(9, _omitEnumNames ? '' : 'TOP_RIGHT');
+
+ static const $core.List values = [
+ PREDEFINED_ALIGNMENT_UNSPECIFIED,
+ BOTTOM_CENTER,
+ BOTTOM_LEFT,
+ BOTTOM_RIGHT,
+ CENTER,
+ CENTER_LEFT,
+ CENTER_RIGHT,
+ TOP_CENTER,
+ TOP_LEFT,
+ TOP_RIGHT,
+ ];
+
+ static final $core.List _byValue = $pb.ProtobufEnum.$_initByValueList(values, 9);
+ static AlignmentData_PredefinedAlignment? valueOf($core.int value) => value < 0 || value >= _byValue.length ? null : _byValue[value];
+
+ const AlignmentData_PredefinedAlignment._(super.v, super.n);
+}
+
+
+const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names');
diff --git a/lib/src/generated/sdui.pbgrpc.dart b/lib/src/generated/sdui.pbgrpc.dart
new file mode 100644
index 0000000..375b447
--- /dev/null
+++ b/lib/src/generated/sdui.pbgrpc.dart
@@ -0,0 +1,64 @@
+//
+// Generated code. Do not modify.
+// source: sdui.proto
+//
+// @dart = 3.3
+
+// ignore_for_file: annotate_overrides, camel_case_types, comment_references
+// ignore_for_file: constant_identifier_names, library_prefixes
+// ignore_for_file: non_constant_identifier_names, prefer_final_fields
+// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
+
+import 'dart:async' as $async;
+import 'dart:core' as $core;
+
+import 'package:grpc/service_api.dart' as $grpc;
+import 'package:protobuf/protobuf.dart' as $pb;
+
+import 'sdui.pb.dart' as $0;
+
+export 'sdui.pb.dart';
+
+/// Service definition (optional for now, but good for future gRPC)
+@$pb.GrpcServiceName('flutter_sdui.SduiService')
+class SduiServiceClient extends $grpc.Client {
+ /// The hostname for this service.
+ static const $core.String defaultHost = '';
+
+ /// OAuth scopes needed for the client.
+ static const $core.List<$core.String> oauthScopes = [
+ '',
+ ];
+
+ static final _$getSduiWidget = $grpc.ClientMethod<$0.SduiRequest, $0.SduiWidgetData>(
+ '/flutter_sdui.SduiService/GetSduiWidget',
+ ($0.SduiRequest value) => value.writeToBuffer(),
+ ($core.List<$core.int> value) => $0.SduiWidgetData.fromBuffer(value));
+
+ SduiServiceClient(super.channel, {super.options, super.interceptors});
+
+ $grpc.ResponseFuture<$0.SduiWidgetData> getSduiWidget($0.SduiRequest request, {$grpc.CallOptions? options}) {
+ return $createUnaryCall(_$getSduiWidget, request, options: options);
+ }
+}
+
+@$pb.GrpcServiceName('flutter_sdui.SduiService')
+abstract class SduiServiceBase extends $grpc.Service {
+ $core.String get $name => 'flutter_sdui.SduiService';
+
+ SduiServiceBase() {
+ $addMethod($grpc.ServiceMethod<$0.SduiRequest, $0.SduiWidgetData>(
+ 'GetSduiWidget',
+ getSduiWidget_Pre,
+ false,
+ false,
+ ($core.List<$core.int> value) => $0.SduiRequest.fromBuffer(value),
+ ($0.SduiWidgetData value) => value.writeToBuffer()));
+ }
+
+ $async.Future<$0.SduiWidgetData> getSduiWidget_Pre($grpc.ServiceCall $call, $async.Future<$0.SduiRequest> $request) async {
+ return getSduiWidget($call, await $request);
+ }
+
+ $async.Future<$0.SduiWidgetData> getSduiWidget($grpc.ServiceCall call, $0.SduiRequest request);
+}
diff --git a/lib/src/generated/sdui.pbjson.dart b/lib/src/generated/sdui.pbjson.dart
new file mode 100644
index 0000000..d3b2847
--- /dev/null
+++ b/lib/src/generated/sdui.pbjson.dart
@@ -0,0 +1,607 @@
+//
+// Generated code. Do not modify.
+// source: sdui.proto
+//
+// @dart = 3.3
+
+// ignore_for_file: annotate_overrides, camel_case_types, comment_references
+// ignore_for_file: constant_identifier_names, library_prefixes
+// ignore_for_file: non_constant_identifier_names, prefer_final_fields
+// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
+
+import 'dart:convert' as $convert;
+import 'dart:core' as $core;
+import 'dart:typed_data' as $typed_data;
+
+@$core.Deprecated('Use widgetTypeDescriptor instead')
+const WidgetType$json = {
+ '1': 'WidgetType',
+ '2': [
+ {'1': 'WIDGET_TYPE_UNSPECIFIED', '2': 0},
+ {'1': 'COLUMN', '2': 1},
+ {'1': 'ROW', '2': 2},
+ {'1': 'TEXT', '2': 3},
+ {'1': 'IMAGE', '2': 4},
+ {'1': 'SIZED_BOX', '2': 5},
+ {'1': 'CONTAINER', '2': 6},
+ {'1': 'SCAFFOLD', '2': 7},
+ {'1': 'SPACER', '2': 8},
+ {'1': 'ICON', '2': 9},
+ ],
+};
+
+/// Descriptor for `WidgetType`. Decode as a `google.protobuf.EnumDescriptorProto`.
+final $typed_data.Uint8List widgetTypeDescriptor = $convert.base64Decode(
+ 'CgpXaWRnZXRUeXBlEhsKF1dJREdFVF9UWVBFX1VOU1BFQ0lGSUVEEAASCgoGQ09MVU1OEAESBw'
+ 'oDUk9XEAISCAoEVEVYVBADEgkKBUlNQUdFEAQSDQoJU0laRURfQk9YEAUSDQoJQ09OVEFJTkVS'
+ 'EAYSDAoIU0NBRkZPTEQQBxIKCgZTUEFDRVIQCBIICgRJQ09OEAk=');
+
+@$core.Deprecated('Use boxFitProtoDescriptor instead')
+const BoxFitProto$json = {
+ '1': 'BoxFitProto',
+ '2': [
+ {'1': 'BOX_FIT_UNSPECIFIED', '2': 0},
+ {'1': 'FILL', '2': 1},
+ {'1': 'CONTAIN', '2': 2},
+ {'1': 'COVER', '2': 3},
+ {'1': 'FIT_WIDTH', '2': 4},
+ {'1': 'FIT_HEIGHT', '2': 5},
+ {'1': 'NONE', '2': 6},
+ {'1': 'SCALE_DOWN', '2': 7},
+ ],
+};
+
+/// Descriptor for `BoxFitProto`. Decode as a `google.protobuf.EnumDescriptorProto`.
+final $typed_data.Uint8List boxFitProtoDescriptor = $convert.base64Decode(
+ 'CgtCb3hGaXRQcm90bxIXChNCT1hfRklUX1VOU1BFQ0lGSUVEEAASCAoERklMTBABEgsKB0NPTl'
+ 'RBSU4QAhIJCgVDT1ZFUhADEg0KCUZJVF9XSURUSBAEEg4KCkZJVF9IRUlHSFQQBRIICgROT05F'
+ 'EAYSDgoKU0NBTEVfRE9XThAH');
+
+@$core.Deprecated('Use borderStyleProtoDescriptor instead')
+const BorderStyleProto$json = {
+ '1': 'BorderStyleProto',
+ '2': [
+ {'1': 'BORDER_STYLE_UNSPECIFIED', '2': 0},
+ {'1': 'SOLID', '2': 1},
+ {'1': 'NONE_BORDER', '2': 2},
+ ],
+};
+
+/// Descriptor for `BorderStyleProto`. Decode as a `google.protobuf.EnumDescriptorProto`.
+final $typed_data.Uint8List borderStyleProtoDescriptor = $convert.base64Decode(
+ 'ChBCb3JkZXJTdHlsZVByb3RvEhwKGEJPUkRFUl9TVFlMRV9VTlNQRUNJRklFRBAAEgkKBVNPTE'
+ 'lEEAESDwoLTk9ORV9CT1JERVIQAg==');
+
+@$core.Deprecated('Use boxShapeProtoDescriptor instead')
+const BoxShapeProto$json = {
+ '1': 'BoxShapeProto',
+ '2': [
+ {'1': 'BOX_SHAPE_UNSPECIFIED', '2': 0},
+ {'1': 'RECTANGLE', '2': 1},
+ {'1': 'CIRCLE', '2': 2},
+ ],
+};
+
+/// Descriptor for `BoxShapeProto`. Decode as a `google.protobuf.EnumDescriptorProto`.
+final $typed_data.Uint8List boxShapeProtoDescriptor = $convert.base64Decode(
+ 'Cg1Cb3hTaGFwZVByb3RvEhkKFUJPWF9TSEFQRV9VTlNQRUNJRklFRBAAEg0KCVJFQ1RBTkdMRR'
+ 'ABEgoKBkNJUkNMRRAC');
+
+@$core.Deprecated('Use imageRepeatProtoDescriptor instead')
+const ImageRepeatProto$json = {
+ '1': 'ImageRepeatProto',
+ '2': [
+ {'1': 'IMAGE_REPEAT_UNSPECIFIED', '2': 0},
+ {'1': 'REPEAT', '2': 1},
+ {'1': 'REPEAT_X', '2': 2},
+ {'1': 'REPEAT_Y', '2': 3},
+ {'1': 'NO_REPEAT', '2': 4},
+ ],
+};
+
+/// Descriptor for `ImageRepeatProto`. Decode as a `google.protobuf.EnumDescriptorProto`.
+final $typed_data.Uint8List imageRepeatProtoDescriptor = $convert.base64Decode(
+ 'ChBJbWFnZVJlcGVhdFByb3RvEhwKGElNQUdFX1JFUEVBVF9VTlNQRUNJRklFRBAAEgoKBlJFUE'
+ 'VBVBABEgwKCFJFUEVBVF9YEAISDAoIUkVQRUFUX1kQAxINCglOT19SRVBFQVQQBA==');
+
+@$core.Deprecated('Use filterQualityProtoDescriptor instead')
+const FilterQualityProto$json = {
+ '1': 'FilterQualityProto',
+ '2': [
+ {'1': 'FILTER_QUALITY_UNSPECIFIED', '2': 0},
+ {'1': 'NONE_FQ', '2': 1},
+ {'1': 'LOW', '2': 2},
+ {'1': 'MEDIUM', '2': 3},
+ {'1': 'HIGH', '2': 4},
+ ],
+};
+
+/// Descriptor for `FilterQualityProto`. Decode as a `google.protobuf.EnumDescriptorProto`.
+final $typed_data.Uint8List filterQualityProtoDescriptor = $convert.base64Decode(
+ 'ChJGaWx0ZXJRdWFsaXR5UHJvdG8SHgoaRklMVEVSX1FVQUxJVFlfVU5TUEVDSUZJRUQQABILCg'
+ 'dOT05FX0ZREAESBwoDTE9XEAISCgoGTUVESVVNEAMSCAoESElHSBAE');
+
+@$core.Deprecated('Use sduiWidgetDataDescriptor instead')
+const SduiWidgetData$json = {
+ '1': 'SduiWidgetData',
+ '2': [
+ {'1': 'type', '3': 1, '4': 1, '5': 14, '6': '.flutter_sdui.WidgetType', '10': 'type'},
+ {'1': 'string_attributes', '3': 2, '4': 3, '5': 11, '6': '.flutter_sdui.SduiWidgetData.StringAttributesEntry', '10': 'stringAttributes'},
+ {'1': 'double_attributes', '3': 3, '4': 3, '5': 11, '6': '.flutter_sdui.SduiWidgetData.DoubleAttributesEntry', '10': 'doubleAttributes'},
+ {'1': 'bool_attributes', '3': 4, '4': 3, '5': 11, '6': '.flutter_sdui.SduiWidgetData.BoolAttributesEntry', '10': 'boolAttributes'},
+ {'1': 'int_attributes', '3': 5, '4': 3, '5': 11, '6': '.flutter_sdui.SduiWidgetData.IntAttributesEntry', '10': 'intAttributes'},
+ {'1': 'text_style', '3': 6, '4': 1, '5': 11, '6': '.flutter_sdui.TextStyleData', '10': 'textStyle'},
+ {'1': 'padding', '3': 7, '4': 1, '5': 11, '6': '.flutter_sdui.EdgeInsetsData', '10': 'padding'},
+ {'1': 'margin', '3': 8, '4': 1, '5': 11, '6': '.flutter_sdui.EdgeInsetsData', '10': 'margin'},
+ {'1': 'color', '3': 9, '4': 1, '5': 11, '6': '.flutter_sdui.ColorData', '10': 'color'},
+ {'1': 'icon', '3': 10, '4': 1, '5': 11, '6': '.flutter_sdui.IconDataMessage', '10': 'icon'},
+ {'1': 'box_decoration', '3': 11, '4': 1, '5': 11, '6': '.flutter_sdui.BoxDecorationData', '10': 'boxDecoration'},
+ {'1': 'children', '3': 12, '4': 3, '5': 11, '6': '.flutter_sdui.SduiWidgetData', '10': 'children'},
+ {'1': 'child', '3': 13, '4': 1, '5': 11, '6': '.flutter_sdui.SduiWidgetData', '10': 'child'},
+ {'1': 'app_bar', '3': 14, '4': 1, '5': 11, '6': '.flutter_sdui.SduiWidgetData', '10': 'appBar'},
+ {'1': 'body', '3': 15, '4': 1, '5': 11, '6': '.flutter_sdui.SduiWidgetData', '10': 'body'},
+ {'1': 'floating_action_button', '3': 16, '4': 1, '5': 11, '6': '.flutter_sdui.SduiWidgetData', '10': 'floatingActionButton'},
+ {'1': 'background_color', '3': 17, '4': 1, '5': 11, '6': '.flutter_sdui.ColorData', '10': 'backgroundColor'},
+ ],
+ '3': [SduiWidgetData_StringAttributesEntry$json, SduiWidgetData_DoubleAttributesEntry$json, SduiWidgetData_BoolAttributesEntry$json, SduiWidgetData_IntAttributesEntry$json],
+};
+
+@$core.Deprecated('Use sduiWidgetDataDescriptor instead')
+const SduiWidgetData_StringAttributesEntry$json = {
+ '1': 'StringAttributesEntry',
+ '2': [
+ {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'},
+ {'1': 'value', '3': 2, '4': 1, '5': 9, '10': 'value'},
+ ],
+ '7': {'7': true},
+};
+
+@$core.Deprecated('Use sduiWidgetDataDescriptor instead')
+const SduiWidgetData_DoubleAttributesEntry$json = {
+ '1': 'DoubleAttributesEntry',
+ '2': [
+ {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'},
+ {'1': 'value', '3': 2, '4': 1, '5': 1, '10': 'value'},
+ ],
+ '7': {'7': true},
+};
+
+@$core.Deprecated('Use sduiWidgetDataDescriptor instead')
+const SduiWidgetData_BoolAttributesEntry$json = {
+ '1': 'BoolAttributesEntry',
+ '2': [
+ {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'},
+ {'1': 'value', '3': 2, '4': 1, '5': 8, '10': 'value'},
+ ],
+ '7': {'7': true},
+};
+
+@$core.Deprecated('Use sduiWidgetDataDescriptor instead')
+const SduiWidgetData_IntAttributesEntry$json = {
+ '1': 'IntAttributesEntry',
+ '2': [
+ {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'},
+ {'1': 'value', '3': 2, '4': 1, '5': 5, '10': 'value'},
+ ],
+ '7': {'7': true},
+};
+
+/// Descriptor for `SduiWidgetData`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List sduiWidgetDataDescriptor = $convert.base64Decode(
+ 'Cg5TZHVpV2lkZ2V0RGF0YRIsCgR0eXBlGAEgASgOMhguZmx1dHRlcl9zZHVpLldpZGdldFR5cG'
+ 'VSBHR5cGUSXwoRc3RyaW5nX2F0dHJpYnV0ZXMYAiADKAsyMi5mbHV0dGVyX3NkdWkuU2R1aVdp'
+ 'ZGdldERhdGEuU3RyaW5nQXR0cmlidXRlc0VudHJ5UhBzdHJpbmdBdHRyaWJ1dGVzEl8KEWRvdW'
+ 'JsZV9hdHRyaWJ1dGVzGAMgAygLMjIuZmx1dHRlcl9zZHVpLlNkdWlXaWRnZXREYXRhLkRvdWJs'
+ 'ZUF0dHJpYnV0ZXNFbnRyeVIQZG91YmxlQXR0cmlidXRlcxJZCg9ib29sX2F0dHJpYnV0ZXMYBC'
+ 'ADKAsyMC5mbHV0dGVyX3NkdWkuU2R1aVdpZGdldERhdGEuQm9vbEF0dHJpYnV0ZXNFbnRyeVIO'
+ 'Ym9vbEF0dHJpYnV0ZXMSVgoOaW50X2F0dHJpYnV0ZXMYBSADKAsyLy5mbHV0dGVyX3NkdWkuU2'
+ 'R1aVdpZGdldERhdGEuSW50QXR0cmlidXRlc0VudHJ5Ug1pbnRBdHRyaWJ1dGVzEjoKCnRleHRf'
+ 'c3R5bGUYBiABKAsyGy5mbHV0dGVyX3NkdWkuVGV4dFN0eWxlRGF0YVIJdGV4dFN0eWxlEjYKB3'
+ 'BhZGRpbmcYByABKAsyHC5mbHV0dGVyX3NkdWkuRWRnZUluc2V0c0RhdGFSB3BhZGRpbmcSNAoG'
+ 'bWFyZ2luGAggASgLMhwuZmx1dHRlcl9zZHVpLkVkZ2VJbnNldHNEYXRhUgZtYXJnaW4SLQoFY2'
+ '9sb3IYCSABKAsyFy5mbHV0dGVyX3NkdWkuQ29sb3JEYXRhUgVjb2xvchIxCgRpY29uGAogASgL'
+ 'Mh0uZmx1dHRlcl9zZHVpLkljb25EYXRhTWVzc2FnZVIEaWNvbhJGCg5ib3hfZGVjb3JhdGlvbh'
+ 'gLIAEoCzIfLmZsdXR0ZXJfc2R1aS5Cb3hEZWNvcmF0aW9uRGF0YVINYm94RGVjb3JhdGlvbhI4'
+ 'CghjaGlsZHJlbhgMIAMoCzIcLmZsdXR0ZXJfc2R1aS5TZHVpV2lkZ2V0RGF0YVIIY2hpbGRyZW'
+ '4SMgoFY2hpbGQYDSABKAsyHC5mbHV0dGVyX3NkdWkuU2R1aVdpZGdldERhdGFSBWNoaWxkEjUK'
+ 'B2FwcF9iYXIYDiABKAsyHC5mbHV0dGVyX3NkdWkuU2R1aVdpZGdldERhdGFSBmFwcEJhchIwCg'
+ 'Rib2R5GA8gASgLMhwuZmx1dHRlcl9zZHVpLlNkdWlXaWRnZXREYXRhUgRib2R5ElIKFmZsb2F0'
+ 'aW5nX2FjdGlvbl9idXR0b24YECABKAsyHC5mbHV0dGVyX3NkdWkuU2R1aVdpZGdldERhdGFSFG'
+ 'Zsb2F0aW5nQWN0aW9uQnV0dG9uEkIKEGJhY2tncm91bmRfY29sb3IYESABKAsyFy5mbHV0dGVy'
+ 'X3NkdWkuQ29sb3JEYXRhUg9iYWNrZ3JvdW5kQ29sb3IaQwoVU3RyaW5nQXR0cmlidXRlc0VudH'
+ 'J5EhAKA2tleRgBIAEoCVIDa2V5EhQKBXZhbHVlGAIgASgJUgV2YWx1ZToCOAEaQwoVRG91Ymxl'
+ 'QXR0cmlidXRlc0VudHJ5EhAKA2tleRgBIAEoCVIDa2V5EhQKBXZhbHVlGAIgASgBUgV2YWx1ZT'
+ 'oCOAEaQQoTQm9vbEF0dHJpYnV0ZXNFbnRyeRIQCgNrZXkYASABKAlSA2tleRIUCgV2YWx1ZRgC'
+ 'IAEoCFIFdmFsdWU6AjgBGkAKEkludEF0dHJpYnV0ZXNFbnRyeRIQCgNrZXkYASABKAlSA2tleR'
+ 'IUCgV2YWx1ZRgCIAEoBVIFdmFsdWU6AjgB');
+
+@$core.Deprecated('Use colorDataDescriptor instead')
+const ColorData$json = {
+ '1': 'ColorData',
+ '2': [
+ {'1': 'alpha', '3': 1, '4': 1, '5': 5, '10': 'alpha'},
+ {'1': 'red', '3': 2, '4': 1, '5': 5, '10': 'red'},
+ {'1': 'green', '3': 3, '4': 1, '5': 5, '10': 'green'},
+ {'1': 'blue', '3': 4, '4': 1, '5': 5, '10': 'blue'},
+ ],
+};
+
+/// Descriptor for `ColorData`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List colorDataDescriptor = $convert.base64Decode(
+ 'CglDb2xvckRhdGESFAoFYWxwaGEYASABKAVSBWFscGhhEhAKA3JlZBgCIAEoBVIDcmVkEhQKBW'
+ 'dyZWVuGAMgASgFUgVncmVlbhISCgRibHVlGAQgASgFUgRibHVl');
+
+@$core.Deprecated('Use edgeInsetsDataDescriptor instead')
+const EdgeInsetsData$json = {
+ '1': 'EdgeInsetsData',
+ '2': [
+ {'1': 'left', '3': 1, '4': 1, '5': 1, '9': 0, '10': 'left', '17': true},
+ {'1': 'top', '3': 2, '4': 1, '5': 1, '9': 1, '10': 'top', '17': true},
+ {'1': 'right', '3': 3, '4': 1, '5': 1, '9': 2, '10': 'right', '17': true},
+ {'1': 'bottom', '3': 4, '4': 1, '5': 1, '9': 3, '10': 'bottom', '17': true},
+ {'1': 'all', '3': 5, '4': 1, '5': 1, '9': 4, '10': 'all', '17': true},
+ ],
+ '8': [
+ {'1': '_left'},
+ {'1': '_top'},
+ {'1': '_right'},
+ {'1': '_bottom'},
+ {'1': '_all'},
+ ],
+};
+
+/// Descriptor for `EdgeInsetsData`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List edgeInsetsDataDescriptor = $convert.base64Decode(
+ 'Cg5FZGdlSW5zZXRzRGF0YRIXCgRsZWZ0GAEgASgBSABSBGxlZnSIAQESFQoDdG9wGAIgASgBSA'
+ 'FSA3RvcIgBARIZCgVyaWdodBgDIAEoAUgCUgVyaWdodIgBARIbCgZib3R0b20YBCABKAFIA1IG'
+ 'Ym90dG9tiAEBEhUKA2FsbBgFIAEoAUgEUgNhbGyIAQFCBwoFX2xlZnRCBgoEX3RvcEIICgZfcm'
+ 'lnaHRCCQoHX2JvdHRvbUIGCgRfYWxs');
+
+@$core.Deprecated('Use textStyleDataDescriptor instead')
+const TextStyleData$json = {
+ '1': 'TextStyleData',
+ '2': [
+ {'1': 'color', '3': 1, '4': 1, '5': 11, '6': '.flutter_sdui.ColorData', '9': 0, '10': 'color', '17': true},
+ {'1': 'font_size', '3': 2, '4': 1, '5': 1, '9': 1, '10': 'fontSize', '17': true},
+ {'1': 'font_weight', '3': 3, '4': 1, '5': 9, '9': 2, '10': 'fontWeight', '17': true},
+ ],
+ '8': [
+ {'1': '_color'},
+ {'1': '_font_size'},
+ {'1': '_font_weight'},
+ ],
+};
+
+/// Descriptor for `TextStyleData`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List textStyleDataDescriptor = $convert.base64Decode(
+ 'Cg1UZXh0U3R5bGVEYXRhEjIKBWNvbG9yGAEgASgLMhcuZmx1dHRlcl9zZHVpLkNvbG9yRGF0YU'
+ 'gAUgVjb2xvcogBARIgCglmb250X3NpemUYAiABKAFIAVIIZm9udFNpemWIAQESJAoLZm9udF93'
+ 'ZWlnaHQYAyABKAlIAlIKZm9udFdlaWdodIgBAUIICgZfY29sb3JCDAoKX2ZvbnRfc2l6ZUIOCg'
+ 'xfZm9udF93ZWlnaHQ=');
+
+@$core.Deprecated('Use iconDataMessageDescriptor instead')
+const IconDataMessage$json = {
+ '1': 'IconDataMessage',
+ '2': [
+ {'1': 'name', '3': 1, '4': 1, '5': 9, '9': 0, '10': 'name', '17': true},
+ {'1': 'code_point', '3': 2, '4': 1, '5': 5, '9': 1, '10': 'codePoint', '17': true},
+ {'1': 'font_family', '3': 3, '4': 1, '5': 9, '9': 2, '10': 'fontFamily', '17': true},
+ {'1': 'color', '3': 4, '4': 1, '5': 11, '6': '.flutter_sdui.ColorData', '9': 3, '10': 'color', '17': true},
+ {'1': 'size', '3': 5, '4': 1, '5': 1, '9': 4, '10': 'size', '17': true},
+ ],
+ '8': [
+ {'1': '_name'},
+ {'1': '_code_point'},
+ {'1': '_font_family'},
+ {'1': '_color'},
+ {'1': '_size'},
+ ],
+};
+
+/// Descriptor for `IconDataMessage`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List iconDataMessageDescriptor = $convert.base64Decode(
+ 'Cg9JY29uRGF0YU1lc3NhZ2USFwoEbmFtZRgBIAEoCUgAUgRuYW1liAEBEiIKCmNvZGVfcG9pbn'
+ 'QYAiABKAVIAVIJY29kZVBvaW50iAEBEiQKC2ZvbnRfZmFtaWx5GAMgASgJSAJSCmZvbnRGYW1p'
+ 'bHmIAQESMgoFY29sb3IYBCABKAsyFy5mbHV0dGVyX3NkdWkuQ29sb3JEYXRhSANSBWNvbG9yiA'
+ 'EBEhcKBHNpemUYBSABKAFIBFIEc2l6ZYgBAUIHCgVfbmFtZUINCgtfY29kZV9wb2ludEIOCgxf'
+ 'Zm9udF9mYW1pbHlCCAoGX2NvbG9yQgcKBV9zaXpl');
+
+@$core.Deprecated('Use boxDecorationDataDescriptor instead')
+const BoxDecorationData$json = {
+ '1': 'BoxDecorationData',
+ '2': [
+ {'1': 'color', '3': 1, '4': 1, '5': 11, '6': '.flutter_sdui.ColorData', '9': 0, '10': 'color', '17': true},
+ {'1': 'border_radius', '3': 2, '4': 1, '5': 11, '6': '.flutter_sdui.BorderRadiusData', '9': 1, '10': 'borderRadius', '17': true},
+ {'1': 'border', '3': 3, '4': 1, '5': 11, '6': '.flutter_sdui.BorderData', '9': 2, '10': 'border', '17': true},
+ {'1': 'box_shadow', '3': 4, '4': 3, '5': 11, '6': '.flutter_sdui.BoxShadowData', '10': 'boxShadow'},
+ {'1': 'gradient', '3': 5, '4': 1, '5': 11, '6': '.flutter_sdui.GradientData', '9': 3, '10': 'gradient', '17': true},
+ {'1': 'shape', '3': 6, '4': 1, '5': 14, '6': '.flutter_sdui.BoxShapeProto', '9': 4, '10': 'shape', '17': true},
+ {'1': 'image', '3': 7, '4': 1, '5': 11, '6': '.flutter_sdui.DecorationImageData', '9': 5, '10': 'image', '17': true},
+ ],
+ '8': [
+ {'1': '_color'},
+ {'1': '_border_radius'},
+ {'1': '_border'},
+ {'1': '_gradient'},
+ {'1': '_shape'},
+ {'1': '_image'},
+ ],
+};
+
+/// Descriptor for `BoxDecorationData`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List boxDecorationDataDescriptor = $convert.base64Decode(
+ 'ChFCb3hEZWNvcmF0aW9uRGF0YRIyCgVjb2xvchgBIAEoCzIXLmZsdXR0ZXJfc2R1aS5Db2xvck'
+ 'RhdGFIAFIFY29sb3KIAQESSAoNYm9yZGVyX3JhZGl1cxgCIAEoCzIeLmZsdXR0ZXJfc2R1aS5C'
+ 'b3JkZXJSYWRpdXNEYXRhSAFSDGJvcmRlclJhZGl1c4gBARI1CgZib3JkZXIYAyABKAsyGC5mbH'
+ 'V0dGVyX3NkdWkuQm9yZGVyRGF0YUgCUgZib3JkZXKIAQESOgoKYm94X3NoYWRvdxgEIAMoCzIb'
+ 'LmZsdXR0ZXJfc2R1aS5Cb3hTaGFkb3dEYXRhUglib3hTaGFkb3cSOwoIZ3JhZGllbnQYBSABKA'
+ 'syGi5mbHV0dGVyX3NkdWkuR3JhZGllbnREYXRhSANSCGdyYWRpZW50iAEBEjYKBXNoYXBlGAYg'
+ 'ASgOMhsuZmx1dHRlcl9zZHVpLkJveFNoYXBlUHJvdG9IBFIFc2hhcGWIAQESPAoFaW1hZ2UYBy'
+ 'ABKAsyIS5mbHV0dGVyX3NkdWkuRGVjb3JhdGlvbkltYWdlRGF0YUgFUgVpbWFnZYgBAUIICgZf'
+ 'Y29sb3JCEAoOX2JvcmRlcl9yYWRpdXNCCQoHX2JvcmRlckILCglfZ3JhZGllbnRCCAoGX3NoYX'
+ 'BlQggKBl9pbWFnZQ==');
+
+@$core.Deprecated('Use borderRadiusDataDescriptor instead')
+const BorderRadiusData$json = {
+ '1': 'BorderRadiusData',
+ '2': [
+ {'1': 'all', '3': 1, '4': 1, '5': 1, '9': 0, '10': 'all', '17': true},
+ {'1': 'top_left', '3': 2, '4': 1, '5': 1, '9': 1, '10': 'topLeft', '17': true},
+ {'1': 'top_right', '3': 3, '4': 1, '5': 1, '9': 2, '10': 'topRight', '17': true},
+ {'1': 'bottom_left', '3': 4, '4': 1, '5': 1, '9': 3, '10': 'bottomLeft', '17': true},
+ {'1': 'bottom_right', '3': 5, '4': 1, '5': 1, '9': 4, '10': 'bottomRight', '17': true},
+ ],
+ '8': [
+ {'1': '_all'},
+ {'1': '_top_left'},
+ {'1': '_top_right'},
+ {'1': '_bottom_left'},
+ {'1': '_bottom_right'},
+ ],
+};
+
+/// Descriptor for `BorderRadiusData`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List borderRadiusDataDescriptor = $convert.base64Decode(
+ 'ChBCb3JkZXJSYWRpdXNEYXRhEhUKA2FsbBgBIAEoAUgAUgNhbGyIAQESHgoIdG9wX2xlZnQYAi'
+ 'ABKAFIAVIHdG9wTGVmdIgBARIgCgl0b3BfcmlnaHQYAyABKAFIAlIIdG9wUmlnaHSIAQESJAoL'
+ 'Ym90dG9tX2xlZnQYBCABKAFIA1IKYm90dG9tTGVmdIgBARImCgxib3R0b21fcmlnaHQYBSABKA'
+ 'FIBFILYm90dG9tUmlnaHSIAQFCBgoEX2FsbEILCglfdG9wX2xlZnRCDAoKX3RvcF9yaWdodEIO'
+ 'CgxfYm90dG9tX2xlZnRCDwoNX2JvdHRvbV9yaWdodA==');
+
+@$core.Deprecated('Use borderSideDataDescriptor instead')
+const BorderSideData$json = {
+ '1': 'BorderSideData',
+ '2': [
+ {'1': 'color', '3': 1, '4': 1, '5': 11, '6': '.flutter_sdui.ColorData', '9': 0, '10': 'color', '17': true},
+ {'1': 'width', '3': 2, '4': 1, '5': 1, '9': 1, '10': 'width', '17': true},
+ {'1': 'style', '3': 3, '4': 1, '5': 14, '6': '.flutter_sdui.BorderStyleProto', '9': 2, '10': 'style', '17': true},
+ ],
+ '8': [
+ {'1': '_color'},
+ {'1': '_width'},
+ {'1': '_style'},
+ ],
+};
+
+/// Descriptor for `BorderSideData`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List borderSideDataDescriptor = $convert.base64Decode(
+ 'Cg5Cb3JkZXJTaWRlRGF0YRIyCgVjb2xvchgBIAEoCzIXLmZsdXR0ZXJfc2R1aS5Db2xvckRhdG'
+ 'FIAFIFY29sb3KIAQESGQoFd2lkdGgYAiABKAFIAVIFd2lkdGiIAQESOQoFc3R5bGUYAyABKA4y'
+ 'Hi5mbHV0dGVyX3NkdWkuQm9yZGVyU3R5bGVQcm90b0gCUgVzdHlsZYgBAUIICgZfY29sb3JCCA'
+ 'oGX3dpZHRoQggKBl9zdHlsZQ==');
+
+@$core.Deprecated('Use borderDataDescriptor instead')
+const BorderData$json = {
+ '1': 'BorderData',
+ '2': [
+ {'1': 'top', '3': 1, '4': 1, '5': 11, '6': '.flutter_sdui.BorderSideData', '9': 0, '10': 'top', '17': true},
+ {'1': 'right', '3': 2, '4': 1, '5': 11, '6': '.flutter_sdui.BorderSideData', '9': 1, '10': 'right', '17': true},
+ {'1': 'bottom', '3': 3, '4': 1, '5': 11, '6': '.flutter_sdui.BorderSideData', '9': 2, '10': 'bottom', '17': true},
+ {'1': 'left', '3': 4, '4': 1, '5': 11, '6': '.flutter_sdui.BorderSideData', '9': 3, '10': 'left', '17': true},
+ {'1': 'all', '3': 5, '4': 1, '5': 11, '6': '.flutter_sdui.BorderSideData', '9': 4, '10': 'all', '17': true},
+ ],
+ '8': [
+ {'1': '_top'},
+ {'1': '_right'},
+ {'1': '_bottom'},
+ {'1': '_left'},
+ {'1': '_all'},
+ ],
+};
+
+/// Descriptor for `BorderData`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List borderDataDescriptor = $convert.base64Decode(
+ 'CgpCb3JkZXJEYXRhEjMKA3RvcBgBIAEoCzIcLmZsdXR0ZXJfc2R1aS5Cb3JkZXJTaWRlRGF0YU'
+ 'gAUgN0b3CIAQESNwoFcmlnaHQYAiABKAsyHC5mbHV0dGVyX3NkdWkuQm9yZGVyU2lkZURhdGFI'
+ 'AVIFcmlnaHSIAQESOQoGYm90dG9tGAMgASgLMhwuZmx1dHRlcl9zZHVpLkJvcmRlclNpZGVEYX'
+ 'RhSAJSBmJvdHRvbYgBARI1CgRsZWZ0GAQgASgLMhwuZmx1dHRlcl9zZHVpLkJvcmRlclNpZGVE'
+ 'YXRhSANSBGxlZnSIAQESMwoDYWxsGAUgASgLMhwuZmx1dHRlcl9zZHVpLkJvcmRlclNpZGVEYX'
+ 'RhSARSA2FsbIgBAUIGCgRfdG9wQggKBl9yaWdodEIJCgdfYm90dG9tQgcKBV9sZWZ0QgYKBF9h'
+ 'bGw=');
+
+@$core.Deprecated('Use boxShadowDataDescriptor instead')
+const BoxShadowData$json = {
+ '1': 'BoxShadowData',
+ '2': [
+ {'1': 'color', '3': 1, '4': 1, '5': 11, '6': '.flutter_sdui.ColorData', '9': 0, '10': 'color', '17': true},
+ {'1': 'offset_x', '3': 2, '4': 1, '5': 1, '9': 1, '10': 'offsetX', '17': true},
+ {'1': 'offset_y', '3': 3, '4': 1, '5': 1, '9': 2, '10': 'offsetY', '17': true},
+ {'1': 'blur_radius', '3': 4, '4': 1, '5': 1, '9': 3, '10': 'blurRadius', '17': true},
+ {'1': 'spread_radius', '3': 5, '4': 1, '5': 1, '9': 4, '10': 'spreadRadius', '17': true},
+ ],
+ '8': [
+ {'1': '_color'},
+ {'1': '_offset_x'},
+ {'1': '_offset_y'},
+ {'1': '_blur_radius'},
+ {'1': '_spread_radius'},
+ ],
+};
+
+/// Descriptor for `BoxShadowData`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List boxShadowDataDescriptor = $convert.base64Decode(
+ 'Cg1Cb3hTaGFkb3dEYXRhEjIKBWNvbG9yGAEgASgLMhcuZmx1dHRlcl9zZHVpLkNvbG9yRGF0YU'
+ 'gAUgVjb2xvcogBARIeCghvZmZzZXRfeBgCIAEoAUgBUgdvZmZzZXRYiAEBEh4KCG9mZnNldF95'
+ 'GAMgASgBSAJSB29mZnNldFmIAQESJAoLYmx1cl9yYWRpdXMYBCABKAFIA1IKYmx1clJhZGl1c4'
+ 'gBARIoCg1zcHJlYWRfcmFkaXVzGAUgASgBSARSDHNwcmVhZFJhZGl1c4gBAUIICgZfY29sb3JC'
+ 'CwoJX29mZnNldF94QgsKCV9vZmZzZXRfeUIOCgxfYmx1cl9yYWRpdXNCEAoOX3NwcmVhZF9yYW'
+ 'RpdXM=');
+
+@$core.Deprecated('Use gradientDataDescriptor instead')
+const GradientData$json = {
+ '1': 'GradientData',
+ '2': [
+ {'1': 'type', '3': 1, '4': 1, '5': 14, '6': '.flutter_sdui.GradientData.GradientType', '10': 'type'},
+ {'1': 'colors', '3': 2, '4': 3, '5': 11, '6': '.flutter_sdui.ColorData', '10': 'colors'},
+ {'1': 'stops', '3': 3, '4': 3, '5': 1, '10': 'stops'},
+ {'1': 'begin', '3': 4, '4': 1, '5': 11, '6': '.flutter_sdui.AlignmentData', '9': 0, '10': 'begin', '17': true},
+ {'1': 'end', '3': 5, '4': 1, '5': 11, '6': '.flutter_sdui.AlignmentData', '9': 1, '10': 'end', '17': true},
+ {'1': 'center', '3': 6, '4': 1, '5': 11, '6': '.flutter_sdui.AlignmentData', '9': 2, '10': 'center', '17': true},
+ {'1': 'radius', '3': 7, '4': 1, '5': 1, '9': 3, '10': 'radius', '17': true},
+ {'1': 'start_angle', '3': 8, '4': 1, '5': 1, '9': 4, '10': 'startAngle', '17': true},
+ {'1': 'end_angle', '3': 9, '4': 1, '5': 1, '9': 5, '10': 'endAngle', '17': true},
+ ],
+ '4': [GradientData_GradientType$json],
+ '8': [
+ {'1': '_begin'},
+ {'1': '_end'},
+ {'1': '_center'},
+ {'1': '_radius'},
+ {'1': '_start_angle'},
+ {'1': '_end_angle'},
+ ],
+};
+
+@$core.Deprecated('Use gradientDataDescriptor instead')
+const GradientData_GradientType$json = {
+ '1': 'GradientType',
+ '2': [
+ {'1': 'GRADIENT_TYPE_UNSPECIFIED', '2': 0},
+ {'1': 'LINEAR', '2': 1},
+ {'1': 'RADIAL', '2': 2},
+ {'1': 'SWEEP', '2': 3},
+ ],
+};
+
+/// Descriptor for `GradientData`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List gradientDataDescriptor = $convert.base64Decode(
+ 'CgxHcmFkaWVudERhdGESOwoEdHlwZRgBIAEoDjInLmZsdXR0ZXJfc2R1aS5HcmFkaWVudERhdG'
+ 'EuR3JhZGllbnRUeXBlUgR0eXBlEi8KBmNvbG9ycxgCIAMoCzIXLmZsdXR0ZXJfc2R1aS5Db2xv'
+ 'ckRhdGFSBmNvbG9ycxIUCgVzdG9wcxgDIAMoAVIFc3RvcHMSNgoFYmVnaW4YBCABKAsyGy5mbH'
+ 'V0dGVyX3NkdWkuQWxpZ25tZW50RGF0YUgAUgViZWdpbogBARIyCgNlbmQYBSABKAsyGy5mbHV0'
+ 'dGVyX3NkdWkuQWxpZ25tZW50RGF0YUgBUgNlbmSIAQESOAoGY2VudGVyGAYgASgLMhsuZmx1dH'
+ 'Rlcl9zZHVpLkFsaWdubWVudERhdGFIAlIGY2VudGVyiAEBEhsKBnJhZGl1cxgHIAEoAUgDUgZy'
+ 'YWRpdXOIAQESJAoLc3RhcnRfYW5nbGUYCCABKAFIBFIKc3RhcnRBbmdsZYgBARIgCgllbmRfYW'
+ '5nbGUYCSABKAFIBVIIZW5kQW5nbGWIAQEiUAoMR3JhZGllbnRUeXBlEh0KGUdSQURJRU5UX1RZ'
+ 'UEVfVU5TUEVDSUZJRUQQABIKCgZMSU5FQVIQARIKCgZSQURJQUwQAhIJCgVTV0VFUBADQggKBl'
+ '9iZWdpbkIGCgRfZW5kQgkKB19jZW50ZXJCCQoHX3JhZGl1c0IOCgxfc3RhcnRfYW5nbGVCDAoK'
+ 'X2VuZF9hbmdsZQ==');
+
+@$core.Deprecated('Use alignmentDataDescriptor instead')
+const AlignmentData$json = {
+ '1': 'AlignmentData',
+ '2': [
+ {'1': 'predefined', '3': 1, '4': 1, '5': 14, '6': '.flutter_sdui.AlignmentData.PredefinedAlignment', '9': 0, '10': 'predefined'},
+ {'1': 'xy', '3': 2, '4': 1, '5': 11, '6': '.flutter_sdui.XYAlignment', '9': 0, '10': 'xy'},
+ ],
+ '4': [AlignmentData_PredefinedAlignment$json],
+ '8': [
+ {'1': 'alignment_type'},
+ ],
+};
+
+@$core.Deprecated('Use alignmentDataDescriptor instead')
+const AlignmentData_PredefinedAlignment$json = {
+ '1': 'PredefinedAlignment',
+ '2': [
+ {'1': 'PREDEFINED_ALIGNMENT_UNSPECIFIED', '2': 0},
+ {'1': 'BOTTOM_CENTER', '2': 1},
+ {'1': 'BOTTOM_LEFT', '2': 2},
+ {'1': 'BOTTOM_RIGHT', '2': 3},
+ {'1': 'CENTER', '2': 4},
+ {'1': 'CENTER_LEFT', '2': 5},
+ {'1': 'CENTER_RIGHT', '2': 6},
+ {'1': 'TOP_CENTER', '2': 7},
+ {'1': 'TOP_LEFT', '2': 8},
+ {'1': 'TOP_RIGHT', '2': 9},
+ ],
+};
+
+/// Descriptor for `AlignmentData`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List alignmentDataDescriptor = $convert.base64Decode(
+ 'Cg1BbGlnbm1lbnREYXRhElEKCnByZWRlZmluZWQYASABKA4yLy5mbHV0dGVyX3NkdWkuQWxpZ2'
+ '5tZW50RGF0YS5QcmVkZWZpbmVkQWxpZ25tZW50SABSCnByZWRlZmluZWQSKwoCeHkYAiABKAsy'
+ 'GS5mbHV0dGVyX3NkdWkuWFlBbGlnbm1lbnRIAFICeHkizQEKE1ByZWRlZmluZWRBbGlnbm1lbn'
+ 'QSJAogUFJFREVGSU5FRF9BTElHTk1FTlRfVU5TUEVDSUZJRUQQABIRCg1CT1RUT01fQ0VOVEVS'
+ 'EAESDwoLQk9UVE9NX0xFRlQQAhIQCgxCT1RUT01fUklHSFQQAxIKCgZDRU5URVIQBBIPCgtDRU'
+ '5URVJfTEVGVBAFEhAKDENFTlRFUl9SSUdIVBAGEg4KClRPUF9DRU5URVIQBxIMCghUT1BfTEVG'
+ 'VBAIEg0KCVRPUF9SSUdIVBAJQhAKDmFsaWdubWVudF90eXBl');
+
+@$core.Deprecated('Use xYAlignmentDescriptor instead')
+const XYAlignment$json = {
+ '1': 'XYAlignment',
+ '2': [
+ {'1': 'x', '3': 1, '4': 1, '5': 1, '10': 'x'},
+ {'1': 'y', '3': 2, '4': 1, '5': 1, '10': 'y'},
+ ],
+};
+
+/// Descriptor for `XYAlignment`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List xYAlignmentDescriptor = $convert.base64Decode(
+ 'CgtYWUFsaWdubWVudBIMCgF4GAEgASgBUgF4EgwKAXkYAiABKAFSAXk=');
+
+@$core.Deprecated('Use decorationImageDataDescriptor instead')
+const DecorationImageData$json = {
+ '1': 'DecorationImageData',
+ '2': [
+ {'1': 'src', '3': 1, '4': 1, '5': 9, '10': 'src'},
+ {'1': 'fit', '3': 2, '4': 1, '5': 14, '6': '.flutter_sdui.BoxFitProto', '9': 0, '10': 'fit', '17': true},
+ {'1': 'alignment', '3': 3, '4': 1, '5': 11, '6': '.flutter_sdui.AlignmentData', '9': 1, '10': 'alignment', '17': true},
+ {'1': 'repeat', '3': 4, '4': 1, '5': 14, '6': '.flutter_sdui.ImageRepeatProto', '9': 2, '10': 'repeat', '17': true},
+ {'1': 'match_text_direction', '3': 5, '4': 1, '5': 8, '9': 3, '10': 'matchTextDirection', '17': true},
+ {'1': 'scale', '3': 6, '4': 1, '5': 1, '9': 4, '10': 'scale', '17': true},
+ {'1': 'opacity', '3': 7, '4': 1, '5': 1, '9': 5, '10': 'opacity', '17': true},
+ {'1': 'filter_quality', '3': 8, '4': 1, '5': 14, '6': '.flutter_sdui.FilterQualityProto', '9': 6, '10': 'filterQuality', '17': true},
+ {'1': 'invert_colors', '3': 9, '4': 1, '5': 8, '9': 7, '10': 'invertColors', '17': true},
+ {'1': 'is_anti_alias', '3': 10, '4': 1, '5': 8, '9': 8, '10': 'isAntiAlias', '17': true},
+ ],
+ '8': [
+ {'1': '_fit'},
+ {'1': '_alignment'},
+ {'1': '_repeat'},
+ {'1': '_match_text_direction'},
+ {'1': '_scale'},
+ {'1': '_opacity'},
+ {'1': '_filter_quality'},
+ {'1': '_invert_colors'},
+ {'1': '_is_anti_alias'},
+ ],
+};
+
+/// Descriptor for `DecorationImageData`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List decorationImageDataDescriptor = $convert.base64Decode(
+ 'ChNEZWNvcmF0aW9uSW1hZ2VEYXRhEhAKA3NyYxgBIAEoCVIDc3JjEjAKA2ZpdBgCIAEoDjIZLm'
+ 'ZsdXR0ZXJfc2R1aS5Cb3hGaXRQcm90b0gAUgNmaXSIAQESPgoJYWxpZ25tZW50GAMgASgLMhsu'
+ 'Zmx1dHRlcl9zZHVpLkFsaWdubWVudERhdGFIAVIJYWxpZ25tZW50iAEBEjsKBnJlcGVhdBgEIA'
+ 'EoDjIeLmZsdXR0ZXJfc2R1aS5JbWFnZVJlcGVhdFByb3RvSAJSBnJlcGVhdIgBARI1ChRtYXRj'
+ 'aF90ZXh0X2RpcmVjdGlvbhgFIAEoCEgDUhJtYXRjaFRleHREaXJlY3Rpb26IAQESGQoFc2NhbG'
+ 'UYBiABKAFIBFIFc2NhbGWIAQESHQoHb3BhY2l0eRgHIAEoAUgFUgdvcGFjaXR5iAEBEkwKDmZp'
+ 'bHRlcl9xdWFsaXR5GAggASgOMiAuZmx1dHRlcl9zZHVpLkZpbHRlclF1YWxpdHlQcm90b0gGUg'
+ '1maWx0ZXJRdWFsaXR5iAEBEigKDWludmVydF9jb2xvcnMYCSABKAhIB1IMaW52ZXJ0Q29sb3Jz'
+ 'iAEBEicKDWlzX2FudGlfYWxpYXMYCiABKAhICFILaXNBbnRpQWxpYXOIAQFCBgoEX2ZpdEIMCg'
+ 'pfYWxpZ25tZW50QgkKB19yZXBlYXRCFwoVX21hdGNoX3RleHRfZGlyZWN0aW9uQggKBl9zY2Fs'
+ 'ZUIKCghfb3BhY2l0eUIRCg9fZmlsdGVyX3F1YWxpdHlCEAoOX2ludmVydF9jb2xvcnNCEAoOX2'
+ 'lzX2FudGlfYWxpYXM=');
+
+@$core.Deprecated('Use sduiRequestDescriptor instead')
+const SduiRequest$json = {
+ '1': 'SduiRequest',
+ '2': [
+ {'1': 'screen_id', '3': 1, '4': 1, '5': 9, '10': 'screenId'},
+ ],
+};
+
+/// Descriptor for `SduiRequest`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List sduiRequestDescriptor = $convert.base64Decode(
+ 'CgtTZHVpUmVxdWVzdBIbCglzY3JlZW5faWQYASABKAlSCHNjcmVlbklk');
+
diff --git a/lib/src/parser/sdui_proto_parser.dart b/lib/src/parser/sdui_proto_parser.dart
new file mode 100644
index 0000000..9040329
--- /dev/null
+++ b/lib/src/parser/sdui_proto_parser.dart
@@ -0,0 +1,308 @@
+import 'dart:developer';
+
+import 'package:flutter/material.dart';
+import 'package:flutter_sdui/src/generated/sdui.pb.dart';
+import 'package:flutter_sdui/src/widgets/sdui_column.dart';
+import 'package:flutter_sdui/src/widgets/sdui_container.dart';
+import 'package:flutter_sdui/src/widgets/sdui_icon.dart';
+import 'package:flutter_sdui/src/widgets/sdui_image.dart';
+import 'package:flutter_sdui/src/widgets/sdui_row.dart';
+import 'package:flutter_sdui/src/widgets/sdui_scaffold.dart';
+import 'package:flutter_sdui/src/widgets/sdui_sized_box.dart';
+import 'package:flutter_sdui/src/widgets/sdui_spacer.dart';
+import 'package:flutter_sdui/src/widgets/sdui_text.dart';
+import 'package:flutter_sdui/src/widgets/sdui_widget.dart';
+
+// Parser for Protobuf definitions for SDUI
+class SduiProtoParser {
+ // Parse method for JSON data
+ static SduiWidget parseJSON(Map data) {
+ // TODO: Implement JSON parsing logic
+ throw UnimplementedError('JSON parser not fully implemented');
+ }
+
+ // Parse from Protobuf data model
+ static SduiWidget parseProto(SduiWidgetData data) {
+ switch (data.type) {
+ case WidgetType.COLUMN:
+ return _parseProtoColumn(data);
+ case WidgetType.ROW:
+ return _parseProtoRow(data);
+ case WidgetType.TEXT:
+ return _parseProtoText(data);
+ case WidgetType.IMAGE:
+ return _parseProtoImage(data);
+ case WidgetType.SIZED_BOX:
+ return _parseProtoSizedBox(data);
+ case WidgetType.CONTAINER:
+ return _parseProtoContainer(data);
+ case WidgetType.SCAFFOLD:
+ return _parseProtoScaffold(data);
+ case WidgetType.SPACER:
+ return _parseProtoSpacer(data);
+ case WidgetType.ICON:
+ return _parseProtoIcon(data);
+ default:
+ log('Unsupported widget type: ${data.type}');
+ return SduiContainer();
+ }
+ }
+
+ // Helper methods to parse specific widget types from protobuf
+ static SduiColumn _parseProtoColumn(SduiWidgetData data) {
+ List children = data.children
+ .map((child) => SduiProtoParser.parseProto(child))
+ .toList();
+ return SduiColumn(children: children);
+ }
+
+ static SduiRow _parseProtoRow(SduiWidgetData data) {
+ List children = data.children
+ .map((child) => SduiProtoParser.parseProto(child))
+ .toList();
+ return SduiRow(children: children);
+ }
+
+ static SduiText _parseProtoText(SduiWidgetData data) {
+ String text = data.stringAttributes['text'] ?? '';
+ TextStyle? style =
+ data.hasTextStyle() ? _parseProtoTextStyle(data.textStyle) : null;
+ return SduiText(text, style: style);
+ }
+
+ static SduiImage _parseProtoImage(SduiWidgetData data) {
+ String src = data.stringAttributes['src'] ?? '';
+ double? width = data.doubleAttributes['width'];
+ double? height = data.doubleAttributes['height'];
+ BoxFit? fit = _parseProtoBoxFit(data.stringAttributes['fit']);
+ return SduiImage(src, width: width, height: height, fit: fit);
+ }
+
+ static SduiSizedBox _parseProtoSizedBox(SduiWidgetData data) {
+ double? width = data.doubleAttributes['width'];
+ double? height = data.doubleAttributes['height'];
+ SduiWidget? child =
+ data.hasChild() ? SduiProtoParser.parseProto(data.child) : null;
+ return SduiSizedBox(width: width, height: height, child: child);
+ }
+
+ static SduiContainer _parseProtoContainer(SduiWidgetData data) {
+ SduiWidget? child =
+ data.hasChild() ? SduiProtoParser.parseProto(data.child) : null;
+ EdgeInsets? padding =
+ data.hasPadding() ? _parseProtoEdgeInsets(data.padding) : null;
+ BoxDecoration? decoration = data.hasBoxDecoration()
+ ? _parseProtoBoxDecoration(data.boxDecoration)
+ : null;
+ double? width = data.doubleAttributes['width'];
+ double? height = data.doubleAttributes['height'];
+
+ return SduiContainer(
+ child: child,
+ padding: padding,
+ decoration: decoration,
+ width: width,
+ height: height,
+ );
+ }
+
+ static SduiScaffold _parseProtoScaffold(SduiWidgetData data) {
+ SduiWidget? appBar =
+ data.hasAppBar() ? SduiProtoParser.parseProto(data.appBar) : null;
+ SduiWidget? body =
+ data.hasBody() ? SduiProtoParser.parseProto(data.body) : null;
+ SduiWidget? floatingActionButton = data.hasFloatingActionButton()
+ ? SduiProtoParser.parseProto(data.floatingActionButton)
+ : null;
+ Color? backgroundColor = data.hasBackgroundColor()
+ ? _parseProtoColor(data.backgroundColor)
+ : null;
+
+ return SduiScaffold(
+ appBar: appBar,
+ body: body,
+ floatingActionButton: floatingActionButton,
+ backgroundColor: backgroundColor,
+ );
+ }
+
+ static SduiSpacer _parseProtoSpacer(SduiWidgetData data) {
+ int flex = data.intAttributes['flex'] ?? 1;
+ return SduiSpacer(flex: flex);
+ }
+
+ static SduiIcon _parseProtoIcon(SduiWidgetData data) {
+ IconData? iconData = data.hasIcon() ? _parseProtoIconData(data.icon) : null;
+ double? size = data.icon.size;
+ Color? color =
+ data.icon.hasColor() ? _parseProtoColor(data.icon.color) : null;
+
+ return SduiIcon(
+ icon: iconData,
+ size: size,
+ color: color,
+ );
+ }
+
+ // Helper methods for parsing protobuf attribute types
+
+ static BoxFit? _parseProtoBoxFit(String? value) {
+ if (value == null) return null;
+ switch (value.toLowerCase()) {
+ case 'fill':
+ return BoxFit.fill;
+ case 'contain':
+ return BoxFit.contain;
+ case 'cover':
+ return BoxFit.cover;
+ case 'fitwidth':
+ return BoxFit.fitWidth;
+ case 'fitheight':
+ return BoxFit.fitHeight;
+ case 'none':
+ return BoxFit.none;
+ case 'scaledown':
+ return BoxFit.scaleDown;
+ default:
+ return null;
+ }
+ }
+
+ static TextStyle? _parseProtoTextStyle(TextStyleData data) {
+ Color? color = data.hasColor() ? _parseProtoColor(data.color) : null;
+ double? fontSize = data.fontSize;
+ FontWeight? fontWeight = _parseProtoFontWeight(data.fontWeight);
+
+ return TextStyle(
+ color: color,
+ fontSize: fontSize,
+ fontWeight: fontWeight,
+ );
+ }
+
+ static FontWeight? _parseProtoFontWeight(String? value) {
+ if (value == null) return null;
+ switch (value.toLowerCase()) {
+ case 'bold':
+ return FontWeight.bold;
+ case 'normal':
+ return FontWeight.normal;
+ case 'w100':
+ return FontWeight.w100;
+ case 'w200':
+ return FontWeight.w200;
+ case 'w300':
+ return FontWeight.w300;
+ case 'w400':
+ return FontWeight.w400;
+ case 'w500':
+ return FontWeight.w500;
+ case 'w600':
+ return FontWeight.w600;
+ case 'w700':
+ return FontWeight.w700;
+ case 'w800':
+ return FontWeight.w800;
+ case 'w900':
+ return FontWeight.w900;
+ default:
+ return null;
+ }
+ }
+
+ static EdgeInsets? _parseProtoEdgeInsets(EdgeInsetsData data) {
+ if (data.hasAll()) {
+ return EdgeInsets.all(data.all);
+ }
+
+ return EdgeInsets.only(
+ left: data.left,
+ top: data.top,
+ right: data.right,
+ bottom: data.bottom,
+ );
+ }
+
+ static Color? _parseProtoColor(ColorData data) {
+ return Color.fromARGB(
+ data.alpha,
+ data.red,
+ data.green,
+ data.blue,
+ );
+ }
+
+ static IconData? _parseProtoIconData(IconDataMessage data) {
+ if (data.hasName()) {
+ // Map common icon names to Material icons (expand as needed)
+ switch (data.name.toLowerCase()) {
+ case 'settings':
+ return Icons.settings;
+ case 'home':
+ return Icons.home;
+ case 'search':
+ return Icons.search;
+ case 'add':
+ return Icons.add;
+ case 'edit':
+ return Icons.edit;
+ default:
+ break;
+ }
+ }
+
+ // Fallback to codePoint if available
+ if (data.hasCodePoint()) {
+ return IconData(
+ data.codePoint,
+ fontFamily: data.fontFamily.isEmpty ? 'MaterialIcons' : data.fontFamily,
+ );
+ }
+
+ return null;
+ }
+
+ static BoxDecoration? _parseProtoBoxDecoration(BoxDecorationData data) {
+ return BoxDecoration(
+ color: data.hasColor() ? _parseProtoColor(data.color) : null,
+ borderRadius: data.hasBorderRadius()
+ ? _parseProtoBorderRadius(data.borderRadius)
+ : null,
+ // Add more properties as needed
+ );
+ }
+
+ static BorderRadius? _parseProtoBorderRadius(BorderRadiusData data) {
+ if (data.hasAll()) {
+ return BorderRadius.all(Radius.circular(data.all));
+ } else if (data.hasTopLeft() &&
+ data.hasTopRight() &&
+ data.hasBottomLeft() &&
+ data.hasBottomRight()) {
+ return BorderRadius.only(
+ topLeft: Radius.circular(data.topLeft),
+ topRight: Radius.circular(data.topRight),
+ bottomLeft: Radius.circular(data.bottomLeft),
+ bottomRight: Radius.circular(data.bottomRight),
+ );
+ } else if (data.hasTopLeft() ||
+ data.hasTopRight() ||
+ data.hasBottomLeft() ||
+ data.hasBottomRight()) {
+ return BorderRadius.only(
+ topLeft:
+ data.hasTopLeft() ? Radius.circular(data.topLeft) : Radius.zero,
+ topRight:
+ data.hasTopRight() ? Radius.circular(data.topRight) : Radius.zero,
+ bottomLeft: data.hasBottomLeft()
+ ? Radius.circular(data.bottomLeft)
+ : Radius.zero,
+ bottomRight: data.hasBottomRight()
+ ? Radius.circular(data.bottomRight)
+ : Radius.zero,
+ );
+ }
+
+ return BorderRadius.circular(8.0); // Example default value
+ }
+}
diff --git a/lib/src/protos/sdui.proto b/lib/src/protos/sdui.proto
new file mode 100644
index 0000000..ff36755
--- /dev/null
+++ b/lib/src/protos/sdui.proto
@@ -0,0 +1,242 @@
+syntax = "proto3";
+
+package flutter_sdui;
+
+// Enum for Widget Types
+enum WidgetType {
+ WIDGET_TYPE_UNSPECIFIED = 0;
+ COLUMN = 1;
+ ROW = 2;
+ TEXT = 3;
+ IMAGE = 4;
+ SIZED_BOX = 5;
+ CONTAINER = 6;
+ SCAFFOLD = 7;
+ SPACER = 8;
+ ICON = 9;
+ // Add other widget types here
+}
+
+// Generic Widget message
+message SduiWidgetData {
+ WidgetType type = 1;
+ map string_attributes = 2; // For simple string attributes like text content, image src
+ map double_attributes = 3; // For numerical attributes like width, height, flex
+ map bool_attributes = 4; // For boolean attributes
+ map int_attributes = 5; // For integer attributes like flex
+
+ // Complex nested attributes
+ TextStyleData text_style = 6;
+ EdgeInsetsData padding = 7;
+ EdgeInsetsData margin = 8; // Example, if we add margin later
+ ColorData color = 9; // General purpose color
+ IconDataMessage icon = 10;
+ BoxDecorationData box_decoration = 11;
+
+ // Children widgets
+ repeated SduiWidgetData children = 12;
+ SduiWidgetData child = 13; // For widgets that take a single child (e.g. SizedBox, Container)
+
+ // Scaffold specific parts
+ SduiWidgetData app_bar = 14;
+ SduiWidgetData body = 15; // Body can also be a single child
+ SduiWidgetData floating_action_button = 16;
+ ColorData background_color = 17; // For Scaffold background
+}
+
+// Message for Color
+message ColorData {
+ int32 alpha = 1;
+ int32 red = 2;
+ int32 green = 3;
+ int32 blue = 4;
+ // Or alternatively, a hex string
+ // string hex = 5;
+}
+
+// Message for EdgeInsets (for padding, margin)
+message EdgeInsetsData {
+ optional double left = 1;
+ optional double top = 2;
+ optional double right = 3;
+ optional double bottom = 4;
+ optional double all = 5;
+}
+
+// Message for TextStyle
+message TextStyleData {
+ optional ColorData color = 1;
+ optional double font_size = 2;
+ optional string font_weight = 3; // e.g., "bold", "w500"
+ // Add other TextStyle properties: fontFamily, fontStyle, letterSpacing, etc.
+}
+
+// Message for IconData
+message IconDataMessage {
+ optional string name = 1; // e.g., "settings", "home"
+ optional int32 code_point = 2;
+ optional string font_family = 3;
+ optional ColorData color = 4;
+ optional double size = 5;
+}
+
+// Message for BoxFit
+enum BoxFitProto {
+ BOX_FIT_UNSPECIFIED = 0;
+ FILL = 1;
+ CONTAIN = 2;
+ COVER = 3;
+ FIT_WIDTH = 4;
+ FIT_HEIGHT = 5;
+ NONE = 6;
+ SCALE_DOWN = 7;
+}
+
+// Message for BoxDecoration
+message BoxDecorationData {
+ optional ColorData color = 1;
+ optional BorderRadiusData border_radius = 2;
+ optional BorderData border = 3;
+ repeated BoxShadowData box_shadow = 4;
+ optional GradientData gradient = 5;
+ optional BoxShapeProto shape = 6; // ENUM: RECTANGLE, CIRCLE
+ optional DecorationImageData image = 7;
+}
+
+// Message for BorderRadius
+message BorderRadiusData {
+ optional double all = 1; // For BorderRadius.circular(all)
+ // For BorderRadius.only or .vertical/.horizontal if needed later
+ optional double top_left = 2;
+ optional double top_right = 3;
+ optional double bottom_left = 4;
+ optional double bottom_right = 5;
+ // Specific types like vertical/horizontal can be handled by how these are set
+}
+
+// Message for BorderSide
+message BorderSideData {
+ optional ColorData color = 1;
+ optional double width = 2;
+ optional BorderStyleProto style = 3; // ENUM: SOLID, NONE
+}
+
+// Message for Border
+message BorderData {
+ optional BorderSideData top = 1;
+ optional BorderSideData right = 2;
+ optional BorderSideData bottom = 3;
+ optional BorderSideData left = 4;
+ optional BorderSideData all = 5; // For Border.all
+}
+
+// Enum for BorderStyle
+enum BorderStyleProto {
+ BORDER_STYLE_UNSPECIFIED = 0;
+ SOLID = 1;
+ NONE_BORDER = 2; // Renamed to avoid conflict with NONE in ImageRepeatProto
+}
+
+// Message for BoxShadow
+message BoxShadowData {
+ optional ColorData color = 1;
+ optional double offset_x = 2;
+ optional double offset_y = 3;
+ optional double blur_radius = 4;
+ optional double spread_radius = 5;
+}
+
+// Message for Gradient
+message GradientData {
+ enum GradientType {
+ GRADIENT_TYPE_UNSPECIFIED = 0;
+ LINEAR = 1;
+ RADIAL = 2;
+ SWEEP = 3;
+ }
+ GradientType type = 1;
+ repeated ColorData colors = 2;
+ repeated double stops = 3;
+ optional AlignmentData begin = 4; // For LinearGradient
+ optional AlignmentData end = 5; // For LinearGradient
+ optional AlignmentData center = 6; // For RadialGradient, SweepGradient
+ optional double radius = 7; // For RadialGradient
+ optional double start_angle = 8; // For SweepGradient
+ optional double end_angle = 9; // For SweepGradient
+}
+
+// Message for Alignment (used in Gradient, DecorationImage)
+message AlignmentData {
+ // Predefined alignments
+ enum PredefinedAlignment {
+ PREDEFINED_ALIGNMENT_UNSPECIFIED = 0;
+ BOTTOM_CENTER = 1;
+ BOTTOM_LEFT = 2;
+ BOTTOM_RIGHT = 3;
+ CENTER = 4;
+ CENTER_LEFT = 5;
+ CENTER_RIGHT = 6;
+ TOP_CENTER = 7;
+ TOP_LEFT = 8;
+ TOP_RIGHT = 9;
+ }
+ oneof alignment_type {
+ PredefinedAlignment predefined = 1;
+ XYAlignment xy = 2;
+ }
+}
+
+message XYAlignment {
+ double x = 1;
+ double y = 2;
+}
+
+
+// Enum for BoxShape
+enum BoxShapeProto {
+ BOX_SHAPE_UNSPECIFIED = 0;
+ RECTANGLE = 1;
+ CIRCLE = 2;
+}
+
+// Message for DecorationImage
+message DecorationImageData {
+ string src = 1; // Network image URL
+ optional BoxFitProto fit = 2;
+ optional AlignmentData alignment = 3;
+ optional ImageRepeatProto repeat = 4;
+ optional bool match_text_direction = 5;
+ optional double scale = 6;
+ optional double opacity = 7;
+ optional FilterQualityProto filter_quality = 8;
+ optional bool invert_colors = 9;
+ optional bool is_anti_alias = 10;
+}
+
+// Enum for ImageRepeat
+enum ImageRepeatProto {
+ IMAGE_REPEAT_UNSPECIFIED = 0;
+ REPEAT = 1;
+ REPEAT_X = 2;
+ REPEAT_Y = 3;
+ NO_REPEAT = 4;
+}
+
+// Enum for FilterQuality
+enum FilterQualityProto {
+ FILTER_QUALITY_UNSPECIFIED = 0;
+ NONE_FQ = 1; // NONE is a keyword in proto3 for enums, so NONE_FQ
+ LOW = 2;
+ MEDIUM = 3;
+ HIGH = 4;
+}
+
+// Service definition (optional for now, but good for future gRPC)
+service SduiService {
+ rpc GetSduiWidget (SduiRequest) returns (SduiWidgetData);
+}
+
+message SduiRequest {
+ string screen_id = 1; // Example: identifier for which UI to fetch
+}
+
diff --git a/lib/src/renderer/sdui_grpc_renderer.dart b/lib/src/renderer/sdui_grpc_renderer.dart
new file mode 100644
index 0000000..0e24f2a
--- /dev/null
+++ b/lib/src/renderer/sdui_grpc_renderer.dart
@@ -0,0 +1,81 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_sdui/src/generated/sdui.pb.dart';
+import 'package:flutter_sdui/src/parser/sdui_proto_parser.dart';
+import 'package:flutter_sdui/src/service/sdui_grpc_client.dart';
+import 'package:flutter_sdui/src/widgets/sdui_widget.dart';
+
+/// A widget that renders a UI from a gRPC server.
+class SduiGrpcRenderer extends StatefulWidget {
+ /// The gRPC client to use for fetching UI widgets.
+ final SduiGrpcClient client;
+
+ /// The screen ID to fetch from the server.
+ final String screenId;
+
+ /// Optional loading widget to display while fetching the UI.
+ final Widget? loadingWidget;
+
+ /// Optional error widget builder to display if an error occurs.
+ final Widget Function(BuildContext, Object)? errorBuilder;
+
+ /// Creates a new SduiGrpcRenderer.
+ const SduiGrpcRenderer({
+ super.key,
+ required this.client,
+ required this.screenId,
+ this.loadingWidget,
+ this.errorBuilder,
+ });
+
+ @override
+ State createState() => _SduiGrpcRendererState();
+}
+
+class _SduiGrpcRendererState extends State {
+ late Future _widgetFuture;
+
+ @override
+ void initState() {
+ super.initState();
+ _fetchWidget();
+ }
+
+ @override
+ void didUpdateWidget(SduiGrpcRenderer oldWidget) {
+ super.didUpdateWidget(oldWidget);
+ if (oldWidget.screenId != widget.screenId ||
+ oldWidget.client != widget.client) {
+ _fetchWidget();
+ }
+ }
+
+ void _fetchWidget() {
+ _widgetFuture = widget.client.getWidget(widget.screenId);
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return FutureBuilder(
+ future: _widgetFuture,
+ builder: (context, snapshot) {
+ if (snapshot.connectionState == ConnectionState.waiting) {
+ return widget.loadingWidget ??
+ const Center(child: CircularProgressIndicator());
+ } else if (snapshot.hasError) {
+ if (widget.errorBuilder != null) {
+ return widget.errorBuilder!(context, snapshot.error!);
+ }
+ return Center(child: Text('Error: ${snapshot.error}'));
+ } else if (snapshot.hasData) {
+ // Convert the protobuf data to a Flutter widget
+ // This will use our SduiProtoParser to create the widget tree
+ final SduiWidget sduiWidget =
+ SduiProtoParser.parseProto(snapshot.data!);
+ return sduiWidget.toFlutterWidget();
+ } else {
+ return const SizedBox.shrink();
+ }
+ },
+ );
+ }
+}
diff --git a/lib/src/service/sdui_grpc_client.dart b/lib/src/service/sdui_grpc_client.dart
new file mode 100644
index 0000000..f5e1200
--- /dev/null
+++ b/lib/src/service/sdui_grpc_client.dart
@@ -0,0 +1,38 @@
+import 'package:grpc/grpc.dart';
+import 'package:flutter_sdui/src/generated/sdui.pbgrpc.dart';
+
+/// A client for the SDUI gRPC service.
+class SduiGrpcClient {
+ late final SduiServiceClient _client;
+ late final ClientChannel _channel;
+
+ /// Creates a new SDUI gRPC client.
+ SduiGrpcClient({
+ required String host,
+ required int port,
+ bool secure = false,
+ }) {
+ _channel = ClientChannel(
+ host,
+ port: port,
+ options: ChannelOptions(
+ credentials: secure
+ ? const ChannelCredentials.secure()
+ : const ChannelCredentials.insecure(),
+ ),
+ );
+
+ _client = SduiServiceClient(_channel);
+ }
+
+ /// Fetches a UI widget from the server.
+ Future getWidget(String screenId) async {
+ final request = SduiRequest()..screenId = screenId;
+ return _client.getSduiWidget(request);
+ }
+
+ /// Closes the connection to the server.
+ Future dispose() async {
+ await _channel.shutdown();
+ }
+}
diff --git a/lib/src/widgets/sdui_column.dart b/lib/src/widgets/sdui_column.dart
new file mode 100644
index 0000000..11769e2
--- /dev/null
+++ b/lib/src/widgets/sdui_column.dart
@@ -0,0 +1,17 @@
+import 'package:flutter/widgets.dart';
+import 'package:flutter_sdui/src/widgets/sdui_widget.dart';
+
+/// Represents a Column widget in SDUI.
+class SduiColumn extends SduiWidget {
+ final List children;
+ // Add other properties like mainAxisAlignment, crossAxisAlignment etc. as needed
+
+ SduiColumn({required this.children});
+
+ @override
+ Widget toFlutterWidget() {
+ return Column(
+ children: children.map((child) => child.toFlutterWidget()).toList(),
+ );
+ }
+}
diff --git a/lib/src/widgets/sdui_container.dart b/lib/src/widgets/sdui_container.dart
new file mode 100644
index 0000000..167f21e
--- /dev/null
+++ b/lib/src/widgets/sdui_container.dart
@@ -0,0 +1,31 @@
+import 'package:flutter/widgets.dart';
+import 'package:flutter_sdui/src/widgets/sdui_widget.dart';
+
+/// Represents a Container widget in SDUI.
+class SduiContainer extends SduiWidget {
+ final SduiWidget? child;
+ final EdgeInsets? padding;
+ final BoxDecoration? decoration; // Handles color, borderRadius, border, etc.
+ final double? width;
+ final double? height;
+ // Add other properties like margin, alignment etc.
+
+ SduiContainer({
+ this.child,
+ this.padding,
+ this.decoration,
+ this.width,
+ this.height,
+ });
+
+ @override
+ Widget toFlutterWidget() {
+ return Container(
+ padding: padding,
+ decoration: decoration,
+ width: width,
+ height: height,
+ child: child?.toFlutterWidget(),
+ );
+ }
+}
diff --git a/lib/src/widgets/sdui_icon.dart b/lib/src/widgets/sdui_icon.dart
new file mode 100644
index 0000000..8fc0626
--- /dev/null
+++ b/lib/src/widgets/sdui_icon.dart
@@ -0,0 +1,31 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_sdui/src/widgets/sdui_widget.dart';
+
+/// Represents an Icon widget in SDUI.
+class SduiIcon extends SduiWidget {
+ final IconData? icon;
+ final double? size;
+ final Color? color;
+ // final String? semanticLabel; // Future enhancement
+
+ SduiIcon({
+ required this.icon,
+ this.size,
+ this.color,
+ // this.semanticLabel,
+ });
+
+ @override
+ Widget toFlutterWidget() {
+ if (icon == null) {
+ // Return a placeholder or an empty widget if icon data is missing
+ return const SizedBox.shrink();
+ }
+ return Icon(
+ icon,
+ size: size,
+ color: color,
+ // semanticLabel: semanticLabel,
+ );
+ }
+}
diff --git a/lib/src/widgets/sdui_image.dart b/lib/src/widgets/sdui_image.dart
new file mode 100644
index 0000000..83dfd3e
--- /dev/null
+++ b/lib/src/widgets/sdui_image.dart
@@ -0,0 +1,26 @@
+import 'package:flutter/widgets.dart';
+import 'package:flutter_sdui/src/widgets/sdui_widget.dart';
+
+/// Represents an Image widget in SDUI.
+class SduiImage extends SduiWidget {
+ final String src; // Network URL
+ final double? width;
+ final double? height;
+ final BoxFit? fit;
+
+ SduiImage(this.src, {this.width, this.height, this.fit});
+
+ @override
+ Widget toFlutterWidget() {
+ // Only network images are supported as per the new requirement.
+ if (src.startsWith('http')) {
+ return Image.network(src, width: width, height: height, fit: fit);
+ } else {
+ // Optionally, return a placeholder or throw an error for non-network images.
+ // For now, returning an empty SizedBox.
+ print(
+ "Warning: SduiImage currently only supports network images. Provided src: $src");
+ return const SizedBox.shrink();
+ }
+ }
+}
diff --git a/lib/src/widgets/sdui_row.dart b/lib/src/widgets/sdui_row.dart
new file mode 100644
index 0000000..43f4799
--- /dev/null
+++ b/lib/src/widgets/sdui_row.dart
@@ -0,0 +1,17 @@
+import 'package:flutter/widgets.dart';
+import 'package:flutter_sdui/src/widgets/sdui_widget.dart';
+
+/// Represents a Row widget in SDUI.
+class SduiRow extends SduiWidget {
+ final List children;
+ // Add other properties like mainAxisAlignment, crossAxisAlignment etc. as needed
+
+ SduiRow({required this.children});
+
+ @override
+ Widget toFlutterWidget() {
+ return Row(
+ children: children.map((child) => child.toFlutterWidget()).toList(),
+ );
+ }
+}
diff --git a/lib/src/widgets/sdui_scaffold.dart b/lib/src/widgets/sdui_scaffold.dart
new file mode 100644
index 0000000..c3e7b6f
--- /dev/null
+++ b/lib/src/widgets/sdui_scaffold.dart
@@ -0,0 +1,47 @@
+import 'package:flutter/material.dart'; // Scaffold is in material.dart
+import 'package:flutter_sdui/src/widgets/sdui_widget.dart';
+
+/// Represents a Scaffold widget in SDUI.
+class SduiScaffold extends SduiWidget {
+ final SduiWidget? appBar;
+ final SduiWidget? body;
+ final SduiWidget? floatingActionButton;
+ final Color? backgroundColor;
+ // Add other Scaffold properties as needed (e.g., bottomNavigationBar, drawer)
+
+ SduiScaffold({
+ this.appBar,
+ this.body,
+ this.floatingActionButton,
+ this.backgroundColor,
+ });
+
+ @override
+ Widget toFlutterWidget() {
+ Widget? flutterAppBar;
+ if (appBar != null) {
+ // Attempt to cast to PreferredSizeWidget. This assumes the SDUI appBar resolves to something like AppBar.
+ // More robust handling might be needed if it can be any widget.
+ // For now, we expect it to be a widget that can be an AppBar (e.g. SduiContainer styled as an AppBar)
+ // or a custom SduiAppBar widget if we introduce one.
+ var potentialAppBar = appBar!.toFlutterWidget();
+ if (potentialAppBar is PreferredSizeWidget) {
+ flutterAppBar = potentialAppBar;
+ } else {
+ // If it's not a PreferredSizeWidget, wrap it in one if possible or log a warning.
+ // For simplicity, we are strict for now. Consider a SduiAppBar sdui widget for proper typing.
+ print(
+ "Warning: appBar widget for SduiScaffold is not a PreferredSizeWidget. It might not render correctly.");
+ // As a fallback, one might wrap it in a simple PreferredSize if it has a defined height.
+ // flutterAppBar = PreferredSize(child: potentialAppBar, preferredSize: Size.fromHeight(kToolbarHeight));
+ }
+ }
+
+ return Scaffold(
+ appBar: flutterAppBar as PreferredSizeWidget?,
+ body: body?.toFlutterWidget(),
+ floatingActionButton: floatingActionButton?.toFlutterWidget(),
+ backgroundColor: backgroundColor,
+ );
+ }
+}
diff --git a/lib/src/widgets/sdui_sized_box.dart b/lib/src/widgets/sdui_sized_box.dart
new file mode 100644
index 0000000..3feb28e
--- /dev/null
+++ b/lib/src/widgets/sdui_sized_box.dart
@@ -0,0 +1,20 @@
+import 'package:flutter/widgets.dart';
+import 'package:flutter_sdui/src/widgets/sdui_widget.dart';
+
+/// Represents a SizedBox widget in SDUI.
+class SduiSizedBox extends SduiWidget {
+ final double? width;
+ final double? height;
+ final SduiWidget? child;
+
+ SduiSizedBox({this.width, this.height, this.child});
+
+ @override
+ Widget toFlutterWidget() {
+ return SizedBox(
+ width: width,
+ height: height,
+ child: child?.toFlutterWidget(),
+ );
+ }
+}
diff --git a/lib/src/widgets/sdui_spacer.dart b/lib/src/widgets/sdui_spacer.dart
new file mode 100644
index 0000000..4095f41
--- /dev/null
+++ b/lib/src/widgets/sdui_spacer.dart
@@ -0,0 +1,14 @@
+import 'package:flutter/widgets.dart';
+import 'package:flutter_sdui/src/widgets/sdui_widget.dart';
+
+/// Represents a Spacer widget in SDUI.
+class SduiSpacer extends SduiWidget {
+ final int flex;
+
+ SduiSpacer({this.flex = 1});
+
+ @override
+ Widget toFlutterWidget() {
+ return Spacer(flex: flex);
+ }
+}
diff --git a/lib/src/widgets/sdui_text.dart b/lib/src/widgets/sdui_text.dart
new file mode 100644
index 0000000..4838814
--- /dev/null
+++ b/lib/src/widgets/sdui_text.dart
@@ -0,0 +1,15 @@
+import 'package:flutter/widgets.dart';
+import 'package:flutter_sdui/src/widgets/sdui_widget.dart';
+
+/// Represents a Text widget in SDUI.
+class SduiText extends SduiWidget {
+ final String text;
+ final TextStyle? style;
+
+ SduiText(this.text, {this.style});
+
+ @override
+ Widget toFlutterWidget() {
+ return Text(text, style: style);
+ }
+}
diff --git a/lib/src/widgets/sdui_widget.dart b/lib/src/widgets/sdui_widget.dart
new file mode 100644
index 0000000..2b01502
--- /dev/null
+++ b/lib/src/widgets/sdui_widget.dart
@@ -0,0 +1,6 @@
+import 'package:flutter/widgets.dart';
+
+/// Abstract class for all SDUI widgets.
+abstract class SduiWidget {
+ Widget toFlutterWidget();
+}
diff --git a/pubspec.yaml b/pubspec.yaml
index e5be782..fe72900 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,54 +1,58 @@
name: flutter_sdui
-description: "A new Flutter package project."
+description: "A Flutter package to render server driven UI."
version: 0.0.1
-homepage:
+# homepage:
environment:
- sdk: ^3.6.0
- flutter: ">=1.17.0"
+ sdk: ">=3.0.0 <4.0.0"
+ flutter: ">=3.0.0"
dependencies:
flutter:
sdk: flutter
+ protobuf: ^4.1.0 # For Protobuf support
+ grpc: ^4.0.4 # For gRPC support
+ # http: ^1.0.0 # Already implicitly available via flutter, but good to be explicit if direct http calls are made for JSON
dev_dependencies:
flutter_test:
sdk: flutter
- flutter_lints: ^5.0.0
-
+ flutter_lints: ^5.0.0 # Keep existing lints
+ build_runner: ^2.0.0 # For code generation
+ protoc_plugin: ^22.2.0 # For Protobuf and gRPC code generation
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter packages.
-flutter:
+# flutter:
- # To add assets to your package, add an assets section, like this:
- # assets:
- # - images/a_dot_burr.jpeg
- # - images/a_dot_ham.jpeg
- #
- # For details regarding assets in packages, see
- # https://flutter.dev/to/asset-from-package
- #
- # An image asset can refer to one or more resolution-specific "variants", see
- # https://flutter.dev/to/resolution-aware-images
+# To add assets to your package, add an assets section, like this:
+# assets:
+# - images/a_dot_burr.jpeg
+# - images/a_dot_ham.jpeg
+#
+# For details regarding assets in packages, see
+# https://flutter.dev/to/asset-from-package
+#
+# An image asset can refer to one or more resolution-specific "variants", see
+# https://flutter.dev/to/resolution-aware-images
- # To add custom fonts to your package, add a fonts section here,
- # in this "flutter" section. Each entry in this list should have a
- # "family" key with the font family name, and a "fonts" key with a
- # list giving the asset and other descriptors for the font. For
- # example:
- # fonts:
- # - family: Schyler
- # fonts:
- # - asset: fonts/Schyler-Regular.ttf
- # - asset: fonts/Schyler-Italic.ttf
- # style: italic
- # - family: Trajan Pro
- # fonts:
- # - asset: fonts/TrajanPro.ttf
- # - asset: fonts/TrajanPro_Bold.ttf
- # weight: 700
- #
- # For details regarding fonts in packages, see
- # https://flutter.dev/to/font-from-package
+# To add custom fonts to your package, add a fonts section here,
+# in this "flutter" section. Each entry in this list should have a
+# "family" key with the font family name, and a "fonts" key with a
+# list giving the asset and other descriptors for the font. For
+# example:
+# fonts:
+# - family: Schyler
+# fonts:
+# - asset: fonts/Schyler-Regular.ttf
+# - asset: fonts/Schyler-Italic.ttf
+# style: italic
+# - family: Trajan Pro
+# fonts:
+# - asset: fonts/TrajanPro.ttf
+# - asset: fonts/TrajanPro_Bold.ttf
+# weight: 700
+#
+# For details regarding fonts in packages, see
+# https://flutter.dev/to/font-from-package
diff --git a/test/flutter_sdui_test.dart b/test/flutter_sdui_test.dart
index 5afd4bf..2cd63e6 100644
--- a/test/flutter_sdui_test.dart
+++ b/test/flutter_sdui_test.dart
@@ -1,12 +1,12 @@
-import 'package:flutter_test/flutter_test.dart';
+// import 'package:flutter_test/flutter_test.dart';
-import 'package:flutter_sdui/flutter_sdui.dart';
+// import 'package:flutter_sdui/flutter_sdui.dart';
-void main() {
- test('adds one to input values', () {
- final calculator = Calculator();
- expect(calculator.addOne(2), 3);
- expect(calculator.addOne(-7), -6);
- expect(calculator.addOne(0), 1);
- });
-}
+// void main() {
+// test('adds one to input values', () {
+// final calculator = Calculator();
+// expect(calculator.addOne(2), 3);
+// expect(calculator.addOne(-7), -6);
+// expect(calculator.addOne(0), 1);
+// });
+// }
diff --git a/tool/generate_protos.ps1 b/tool/generate_protos.ps1
new file mode 100644
index 0000000..0e6ad00
--- /dev/null
+++ b/tool/generate_protos.ps1
@@ -0,0 +1,46 @@
+# Script to generate Dart files from Protobuf definitions
+# This script assumes you've run setup_protoc.ps1 first to install protoc locally
+
+# Ensure our local protoc binary is in the PATH
+$protoBinDir = "$PSScriptRoot\..\bin\bin"
+if (Test-Path $protoBinDir) {
+ $env:PATH = "$protoBinDir;$env:PATH"
+} else {
+ Write-Host "Local protoc not found. Run setup_protoc.ps1 first to install protoc." -ForegroundColor Yellow
+ exit 1
+}
+
+# Ensure the output directory exists
+New-Item -ItemType Directory -Force -Path "$PSScriptRoot\..\lib\src\generated" -ErrorAction SilentlyContinue | Out-Null
+
+Write-Host "Updating packages..."
+dart pub upgrade
+
+Write-Host "Clearing old generated files..."
+Remove-Item -Path "$PSScriptRoot\..\lib\src\generated\*" -Force -ErrorAction SilentlyContinue
+
+# Use the local pub cache protoc_plugin
+$PROTOC_GEN_DART = "$env:USERPROFILE\AppData\Local\Pub\Cache\bin\protoc-gen-dart.bat"
+if (-not (Test-Path $PROTOC_GEN_DART)) {
+ Write-Host "Installing protoc_plugin globally..."
+ dart pub global activate protoc_plugin
+}
+
+# Add the plugin to the PATH
+$env:PATH = "$env:PATH;$env:USERPROFILE\AppData\Local\Pub\Cache\bin"
+
+# For debugging
+Write-Host "Using protoc version: $(& $protoBinDir\protoc.exe --version)"
+Write-Host "Using protoc_plugin from: $PROTOC_GEN_DART"
+
+# Run protoc to generate Dart files with our local binary
+Write-Host "Generating Protobuf files..."
+& "$protoBinDir\protoc.exe" --dart_out=grpc:lib/src/generated --proto_path=lib/src/protos lib/src/protos/sdui.proto
+
+Write-Host "Protobuf files generated in lib/src/generated/"
+
+# Alternative approach using dart run build_runner
+Write-Host "Running build_runner as an alternative approach..."
+dart run build_runner build --delete-conflicting-outputs
+
+Write-Output "Protobuf files generated in lib/src/generated/"
diff --git a/tool/setup_protoc.ps1 b/tool/setup_protoc.ps1
new file mode 100644
index 0000000..2bb6ad0
--- /dev/null
+++ b/tool/setup_protoc.ps1
@@ -0,0 +1,32 @@
+# Setup protoc on Windows
+Write-Host "Setting up Protocol Buffers compiler (protoc)..."
+
+# Create a temporary directory for downloads
+$tempDir = "$env:TEMP\protoc_setup"
+New-Item -ItemType Directory -Force -Path $tempDir | Out-Null
+
+# Set the version and download URL for protoc
+$protocVersion = "24.4"
+$downloadUrl = "https://github.com/protocolbuffers/protobuf/releases/download/v$protocVersion/protoc-$protocVersion-win64.zip"
+$zipFile = "$tempDir\protoc.zip"
+
+# Create a directory for the protoc installation
+$protoBinDir = "$PSScriptRoot\..\bin"
+New-Item -ItemType Directory -Force -Path $protoBinDir | Out-Null
+
+Write-Host "Downloading protoc v$protocVersion..."
+Invoke-WebRequest -Uri $downloadUrl -OutFile $zipFile
+
+Write-Host "Extracting protoc..."
+Expand-Archive -Path $zipFile -DestinationPath $protoBinDir -Force
+
+Write-Host "Cleaning up..."
+Remove-Item -Path $tempDir -Recurse -Force
+
+# Update environment variable for this session
+$env:PATH = "$protoBinDir\bin;$env:PATH"
+
+Write-Host "protoc has been installed to $protoBinDir\bin"
+Write-Host "protoc version: $(& $protoBinDir\bin\protoc.exe --version)"
+Write-Host "Please add this directory to your PATH environment variable for future sessions."
+Write-Host "To use protoc in this terminal session, it's already added to PATH."
From 69d83c6576a6d3501169ac79a74b5167d3f29390 Mon Sep 17 00:00:00 2001
From: JothishKamal
Date: Wed, 28 May 2025 16:30:23 +0530
Subject: [PATCH 3/5] chore: update README.md
---
CHANGELOG.md | 11 +-
README.md | 347 +++++++++++++++++----------------------------------
2 files changed, 124 insertions(+), 234 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 41cc7d8..29a813e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,12 @@
+# Changelog
+
## 0.0.1
-* TODO: Describe initial release.
+### Added
+
+- Basic framework for Server-Driven UI implementation
+- Support for rendering UI from server-provided definitions
+- gRPC integration with Protocol Buffers
+- Core widget support (Text, Column, Row, Container, etc.)
+- Example application demonstrating gRPC usage
+- Setup scripts for Protocol Buffer compilation
diff --git a/README.md b/README.md
index 2879199..52a2153 100644
--- a/README.md
+++ b/README.md
@@ -6,35 +6,39 @@
A Flutter package for implementing Server-Driven UI with both JSON and gRPC support
----
-
[](https://dsc.community.dev/vellore-institute-of-technology/)
[](https://discord.gg/498KVdSKWR)
-
[](docs/grpc_support.md)
[](https://flutter.dev)
-## Features
+A powerful Flutter package for implementing Server-Driven UI (SDUI) with both JSON and gRPC support.
+
+## What is SDUI?
-- [x] Render UI from server-provided definitions
-- [x] Support for basic Flutter widgets (Text, Column, Row, Container, etc.)
-- [x] JSON parsing for server responses
-- [x] gRPC support for efficient communication
-- [x] Protocol Buffers for type-safe data exchange
-- [x] Easy-to-use client API
+Server-Driven UI is an architectural pattern where the UI layout and content definitions come from a backend server rather than being hardcoded in the client application. This approach enables:
+
+- Dynamic UI updates without app store releases
+- A/B testing and feature flagging at the UI level
+- Consistent UI across platforms
+- Faster iteration cycles for UI changes
+
+## Features
-
+- ✅ Render UI dynamically from server-provided definitions
+- ✅ Support for essential Flutter widgets (Text, Column, Row, Container, etc.)
+- ✅ JSON parsing for server responses
+- ✅ gRPC support for efficient, type-safe communication
+- ✅ Protocol Buffers for structured data exchange
+- ✅ Easy-to-use client API
+- ✅ Customizable error handling and loading states
-## Installation & Setup
+## Installation
Add the package to your `pubspec.yaml`:
```yaml
dependencies:
flutter_sdui: ^0.0.1
- flutter: ^3.0.0
- protobuf: ^4.1.0
- grpc: ^4.0.4
```
Or use the Flutter CLI:
@@ -43,40 +47,45 @@ Or use the Flutter CLI:
flutter pub add flutter_sdui
```
-Then import the package in your Dart code:
+Import the package in your Dart code:
```dart
import 'package:flutter_sdui/flutter_sdui.dart';
```
-### Troubleshooting
+## Basic Usage
-#### Protocol Buffer Issues
+This package provides two approaches for implementing server-driven UI:
-If you encounter issues with the generated Protocol Buffer files:
+### 1. Using gRPC (Recommended)
-1. Make sure you have the correct versions of protobuf and grpc packages
-2. Install protoc locally and regenerate the files:
+For efficient, type-safe server communication:
-```powershell
-# Run the setup script to install protoc
-pwsh ./tool/setup_protoc.ps1
-
-# Generate the Protobuf files
-pwsh ./tool/generate_protos.ps1
+```dart
+// Create a gRPC client
+final client = SduiGrpcClient(
+ host: 'your-server.com',
+ port: 50051,
+);
+
+// Use the SduiGrpcRenderer widget
+SduiGrpcRenderer(
+ client: client,
+ screenId: 'home_screen',
+ loadingWidget: CircularProgressIndicator(),
+ errorBuilder: (context, error) => Text('Error: $error'),
+)
```
-## Usage
-There are two ways to use this package:
+### 2. Using JSON
-1. **JSON-based approach**: For simpler implementations where you fetch UI definitions as JSON
-2. **gRPC-based approach**: For more efficient, type-safe implementations using Protocol Buffers
+For simpler implementation with standard HTTP requests (coming soon).
-### Using the gRPC Client
+## Example
-To use the gRPC client for fetching server-driven UI:
+Here's a complete example of using the gRPC renderer:
-````dart
+```dart
import 'package:flutter/material.dart';
import 'package:flutter_sdui/flutter_sdui.dart';
@@ -90,40 +99,38 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
- title: 'SDUI gRPC Demo',
+ title: 'SDUI Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.blue),
useMaterial3: true,
),
- home: const GrpcDemoScreen(),
+ home: const SDUIDemo(),
);
}
}
-class GrpcDemoScreen extends StatefulWidget {
- const GrpcDemoScreen({super.key});
+class SDUIDemo extends StatefulWidget {
+ const SDUIDemo({super.key});
@override
- State createState() => _GrpcDemoScreenState();
+ State createState() => _SDUIDemoState();
}
-class _GrpcDemoScreenState extends State {
+class _SDUIDemoState extends State {
late SduiGrpcClient _grpcClient;
String _screenId = 'home';
@override
void initState() {
super.initState();
- // Connect to your gRPC server
_grpcClient = SduiGrpcClient(
- host: 'localhost', // Replace with your server address
- port: 50051, // Replace with your server port
+ host: 'localhost', // Replace with your server address
+ port: 50051, // Replace with your server port
);
}
@override
void dispose() {
- // Close the gRPC connection when done
_grpcClient.dispose();
super.dispose();
}
@@ -132,77 +139,44 @@ class _GrpcDemoScreenState extends State {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
- title: const Text('SDUI gRPC Demo'),
+ title: const Text('Server-Driven UI Demo'),
),
- body: Column(
- children: [
- // Screen selector
- Padding(
- padding: const EdgeInsets.all(8.0),
- child: Row(
+ body: SduiGrpcRenderer(
+ client: _grpcClient,
+ screenId: _screenId,
+ loadingWidget: const Center(
+ child: CircularProgressIndicator(),
+ ),
+ errorBuilder: (context, error) {
+ return Center(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
children: [
- const Text('Screen: '),
- const SizedBox(width: 8),
- DropdownButton(
- value: _screenId,
- items: const [
- DropdownMenuItem(value: 'home', child: Text('Home')),
- DropdownMenuItem(value: 'profile', child: Text('Profile')),
- DropdownMenuItem(value: 'settings', child: Text('Settings')),
- ],
- onChanged: (value) {
- if (value != null) {
- setState(() {
- _screenId = value;
- });
- }
- },
+ Icon(Icons.error, color: Colors.red, size: 48),
+ SizedBox(height: 16),
+ Text('Error: $error'),
+ SizedBox(height: 16),
+ ElevatedButton(
+ onPressed: () => setState(() {}),
+ child: Text('Retry'),
),
],
),
- ),
-
- // SDUI Renderer that fetches UI from gRPC server
- Expanded(
- child: SduiGrpcRenderer(
- client: _grpcClient,
- screenId: _screenId,
- loadingWidget: const Center(
- child: CircularProgressIndicator(),
- ),
- errorBuilder: (context, error) {
- return Center(
- child: Column(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- const Icon(Icons.error, color: Colors.red, size: 48),
- const SizedBox(height: 16),
- Text('Error: $error'),
- const SizedBox(height: 16),
- ElevatedButton(
- onPressed: () => setState(() {}),
- child: const Text('Retry'),
- ),
- ],
- ),
- );
- },
- ),
- ),
- ],
+ );
+ },
),
);
}
}
+```
## Server Implementation
### Setting Up a gRPC Server
-To create a server that provides UI definitions via gRPC:
+Here's a basic example of a Dart server that provides UI definitions via gRPC:
```dart
-// Server implementation example
import 'package:grpc/grpc.dart';
import 'package:flutter_sdui/src/generated/sdui.pb.dart';
import 'package:flutter_sdui/src/generated/sdui.pbgrpc.dart';
@@ -214,62 +188,26 @@ Future main() async {
],
);
- final port = 50051;
- await server.serve(port: port);
- print('Server listening on port $port...');
- print('Press Ctrl+C to stop');
+ await server.serve(port: 50051);
+ print('Server listening on port 50051...');
}
-// Implementation of the SDUI service
class SduiServiceImpl extends SduiServiceBase {
@override
Future getSduiWidget(
ServiceCall call, SduiRequest request) async {
- print('Received request for screen: ${request.screenId}');
-
- // Based on the requested screen, return different UI definitions
+ // Return different UI based on the screenId
switch (request.screenId) {
case 'home':
return _createHomeScreen();
- case 'profile':
- return _createProfileScreen();
- case 'settings':
- return _createSettingsScreen();
default:
- // Default or error screen
- print('Warning: Unknown screen ID requested: ${request.screenId}');
return _createErrorScreen();
}
}
- // Example screen definition
SduiWidgetData _createHomeScreen() {
- final homeScreen = SduiWidgetData()
+ return SduiWidgetData()
..type = WidgetType.SCAFFOLD
- ..appBar = (SduiWidgetData()
- ..type = WidgetType.CONTAINER
- ..boxDecoration = (BoxDecorationData()
- ..color = (ColorData()
- ..red = 25
- ..green = 118
- ..blue = 210
- ..alpha = 255))
- ..padding = (EdgeInsetsData()
- ..top = 8
- ..left = 16
- ..right = 16
- ..bottom = 8)
- ..child = (SduiWidgetData()
- ..type = WidgetType.TEXT
- ..stringAttributes['text'] = 'Home Screen'
- ..textStyle = (TextStyleData()
- ..fontSize = 20
- ..fontWeight = 'bold'
- ..color = (ColorData()
- ..red = 255
- ..green = 255
- ..blue = 255
- ..alpha = 255))))
..body = (SduiWidgetData()
..type = WidgetType.COLUMN
..children.addAll([
@@ -286,141 +224,84 @@ class SduiServiceImpl extends SduiServiceBase {
..type = WidgetType.TEXT
..stringAttributes['text'] = 'This UI is rendered from gRPC data'
]));
-
- return homeScreen;
}
-
- // Implement other screen methods similarly...
}
-````
-
-### Testing the gRPC Connection
-
-You can test the connection using a simple command-line client:
-
-```dart
-// Simple client for testing gRPC connection
-import 'dart:io';
-import 'package:flutter_sdui/src/service/sdui_grpc_client.dart';
-
-Future main(List args) async {
- final screenId = args.isNotEmpty ? args[0] : 'home';
-
- print('Testing gRPC SDUI client...');
- print('Connecting to server at localhost:50051');
- print('Requesting screen: $screenId');
-
- final client = SduiGrpcClient(
- host: 'localhost',
- port: 50051,
- );
+```
- try {
- print('Sending request...');
- final widget = await client.getWidget(screenId);
- print('Response received!');
- print('Widget type: ${widget.type}');
+## Supported Widgets
- if (widget.hasAppBar()) {
- print('Has app bar: yes');
- }
+The package currently supports these Flutter widgets:
- if (widget.hasBody()) {
- print('Has body: yes');
- }
-
- print('Success!');
- } catch (e) {
- print('Error: $e');
- } finally {
- await client.dispose();
- }
-
- print('Test completed');
- exit(0);
-}
-```
+- `Scaffold`
+- `Container`
+- `Column`
+- `Row`
+- `Text`
+- `Image`
+- `SizedBox`
+- `Spacer`
+- `Icon`
## Advanced Usage
### Protobuf Definitions
-The package uses Protocol Buffers to define the data structures for gRPC communication. The main message types are:
+The package uses Protocol Buffers to define the data structures for gRPC communication. Here's a simplified version of the main message types:
```protobuf
-// Generic Widget message
message SduiWidgetData {
WidgetType type = 1;
- map string_attributes = 2; // For simple string attributes like text content, image src
- map double_attributes = 3; // For numerical attributes like width, height, flex
- map bool_attributes = 4; // For boolean attributes
- map int_attributes = 5; // For integer attributes like flex
+ map string_attributes = 2;
+ map double_attributes = 3;
+ map bool_attributes = 4;
// Complex nested attributes
TextStyleData text_style = 6;
EdgeInsetsData padding = 7;
- EdgeInsetsData margin = 8;
- ColorData color = 9;
- IconDataMessage icon = 10;
- BoxDecorationData box_decoration = 11;
// Children widgets
repeated SduiWidgetData children = 12;
- SduiWidgetData child = 13; // For widgets that take a single child
+ SduiWidgetData child = 13;
// Scaffold specific parts
SduiWidgetData app_bar = 14;
SduiWidgetData body = 15;
- SduiWidgetData floating_action_button = 16;
- ColorData background_color = 17;
}
-// Service definition
service SduiService {
rpc GetSduiWidget (SduiRequest) returns (SduiWidgetData);
}
-
-message SduiRequest {
- string screen_id = 1; // Identifier for which UI to fetch
-}
```
-### Custom Widget Support
+### Working with Protocol Buffers
-The package supports various Flutter widgets out of the box, but you can also extend it to support custom widgets by:
+If you need to regenerate the Dart files from the proto definitions:
-1. Adding new widget types to the `WidgetType` enum in the proto file
-2. Extending the `SduiProtoParser` class to handle the new widget type
+1. Install the Protocol Buffer compiler using the provided scripts:
-```dart
-// Extend the parser to support custom widgets
-class MySduiProtoParser extends SduiProtoParser {
- @override
- SduiWidget parseProto(SduiWidgetData data) {
- if (data.type == WidgetType.MY_CUSTOM_WIDGET) {
- // Parse custom widget from proto data
- return MyCustomSduiWidget(
- // Extract attributes from data
- );
- }
+```bash
+# Windows
+pwsh ./tool/setup_protoc.ps1
- // Fall back to parent implementation for standard widgets
- return super.parseProto(data);
- }
-}
+# Generate the Protobuf files
+pwsh ./tool/generate_protos.ps1
```
-### Regenerating Proto Files
+## Roadmap
-If you modify the proto definitions, you need to regenerate the Dart files:
+- [x] Basic widget support
+- [x] gRPC implementation
+- [ ] JSON implementation
+- [ ] Interactive widgets (buttons, forms)
+- [ ] More advanced widget support
-1. Install the Protocol Buffer compiler (protoc)
-2. Run the generator script:
+## Contributing
-```bash
-cd your_package_directory
-pwsh ./tool/generate_protos.ps1
-```
+We welcome contributions! Please see our [contributing guidelines](contributing.md) for details.
+
+## License
+
+This project is licensed under the [LICENSE](LICENSE) file in the repository.
## Contributors
From 60ccb44ea29bcde795bf059237a95dd98ef48a9e Mon Sep 17 00:00:00 2001
From: JothishKamal
Date: Wed, 28 May 2025 16:33:47 +0530
Subject: [PATCH 4/5] chore: updated readme again
---
README.md | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
index 52a2153..731d0b2 100644
--- a/README.md
+++ b/README.md
@@ -24,13 +24,13 @@ Server-Driven UI is an architectural pattern where the UI layout and content def
## Features
-- ✅ Render UI dynamically from server-provided definitions
-- ✅ Support for essential Flutter widgets (Text, Column, Row, Container, etc.)
-- ✅ JSON parsing for server responses
-- ✅ gRPC support for efficient, type-safe communication
-- ✅ Protocol Buffers for structured data exchange
-- ✅ Easy-to-use client API
-- ✅ Customizable error handling and loading states
+- [x] Render UI dynamically from server-provided definitions
+- [x] Support for essential Flutter widgets (Text, Column, Row, Container, etc.)
+- [x] JSON parsing for server responses
+- [x] gRPC support for efficient, type-safe communication
+- [x] Protocol Buffers for structured data exchange
+- [x] Easy-to-use client API
+- [x] Customizable error handling and loading states
## Installation
@@ -41,6 +41,13 @@ dependencies:
flutter_sdui: ^0.0.1
```
+```yaml
+# For devs
+dependencies:
+ flutter_sdui:
+ path: path/to/flutter_sdui
+```
+
Or use the Flutter CLI:
```bash
From b8665c1a91c0bc45dd30f3dd78a4ab9ae00a9a48 Mon Sep 17 00:00:00 2001
From: JothishKamal
Date: Wed, 28 May 2025 21:56:56 +0530
Subject: [PATCH 5/5] feat: added functionality to protobuf def and parser
---
docs/doc.md | 467 ++++
lib/src/generated/sdui.pb.dart | 2589 +++++++++++++++++++---
lib/src/generated/sdui.pbenum.dart | 744 ++++++-
lib/src/generated/sdui.pbgrpc.dart | 20 +-
lib/src/generated/sdui.pbjson.dart | 1576 ++++++++++++-
lib/src/parser/sdui_proto_parser.dart | 618 +++++-
lib/src/protos/sdui.proto | 270 ++-
lib/src/renderer/sdui_grpc_renderer.dart | 3 +-
lib/src/widgets/sdui_column.dart | 23 +-
lib/src/widgets/sdui_container.dart | 24 +-
lib/src/widgets/sdui_icon.dart | 33 +-
lib/src/widgets/sdui_image.dart | 61 +-
lib/src/widgets/sdui_row.dart | 23 +-
lib/src/widgets/sdui_scaffold.dart | 40 +-
lib/src/widgets/sdui_text.dart | 53 +-
15 files changed, 6057 insertions(+), 487 deletions(-)
create mode 100644 docs/doc.md
diff --git a/docs/doc.md b/docs/doc.md
new file mode 100644
index 0000000..2b35aa4
--- /dev/null
+++ b/docs/doc.md
@@ -0,0 +1,467 @@
+# Comprehensive Guide to Creating Screens with Flutter SDUI and gRPC
+
+## Overview
+
+This guide explains how to create dynamic UI screens for Flutter applications using Server-Driven UI (SDUI) with gRPC. The SDUI approach allows you to define your user interface on the server and deliver it to the client app, enabling dynamic updates without requiring app releases.
+
+## Setup Requirements
+
+1. **Flutter application** with the `flutter_sdui` package
+2. **gRPC server** (can be implemented in any language that supports gRPC)
+3. **Proto definitions** from the SDUI package
+
+## Creating a gRPC Server
+
+### 1. Set Up Server Environment
+
+Example in Dart:
+```dart
+import 'package:grpc/grpc.dart';
+import 'package:flutter_sdui/src/generated/sdui.pbgrpc.dart';
+
+Future main() async {
+ final server = Server.create(
+ services: [
+ SduiServiceImpl(),
+ ],
+ );
+
+ final port = 50051;
+ await server.serve(port: port);
+ print('Server listening on port $port...');
+}
+```
+
+### 2. Implement the SDUI Service
+
+Create a class that implements the SDUI service from the protobuf definitions:
+
+```dart
+class SduiServiceImpl extends SduiServiceBase {
+ @override
+ Future getSduiWidget(
+ ServiceCall call, SduiRequest request) async {
+ // Return different UI based on the requested screen ID
+ switch (request.screenId) {
+ case 'home':
+ return _createHomeScreen();
+ case 'profile':
+ return _createProfileScreen();
+ // Add more screens as needed
+ default:
+ return _createErrorScreen();
+ }
+ }
+}
+```
+
+## Creating Screens
+
+### Basic Structure of a Screen
+
+Each screen is built as a tree of `SduiWidgetData` objects:
+
+```dart
+SduiWidgetData createScreen() {
+ final screen = SduiWidgetData()
+ ..type = WidgetType.SCAFFOLD
+ ..appBar = (SduiWidgetData()
+ ..type = WidgetType.CONTAINER
+ // Define appBar properties
+ ..child = (SduiWidgetData()
+ ..type = WidgetType.TEXT
+ ..stringAttributes['text'] = 'Screen Title'))
+ ..body = (SduiWidgetData()
+ ..type = WidgetType.COLUMN
+ ..children.addAll([
+ // Add child widgets here
+ ]));
+
+ return screen;
+}
+```
+
+### Common Widget Types
+
+#### Scaffold
+The root container for a screen:
+```dart
+SduiWidgetData()
+ ..type = WidgetType.SCAFFOLD
+ ..backgroundColor = (ColorData()
+ ..red = 255
+ ..green = 255
+ ..blue = 255
+ ..alpha = 255)
+ ..appBar = (SduiWidgetData()...)
+ ..body = (SduiWidgetData()...)
+```
+
+#### Container
+A box that can have decoration, padding, margin:
+```dart
+SduiWidgetData()
+ ..type = WidgetType.CONTAINER
+ ..padding = (EdgeInsetsData()..all = 16)
+ ..margin = (EdgeInsetsData()
+ ..top = 8
+ ..left = 16
+ ..right = 16)
+ ..boxDecoration = (BoxDecorationData()
+ ..color = (ColorData()
+ ..red = 240
+ ..green = 240
+ ..blue = 240
+ ..alpha = 255)
+ ..borderRadius = (BorderRadiusData()..all = 8))
+ ..child = (SduiWidgetData()...)
+```
+
+#### Text
+Display text with styling:
+```dart
+SduiWidgetData()
+ ..type = WidgetType.TEXT
+ ..stringAttributes['text'] = 'Hello World'
+ ..textStyle = (TextStyleData()
+ ..fontSize = 16
+ ..fontWeight = 'bold'
+ ..color = (ColorData()
+ ..red = 0
+ ..green = 0
+ ..blue = 0
+ ..alpha = 255))
+```
+
+#### Column and Row
+Layout widgets for vertical and horizontal arrangement:
+```dart
+SduiWidgetData()
+ ..type = WidgetType.COLUMN // or WidgetType.ROW
+ ..mainAxisAlignment = MainAxisAlignmentProto.MAIN_AXIS_CENTER
+ ..crossAxisAlignment = CrossAxisAlignmentProto.CROSS_AXIS_START
+ ..children.addAll([
+ // Child widgets
+ ])
+```
+
+#### Image
+Display network images:
+```dart
+SduiWidgetData()
+ ..type = WidgetType.IMAGE
+ ..stringAttributes['src'] = 'https://example.com/image.jpg'
+ ..stringAttributes['fit'] = 'cover'
+ ..doubleAttributes['width'] = 200
+ ..doubleAttributes['height'] = 150
+```
+
+#### Icon
+Display Material icons:
+```dart
+SduiWidgetData()
+ ..type = WidgetType.ICON
+ ..icon = (IconDataMessage()
+ ..name = 'home' // Material icon name
+ ..color = (ColorData()
+ ..red = 0
+ ..green = 0
+ ..blue = 0
+ ..alpha = 255)
+ ..size = 24)
+```
+
+### Advanced Styling
+
+#### Gradients
+```dart
+..boxDecoration = (BoxDecorationData()
+ ..gradient = (GradientData()
+ ..type = GradientData_GradientType.LINEAR
+ ..colors.addAll([
+ ColorData()
+ ..red = 25
+ ..green = 118
+ ..blue = 210
+ ..alpha = 255,
+ ColorData()
+ ..red = 66
+ ..green = 165
+ ..blue = 245
+ ..alpha = 255
+ ])
+ ..begin = (AlignmentData()
+ ..predefined = AlignmentData_PredefinedAlignment.TOP_LEFT)
+ ..end = (AlignmentData()
+ ..predefined = AlignmentData_PredefinedAlignment.BOTTOM_RIGHT)))
+```
+
+#### Shadows
+```dart
+..boxDecoration = (BoxDecorationData()
+ ..boxShadow.add(BoxShadowData()
+ ..color = (ColorData()
+ ..red = 0
+ ..green = 0
+ ..blue = 0
+ ..alpha = 50)
+ ..offsetX = 0
+ ..offsetY = 2
+ ..blurRadius = 4
+ ..spreadRadius = 0))
+```
+
+#### Transforms
+```dart
+..transform = (TransformData()
+ ..type = TransformData_TransformType.ROTATE
+ ..rotationAngle = 0.05) // In radians
+```
+
+## Example Screens
+
+### Home Screen with Card Layout
+```dart
+SduiWidgetData _createHomeScreen() {
+ final homeScreen = SduiWidgetData()
+ ..type = WidgetType.SCAFFOLD
+ ..appBar = (SduiWidgetData()
+ ..type = WidgetType.CONTAINER
+ ..boxDecoration = (BoxDecorationData()
+ ..color = (ColorData()
+ ..red = 25
+ ..green = 118
+ ..blue = 210
+ ..alpha = 255))
+ ..padding = (EdgeInsetsData()
+ ..top = 8
+ ..left = 16
+ ..right = 16
+ ..bottom = 8)
+ ..child = (SduiWidgetData()
+ ..type = WidgetType.TEXT
+ ..stringAttributes['text'] = 'Home Screen'
+ ..textStyle = (TextStyleData()
+ ..fontSize = 20
+ ..fontWeight = 'bold'
+ ..color = (ColorData()
+ ..red = 255
+ ..green = 255
+ ..blue = 255
+ ..alpha = 255))))
+ ..body = (SduiWidgetData()
+ ..type = WidgetType.COLUMN
+ ..children.addAll([
+ // Hero Image
+ SduiWidgetData()
+ ..type = WidgetType.CONTAINER
+ ..doubleAttributes['height'] = 200
+ ..child = (SduiWidgetData()
+ ..type = WidgetType.IMAGE
+ ..stringAttributes['src'] = 'https://picsum.photos/800/300'
+ ..stringAttributes['fit'] = 'cover'),
+
+ // Feature card
+ SduiWidgetData()
+ ..type = WidgetType.CONTAINER
+ ..margin = (EdgeInsetsData()..all = 16)
+ ..padding = (EdgeInsetsData()..all = 16)
+ ..boxDecoration = (BoxDecorationData()
+ ..borderRadius = (BorderRadiusData()..all = 8)
+ ..color = (ColorData()
+ ..red = 240
+ ..green = 240
+ ..blue = 240
+ ..alpha = 255))
+ ..child = (SduiWidgetData()
+ ..type = WidgetType.COLUMN
+ ..children.addAll([
+ SduiWidgetData()
+ ..type = WidgetType.TEXT
+ ..stringAttributes['text'] = 'Feature Card'
+ ..textStyle = (TextStyleData()
+ ..fontSize = 18
+ ..fontWeight = 'bold'),
+ SduiWidgetData()
+ ..type = WidgetType.SIZED_BOX
+ ..doubleAttributes['height'] = 8,
+ SduiWidgetData()
+ ..type = WidgetType.TEXT
+ ..stringAttributes['text'] = 'This is a description of the feature'
+ ]))
+ ]));
+
+ return homeScreen;
+}
+```
+
+### Profile Screen with Avatar
+```dart
+SduiWidgetData _createProfileScreen() {
+ final profileScreen = SduiWidgetData()
+ ..type = WidgetType.SCAFFOLD
+ ..backgroundColor = (ColorData()
+ ..red = 245
+ ..green = 245
+ ..blue = 245
+ ..alpha = 255)
+ ..body = (SduiWidgetData()
+ ..type = WidgetType.COLUMN
+ ..children.addAll([
+ // Profile Header
+ SduiWidgetData()
+ ..type = WidgetType.CONTAINER
+ ..color = (ColorData()
+ ..red = 76
+ ..green = 175
+ ..blue = 80
+ ..alpha = 255)
+ ..padding = (EdgeInsetsData()
+ ..top = 40
+ ..bottom = 20)
+ ..child = (SduiWidgetData()
+ ..type = WidgetType.COLUMN
+ ..mainAxisAlignment = MainAxisAlignmentProto.MAIN_AXIS_CENTER
+ ..crossAxisAlignment = CrossAxisAlignmentProto.CROSS_AXIS_CENTER
+ ..children.addAll([
+ // Avatar
+ SduiWidgetData()
+ ..type = WidgetType.CONTAINER
+ ..doubleAttributes['width'] = 100
+ ..doubleAttributes['height'] = 100
+ ..boxDecoration = (BoxDecorationData()
+ ..shape = BoxShapeProto.CIRCLE
+ ..border = (BorderData()
+ ..all = (BorderSideData()
+ ..color = (ColorData()
+ ..red = 255
+ ..green = 255
+ ..blue = 255
+ ..alpha = 255)
+ ..width = 3
+ ..style = BorderStyleProto.SOLID)))
+ ..child = (SduiWidgetData()
+ ..type = WidgetType.IMAGE
+ ..stringAttributes['src'] = 'https://randomuser.me/api/portraits/women/44.jpg'
+ ..stringAttributes['fit'] = 'cover'),
+
+ // Name
+ SduiWidgetData()
+ ..type = WidgetType.SIZED_BOX
+ ..doubleAttributes['height'] = 16,
+ SduiWidgetData()
+ ..type = WidgetType.TEXT
+ ..stringAttributes['text'] = 'Sarah Johnson'
+ ..textStyle = (TextStyleData()
+ ..fontSize = 24
+ ..fontWeight = 'bold'
+ ..color = (ColorData()
+ ..red = 255
+ ..green = 255
+ ..blue = 255
+ ..alpha = 255))
+ ]))
+ ]));
+
+ return profileScreen;
+}
+```
+
+## Best Practices
+
+1. **Structure Your Code**
+ - Create helper methods for repeated UI patterns
+ - Break complex screens into logical sections
+
+2. **Handle Errors Gracefully**
+ - Always provide an error screen for unknown screen IDs
+ - Include helpful information in error screens
+
+3. **Optimize Network Usage**
+ - Keep UI definitions concise
+ - Consider caching common UI components
+
+4. **Progressive Enhancement**
+ - Start with simple layouts and add complexity gradually
+ - Test on different device sizes
+
+5. **Naming Conventions**
+ - Use clear, consistent naming for screen IDs
+ - Document the purpose of each screen
+
+## Advanced Techniques
+
+### Reusable Components
+
+Create helper methods for commonly used components:
+
+```dart
+SduiWidgetData _createSettingItem(String title, String subtitle, String iconName) {
+ return SduiWidgetData()
+ ..type = WidgetType.CONTAINER
+ ..padding = (EdgeInsetsData()
+ ..all = 12)
+ ..boxDecoration = (BoxDecorationData()
+ ..borderRadius = (BorderRadiusData()..all = 8)
+ ..color = (ColorData()
+ ..red = 255
+ ..green = 255
+ ..blue = 255
+ ..alpha = 255))
+ ..child = (SduiWidgetData()
+ ..type = WidgetType.ROW
+ ..children.addAll([
+ // Icon
+ SduiWidgetData()
+ ..type = WidgetType.ICON
+ ..icon = (IconDataMessage()
+ ..name = iconName),
+ // Content
+ SduiWidgetData()
+ ..type = WidgetType.COLUMN
+ ..children.addAll([
+ SduiWidgetData()
+ ..type = WidgetType.TEXT
+ ..stringAttributes['text'] = title,
+ SduiWidgetData()
+ ..type = WidgetType.TEXT
+ ..stringAttributes['text'] = subtitle
+ ])
+ ]));
+}
+```
+
+### Responsive Design
+
+Adjust layouts based on screen size:
+
+```dart
+// Check device width from client and adapt layout
+if (deviceWidth > 600) {
+ // Tablet layout with multi-column grid
+ return createTabletLayout();
+} else {
+ // Phone layout with single column
+ return createPhoneLayout();
+}
+```
+
+## Troubleshooting
+
+1. **Missing Properties**
+ - Ensure all required properties are set for each widget type
+ - Check for typos in property names
+
+2. **Enum Value Issues**
+ - Ensure you're using the correct enum values defined in the proto files
+ - Watch for renamed enum values to avoid conflicts
+
+3. **Nested Structure Problems**
+ - Verify that all parentheses and brackets are properly closed
+ - Maintain consistent indentation for readability
+
+4. **Type Mismatches**
+ - Double-check types for numeric values, especially when converting between int and double
+ - Ensure string attributes are used for text content
+
+By following this guide, you can create rich, dynamic UIs that are delivered from your server to Flutter clients via gRPC.
\ No newline at end of file
diff --git a/lib/src/generated/sdui.pb.dart b/lib/src/generated/sdui.pb.dart
index 10caa0e..cb01cf5 100644
--- a/lib/src/generated/sdui.pb.dart
+++ b/lib/src/generated/sdui.pb.dart
@@ -23,8 +23,10 @@ export 'sdui.pbenum.dart';
class SduiWidgetData extends $pb.GeneratedMessage {
factory SduiWidgetData({
WidgetType? type,
- $core.Iterable<$core.MapEntry<$core.String, $core.String>>? stringAttributes,
- $core.Iterable<$core.MapEntry<$core.String, $core.double>>? doubleAttributes,
+ $core.Iterable<$core.MapEntry<$core.String, $core.String>>?
+ stringAttributes,
+ $core.Iterable<$core.MapEntry<$core.String, $core.double>>?
+ doubleAttributes,
$core.Iterable<$core.MapEntry<$core.String, $core.bool>>? boolAttributes,
$core.Iterable<$core.MapEntry<$core.String, $core.int>>? intAttributes,
TextStyleData? textStyle,
@@ -39,6 +41,53 @@ class SduiWidgetData extends $pb.GeneratedMessage {
SduiWidgetData? body,
SduiWidgetData? floatingActionButton,
ColorData? backgroundColor,
+ SduiWidgetData? bottomNavigationBar,
+ SduiWidgetData? drawer,
+ SduiWidgetData? endDrawer,
+ SduiWidgetData? bottomSheet,
+ $core.bool? resizeToAvoidBottomInset,
+ $core.bool? primary,
+ FloatingActionButtonLocationProto? floatingActionButtonLocation,
+ $core.bool? extendBody,
+ $core.bool? extendBodyBehindAppBar,
+ ColorData? drawerScrimColor,
+ $core.double? drawerEdgeDragWidth,
+ $core.bool? drawerEnableOpenDragGesture,
+ $core.bool? endDrawerEnableOpenDragGesture,
+ MainAxisAlignmentProto? mainAxisAlignment,
+ CrossAxisAlignmentProto? crossAxisAlignment,
+ MainAxisSizeProto? mainAxisSize,
+ TextDirectionProto? textDirection,
+ VerticalDirectionProto? verticalDirection,
+ TextBaselineProto? textBaseline,
+ AlignmentData? alignment,
+ BoxConstraintsData? constraints,
+ TransformData? transform,
+ AlignmentData? transformAlignment,
+ ClipProto? clipBehavior,
+ TextAlignProto? textAlign,
+ TextOverflowProto? overflow,
+ $core.int? maxLines,
+ $core.bool? softWrap,
+ $core.double? letterSpacing,
+ $core.double? wordSpacing,
+ $core.double? height,
+ $core.String? fontFamily,
+ ImageRepeatProto? repeat,
+ BlendModeProto? colorBlendMode,
+ RectData? centerSlice,
+ $core.bool? matchTextDirection,
+ $core.bool? gaplessPlayback,
+ FilterQualityProto? filterQuality,
+ $core.int? cacheWidth,
+ $core.int? cacheHeight,
+ $core.double? scale,
+ $core.String? semanticLabel,
+ SduiWidgetData? errorWidget,
+ SduiWidgetData? loadingWidget,
+ $core.double? opacity,
+ $core.bool? applyTextScaling,
+ $core.Iterable? shadows,
}) {
final $result = create();
if (type != null) {
@@ -92,52 +141,359 @@ class SduiWidgetData extends $pb.GeneratedMessage {
if (backgroundColor != null) {
$result.backgroundColor = backgroundColor;
}
+ if (bottomNavigationBar != null) {
+ $result.bottomNavigationBar = bottomNavigationBar;
+ }
+ if (drawer != null) {
+ $result.drawer = drawer;
+ }
+ if (endDrawer != null) {
+ $result.endDrawer = endDrawer;
+ }
+ if (bottomSheet != null) {
+ $result.bottomSheet = bottomSheet;
+ }
+ if (resizeToAvoidBottomInset != null) {
+ $result.resizeToAvoidBottomInset = resizeToAvoidBottomInset;
+ }
+ if (primary != null) {
+ $result.primary = primary;
+ }
+ if (floatingActionButtonLocation != null) {
+ $result.floatingActionButtonLocation = floatingActionButtonLocation;
+ }
+ if (extendBody != null) {
+ $result.extendBody = extendBody;
+ }
+ if (extendBodyBehindAppBar != null) {
+ $result.extendBodyBehindAppBar = extendBodyBehindAppBar;
+ }
+ if (drawerScrimColor != null) {
+ $result.drawerScrimColor = drawerScrimColor;
+ }
+ if (drawerEdgeDragWidth != null) {
+ $result.drawerEdgeDragWidth = drawerEdgeDragWidth;
+ }
+ if (drawerEnableOpenDragGesture != null) {
+ $result.drawerEnableOpenDragGesture = drawerEnableOpenDragGesture;
+ }
+ if (endDrawerEnableOpenDragGesture != null) {
+ $result.endDrawerEnableOpenDragGesture = endDrawerEnableOpenDragGesture;
+ }
+ if (mainAxisAlignment != null) {
+ $result.mainAxisAlignment = mainAxisAlignment;
+ }
+ if (crossAxisAlignment != null) {
+ $result.crossAxisAlignment = crossAxisAlignment;
+ }
+ if (mainAxisSize != null) {
+ $result.mainAxisSize = mainAxisSize;
+ }
+ if (textDirection != null) {
+ $result.textDirection = textDirection;
+ }
+ if (verticalDirection != null) {
+ $result.verticalDirection = verticalDirection;
+ }
+ if (textBaseline != null) {
+ $result.textBaseline = textBaseline;
+ }
+ if (alignment != null) {
+ $result.alignment = alignment;
+ }
+ if (constraints != null) {
+ $result.constraints = constraints;
+ }
+ if (transform != null) {
+ $result.transform = transform;
+ }
+ if (transformAlignment != null) {
+ $result.transformAlignment = transformAlignment;
+ }
+ if (clipBehavior != null) {
+ $result.clipBehavior = clipBehavior;
+ }
+ if (textAlign != null) {
+ $result.textAlign = textAlign;
+ }
+ if (overflow != null) {
+ $result.overflow = overflow;
+ }
+ if (maxLines != null) {
+ $result.maxLines = maxLines;
+ }
+ if (softWrap != null) {
+ $result.softWrap = softWrap;
+ }
+ if (letterSpacing != null) {
+ $result.letterSpacing = letterSpacing;
+ }
+ if (wordSpacing != null) {
+ $result.wordSpacing = wordSpacing;
+ }
+ if (height != null) {
+ $result.height = height;
+ }
+ if (fontFamily != null) {
+ $result.fontFamily = fontFamily;
+ }
+ if (repeat != null) {
+ $result.repeat = repeat;
+ }
+ if (colorBlendMode != null) {
+ $result.colorBlendMode = colorBlendMode;
+ }
+ if (centerSlice != null) {
+ $result.centerSlice = centerSlice;
+ }
+ if (matchTextDirection != null) {
+ $result.matchTextDirection = matchTextDirection;
+ }
+ if (gaplessPlayback != null) {
+ $result.gaplessPlayback = gaplessPlayback;
+ }
+ if (filterQuality != null) {
+ $result.filterQuality = filterQuality;
+ }
+ if (cacheWidth != null) {
+ $result.cacheWidth = cacheWidth;
+ }
+ if (cacheHeight != null) {
+ $result.cacheHeight = cacheHeight;
+ }
+ if (scale != null) {
+ $result.scale = scale;
+ }
+ if (semanticLabel != null) {
+ $result.semanticLabel = semanticLabel;
+ }
+ if (errorWidget != null) {
+ $result.errorWidget = errorWidget;
+ }
+ if (loadingWidget != null) {
+ $result.loadingWidget = loadingWidget;
+ }
+ if (opacity != null) {
+ $result.opacity = opacity;
+ }
+ if (applyTextScaling != null) {
+ $result.applyTextScaling = applyTextScaling;
+ }
+ if (shadows != null) {
+ $result.shadows.addAll(shadows);
+ }
return $result;
}
SduiWidgetData._() : super();
- factory SduiWidgetData.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
- factory SduiWidgetData.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
-
- static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'SduiWidgetData', package: const $pb.PackageName(_omitMessageNames ? '' : 'flutter_sdui'), createEmptyInstance: create)
- ..e(1, _omitFieldNames ? '' : 'type', $pb.PbFieldType.OE, defaultOrMaker: WidgetType.WIDGET_TYPE_UNSPECIFIED, valueOf: WidgetType.valueOf, enumValues: WidgetType.values)
- ..m<$core.String, $core.String>(2, _omitFieldNames ? '' : 'stringAttributes', entryClassName: 'SduiWidgetData.StringAttributesEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OS, packageName: const $pb.PackageName('flutter_sdui'))
- ..m<$core.String, $core.double>(3, _omitFieldNames ? '' : 'doubleAttributes', entryClassName: 'SduiWidgetData.DoubleAttributesEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OD, packageName: const $pb.PackageName('flutter_sdui'))
- ..m<$core.String, $core.bool>(4, _omitFieldNames ? '' : 'boolAttributes', entryClassName: 'SduiWidgetData.BoolAttributesEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OB, packageName: const $pb.PackageName('flutter_sdui'))
- ..m<$core.String, $core.int>(5, _omitFieldNames ? '' : 'intAttributes', entryClassName: 'SduiWidgetData.IntAttributesEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.O3, packageName: const $pb.PackageName('flutter_sdui'))
- ..aOM(6, _omitFieldNames ? '' : 'textStyle', subBuilder: TextStyleData.create)
- ..aOM(7, _omitFieldNames ? '' : 'padding', subBuilder: EdgeInsetsData.create)
- ..aOM(8, _omitFieldNames ? '' : 'margin', subBuilder: EdgeInsetsData.create)
- ..aOM(9, _omitFieldNames ? '' : 'color', subBuilder: ColorData.create)
- ..aOM(10, _omitFieldNames ? '' : 'icon', subBuilder: IconDataMessage.create)
- ..aOM(11, _omitFieldNames ? '' : 'boxDecoration', subBuilder: BoxDecorationData.create)
- ..pc(12, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: SduiWidgetData.create)
- ..aOM(13, _omitFieldNames ? '' : 'child', subBuilder: SduiWidgetData.create)
- ..aOM(14, _omitFieldNames ? '' : 'appBar', subBuilder: SduiWidgetData.create)
- ..aOM(15, _omitFieldNames ? '' : 'body', subBuilder: SduiWidgetData.create)
- ..aOM(16, _omitFieldNames ? '' : 'floatingActionButton', subBuilder: SduiWidgetData.create)
- ..aOM(17, _omitFieldNames ? '' : 'backgroundColor', subBuilder: ColorData.create)
- ..hasRequiredFields = false
- ;
+ factory SduiWidgetData.fromBuffer($core.List<$core.int> i,
+ [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
+ create()..mergeFromBuffer(i, r);
+ factory SduiWidgetData.fromJson($core.String i,
+ [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
+ create()..mergeFromJson(i, r);
+
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(
+ _omitMessageNames ? '' : 'SduiWidgetData',
+ package: const $pb.PackageName(_omitMessageNames ? '' : 'flutter_sdui'),
+ createEmptyInstance: create)
+ ..e(1, _omitFieldNames ? '' : 'type', $pb.PbFieldType.OE,
+ defaultOrMaker: WidgetType.WIDGET_TYPE_UNSPECIFIED,
+ valueOf: WidgetType.valueOf,
+ enumValues: WidgetType.values)
+ ..m<$core.String, $core.String>(
+ 2, _omitFieldNames ? '' : 'stringAttributes',
+ entryClassName: 'SduiWidgetData.StringAttributesEntry',
+ keyFieldType: $pb.PbFieldType.OS,
+ valueFieldType: $pb.PbFieldType.OS,
+ packageName: const $pb.PackageName('flutter_sdui'))
+ ..m<$core.String, $core.double>(
+ 3, _omitFieldNames ? '' : 'doubleAttributes',
+ entryClassName: 'SduiWidgetData.DoubleAttributesEntry',
+ keyFieldType: $pb.PbFieldType.OS,
+ valueFieldType: $pb.PbFieldType.OD,
+ packageName: const $pb.PackageName('flutter_sdui'))
+ ..m<$core.String, $core.bool>(4, _omitFieldNames ? '' : 'boolAttributes',
+ entryClassName: 'SduiWidgetData.BoolAttributesEntry',
+ keyFieldType: $pb.PbFieldType.OS,
+ valueFieldType: $pb.PbFieldType.OB,
+ packageName: const $pb.PackageName('flutter_sdui'))
+ ..m<$core.String, $core.int>(5, _omitFieldNames ? '' : 'intAttributes',
+ entryClassName: 'SduiWidgetData.IntAttributesEntry',
+ keyFieldType: $pb.PbFieldType.OS,
+ valueFieldType: $pb.PbFieldType.O3,
+ packageName: const $pb.PackageName('flutter_sdui'))
+ ..aOM(6, _omitFieldNames ? '' : 'textStyle',
+ subBuilder: TextStyleData.create)
+ ..aOM(7, _omitFieldNames ? '' : 'padding',
+ subBuilder: EdgeInsetsData.create)
+ ..aOM(8, _omitFieldNames ? '' : 'margin',
+ subBuilder: EdgeInsetsData.create)
+ ..aOM(9, _omitFieldNames ? '' : 'color',
+ subBuilder: ColorData.create)
+ ..aOM(10, _omitFieldNames ? '' : 'icon',
+ subBuilder: IconDataMessage.create)
+ ..aOM(11, _omitFieldNames ? '' : 'boxDecoration',
+ subBuilder: BoxDecorationData.create)
+ ..pc(
+ 12, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM,
+ subBuilder: SduiWidgetData.create)
+ ..aOM(13, _omitFieldNames ? '' : 'child',
+ subBuilder: SduiWidgetData.create)
+ ..aOM(14, _omitFieldNames ? '' : 'appBar',
+ subBuilder: SduiWidgetData.create)
+ ..aOM(15, _omitFieldNames ? '' : 'body',
+ subBuilder: SduiWidgetData.create)
+ ..aOM(16, _omitFieldNames ? '' : 'floatingActionButton',
+ subBuilder: SduiWidgetData.create)
+ ..aOM(17, _omitFieldNames ? '' : 'backgroundColor',
+ subBuilder: ColorData.create)
+ ..aOM(18, _omitFieldNames ? '' : 'bottomNavigationBar',
+ subBuilder: SduiWidgetData.create)
+ ..aOM(19, _omitFieldNames ? '' : 'drawer',
+ subBuilder: SduiWidgetData.create)
+ ..aOM(20, _omitFieldNames ? '' : 'endDrawer',
+ subBuilder: SduiWidgetData.create)
+ ..aOM(21, _omitFieldNames ? '' : 'bottomSheet',
+ subBuilder: SduiWidgetData.create)
+ ..aOB(22, _omitFieldNames ? '' : 'resizeToAvoidBottomInset')
+ ..aOB(23, _omitFieldNames ? '' : 'primary')
+ ..e(
+ 24,
+ _omitFieldNames ? '' : 'floatingActionButtonLocation',
+ $pb.PbFieldType.OE,
+ defaultOrMaker:
+ FloatingActionButtonLocationProto.FAB_LOCATION_UNSPECIFIED,
+ valueOf: FloatingActionButtonLocationProto.valueOf,
+ enumValues: FloatingActionButtonLocationProto.values)
+ ..aOB(25, _omitFieldNames ? '' : 'extendBody')
+ ..aOB(26, _omitFieldNames ? '' : 'extendBodyBehindAppBar')
+ ..aOM(27, _omitFieldNames ? '' : 'drawerScrimColor',
+ subBuilder: ColorData.create)
+ ..a<$core.double>(
+ 28, _omitFieldNames ? '' : 'drawerEdgeDragWidth', $pb.PbFieldType.OD)
+ ..aOB(29, _omitFieldNames ? '' : 'drawerEnableOpenDragGesture')
+ ..aOB(30, _omitFieldNames ? '' : 'endDrawerEnableOpenDragGesture')
+ ..e(
+ 31, _omitFieldNames ? '' : 'mainAxisAlignment', $pb.PbFieldType.OE,
+ defaultOrMaker: MainAxisAlignmentProto.MAIN_AXIS_ALIGNMENT_UNSPECIFIED,
+ valueOf: MainAxisAlignmentProto.valueOf,
+ enumValues: MainAxisAlignmentProto.values)
+ ..e(
+ 32, _omitFieldNames ? '' : 'crossAxisAlignment', $pb.PbFieldType.OE,
+ defaultOrMaker:
+ CrossAxisAlignmentProto.CROSS_AXIS_ALIGNMENT_UNSPECIFIED,
+ valueOf: CrossAxisAlignmentProto.valueOf,
+ enumValues: CrossAxisAlignmentProto.values)
+ ..e(
+ 33, _omitFieldNames ? '' : 'mainAxisSize', $pb.PbFieldType.OE,
+ defaultOrMaker: MainAxisSizeProto.MAIN_AXIS_SIZE_UNSPECIFIED,
+ valueOf: MainAxisSizeProto.valueOf,
+ enumValues: MainAxisSizeProto.values)
+ ..e(
+ 34, _omitFieldNames ? '' : 'textDirection', $pb.PbFieldType.OE,
+ defaultOrMaker: TextDirectionProto.TEXT_DIRECTION_UNSPECIFIED,
+ valueOf: TextDirectionProto.valueOf,
+ enumValues: TextDirectionProto.values)
+ ..e(
+ 35, _omitFieldNames ? '' : 'verticalDirection', $pb.PbFieldType.OE,
+ defaultOrMaker: VerticalDirectionProto.VERTICAL_DIRECTION_UNSPECIFIED,
+ valueOf: VerticalDirectionProto.valueOf,
+ enumValues: VerticalDirectionProto.values)
+ ..e(
+ 36, _omitFieldNames ? '' : 'textBaseline', $pb.PbFieldType.OE,
+ defaultOrMaker: TextBaselineProto.TEXT_BASELINE_UNSPECIFIED,
+ valueOf: TextBaselineProto.valueOf,
+ enumValues: TextBaselineProto.values)
+ ..aOM(37, _omitFieldNames ? '' : 'alignment',
+ subBuilder: AlignmentData.create)
+ ..aOM(38, _omitFieldNames ? '' : 'constraints',
+ subBuilder: BoxConstraintsData.create)
+ ..aOM(39, _omitFieldNames ? '' : 'transform',
+ subBuilder: TransformData.create)
+ ..aOM(40, _omitFieldNames ? '' : 'transformAlignment',
+ subBuilder: AlignmentData.create)
+ ..e(
+ 41, _omitFieldNames ? '' : 'clipBehavior', $pb.PbFieldType.OE,
+ defaultOrMaker: ClipProto.CLIP_UNSPECIFIED,
+ valueOf: ClipProto.valueOf,
+ enumValues: ClipProto.values)
+ ..e(
+ 42, _omitFieldNames ? '' : 'textAlign', $pb.PbFieldType.OE,
+ defaultOrMaker: TextAlignProto.TEXT_ALIGN_UNSPECIFIED,
+ valueOf: TextAlignProto.valueOf,
+ enumValues: TextAlignProto.values)
+ ..e(
+ 43, _omitFieldNames ? '' : 'overflow', $pb.PbFieldType.OE,
+ defaultOrMaker: TextOverflowProto.TEXT_OVERFLOW_UNSPECIFIED,
+ valueOf: TextOverflowProto.valueOf,
+ enumValues: TextOverflowProto.values)
+ ..a<$core.int>(44, _omitFieldNames ? '' : 'maxLines', $pb.PbFieldType.O3)
+ ..aOB(45, _omitFieldNames ? '' : 'softWrap')
+ ..a<$core.double>(
+ 46, _omitFieldNames ? '' : 'letterSpacing', $pb.PbFieldType.OD)
+ ..a<$core.double>(
+ 47, _omitFieldNames ? '' : 'wordSpacing', $pb.PbFieldType.OD)
+ ..a<$core.double>(48, _omitFieldNames ? '' : 'height', $pb.PbFieldType.OD)
+ ..aOS(49, _omitFieldNames ? '' : 'fontFamily')
+ ..e(
+ 50, _omitFieldNames ? '' : 'repeat', $pb.PbFieldType.OE,
+ defaultOrMaker: ImageRepeatProto.IMAGE_REPEAT_UNSPECIFIED,
+ valueOf: ImageRepeatProto.valueOf,
+ enumValues: ImageRepeatProto.values)
+ ..e(
+ 51, _omitFieldNames ? '' : 'colorBlendMode', $pb.PbFieldType.OE,
+ defaultOrMaker: BlendModeProto.BLEND_MODE_UNSPECIFIED,
+ valueOf: BlendModeProto.valueOf,
+ enumValues: BlendModeProto.values)
+ ..aOM(52, _omitFieldNames ? '' : 'centerSlice',
+ subBuilder: RectData.create)
+ ..aOB(53, _omitFieldNames ? '' : 'matchTextDirection')
+ ..aOB(54, _omitFieldNames ? '' : 'gaplessPlayback')
+ ..e(
+ 55, _omitFieldNames ? '' : 'filterQuality', $pb.PbFieldType.OE,
+ defaultOrMaker: FilterQualityProto.FILTER_QUALITY_UNSPECIFIED,
+ valueOf: FilterQualityProto.valueOf,
+ enumValues: FilterQualityProto.values)
+ ..a<$core.int>(56, _omitFieldNames ? '' : 'cacheWidth', $pb.PbFieldType.O3)
+ ..a<$core.int>(57, _omitFieldNames ? '' : 'cacheHeight', $pb.PbFieldType.O3)
+ ..a<$core.double>(58, _omitFieldNames ? '' : 'scale', $pb.PbFieldType.OD)
+ ..aOS(59, _omitFieldNames ? '' : 'semanticLabel')
+ ..aOM(60, _omitFieldNames ? '' : 'errorWidget',
+ subBuilder: SduiWidgetData.create)
+ ..aOM(61, _omitFieldNames ? '' : 'loadingWidget',
+ subBuilder: SduiWidgetData.create)
+ ..a<$core.double>(62, _omitFieldNames ? '' : 'opacity', $pb.PbFieldType.OD)
+ ..aOB(63, _omitFieldNames ? '' : 'applyTextScaling')
+ ..pc(64, _omitFieldNames ? '' : 'shadows', $pb.PbFieldType.PM,
+ subBuilder: ShadowData.create)
+ ..hasRequiredFields = false;
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
SduiWidgetData clone() => SduiWidgetData()..mergeFromMessage(this);
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
- SduiWidgetData copyWith(void Function(SduiWidgetData) updates) => super.copyWith((message) => updates(message as SduiWidgetData)) as SduiWidgetData;
+ SduiWidgetData copyWith(void Function(SduiWidgetData) updates) =>
+ super.copyWith((message) => updates(message as SduiWidgetData))
+ as SduiWidgetData;
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static SduiWidgetData create() => SduiWidgetData._();
SduiWidgetData createEmptyInstance() => create();
- static $pb.PbList createRepeated() => $pb.PbList();
+ static $pb.PbList createRepeated() =>
+ $pb.PbList();
@$core.pragma('dart2js:noInline')
- static SduiWidgetData getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create);
+ static SduiWidgetData getDefault() => _defaultInstance ??=
+ $pb.GeneratedMessage.$_defaultFor(create);
static SduiWidgetData? _defaultInstance;
@$pb.TagNumber(1)
WidgetType get type => $_getN(0);
@$pb.TagNumber(1)
- set type(WidgetType v) { $_setField(1, v); }
+ set type(WidgetType v) {
+ $_setField(1, v);
+ }
+
@$pb.TagNumber(1)
$core.bool hasType() => $_has(0);
@$pb.TagNumber(1)
@@ -159,7 +515,10 @@ class SduiWidgetData extends $pb.GeneratedMessage {
@$pb.TagNumber(6)
TextStyleData get textStyle => $_getN(5);
@$pb.TagNumber(6)
- set textStyle(TextStyleData v) { $_setField(6, v); }
+ set textStyle(TextStyleData v) {
+ $_setField(6, v);
+ }
+
@$pb.TagNumber(6)
$core.bool hasTextStyle() => $_has(5);
@$pb.TagNumber(6)
@@ -170,7 +529,10 @@ class SduiWidgetData extends $pb.GeneratedMessage {
@$pb.TagNumber(7)
EdgeInsetsData get padding => $_getN(6);
@$pb.TagNumber(7)
- set padding(EdgeInsetsData v) { $_setField(7, v); }
+ set padding(EdgeInsetsData v) {
+ $_setField(7, v);
+ }
+
@$pb.TagNumber(7)
$core.bool hasPadding() => $_has(6);
@$pb.TagNumber(7)
@@ -181,7 +543,10 @@ class SduiWidgetData extends $pb.GeneratedMessage {
@$pb.TagNumber(8)
EdgeInsetsData get margin => $_getN(7);
@$pb.TagNumber(8)
- set margin(EdgeInsetsData v) { $_setField(8, v); }
+ set margin(EdgeInsetsData v) {
+ $_setField(8, v);
+ }
+
@$pb.TagNumber(8)
$core.bool hasMargin() => $_has(7);
@$pb.TagNumber(8)
@@ -192,7 +557,10 @@ class SduiWidgetData extends $pb.GeneratedMessage {
@$pb.TagNumber(9)
ColorData get color => $_getN(8);
@$pb.TagNumber(9)
- set color(ColorData v) { $_setField(9, v); }
+ set color(ColorData v) {
+ $_setField(9, v);
+ }
+
@$pb.TagNumber(9)
$core.bool hasColor() => $_has(8);
@$pb.TagNumber(9)
@@ -203,7 +571,10 @@ class SduiWidgetData extends $pb.GeneratedMessage {
@$pb.TagNumber(10)
IconDataMessage get icon => $_getN(9);
@$pb.TagNumber(10)
- set icon(IconDataMessage v) { $_setField(10, v); }
+ set icon(IconDataMessage v) {
+ $_setField(10, v);
+ }
+
@$pb.TagNumber(10)
$core.bool hasIcon() => $_has(9);
@$pb.TagNumber(10)
@@ -214,7 +585,10 @@ class SduiWidgetData extends $pb.GeneratedMessage {
@$pb.TagNumber(11)
BoxDecorationData get boxDecoration => $_getN(10);
@$pb.TagNumber(11)
- set boxDecoration(BoxDecorationData v) { $_setField(11, v); }
+ set boxDecoration(BoxDecorationData v) {
+ $_setField(11, v);
+ }
+
@$pb.TagNumber(11)
$core.bool hasBoxDecoration() => $_has(10);
@$pb.TagNumber(11)
@@ -229,7 +603,10 @@ class SduiWidgetData extends $pb.GeneratedMessage {
@$pb.TagNumber(13)
SduiWidgetData get child => $_getN(12);
@$pb.TagNumber(13)
- set child(SduiWidgetData v) { $_setField(13, v); }
+ set child(SduiWidgetData v) {
+ $_setField(13, v);
+ }
+
@$pb.TagNumber(13)
$core.bool hasChild() => $_has(12);
@$pb.TagNumber(13)
@@ -241,7 +618,10 @@ class SduiWidgetData extends $pb.GeneratedMessage {
@$pb.TagNumber(14)
SduiWidgetData get appBar => $_getN(13);
@$pb.TagNumber(14)
- set appBar(SduiWidgetData v) { $_setField(14, v); }
+ set appBar(SduiWidgetData v) {
+ $_setField(14, v);
+ }
+
@$pb.TagNumber(14)
$core.bool hasAppBar() => $_has(13);
@$pb.TagNumber(14)
@@ -252,7 +632,10 @@ class SduiWidgetData extends $pb.GeneratedMessage {
@$pb.TagNumber(15)
SduiWidgetData get body => $_getN(14);
@$pb.TagNumber(15)
- set body(SduiWidgetData v) { $_setField(15, v); }
+ set body(SduiWidgetData v) {
+ $_setField(15, v);
+ }
+
@$pb.TagNumber(15)
$core.bool hasBody() => $_has(14);
@$pb.TagNumber(15)
@@ -263,7 +646,10 @@ class SduiWidgetData extends $pb.GeneratedMessage {
@$pb.TagNumber(16)
SduiWidgetData get floatingActionButton => $_getN(15);
@$pb.TagNumber(16)
- set floatingActionButton(SduiWidgetData v) { $_setField(16, v); }
+ set floatingActionButton(SduiWidgetData v) {
+ $_setField(16, v);
+ }
+
@$pb.TagNumber(16)
$core.bool hasFloatingActionButton() => $_has(15);
@$pb.TagNumber(16)
@@ -274,13 +660,602 @@ class SduiWidgetData extends $pb.GeneratedMessage {
@$pb.TagNumber(17)
ColorData get backgroundColor => $_getN(16);
@$pb.TagNumber(17)
- set backgroundColor(ColorData v) { $_setField(17, v); }
+ set backgroundColor(ColorData v) {
+ $_setField(17, v);
+ }
+
@$pb.TagNumber(17)
$core.bool hasBackgroundColor() => $_has(16);
@$pb.TagNumber(17)
void clearBackgroundColor() => $_clearField(17);
@$pb.TagNumber(17)
ColorData ensureBackgroundColor() => $_ensure(16);
+
+ /// New Scaffold attributes
+ @$pb.TagNumber(18)
+ SduiWidgetData get bottomNavigationBar => $_getN(17);
+ @$pb.TagNumber(18)
+ set bottomNavigationBar(SduiWidgetData v) {
+ $_setField(18, v);
+ }
+
+ @$pb.TagNumber(18)
+ $core.bool hasBottomNavigationBar() => $_has(17);
+ @$pb.TagNumber(18)
+ void clearBottomNavigationBar() => $_clearField(18);
+ @$pb.TagNumber(18)
+ SduiWidgetData ensureBottomNavigationBar() => $_ensure(17);
+
+ @$pb.TagNumber(19)
+ SduiWidgetData get drawer => $_getN(18);
+ @$pb.TagNumber(19)
+ set drawer(SduiWidgetData v) {
+ $_setField(19, v);
+ }
+
+ @$pb.TagNumber(19)
+ $core.bool hasDrawer() => $_has(18);
+ @$pb.TagNumber(19)
+ void clearDrawer() => $_clearField(19);
+ @$pb.TagNumber(19)
+ SduiWidgetData ensureDrawer() => $_ensure(18);
+
+ @$pb.TagNumber(20)
+ SduiWidgetData get endDrawer => $_getN(19);
+ @$pb.TagNumber(20)
+ set endDrawer(SduiWidgetData v) {
+ $_setField(20, v);
+ }
+
+ @$pb.TagNumber(20)
+ $core.bool hasEndDrawer() => $_has(19);
+ @$pb.TagNumber(20)
+ void clearEndDrawer() => $_clearField(20);
+ @$pb.TagNumber(20)
+ SduiWidgetData ensureEndDrawer() => $_ensure(19);
+
+ @$pb.TagNumber(21)
+ SduiWidgetData get bottomSheet => $_getN(20);
+ @$pb.TagNumber(21)
+ set bottomSheet(SduiWidgetData v) {
+ $_setField(21, v);
+ }
+
+ @$pb.TagNumber(21)
+ $core.bool hasBottomSheet() => $_has(20);
+ @$pb.TagNumber(21)
+ void clearBottomSheet() => $_clearField(21);
+ @$pb.TagNumber(21)
+ SduiWidgetData ensureBottomSheet() => $_ensure(20);
+
+ @$pb.TagNumber(22)
+ $core.bool get resizeToAvoidBottomInset => $_getBF(21);
+ @$pb.TagNumber(22)
+ set resizeToAvoidBottomInset($core.bool v) {
+ $_setBool(21, v);
+ }
+
+ @$pb.TagNumber(22)
+ $core.bool hasResizeToAvoidBottomInset() => $_has(21);
+ @$pb.TagNumber(22)
+ void clearResizeToAvoidBottomInset() => $_clearField(22);
+
+ @$pb.TagNumber(23)
+ $core.bool get primary => $_getBF(22);
+ @$pb.TagNumber(23)
+ set primary($core.bool v) {
+ $_setBool(22, v);
+ }
+
+ @$pb.TagNumber(23)
+ $core.bool hasPrimary() => $_has(22);
+ @$pb.TagNumber(23)
+ void clearPrimary() => $_clearField(23);
+
+ @$pb.TagNumber(24)
+ FloatingActionButtonLocationProto get floatingActionButtonLocation =>
+ $_getN(23);
+ @$pb.TagNumber(24)
+ set floatingActionButtonLocation(FloatingActionButtonLocationProto v) {
+ $_setField(24, v);
+ }
+
+ @$pb.TagNumber(24)
+ $core.bool hasFloatingActionButtonLocation() => $_has(23);
+ @$pb.TagNumber(24)
+ void clearFloatingActionButtonLocation() => $_clearField(24);
+
+ @$pb.TagNumber(25)
+ $core.bool get extendBody => $_getBF(24);
+ @$pb.TagNumber(25)
+ set extendBody($core.bool v) {
+ $_setBool(24, v);
+ }
+
+ @$pb.TagNumber(25)
+ $core.bool hasExtendBody() => $_has(24);
+ @$pb.TagNumber(25)
+ void clearExtendBody() => $_clearField(25);
+
+ @$pb.TagNumber(26)
+ $core.bool get extendBodyBehindAppBar => $_getBF(25);
+ @$pb.TagNumber(26)
+ set extendBodyBehindAppBar($core.bool v) {
+ $_setBool(25, v);
+ }
+
+ @$pb.TagNumber(26)
+ $core.bool hasExtendBodyBehindAppBar() => $_has(25);
+ @$pb.TagNumber(26)
+ void clearExtendBodyBehindAppBar() => $_clearField(26);
+
+ @$pb.TagNumber(27)
+ ColorData get drawerScrimColor => $_getN(26);
+ @$pb.TagNumber(27)
+ set drawerScrimColor(ColorData v) {
+ $_setField(27, v);
+ }
+
+ @$pb.TagNumber(27)
+ $core.bool hasDrawerScrimColor() => $_has(26);
+ @$pb.TagNumber(27)
+ void clearDrawerScrimColor() => $_clearField(27);
+ @$pb.TagNumber(27)
+ ColorData ensureDrawerScrimColor() => $_ensure(26);
+
+ @$pb.TagNumber(28)
+ $core.double get drawerEdgeDragWidth => $_getN(27);
+ @$pb.TagNumber(28)
+ set drawerEdgeDragWidth($core.double v) {
+ $_setDouble(27, v);
+ }
+
+ @$pb.TagNumber(28)
+ $core.bool hasDrawerEdgeDragWidth() => $_has(27);
+ @$pb.TagNumber(28)
+ void clearDrawerEdgeDragWidth() => $_clearField(28);
+
+ @$pb.TagNumber(29)
+ $core.bool get drawerEnableOpenDragGesture => $_getBF(28);
+ @$pb.TagNumber(29)
+ set drawerEnableOpenDragGesture($core.bool v) {
+ $_setBool(28, v);
+ }
+
+ @$pb.TagNumber(29)
+ $core.bool hasDrawerEnableOpenDragGesture() => $_has(28);
+ @$pb.TagNumber(29)
+ void clearDrawerEnableOpenDragGesture() => $_clearField(29);
+
+ @$pb.TagNumber(30)
+ $core.bool get endDrawerEnableOpenDragGesture => $_getBF(29);
+ @$pb.TagNumber(30)
+ set endDrawerEnableOpenDragGesture($core.bool v) {
+ $_setBool(29, v);
+ }
+
+ @$pb.TagNumber(30)
+ $core.bool hasEndDrawerEnableOpenDragGesture() => $_has(29);
+ @$pb.TagNumber(30)
+ void clearEndDrawerEnableOpenDragGesture() => $_clearField(30);
+
+ /// Layout attributes for Row and Column
+ @$pb.TagNumber(31)
+ MainAxisAlignmentProto get mainAxisAlignment => $_getN(30);
+ @$pb.TagNumber(31)
+ set mainAxisAlignment(MainAxisAlignmentProto v) {
+ $_setField(31, v);
+ }
+
+ @$pb.TagNumber(31)
+ $core.bool hasMainAxisAlignment() => $_has(30);
+ @$pb.TagNumber(31)
+ void clearMainAxisAlignment() => $_clearField(31);
+
+ @$pb.TagNumber(32)
+ CrossAxisAlignmentProto get crossAxisAlignment => $_getN(31);
+ @$pb.TagNumber(32)
+ set crossAxisAlignment(CrossAxisAlignmentProto v) {
+ $_setField(32, v);
+ }
+
+ @$pb.TagNumber(32)
+ $core.bool hasCrossAxisAlignment() => $_has(31);
+ @$pb.TagNumber(32)
+ void clearCrossAxisAlignment() => $_clearField(32);
+
+ @$pb.TagNumber(33)
+ MainAxisSizeProto get mainAxisSize => $_getN(32);
+ @$pb.TagNumber(33)
+ set mainAxisSize(MainAxisSizeProto v) {
+ $_setField(33, v);
+ }
+
+ @$pb.TagNumber(33)
+ $core.bool hasMainAxisSize() => $_has(32);
+ @$pb.TagNumber(33)
+ void clearMainAxisSize() => $_clearField(33);
+
+ @$pb.TagNumber(34)
+ TextDirectionProto get textDirection => $_getN(33);
+ @$pb.TagNumber(34)
+ set textDirection(TextDirectionProto v) {
+ $_setField(34, v);
+ }
+
+ @$pb.TagNumber(34)
+ $core.bool hasTextDirection() => $_has(33);
+ @$pb.TagNumber(34)
+ void clearTextDirection() => $_clearField(34);
+
+ @$pb.TagNumber(35)
+ VerticalDirectionProto get verticalDirection => $_getN(34);
+ @$pb.TagNumber(35)
+ set verticalDirection(VerticalDirectionProto v) {
+ $_setField(35, v);
+ }
+
+ @$pb.TagNumber(35)
+ $core.bool hasVerticalDirection() => $_has(34);
+ @$pb.TagNumber(35)
+ void clearVerticalDirection() => $_clearField(35);
+
+ @$pb.TagNumber(36)
+ TextBaselineProto get textBaseline => $_getN(35);
+ @$pb.TagNumber(36)
+ set textBaseline(TextBaselineProto v) {
+ $_setField(36, v);
+ }
+
+ @$pb.TagNumber(36)
+ $core.bool hasTextBaseline() => $_has(35);
+ @$pb.TagNumber(36)
+ void clearTextBaseline() => $_clearField(36);
+
+ /// Container specific attributes
+ @$pb.TagNumber(37)
+ AlignmentData get alignment => $_getN(36);
+ @$pb.TagNumber(37)
+ set alignment(AlignmentData v) {
+ $_setField(37, v);
+ }
+
+ @$pb.TagNumber(37)
+ $core.bool hasAlignment() => $_has(36);
+ @$pb.TagNumber(37)
+ void clearAlignment() => $_clearField(37);
+ @$pb.TagNumber(37)
+ AlignmentData ensureAlignment() => $_ensure(36);
+
+ @$pb.TagNumber(38)
+ BoxConstraintsData get constraints => $_getN(37);
+ @$pb.TagNumber(38)
+ set constraints(BoxConstraintsData v) {
+ $_setField(38, v);
+ }
+
+ @$pb.TagNumber(38)
+ $core.bool hasConstraints() => $_has(37);
+ @$pb.TagNumber(38)
+ void clearConstraints() => $_clearField(38);
+ @$pb.TagNumber(38)
+ BoxConstraintsData ensureConstraints() => $_ensure(37);
+
+ @$pb.TagNumber(39)
+ TransformData get transform => $_getN(38);
+ @$pb.TagNumber(39)
+ set transform(TransformData v) {
+ $_setField(39, v);
+ }
+
+ @$pb.TagNumber(39)
+ $core.bool hasTransform() => $_has(38);
+ @$pb.TagNumber(39)
+ void clearTransform() => $_clearField(39);
+ @$pb.TagNumber(39)
+ TransformData ensureTransform() => $_ensure(38);
+
+ @$pb.TagNumber(40)
+ AlignmentData get transformAlignment => $_getN(39);
+ @$pb.TagNumber(40)
+ set transformAlignment(AlignmentData v) {
+ $_setField(40, v);
+ }
+
+ @$pb.TagNumber(40)
+ $core.bool hasTransformAlignment() => $_has(39);
+ @$pb.TagNumber(40)
+ void clearTransformAlignment() => $_clearField(40);
+ @$pb.TagNumber(40)
+ AlignmentData ensureTransformAlignment() => $_ensure(39);
+
+ @$pb.TagNumber(41)
+ ClipProto get clipBehavior => $_getN(40);
+ @$pb.TagNumber(41)
+ set clipBehavior(ClipProto v) {
+ $_setField(41, v);
+ }
+
+ @$pb.TagNumber(41)
+ $core.bool hasClipBehavior() => $_has(40);
+ @$pb.TagNumber(41)
+ void clearClipBehavior() => $_clearField(41);
+
+ /// Text specific attributes
+ @$pb.TagNumber(42)
+ TextAlignProto get textAlign => $_getN(41);
+ @$pb.TagNumber(42)
+ set textAlign(TextAlignProto v) {
+ $_setField(42, v);
+ }
+
+ @$pb.TagNumber(42)
+ $core.bool hasTextAlign() => $_has(41);
+ @$pb.TagNumber(42)
+ void clearTextAlign() => $_clearField(42);
+
+ @$pb.TagNumber(43)
+ TextOverflowProto get overflow => $_getN(42);
+ @$pb.TagNumber(43)
+ set overflow(TextOverflowProto v) {
+ $_setField(43, v);
+ }
+
+ @$pb.TagNumber(43)
+ $core.bool hasOverflow() => $_has(42);
+ @$pb.TagNumber(43)
+ void clearOverflow() => $_clearField(43);
+
+ @$pb.TagNumber(44)
+ $core.int get maxLines => $_getIZ(43);
+ @$pb.TagNumber(44)
+ set maxLines($core.int v) {
+ $_setSignedInt32(43, v);
+ }
+
+ @$pb.TagNumber(44)
+ $core.bool hasMaxLines() => $_has(43);
+ @$pb.TagNumber(44)
+ void clearMaxLines() => $_clearField(44);
+
+ @$pb.TagNumber(45)
+ $core.bool get softWrap => $_getBF(44);
+ @$pb.TagNumber(45)
+ set softWrap($core.bool v) {
+ $_setBool(44, v);
+ }
+
+ @$pb.TagNumber(45)
+ $core.bool hasSoftWrap() => $_has(44);
+ @$pb.TagNumber(45)
+ void clearSoftWrap() => $_clearField(45);
+
+ @$pb.TagNumber(46)
+ $core.double get letterSpacing => $_getN(45);
+ @$pb.TagNumber(46)
+ set letterSpacing($core.double v) {
+ $_setDouble(45, v);
+ }
+
+ @$pb.TagNumber(46)
+ $core.bool hasLetterSpacing() => $_has(45);
+ @$pb.TagNumber(46)
+ void clearLetterSpacing() => $_clearField(46);
+
+ @$pb.TagNumber(47)
+ $core.double get wordSpacing => $_getN(46);
+ @$pb.TagNumber(47)
+ set wordSpacing($core.double v) {
+ $_setDouble(46, v);
+ }
+
+ @$pb.TagNumber(47)
+ $core.bool hasWordSpacing() => $_has(46);
+ @$pb.TagNumber(47)
+ void clearWordSpacing() => $_clearField(47);
+
+ @$pb.TagNumber(48)
+ $core.double get height => $_getN(47);
+ @$pb.TagNumber(48)
+ set height($core.double v) {
+ $_setDouble(47, v);
+ }
+
+ @$pb.TagNumber(48)
+ $core.bool hasHeight() => $_has(47);
+ @$pb.TagNumber(48)
+ void clearHeight() => $_clearField(48);
+
+ @$pb.TagNumber(49)
+ $core.String get fontFamily => $_getSZ(48);
+ @$pb.TagNumber(49)
+ set fontFamily($core.String v) {
+ $_setString(48, v);
+ }
+
+ @$pb.TagNumber(49)
+ $core.bool hasFontFamily() => $_has(48);
+ @$pb.TagNumber(49)
+ void clearFontFamily() => $_clearField(49);
+
+ /// Image specific attributes
+ @$pb.TagNumber(50)
+ ImageRepeatProto get repeat => $_getN(49);
+ @$pb.TagNumber(50)
+ set repeat(ImageRepeatProto v) {
+ $_setField(50, v);
+ }
+
+ @$pb.TagNumber(50)
+ $core.bool hasRepeat() => $_has(49);
+ @$pb.TagNumber(50)
+ void clearRepeat() => $_clearField(50);
+
+ @$pb.TagNumber(51)
+ BlendModeProto get colorBlendMode => $_getN(50);
+ @$pb.TagNumber(51)
+ set colorBlendMode(BlendModeProto v) {
+ $_setField(51, v);
+ }
+
+ @$pb.TagNumber(51)
+ $core.bool hasColorBlendMode() => $_has(50);
+ @$pb.TagNumber(51)
+ void clearColorBlendMode() => $_clearField(51);
+
+ @$pb.TagNumber(52)
+ RectData get centerSlice => $_getN(51);
+ @$pb.TagNumber(52)
+ set centerSlice(RectData v) {
+ $_setField(52, v);
+ }
+
+ @$pb.TagNumber(52)
+ $core.bool hasCenterSlice() => $_has(51);
+ @$pb.TagNumber(52)
+ void clearCenterSlice() => $_clearField(52);
+ @$pb.TagNumber(52)
+ RectData ensureCenterSlice() => $_ensure(51);
+
+ @$pb.TagNumber(53)
+ $core.bool get matchTextDirection => $_getBF(52);
+ @$pb.TagNumber(53)
+ set matchTextDirection($core.bool v) {
+ $_setBool(52, v);
+ }
+
+ @$pb.TagNumber(53)
+ $core.bool hasMatchTextDirection() => $_has(52);
+ @$pb.TagNumber(53)
+ void clearMatchTextDirection() => $_clearField(53);
+
+ @$pb.TagNumber(54)
+ $core.bool get gaplessPlayback => $_getBF(53);
+ @$pb.TagNumber(54)
+ set gaplessPlayback($core.bool v) {
+ $_setBool(53, v);
+ }
+
+ @$pb.TagNumber(54)
+ $core.bool hasGaplessPlayback() => $_has(53);
+ @$pb.TagNumber(54)
+ void clearGaplessPlayback() => $_clearField(54);
+
+ @$pb.TagNumber(55)
+ FilterQualityProto get filterQuality => $_getN(54);
+ @$pb.TagNumber(55)
+ set filterQuality(FilterQualityProto v) {
+ $_setField(55, v);
+ }
+
+ @$pb.TagNumber(55)
+ $core.bool hasFilterQuality() => $_has(54);
+ @$pb.TagNumber(55)
+ void clearFilterQuality() => $_clearField(55);
+
+ @$pb.TagNumber(56)
+ $core.int get cacheWidth => $_getIZ(55);
+ @$pb.TagNumber(56)
+ set cacheWidth($core.int v) {
+ $_setSignedInt32(55, v);
+ }
+
+ @$pb.TagNumber(56)
+ $core.bool hasCacheWidth() => $_has(55);
+ @$pb.TagNumber(56)
+ void clearCacheWidth() => $_clearField(56);
+
+ @$pb.TagNumber(57)
+ $core.int get cacheHeight => $_getIZ(56);
+ @$pb.TagNumber(57)
+ set cacheHeight($core.int v) {
+ $_setSignedInt32(56, v);
+ }
+
+ @$pb.TagNumber(57)
+ $core.bool hasCacheHeight() => $_has(56);
+ @$pb.TagNumber(57)
+ void clearCacheHeight() => $_clearField(57);
+
+ @$pb.TagNumber(58)
+ $core.double get scale => $_getN(57);
+ @$pb.TagNumber(58)
+ set scale($core.double v) {
+ $_setDouble(57, v);
+ }
+
+ @$pb.TagNumber(58)
+ $core.bool hasScale() => $_has(57);
+ @$pb.TagNumber(58)
+ void clearScale() => $_clearField(58);
+
+ @$pb.TagNumber(59)
+ $core.String get semanticLabel => $_getSZ(58);
+ @$pb.TagNumber(59)
+ set semanticLabel($core.String v) {
+ $_setString(58, v);
+ }
+
+ @$pb.TagNumber(59)
+ $core.bool hasSemanticLabel() => $_has(58);
+ @$pb.TagNumber(59)
+ void clearSemanticLabel() => $_clearField(59);
+
+ @$pb.TagNumber(60)
+ SduiWidgetData get errorWidget => $_getN(59);
+ @$pb.TagNumber(60)
+ set errorWidget(SduiWidgetData v) {
+ $_setField(60, v);
+ }
+
+ @$pb.TagNumber(60)
+ $core.bool hasErrorWidget() => $_has(59);
+ @$pb.TagNumber(60)
+ void clearErrorWidget() => $_clearField(60);
+ @$pb.TagNumber(60)
+ SduiWidgetData ensureErrorWidget() => $_ensure(59);
+
+ @$pb.TagNumber(61)
+ SduiWidgetData get loadingWidget => $_getN(60);
+ @$pb.TagNumber(61)
+ set loadingWidget(SduiWidgetData v) {
+ $_setField(61, v);
+ }
+
+ @$pb.TagNumber(61)
+ $core.bool hasLoadingWidget() => $_has(60);
+ @$pb.TagNumber(61)
+ void clearLoadingWidget() => $_clearField(61);
+ @$pb.TagNumber(61)
+ SduiWidgetData ensureLoadingWidget() => $_ensure(60);
+
+ /// Icon specific attributes
+ @$pb.TagNumber(62)
+ $core.double get opacity => $_getN(61);
+ @$pb.TagNumber(62)
+ set opacity($core.double v) {
+ $_setDouble(61, v);
+ }
+
+ @$pb.TagNumber(62)
+ $core.bool hasOpacity() => $_has(61);
+ @$pb.TagNumber(62)
+ void clearOpacity() => $_clearField(62);
+
+ @$pb.TagNumber(63)
+ $core.bool get applyTextScaling => $_getBF(62);
+ @$pb.TagNumber(63)
+ set applyTextScaling($core.bool v) {
+ $_setBool(62, v);
+ }
+
+ @$pb.TagNumber(63)
+ $core.bool hasApplyTextScaling() => $_has(62);
+ @$pb.TagNumber(63)
+ void clearApplyTextScaling() => $_clearField(63);
+
+ @$pb.TagNumber(64)
+ $pb.PbList get shadows => $_getList(63);
}
/// Message for Color
@@ -307,21 +1282,28 @@ class ColorData extends $pb.GeneratedMessage {
return $result;
}
ColorData._() : super();
- factory ColorData.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
- factory ColorData.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
-
- static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ColorData', package: const $pb.PackageName(_omitMessageNames ? '' : 'flutter_sdui'), createEmptyInstance: create)
+ factory ColorData.fromBuffer($core.List<$core.int> i,
+ [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
+ create()..mergeFromBuffer(i, r);
+ factory ColorData.fromJson($core.String i,
+ [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
+ create()..mergeFromJson(i, r);
+
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(
+ _omitMessageNames ? '' : 'ColorData',
+ package: const $pb.PackageName(_omitMessageNames ? '' : 'flutter_sdui'),
+ createEmptyInstance: create)
..a<$core.int>(1, _omitFieldNames ? '' : 'alpha', $pb.PbFieldType.O3)
..a<$core.int>(2, _omitFieldNames ? '' : 'red', $pb.PbFieldType.O3)
..a<$core.int>(3, _omitFieldNames ? '' : 'green', $pb.PbFieldType.O3)
..a<$core.int>(4, _omitFieldNames ? '' : 'blue', $pb.PbFieldType.O3)
- ..hasRequiredFields = false
- ;
+ ..hasRequiredFields = false;
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
ColorData clone() => ColorData()..mergeFromMessage(this);
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
- ColorData copyWith(void Function(ColorData) updates) => super.copyWith((message) => updates(message as ColorData)) as ColorData;
+ ColorData copyWith(void Function(ColorData) updates) =>
+ super.copyWith((message) => updates(message as ColorData)) as ColorData;
$pb.BuilderInfo get info_ => _i;
@@ -330,13 +1312,17 @@ class ColorData extends $pb.GeneratedMessage {
ColorData createEmptyInstance() => create();
static $pb.PbList createRepeated() => $pb.PbList();
@$core.pragma('dart2js:noInline')
- static ColorData getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create);
+ static ColorData getDefault() =>
+ _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create);
static ColorData? _defaultInstance;
@$pb.TagNumber(1)
$core.int get alpha => $_getIZ(0);
@$pb.TagNumber(1)
- set alpha($core.int v) { $_setSignedInt32(0, v); }
+ set alpha($core.int v) {
+ $_setSignedInt32(0, v);
+ }
+
@$pb.TagNumber(1)
$core.bool hasAlpha() => $_has(0);
@$pb.TagNumber(1)
@@ -345,7 +1331,10 @@ class ColorData extends $pb.GeneratedMessage {
@$pb.TagNumber(2)
$core.int get red => $_getIZ(1);
@$pb.TagNumber(2)
- set red($core.int v) { $_setSignedInt32(1, v); }
+ set red($core.int v) {
+ $_setSignedInt32(1, v);
+ }
+
@$pb.TagNumber(2)
$core.bool hasRed() => $_has(1);
@$pb.TagNumber(2)
@@ -354,7 +1343,10 @@ class ColorData extends $pb.GeneratedMessage {
@$pb.TagNumber(3)
$core.int get green => $_getIZ(2);
@$pb.TagNumber(3)
- set green($core.int v) { $_setSignedInt32(2, v); }
+ set green($core.int v) {
+ $_setSignedInt32(2, v);
+ }
+
@$pb.TagNumber(3)
$core.bool hasGreen() => $_has(2);
@$pb.TagNumber(3)
@@ -363,7 +1355,10 @@ class ColorData extends $pb.GeneratedMessage {
@$pb.TagNumber(4)
$core.int get blue => $_getIZ(3);
@$pb.TagNumber(4)
- set blue($core.int v) { $_setSignedInt32(3, v); }
+ set blue($core.int v) {
+ $_setSignedInt32(3, v);
+ }
+
@$pb.TagNumber(4)
$core.bool hasBlue() => $_has(3);
@$pb.TagNumber(4)
@@ -398,37 +1393,50 @@ class EdgeInsetsData extends $pb.GeneratedMessage {
return $result;
}
EdgeInsetsData._() : super();
- factory EdgeInsetsData.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
- factory EdgeInsetsData.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
-
- static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'EdgeInsetsData', package: const $pb.PackageName(_omitMessageNames ? '' : 'flutter_sdui'), createEmptyInstance: create)
+ factory EdgeInsetsData.fromBuffer($core.List<$core.int> i,
+ [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
+ create()..mergeFromBuffer(i, r);
+ factory EdgeInsetsData.fromJson($core.String i,
+ [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
+ create()..mergeFromJson(i, r);
+
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(
+ _omitMessageNames ? '' : 'EdgeInsetsData',
+ package: const $pb.PackageName(_omitMessageNames ? '' : 'flutter_sdui'),
+ createEmptyInstance: create)
..a<$core.double>(1, _omitFieldNames ? '' : 'left', $pb.PbFieldType.OD)
..a<$core.double>(2, _omitFieldNames ? '' : 'top', $pb.PbFieldType.OD)
..a<$core.double>(3, _omitFieldNames ? '' : 'right', $pb.PbFieldType.OD)
..a<$core.double>(4, _omitFieldNames ? '' : 'bottom', $pb.PbFieldType.OD)
..a<$core.double>(5, _omitFieldNames ? '' : 'all', $pb.PbFieldType.OD)
- ..hasRequiredFields = false
- ;
+ ..hasRequiredFields = false;
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
EdgeInsetsData clone() => EdgeInsetsData()..mergeFromMessage(this);
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
- EdgeInsetsData copyWith(void Function(EdgeInsetsData) updates) => super.copyWith((message) => updates(message as EdgeInsetsData)) as EdgeInsetsData;
+ EdgeInsetsData copyWith(void Function(EdgeInsetsData) updates) =>
+ super.copyWith((message) => updates(message as EdgeInsetsData))
+ as EdgeInsetsData;
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static EdgeInsetsData create() => EdgeInsetsData._();
EdgeInsetsData createEmptyInstance() => create();
- static $pb.PbList createRepeated() => $pb.PbList();
+ static $pb.PbList createRepeated() =>
+ $pb.PbList();
@$core.pragma('dart2js:noInline')
- static EdgeInsetsData getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create);
+ static EdgeInsetsData getDefault() => _defaultInstance ??=
+ $pb.GeneratedMessage.$_defaultFor(create);
static EdgeInsetsData? _defaultInstance;
@$pb.TagNumber(1)
$core.double get left => $_getN(0);
@$pb.TagNumber(1)
- set left($core.double v) { $_setDouble(0, v); }
+ set left($core.double v) {
+ $_setDouble(0, v);
+ }
+
@$pb.TagNumber(1)
$core.bool hasLeft() => $_has(0);
@$pb.TagNumber(1)
@@ -437,7 +1445,10 @@ class EdgeInsetsData extends $pb.GeneratedMessage {
@$pb.TagNumber(2)
$core.double get top => $_getN(1);
@$pb.TagNumber(2)
- set top($core.double v) { $_setDouble(1, v); }
+ set top($core.double v) {
+ $_setDouble(1, v);
+ }
+
@$pb.TagNumber(2)
$core.bool hasTop() => $_has(1);
@$pb.TagNumber(2)
@@ -446,7 +1457,10 @@ class EdgeInsetsData extends $pb.GeneratedMessage {
@$pb.TagNumber(3)
$core.double get right => $_getN(2);
@$pb.TagNumber(3)
- set right($core.double v) { $_setDouble(2, v); }
+ set right($core.double v) {
+ $_setDouble(2, v);
+ }
+
@$pb.TagNumber(3)
$core.bool hasRight() => $_has(2);
@$pb.TagNumber(3)
@@ -455,7 +1469,10 @@ class EdgeInsetsData extends $pb.GeneratedMessage {
@$pb.TagNumber(4)
$core.double get bottom => $_getN(3);
@$pb.TagNumber(4)
- set bottom($core.double v) { $_setDouble(3, v); }
+ set bottom($core.double v) {
+ $_setDouble(3, v);
+ }
+
@$pb.TagNumber(4)
$core.bool hasBottom() => $_has(3);
@$pb.TagNumber(4)
@@ -464,7 +1481,10 @@ class EdgeInsetsData extends $pb.GeneratedMessage {
@$pb.TagNumber(5)
$core.double get all => $_getN(4);
@$pb.TagNumber(5)
- set all($core.double v) { $_setDouble(4, v); }
+ set all($core.double v) {
+ $_setDouble(4, v);
+ }
+
@$pb.TagNumber(5)
$core.bool hasAll() => $_has(4);
@$pb.TagNumber(5)
@@ -477,6 +1497,12 @@ class TextStyleData extends $pb.GeneratedMessage {
ColorData? color,
$core.double? fontSize,
$core.String? fontWeight,
+ TextDecorationProto? decoration,
+ $core.double? letterSpacing,
+ $core.double? wordSpacing,
+ $core.double? height,
+ $core.String? fontFamily,
+ FontStyleProto? fontStyle,
}) {
final $result = create();
if (color != null) {
@@ -488,38 +1514,86 @@ class TextStyleData extends $pb.GeneratedMessage {
if (fontWeight != null) {
$result.fontWeight = fontWeight;
}
+ if (decoration != null) {
+ $result.decoration = decoration;
+ }
+ if (letterSpacing != null) {
+ $result.letterSpacing = letterSpacing;
+ }
+ if (wordSpacing != null) {
+ $result.wordSpacing = wordSpacing;
+ }
+ if (height != null) {
+ $result.height = height;
+ }
+ if (fontFamily != null) {
+ $result.fontFamily = fontFamily;
+ }
+ if (fontStyle != null) {
+ $result.fontStyle = fontStyle;
+ }
return $result;
}
TextStyleData._() : super();
- factory TextStyleData.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
- factory TextStyleData.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
-
- static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'TextStyleData', package: const $pb.PackageName(_omitMessageNames ? '' : 'flutter_sdui'), createEmptyInstance: create)
- ..aOM(1, _omitFieldNames ? '' : 'color', subBuilder: ColorData.create)
+ factory TextStyleData.fromBuffer($core.List<$core.int> i,
+ [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
+ create()..mergeFromBuffer(i, r);
+ factory TextStyleData.fromJson($core.String i,
+ [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
+ create()..mergeFromJson(i, r);
+
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(
+ _omitMessageNames ? '' : 'TextStyleData',
+ package: const $pb.PackageName(_omitMessageNames ? '' : 'flutter_sdui'),
+ createEmptyInstance: create)
+ ..aOM(1, _omitFieldNames ? '' : 'color',
+ subBuilder: ColorData.create)
..a<$core.double>(2, _omitFieldNames ? '' : 'fontSize', $pb.PbFieldType.OD)
..aOS(3, _omitFieldNames ? '' : 'fontWeight')
- ..hasRequiredFields = false
- ;
+ ..e(
+ 4, _omitFieldNames ? '' : 'decoration', $pb.PbFieldType.OE,
+ defaultOrMaker: TextDecorationProto.TEXT_DECORATION_UNSPECIFIED,
+ valueOf: TextDecorationProto.valueOf,
+ enumValues: TextDecorationProto.values)
+ ..a<$core.double>(
+ 5, _omitFieldNames ? '' : 'letterSpacing', $pb.PbFieldType.OD)
+ ..a<$core.double>(
+ 6, _omitFieldNames ? '' : 'wordSpacing', $pb.PbFieldType.OD)
+ ..a<$core.double>(7, _omitFieldNames ? '' : 'height', $pb.PbFieldType.OD)
+ ..aOS(8, _omitFieldNames ? '' : 'fontFamily')
+ ..e(
+ 9, _omitFieldNames ? '' : 'fontStyle', $pb.PbFieldType.OE,
+ defaultOrMaker: FontStyleProto.FONT_STYLE_UNSPECIFIED,
+ valueOf: FontStyleProto.valueOf,
+ enumValues: FontStyleProto.values)
+ ..hasRequiredFields = false;
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
TextStyleData clone() => TextStyleData()..mergeFromMessage(this);
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
- TextStyleData copyWith(void Function(TextStyleData) updates) => super.copyWith((message) => updates(message as TextStyleData)) as TextStyleData;
+ TextStyleData copyWith(void Function(TextStyleData) updates) =>
+ super.copyWith((message) => updates(message as TextStyleData))
+ as TextStyleData;
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static TextStyleData create() => TextStyleData._();
TextStyleData createEmptyInstance() => create();
- static $pb.PbList createRepeated() => $pb.PbList();
+ static $pb.PbList createRepeated() =>
+ $pb.PbList();
@$core.pragma('dart2js:noInline')
- static TextStyleData getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create);
+ static TextStyleData getDefault() => _defaultInstance ??=
+ $pb.GeneratedMessage.$_defaultFor(create);
static TextStyleData? _defaultInstance;
@$pb.TagNumber(1)
ColorData get color => $_getN(0);
@$pb.TagNumber(1)
- set color(ColorData v) { $_setField(1, v); }
+ set color(ColorData v) {
+ $_setField(1, v);
+ }
+
@$pb.TagNumber(1)
$core.bool hasColor() => $_has(0);
@$pb.TagNumber(1)
@@ -530,7 +1604,10 @@ class TextStyleData extends $pb.GeneratedMessage {
@$pb.TagNumber(2)
$core.double get fontSize => $_getN(1);
@$pb.TagNumber(2)
- set fontSize($core.double v) { $_setDouble(1, v); }
+ set fontSize($core.double v) {
+ $_setDouble(1, v);
+ }
+
@$pb.TagNumber(2)
$core.bool hasFontSize() => $_has(1);
@$pb.TagNumber(2)
@@ -539,18 +1616,93 @@ class TextStyleData extends $pb.GeneratedMessage {
@$pb.TagNumber(3)
$core.String get fontWeight => $_getSZ(2);
@$pb.TagNumber(3)
- set fontWeight($core.String v) { $_setString(2, v); }
+ set fontWeight($core.String v) {
+ $_setString(2, v);
+ }
+
@$pb.TagNumber(3)
$core.bool hasFontWeight() => $_has(2);
@$pb.TagNumber(3)
void clearFontWeight() => $_clearField(3);
-}
-/// Message for IconData
-class IconDataMessage extends $pb.GeneratedMessage {
- factory IconDataMessage({
- $core.String? name,
- $core.int? codePoint,
+ @$pb.TagNumber(4)
+ TextDecorationProto get decoration => $_getN(3);
+ @$pb.TagNumber(4)
+ set decoration(TextDecorationProto v) {
+ $_setField(4, v);
+ }
+
+ @$pb.TagNumber(4)
+ $core.bool hasDecoration() => $_has(3);
+ @$pb.TagNumber(4)
+ void clearDecoration() => $_clearField(4);
+
+ @$pb.TagNumber(5)
+ $core.double get letterSpacing => $_getN(4);
+ @$pb.TagNumber(5)
+ set letterSpacing($core.double v) {
+ $_setDouble(4, v);
+ }
+
+ @$pb.TagNumber(5)
+ $core.bool hasLetterSpacing() => $_has(4);
+ @$pb.TagNumber(5)
+ void clearLetterSpacing() => $_clearField(5);
+
+ @$pb.TagNumber(6)
+ $core.double get wordSpacing => $_getN(5);
+ @$pb.TagNumber(6)
+ set wordSpacing($core.double v) {
+ $_setDouble(5, v);
+ }
+
+ @$pb.TagNumber(6)
+ $core.bool hasWordSpacing() => $_has(5);
+ @$pb.TagNumber(6)
+ void clearWordSpacing() => $_clearField(6);
+
+ @$pb.TagNumber(7)
+ $core.double get height => $_getN(6);
+ @$pb.TagNumber(7)
+ set height($core.double v) {
+ $_setDouble(6, v);
+ }
+
+ @$pb.TagNumber(7)
+ $core.bool hasHeight() => $_has(6);
+ @$pb.TagNumber(7)
+ void clearHeight() => $_clearField(7);
+
+ @$pb.TagNumber(8)
+ $core.String get fontFamily => $_getSZ(7);
+ @$pb.TagNumber(8)
+ set fontFamily($core.String v) {
+ $_setString(7, v);
+ }
+
+ @$pb.TagNumber(8)
+ $core.bool hasFontFamily() => $_has(7);
+ @$pb.TagNumber(8)
+ void clearFontFamily() => $_clearField(8);
+
+ @$pb.TagNumber(9)
+ FontStyleProto get fontStyle => $_getN(8);
+ @$pb.TagNumber(9)
+ set fontStyle(FontStyleProto v) {
+ $_setField(9, v);
+ }
+
+ @$pb.TagNumber(9)
+ $core.bool hasFontStyle() => $_has(8);
+ @$pb.TagNumber(9)
+ void clearFontStyle() => $_clearField(9);
+}
+
+/// Message for IconData
+class IconDataMessage extends $pb.GeneratedMessage {
+ factory IconDataMessage({
+ $core.String? name,
+ $core.int? codePoint,
$core.String? fontFamily,
ColorData? color,
$core.double? size,
@@ -574,37 +1726,51 @@ class IconDataMessage extends $pb.GeneratedMessage {
return $result;
}
IconDataMessage._() : super();
- factory IconDataMessage.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
- factory IconDataMessage.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
-
- static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'IconDataMessage', package: const $pb.PackageName(_omitMessageNames ? '' : 'flutter_sdui'), createEmptyInstance: create)
+ factory IconDataMessage.fromBuffer($core.List<$core.int> i,
+ [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
+ create()..mergeFromBuffer(i, r);
+ factory IconDataMessage.fromJson($core.String i,
+ [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
+ create()..mergeFromJson(i, r);
+
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(
+ _omitMessageNames ? '' : 'IconDataMessage',
+ package: const $pb.PackageName(_omitMessageNames ? '' : 'flutter_sdui'),
+ createEmptyInstance: create)
..aOS(1, _omitFieldNames ? '' : 'name')
..a<$core.int>(2, _omitFieldNames ? '' : 'codePoint', $pb.PbFieldType.O3)
..aOS(3, _omitFieldNames ? '' : 'fontFamily')
- ..aOM(4, _omitFieldNames ? '' : 'color', subBuilder: ColorData.create)
+ ..aOM |