// 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 TXPaster extends NSObject  {
  //region constants
  static const String name__ = 'TXPaster';

  
  //endregion

  //region creators
  static Future<TXPaster> create__({ bool init = true /* ios only */ }) async {
    final refId = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('ObjectFactory::createTXPaster', {'init': init});
    final object = TXPaster()..refId = refId..tag__ = 'tencent_live_fluttify';
    return object;
  }
  
  static Future<List<TXPaster>> 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_batchTXPaster', {'length': length, 'init': init});
  
    final List<TXPaster> typedResult = resultBatch.map((result) => TXPaster()..refId = result..tag__ = 'tencent_live_fluttify').toList();
    return typedResult;
  }
  
  //endregion

  //region getters
  Future<UIImage> get_pasterImage() async {
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXPaster::get_pasterImage", {'__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("TXPaster::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("TXPaster::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("TXPaster::get_endTime", {'__this__': this});
    return __result__ == null ? null : (__result__);
  }
  
  //endregion

  //region setters
  Future<void> set_pasterImage(UIImage pasterImage) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXPaster::set_pasterImage', <String, dynamic>{'__this__': this, "pasterImage": pasterImage});
  
  
  }
  
  Future<void> set_frame(CGRect frame) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXPaster::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('TXPaster::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('TXPaster::set_endTime', <String, dynamic>{'__this__': this, "endTime": endTime});
  
  
  }
  
  //endregion

  //region methods
  
  //endregion
}

extension TXPaster_Batch on List<TXPaster> {
  //region getters
  Future<List<UIImage>> get_pasterImage_batch() async {
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXPaster::get_pasterImage_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("TXPaster::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("TXPaster::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("TXPaster::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_pasterImage_batch(List<UIImage> pasterImage) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('TXPaster::set_pasterImage_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "pasterImage": pasterImage[__i__]}]);
  
  
  }
  
  Future<void> set_frame_batch(List<CGRect> frame) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('TXPaster::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('TXPaster::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('TXPaster::set_endTime_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "endTime": endTime[__i__]}]);
  
  
  }
  
  //endregion

  //region methods
  
  //endregion
}