-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound in release: 3.20Found to occur in 3.20Found to occur in 3.20found in release: 3.21Found to occur in 3.21Found to occur in 3.21has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: rfwRemote Flutter Widgets packageRemote Flutter Widgets packagepackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-ecosystemOwned by Ecosystem teamOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem teamTriaged by Ecosystem team
Description
Steps to reproduce
Override the error widget builder with ErrorWidget.builder.
Expected results
RFW should render the override error widget.
Actual results
RFW still renders the default error widget.
Code sample
Code sample
void main() {
ErrorWidget.builder = (FlutterErrorDetails details) {
// In release builds, show a yellow-on-blue message instead:
return Container(
alignment: Alignment.center,
child: Text(
'Error!\n${details.exception}',
style: const TextStyle(color: Colors.yellow),
textAlign: TextAlign.center,
textDirection: TextDirection.ltr,
),
);
};
runApp(const Example());
}
...
class Example extends StatefulWidget {
const Example({super.key});
@override
State<Example> createState() => _ExampleState();
}
class _ExampleState extends State<Example> {
final Runtime _runtime = Runtime();
final DynamicContent _data = DynamicContent();
static final RemoteWidgetLibrary _remoteWidgets = parseLibraryFile('''
import core.widgets;
widget root = Container(
color: 0xFF002211,
child: Center(
child: Random(text: ["Hello, ", data.name.greet, "!"], textDirection: "ltr"),
),
);
''');
static const LibraryName coreName = LibraryName(<String>['core', 'widgets']);
static const LibraryName mainName = LibraryName(<String>['main']);
@override
void initState() {
super.initState();
_runtime.update(coreName, createCoreWidgets());
_runtime.update(mainName, _remoteWidgets);
_data.update('greet', <String, Object>{'name': 'World'});
}
@override
Widget build(BuildContext context) {
return RemoteWidget(
runtime: _runtime,
data: _data,
widget: const FullyQualifiedWidgetName(mainName, 'root'),
onEvent: (String name, DynamicMap arguments) {
debugPrint('user triggered event "$name" with data: $arguments');
},
);
}
}
Screenshots or Video
Logs
Logs
[Paste your logs here]Flutter Doctor output
Doctor output
[Paste your output here]Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound in release: 3.20Found to occur in 3.20Found to occur in 3.20found in release: 3.21Found to occur in 3.21Found to occur in 3.21has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: rfwRemote Flutter Widgets packageRemote Flutter Widgets packagepackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-ecosystemOwned by Ecosystem teamOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem teamTriaged by Ecosystem team
