agent-workspace / flutter /packages /flutter_tools /templates /plugin /ios-objc.tmpl /Classes /pluginClass.m.tmpl
agent-workspace / flutter /packages /flutter_tools /templates /plugin /ios-objc.tmpl /Classes /pluginClass.m.tmpl
Download flutter/packages/flutter_tools/templates/plugin/ios-objc.tmpl/Classes/pluginClass.m.tmpl from luom2645/agent-workspace: direct link, hf CLI and curl.
- Browser
- Download file 714 Bytes
-
https://huggingface.co/luom2645/agent-workspace/resolve/7d4c5ffdb4518a5d7456ef06ab77458fcf42663a/flutter/packages/flutter_tools/templates/plugin/ios-objc.tmpl/Classes/pluginClass.m.tmpl
- Command line
-
hf download hf://luom2645/agent-workspace@7d4c5ffdb4518a5d7456ef06ab77458fcf42663a/flutter/packages/flutter_tools/templates/plugin/ios-objc.tmpl/Classes/pluginClass.m.tmpl
-
curl -L -o pluginClass.m.tmpl https://huggingface.co/luom2645/agent-workspace/resolve/7d4c5ffdb4518a5d7456ef06ab77458fcf42663a/flutter/packages/flutter_tools/templates/plugin/ios-objc.tmpl/Classes/pluginClass.m.tmpl
714 Bytes
| #import "{{pluginClass}}.h" | |
| @implementation {{pluginClass}} | |
| + (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar { | |
| FlutterMethodChannel* channel = [FlutterMethodChannel | |
| methodChannelWithName:@"{{projectName}}" | |
| binaryMessenger:[registrar messenger]]; | |
| {{pluginClass}}* instance = [[{{pluginClass}} alloc] init]; | |
| [registrar addMethodCallDelegate:instance channel:channel]; | |
| } | |
| - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result { | |
| if ([@"getPlatformVersion" isEqualToString:call.method]) { | |
| result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]); | |
| } else { | |
| result(FlutterMethodNotImplemented); | |
| } | |
| } | |
| @end | |