getIRCCCodes method Null safety

Future<List> getIRCCCodes()

List codes = getIRCCCodes();

Returns a list of IRCC codes supported by the TV. IRCC codes are what a remote control (for the TV) app would send when a button (play, pause, volume up...) is pressed.

Implementation

Future<List<dynamic>> getIRCCCodes() async {
  if (_codes.length <= 0) {
    final result = await system.invoke('getRemoteControllerInfo');
    _codes = result[1];
  }
  return _codes;
}