Skip to content

Commit

Permalink
chore: Replace channel name to dev.leanflutter.plugins/protocol_handler
Browse files Browse the repository at this point in the history
  • Loading branch information
lijy91 committed Jan 28, 2024
1 parent 58e4548 commit 7772088
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class ProtocolHandlerPlugin implements FlutterPlugin, MethodCallHandler,

@Override
public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBinding) {
channel = new MethodChannel(flutterPluginBinding.getBinaryMessenger(), "protocol_handler");
channel = new MethodChannel(flutterPluginBinding.getBinaryMessenger(), "dev.leanflutter.plugins/protocol_handler");
channel.setMethodCallHandler(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class SwiftProtocolHandlerPlugin: NSObject, FlutterPlugin {
private var _initialUrl: String?

public static func register(with registrar: FlutterPluginRegistrar) {
let channel = FlutterMethodChannel(name: "protocol_handler", binaryMessenger: registrar.messenger())
let channel = FlutterMethodChannel(name: "dev.leanflutter.plugins/protocol_handler", binaryMessenger: registrar.messenger())
let instance = SwiftProtocolHandlerPlugin()
instance.channel = channel
registrar.addMethodCallDelegate(instance, channel: channel)
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol_handler/lib/src/protocol_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ProtocolHandler {
/// The shared instance of [ProtocolHandler].
static final ProtocolHandler instance = ProtocolHandler._();

final MethodChannel _channel = const MethodChannel('protocol_handler');
final MethodChannel _channel = const MethodChannel('dev.leanflutter.plugins/protocol_handler');

final ObserverList<ProtocolListener> _listeners =
ObserverList<ProtocolListener>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class ProtocolHandlerPlugin: NSObject, FlutterPlugin,FlutterAppLifecycleD
}

public static func register(with registrar: FlutterPluginRegistrar) {
let channel = FlutterMethodChannel(name: "protocol_handler", binaryMessenger: registrar.messenger)
let channel = FlutterMethodChannel(name: "dev.leanflutter.plugins/protocol_handler", binaryMessenger: registrar.messenger)
let instance = ProtocolHandlerPlugin()
_instance = instance
instance.channel = channel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void ProtocolHandlerPlugin::RegisterWithRegistrar(
auto plugin = std::make_unique<ProtocolHandlerPlugin>(
registrar,
std::make_unique<flutter::MethodChannel<flutter::EncodableValue>>(
registrar->messenger(), "protocol_handler",
registrar->messenger(), "dev.leanflutter.plugins/protocol_handler",
&flutter::StandardMethodCodec::GetInstance()));
plugin->channel()->SetMethodCallHandler(
[plugin_pointer = plugin.get()](const auto& call, auto result) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import 'package:protocol_handler_platform_interface/src/protocol_handler_platfor
class MethodChannelProtocolHandler extends ProtocolHandlerPlatform {
/// The method channel used to interact with the native platform.
@visibleForTesting
final methodChannel = const MethodChannel('protocol_handler');
final methodChannel = const MethodChannel(
'dev.leanflutter.plugins/protocol_handler',
);

@override
Future<String?> getPlatformVersion() async {
Expand Down

0 comments on commit 7772088

Please sign in to comment.