Skip to content

Instantly share code, notes, and snippets.

@liusilong
Created May 9, 2020 15:33
Show Gist options
  • Save liusilong/493026e3e84ba050115ca9d094fb7d14 to your computer and use it in GitHub Desktop.
Save liusilong/493026e3e84ba050115ca9d094fb7d14 to your computer and use it in GitHub Desktop.
import 'dart:async';
import 'package:flutter/services.dart';
class Flutterplugin17 {
static const MethodChannel _channel =
const MethodChannel('flutterplugin17');
static Future<String> get platformVersion async {
final String version = await _channel.invokeMethod('getPlatformVersion');
return version;
}
static Future<void> callMethod() async{
await _channel.invokeMethod("personName");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment