Adds a type parameter to invokeMethod (and additional utility methods) (#26303)
This commit is contained in:
@@ -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;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user