Flutter Easy Plugin

A plugin basic class for Flutter. To implement method of plugin class directly without handleMethodCall or onMethodCall .

Flutter Test pub package Build Status style: effective dart


  • Class FlutterEasyPlugin must be as parent class.
  • Subclass implement plugin method directly without handleMethodCall or onMethodCall.
  • Just like an native method implementation for Flutter channel call.
  • Support result such as return-value, async-return-value and error for implemented method.
  • Try to see examples for detail or see method getPlatformVersion.


To use this plugin, add flutter_easy_plugin as a dependency in your pubspec.yaml file. For example:

  flutter_easy_plugin: 0.0.1



// iOS result
@interface FlutterEasyPluginResult : NSObject

+ (instancetype)notImplemention;

+ (instancetype)return:(id)value;

+ (instancetype)error:(NSError *)error;

+ (instancetype)async:(void (^)(void (^done)(id value, NSError *_Nullable error)))block;


// iOS base class
@interface FlutterEasyPlugin : NSObject<FlutterPlugin>

@property (nonatomic, copy, class, readonly) NSString *channelName;

@property (nonatomic, strong, readonly) FlutterMethodChannel *methodChannel;

- (instancetype)initWithMethodChannel:(FlutterMethodChannel *)methodChannel NS_DESIGNATED_INITIALIZER;



// Android Result
public abstract class FlutterEasyPluginResult {
    public static FlutterEasyPluginResult success(Object object) {
        return new FlutterEasyPluginReturnResult(object);

    public static FlutterEasyPluginResult error(Error error) {
        return new FlutterEasyPluginErrorResult(error);

    public static FlutterEasyPluginResult notImplemented() {
        return new FlutterEasyPluginNotImplementedResult();
    public static FlutterEasyPluginResult async(AsyncExcutor excutor) {
        return new FlutterEasyPluginAsyncResult(excutor);

// Android base class
public class FlutterEasyPlugin implements MethodCallHandler {}


Please file any issues, bugs or feature request as an issue on our Github page.

Want to contribute

If you would like to contribute to the plugin (e.g. by improving the documentation, solving a bug or adding a cool new feature), please carefully review our contribution guide and send us your pull request.


This Flutter easy plugin for Flutter is developed by modool. You can contact us at modool.go@gmail.com