I created a new plugin with
flutter create --template plugin alfalfa
which generates lib/alfalfa.dart
containing
import 'dart:async';
import 'package:flutter/services.dart';
class Alfalfa {
static const MethodChannel _channel =
const MethodChannel('alfalfa');
//...
}
I want to add an EventChannel
so Java and Objective-C code can call back to the Dart code. I don't know what the name of the EventChannel
should be.
final EventChannel _eventChannel =
const EventChannel("com.rollingfields.alfalfa/events");
or
final EventChannel _eventChannel =
const EventChannel("alfalfa/events");
or something else? Is there a convention?
If the better option for the EventChannel
is the name including the reverse domain, should I rename the generated MethodChannel
to be com.rollingfields.alfalfa
?