getChannels method

  1. @override
Future<List<NotificationChannel>> getChannels()
override

Implementation

@override
Future<List<NotificationChannel>> getChannels() async {
  final Map response = await methodChannel.invokeMethod('getChannels');
  final List<NotificationChannel> channels = List.from([]);
  for (var item in response.entries) {
    channels.add(NotificationChannel.fromJson(jsonDecode(item.value)));
  }
  return channels;
}