-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add linux kdf copy step & build step renaming
- Loading branch information
1 parent
31cf94a
commit 7858120
Showing
6 changed files
with
84 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#include <flutter_linux/flutter_linux.h> | ||
|
||
#include "mm2_plugin.h" | ||
|
||
struct _Mm2Plugin { | ||
GObject parent_instance; | ||
}; | ||
|
||
G_DEFINE_TYPE(Mm2Plugin, mm2_plugin, g_object_get_type()) | ||
|
||
static void mm2_plugin_dispose(GObject* object) { | ||
G_OBJECT_CLASS(mm2_plugin_parent_class)->dispose(object); | ||
} | ||
|
||
static void mm2_plugin_class_init(Mm2PluginClass* klass) { | ||
G_OBJECT_CLASS(klass)->dispose = mm2_plugin_dispose; | ||
} | ||
|
||
static void mm2_plugin_init(Mm2Plugin* self) {} | ||
|
||
static void method_call_cb(FlMethodChannel* channel, FlMethodCall* method_call, | ||
gpointer user_data) { | ||
// Handle method calls here | ||
} | ||
|
||
void mm2_plugin_register_with_registrar(FlPluginRegistrar* registrar) { | ||
Mm2Plugin* plugin = MM2_PLUGIN( | ||
g_object_new(mm2_plugin_get_type(), nullptr)); | ||
|
||
g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new(); | ||
g_autoptr(FlMethodChannel) channel = | ||
fl_method_channel_new(fl_plugin_registrar_get_messenger(registrar), | ||
"mm2", | ||
FL_METHOD_CODEC(codec)); | ||
fl_method_channel_set_method_call_handler(channel, method_call_cb, | ||
g_object_ref(plugin), | ||
g_object_unref); | ||
|
||
g_object_unref(plugin); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#ifndef FLUTTER_PLUGIN_MM2_PLUGIN_H_ | ||
#define FLUTTER_PLUGIN_MM2_PLUGIN_H_ | ||
|
||
#include <flutter_linux/flutter_linux.h> | ||
|
||
G_BEGIN_DECLS | ||
|
||
#define MM2_TYPE_PLUGIN (mm2_plugin_get_type()) | ||
|
||
G_DECLARE_FINAL_TYPE(Mm2Plugin, mm2_plugin, MM2, PLUGIN, GObject) | ||
|
||
void mm2_plugin_register_with_registrar(FlPluginRegistrar* registrar); | ||
|
||
G_END_DECLS | ||
|
||
#endif // FLUTTER_PLUGIN_MM2_PLUGIN_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters