// ignore_for_file: non_constant_identifier_names, camel_case_types, missing_return, unused_import, unused_local_variable, dead_code, unnecessary_cast
//////////////////////////////////////////////////////////
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
//////////////////////////////////////////////////////////

import 'dart:typed_data';

import 'package:tencent_live_fluttify/src/ios/ios.export.g.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';

import 'package:foundation_fluttify/foundation_fluttify.dart';

class TXSubtitle extends NSObject  {
  //region constants
  static const String name__ = 'TXSubtitle';

  
  //endregion

  //region creators
  static Future<TXSubtitle> create__({ bool init = true /* ios only */ }) async {
    final refId = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('ObjectFactory::createTXSubtitle', {'init': init});
    final object = TXSubtitle()..refId = refId..tag__ = 'tencent_live_fluttify';
    return object;
  }
  
  static Future<List<TXSubtitle>> create_batch__(int length, { bool init = true /* ios only */ }) async {
    if (false) {
      return Future.error('all args must have same length!');
    }
    final List resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('ObjectFactory::create_batchTXSubtitle', {'length': length, 'init': init});
  
    final List<TXSubtitle> typedResult = resultBatch.map((result) => TXSubtitle()..refId = result..tag__ = 'tencent_live_fluttify').toList();
    return typedResult;
  }
  
  //endregion

  //region getters
  Future<UIImage> get_titleImage() async {
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXSubtitle::get_titleImage", {'__this__': this});
    return __result__ == null ? null : (UIImage()..refId = __result__..tag__ = 'tencent_live_fluttify');
  }
  
  Future<CGRect> get_frame() async {
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXSubtitle::get_frame", {'__this__': this});
    return __result__ == null ? null : (CGRect()..refId = __result__..tag__ = 'tencent_live_fluttify');
  }
  
  Future<double> get_startTime() async {
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXSubtitle::get_startTime", {'__this__': this});
    return __result__ == null ? null : (__result__);
  }
  
  Future<double> get_endTime() async {
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXSubtitle::get_endTime", {'__this__': this});
    return __result__ == null ? null : (__result__);
  }
  
  //endregion

  //region setters
  Future<void> set_titleImage(UIImage titleImage) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXSubtitle::set_titleImage', <String, dynamic>{'__this__': this, "titleImage": titleImage});
  
  
  }
  
  Future<void> set_frame(CGRect frame) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXSubtitle::set_frame', <String, dynamic>{'__this__': this, "frame": frame});
  
  
  }
  
  Future<void> set_startTime(double startTime) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXSubtitle::set_startTime', <String, dynamic>{'__this__': this, "startTime": startTime});
  
  
  }
  
  Future<void> set_endTime(double endTime) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXSubtitle::set_endTime', <String, dynamic>{'__this__': this, "endTime": endTime});
  
  
  }
  
  //endregion

  //region methods
  
  //endregion
}

extension TXSubtitle_Batch on List<TXSubtitle> {
  //region getters
  Future<List<UIImage>> get_titleImage_batch() async {
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXSubtitle::get_titleImage_batch", [for (final __item__ in this) {'__this__': __item__}]);
  
    final typedResult = (resultBatch as List).cast<String>().map((__result__) => UIImage()..refId = __result__..tag__ = 'tencent_live_fluttify').toList();
    return typedResult;
  }
  
  Future<List<CGRect>> get_frame_batch() async {
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXSubtitle::get_frame_batch", [for (final __item__ in this) {'__this__': __item__}]);
  
    final typedResult = (resultBatch as List).cast<String>().map((__result__) => CGRect()..refId = __result__..tag__ = 'tencent_live_fluttify').toList();
    return typedResult;
  }
  
  Future<List<double>> get_startTime_batch() async {
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXSubtitle::get_startTime_batch", [for (final __item__ in this) {'__this__': __item__}]);
  
    final typedResult = (resultBatch as List).cast<double>().map((__result__) => __result__).toList();
    return typedResult;
  }
  
  Future<List<double>> get_endTime_batch() async {
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXSubtitle::get_endTime_batch", [for (final __item__ in this) {'__this__': __item__}]);
  
    final typedResult = (resultBatch as List).cast<double>().map((__result__) => __result__).toList();
    return typedResult;
  }
  
  //endregion

  //region setters
  Future<void> set_titleImage_batch(List<UIImage> titleImage) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('TXSubtitle::set_titleImage_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "titleImage": titleImage[__i__]}]);
  
  
  }
  
  Future<void> set_frame_batch(List<CGRect> frame) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('TXSubtitle::set_frame_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "frame": frame[__i__]}]);
  
  
  }
  
  Future<void> set_startTime_batch(List<double> startTime) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('TXSubtitle::set_startTime_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "startTime": startTime[__i__]}]);
  
  
  }
  
  Future<void> set_endTime_batch(List<double> endTime) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('TXSubtitle::set_endTime_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "endTime": endTime[__i__]}]);
  
  
  }
  
  //endregion

  //region methods
  
  //endregion
}