@@ -13,9 +13,10 @@ import (
13
13
// The BinaryMessenger is passed to allow the plugin to register channels.
14
14
// A plugin may optionally implement PluginGLFW.
15
15
type Plugin interface {
16
- // InitPlugin is called during the startup of the flutter application. The
17
- // plugin is responsible for setting up channels using the BinaryMessenger.
18
- // If an error is returned it is printend the application is stopped.
16
+ // InitPlugin is called before creating the GLFW window of the flutter
17
+ // application. The plugin is responsible for setting up channels using the
18
+ // BinaryMessenger.
19
+ // If an error is returned it is printed the application is stopped.
19
20
InitPlugin (messenger plugin.BinaryMessenger ) error
20
21
}
21
22
@@ -26,14 +27,15 @@ type Plugin interface {
26
27
//
27
28
// PluginGLFW is separated because not all plugins need to know about glfw,
28
29
// Adding glfw.Window to the InitPlugin call would add glfw as dependency to
29
- // every plugin implementation. Also, this helps in a scenarion where glfw is
30
+ // every plugin implementation. Also, this helps in a scenario where glfw is
30
31
// moved into a separate renderer/glfw package.
31
32
//
32
33
// The PluginGLFW interface is not stable and may change at any time.
33
34
type PluginGLFW interface {
34
- // Any type inmplementing PluginGLFW must also implement Plugin.
35
+ // Any type implementing PluginGLFW must also implement Plugin.
35
36
Plugin
36
- // InitPluginGLFW is called after the call to InitPlugin. When an error is
37
- // returned it is printend the application is stopped.
37
+ // InitPluginGLFW is called after the flutter engine is linked to the GLFW
38
+ // window. When an error is returned it is printed the application is
39
+ // stopped.
38
40
InitPluginGLFW (window * glfw.Window ) error
39
41
}
0 commit comments