refactor: Lot of code duplication when I use this template #88
Labels
product: very_good_flutter_plugin
Changes that affect the Very Good Flutter Plugin template.
refactor
A code change that neither fixes a bug nor add a feature
Description
I'm using this template for me flutter plugin and trying to remove boiler plate. I noticed that I have basically the same for each platform the same test and also the same code (just invoking my method channel to let the native code do the hard work).
I noticed that I should be able to use the same
MethodChannel{PluginName}
for all my platform implementations I had this code:class {PluginName}Android extends {PluginName}Platform {
I replaced it now withclass {PluginName}Android extends MethodChannel{PluginName} {
and how each platform has basically the same code. For some platforms I really only pass the data via method channel and therefore that class is not required at all. This also applies for the tests. I the differences are just the platform name in the class names.What do you think about it? Is there not a lot of boiler plate just to make some CI test pass?
Requirements
The text was updated successfully, but these errors were encountered: