-
Notifications
You must be signed in to change notification settings - Fork 605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overhaul example plugin, and rename it 'sample' #654
Overhaul example plugin, and rename it 'sample' #654
Conversation
Having _plugin in the name made in inconsistent with all the actual plugins, making it harder to see how to adjust it to a real plugin name.
- Remove channel ivar, since it's not used in the example. - Add comments in the code for the things to change. - Remove most of the README in favor of pointing to the code comments, to make it easier to keep updated over time, and to reduce the need to look back and forth between two places while using the sample.
@@ -0,0 +1,41 @@ | |||
# sample_plugin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is showing up as a new file rather than a modification of the old README because it both moved, and changed substantially due to moving a bunch of the specific instructions into comments in the code.
@@ -14,7 +14,7 @@ | |||
<VCProjectVersion>15.0</VCProjectVersion> | |||
<ProjectGuid>{95E21B2C-C18A-4CED-8509-585CB2570FDE}</ProjectGuid> | |||
<Keyword>Win32Proj</Keyword> | |||
<RootNamespace>example_plugin</RootNamespace> | |||
<RootNamespace>dev_flutter_plugin</RootNamespace> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this isn't currently used by anything, I just gave it a generic value instead of the plugin name, since I think it's likely to not get updated by people, in practice, so long as it's unused and not surfaced anywhere.
|
||
ExamplePlugin::RegisterWithRegistrar(plugin_registrar); | ||
} | ||
// Copyright 2019 Google LLC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was using Windows line endings for some reason, unlike all our other code files, thus the everything-changed diff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just some typos
Renames the plugin from 'example_plugin' to 'sample' so that the naming is
consistent with all the actual plugins (which have 'plugin' in the class name,
but not the actual plugin name).
Also makes various improvements to the sample code and documentation,
as described in the associated bug.
Fixes #648