contants_select_method_channel.dart
844 Bytes
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
import 'contants_select_platform_interface.dart';
/// An implementation of [ContantsSelectPlatform] that uses method channels.
class MethodChannelContantsSelect extends ContantsSelectPlatform {
/// The method channel used to interact with the native platform.
@visibleForTesting
final methodChannel = const MethodChannel('contants_select');
@override
Future<String?> getPlatformVersion() async {
final version =
await methodChannel.invokeMethod<String>('getPlatformVersion');
return version;
}
@override
Future<List<dynamic>?> getContact(bool isMultiSelect) async {
List<dynamic>? contact = await methodChannel
.invokeMethod<List<dynamic>>('getContact', {'isMultiSelect': isMultiSelect});
return contact;
}
}