// 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:amap_map_fluttify/src/ios/ios.export.g.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';

import 'package:foundation_fluttify/foundation_fluttify.dart';
import 'package:core_location_fluttify/core_location_fluttify.dart';
import 'package:amap_core_fluttify/amap_core_fluttify.dart';
import 'package:amap_search_fluttify/amap_search_fluttify.dart';
import 'package:amap_location_fluttify/amap_location_fluttify.dart';

class MAParticleRandomVelocityGenerate extends NSObject with MAParticleVelocityGenerate {
  //region constants
  static const String name__ = 'MAParticleRandomVelocityGenerate';

  @override
  final String tag__ = 'amap_map_fluttify';

  
  //endregion

  //region creators
  static Future<MAParticleRandomVelocityGenerate> create__({ bool init = true /* ios only */ }) async {
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod(
      'ObjectFactory::createMAParticleRandomVelocityGenerate',
      {'init': init}
    );
    return AmapMapFluttifyIOSAs<MAParticleRandomVelocityGenerate>(__result__)!;
  }
  
  static Future<List<MAParticleRandomVelocityGenerate>> create_batch__(int length, { bool init = true /* ios only */ }) async {
    assert(true);
    final __result_batch__ = await  kAmapMapFluttifyChannel.invokeListMethod(
      'ObjectFactory::create_batchMAParticleRandomVelocityGenerate',
      {'length': length, 'init': init}
    );
    return __result_batch__
        ?.map((it) => AmapMapFluttifyIOSAs<MAParticleRandomVelocityGenerate>(it))
        .where((element) => element !=null)
        .cast<MAParticleRandomVelocityGenerate>()
        .toList() ?? <MAParticleRandomVelocityGenerate>[];
  }
  
  //endregion

  //region getters
  
  //endregion

  //region setters
  
  //endregion

  //region methods
  
  Future<MAParticleRandomVelocityGenerate?> initWithBoundaryValueX1_Y1_Z1_X2_Y2_Z2(double? x1, double? y1, double? z1, double? x2, double? y2, double? z2) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: MAParticleRandomVelocityGenerate@$refId::initWithBoundaryValueX1([\'x1\':$x1, \'y1\':$y1, \'z1\':$z1, \'x2\':$x2, \'y2\':$y2, \'z2\':$z2])');
    }
  
    // invoke native method
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod('MAParticleRandomVelocityGenerate::initWithBoundaryValueX1_Y1_Z1_X2_Y2_Z2', {"x1": x1, "y1": y1, "z1": z1, "x2": x2, "y2": y2, "z2": z2, "__this__": this});
  
  
    // handle native call
  
  
    return AmapMapFluttifyIOSAs<MAParticleRandomVelocityGenerate>(__result__);
  }
  
  //endregion

  @override
  String toString() {
    return 'MAParticleRandomVelocityGenerate{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}';
  }
}

extension MAParticleRandomVelocityGenerate_Batch on List<MAParticleRandomVelocityGenerate?> {
  String? get refId {
    if (isEmpty) return null;
    return first?.refId;
  }

  //region getters
  
  //endregion

  //region setters
  
  //endregion

  //region methods
  
  Future<List<MAParticleRandomVelocityGenerate?>> initWithBoundaryValueX1_Y1_Z1_X2_Y2_Z2_batch(List<double?> x1, List<double?> y1, List<double?> z1, List<double?> x2, List<double?> y2, List<double?> z2) async {
    assert(x1.length == y1.length && y1.length == z1.length && z1.length == x2.length && x2.length == y2.length && y2.length == z2.length);
  
    // invoke native method
    final resultBatch = await kAmapMapFluttifyChannel.invokeMethod('MAParticleRandomVelocityGenerate::initWithBoundaryValueX1_Y1_Z1_X2_Y2_Z2_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"x1": x1[__i__], "y1": y1[__i__], "z1": z1[__i__], "x2": x2[__i__], "y2": y2[__i__], "z2": z2[__i__], "__this__": this[__i__]}]);
  
  
    return (resultBatch as List).map((__result__) => AmapMapFluttifyIOSAs<MAParticleRandomVelocityGenerate>(__result__)).cast<MAParticleRandomVelocityGenerate?>().toList();
  }
  
  //endregion
}