Adds a type parameter to invokeMethod (and additional utility methods) (#26303)

This commit is contained in:
Jonah Williams
2019-01-10 13:21:03 -08:00
committed by GitHub
parent dca8d36d62
commit 83af6f48d6
15 changed files with 149 additions and 62 deletions

View File

@@ -18,7 +18,7 @@ class _FlavorState extends State<Flavor> {
@override
void initState() {
super.initState();
const MethodChannel('flavor').invokeMethod('getFlavor').then((Object flavor) {
const MethodChannel('flavor').invokeMethod<String>('getFlavor').then((String flavor) {
setState(() {
_flavor = flavor;
});