-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/engine
#21423Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listc: performanceRelates to speed or footprint issues (see "perf:" labels)Relates to speed or footprint issues (see "perf:" labels)engineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-webWeb applications specificallyWeb applications specifically
Milestone
Description
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
void main() {
runApp(TestApp());
}
class TestApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: RaisedButton(
onPressed: () {
print('calling method');
OptionalMethodChannel('foo').invokeMethod('bar').then((_) {
print('Done');
});
},
child: Text('push'),
),
),
),
);
}
}When calling a method channel, that's not implemented on the native side, OptionalMethodChannels are documented to return null. This works as expected on mobile. However, on the web, the code above just hangs.
This is a problem for apps that use state restoration, which relies on the fact that if the platform is not implementing the state restoration channel, state restoration is turned off.
/cc @yjbanov
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listc: performanceRelates to speed or footprint issues (see "perf:" labels)Relates to speed or footprint issues (see "perf:" labels)engineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-webWeb applications specificallyWeb applications specifically