基础组件库
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

ZhiyingBaseWidgetPlugin.m 750 B

4 年前
1234567891011121314151617181920
  1. #import "ZhiyingBaseWidgetPlugin.h"
  2. @implementation ZhiyingBaseWidgetPlugin
  3. + (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
  4. FlutterMethodChannel* channel = [FlutterMethodChannel
  5. methodChannelWithName:@"zhiying_base_widget"
  6. binaryMessenger:[registrar messenger]];
  7. ZhiyingBaseWidgetPlugin* instance = [[ZhiyingBaseWidgetPlugin alloc] init];
  8. [registrar addMethodCallDelegate:instance channel:channel];
  9. }
  10. - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
  11. if ([@"getPlatformVersion" isEqualToString:call.method]) {
  12. result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]);
  13. } else {
  14. result(FlutterMethodNotImplemented);
  15. }
  16. }
  17. @end