cooperation 1.0.0 cooperation: ^1.0.0 copied to clipboard
A Flutter plugin that calls dart function in native code.
import 'package:cooperation_example/entry.dart';
import 'package:cooperation/cooperation.dart';
void main() {
}
@pragma('vm:entry-point')
entry() {
Cooperation.instance.addHandler('m1', (arguments) async {
return arguments?['platform'];
});
Cooperation.instance.addHandler('m2', (arguments) async {
return 'm2';
});
}