diff --git a/frb_example/pure_dart/dart/lib/bridge_generated.dart b/frb_example/pure_dart/dart/lib/bridge_generated.dart index d79c27a461..c75acf3e53 100644 --- a/frb_example/pure_dart/dart/lib/bridge_generated.dart +++ b/frb_example/pure_dart/dart/lib/bridge_generated.dart @@ -25,11 +25,7 @@ abstract class FlutterRustBridgeExample { /// Newlines are preserved. /// Future primitiveTypes( - {required int myI32, - required int myI64, - required double myF64, - required bool myBool, - dynamic hint}); + {required int myI32, required int myI64, required double myF64, required bool myBool, dynamic hint}); Future primitiveU32({required int myU32, dynamic hint}); @@ -39,22 +35,17 @@ abstract class FlutterRustBridgeExample { Future handleVecU8({required Uint8List v, dynamic hint}); - Future handleVecOfPrimitive( - {required int n, dynamic hint}); + Future handleVecOfPrimitive({required int n, dynamic hint}); - Future handleZeroCopyVecOfPrimitive( - {required int n, dynamic hint}); + Future handleZeroCopyVecOfPrimitive({required int n, dynamic hint}); - Future handleStruct( - {required MySize arg, required MySize boxed, dynamic hint}); + Future handleStruct({required MySize arg, required MySize boxed, dynamic hint}); Future handleNewtype({required NewTypeInt arg, dynamic hint}); - Future> handleListOfStruct( - {required List l, dynamic hint}); + Future> handleListOfStruct({required List l, dynamic hint}); - Future> handleStringList( - {required List names, dynamic hint}); + Future> handleStringList({required List names, dynamic hint}); Future handleComplexStruct({required MyTreeNode s, dynamic hint}); @@ -68,13 +59,11 @@ abstract class FlutterRustBridgeExample { Future returnPanic({dynamic hint}); - Future handleOptionalReturn( - {required double left, required double right, dynamic hint}); + Future handleOptionalReturn({required double left, required double right, dynamic hint}); Future handleOptionalStruct({String? document, dynamic hint}); - Future handleOptionalIncrement( - {ExoticOptionals? opt, dynamic hint}); + Future handleOptionalIncrement({ExoticOptionals? opt, dynamic hint}); Future handleIncrementBoxedOptional({double? opt, dynamic hint}); @@ -90,13 +79,11 @@ abstract class FlutterRustBridgeExample { Future handleReturnEnum({required String input, dynamic hint}); - Future handleEnumParameter( - {required Weekdays weekday, dynamic hint}); + Future handleEnumParameter({required Weekdays weekday, dynamic hint}); Future handleCustomizedStruct({required Customized val, dynamic hint}); - Future handleEnumStruct( - {required KitchenSink val, dynamic hint}); + Future handleEnumStruct({required KitchenSink val, dynamic hint}); Future useImportedStruct({required MyStruct myStruct, dynamic hint}); @@ -104,8 +91,7 @@ abstract class FlutterRustBridgeExample { Future getAppSettings({dynamic hint}); - Future isAppEmbedded( - {required ApplicationSettings appSettings, dynamic hint}); + Future isAppEmbedded({required ApplicationSettings appSettings, dynamic hint}); Future getMessage({dynamic hint}); @@ -390,19 +376,15 @@ class ZeroCopyVecOfPrimitivePack { }); } -class FlutterRustBridgeExampleImpl - extends FlutterRustBridgeBase +class FlutterRustBridgeExampleImpl extends FlutterRustBridgeBase implements FlutterRustBridgeExample { factory FlutterRustBridgeExampleImpl(ffi.DynamicLibrary dylib) => FlutterRustBridgeExampleImpl.raw(FlutterRustBridgeExampleWire(dylib)); - FlutterRustBridgeExampleImpl.raw(FlutterRustBridgeExampleWire inner) - : super(inner); + FlutterRustBridgeExampleImpl.raw(FlutterRustBridgeExampleWire inner) : super(inner); - Future simpleAdder({required int a, required int b, dynamic hint}) => - executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - inner.wire_simple_adder(port_, _api2wire_i32(a), _api2wire_i32(b)), + Future simpleAdder({required int a, required int b, dynamic hint}) => executeNormal(FlutterRustBridgeTask( + callFfi: (port_) => inner.wire_simple_adder(port_, _api2wire_i32(a), _api2wire_i32(b)), parseSuccessData: _wire2api_i32, constMeta: const FlutterRustBridgeTaskConstMeta( debugName: "simple_adder", @@ -413,18 +395,10 @@ class FlutterRustBridgeExampleImpl )); Future primitiveTypes( - {required int myI32, - required int myI64, - required double myF64, - required bool myBool, - dynamic hint}) => + {required int myI32, required int myI64, required double myF64, required bool myBool, dynamic hint}) => executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => inner.wire_primitive_types( - port_, - _api2wire_i32(myI32), - _api2wire_i64(myI64), - _api2wire_f64(myF64), - myBool), + callFfi: (port_) => + inner.wire_primitive_types(port_, _api2wire_i32(myI32), _api2wire_i64(myI64), _api2wire_f64(myF64), myBool), parseSuccessData: _wire2api_i32, constMeta: const FlutterRustBridgeTaskConstMeta( debugName: "primitive_types", @@ -434,10 +408,8 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Future primitiveU32({required int myU32, dynamic hint}) => - executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - inner.wire_primitive_u32(port_, _api2wire_u32(myU32)), + Future primitiveU32({required int myU32, dynamic hint}) => executeNormal(FlutterRustBridgeTask( + callFfi: (port_) => inner.wire_primitive_u32(port_, _api2wire_u32(myU32)), parseSuccessData: _wire2api_u32, constMeta: const FlutterRustBridgeTaskConstMeta( debugName: "primitive_u32", @@ -447,10 +419,8 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Future handleString({required String s, dynamic hint}) => - executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - inner.wire_handle_string(port_, _api2wire_String(s)), + Future handleString({required String s, dynamic hint}) => executeNormal(FlutterRustBridgeTask( + callFfi: (port_) => inner.wire_handle_string(port_, _api2wire_String(s)), parseSuccessData: _wire2api_String, constMeta: const FlutterRustBridgeTaskConstMeta( debugName: "handle_string", @@ -460,8 +430,7 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Future handleReturnUnit({dynamic hint}) => - executeNormal(FlutterRustBridgeTask( + Future handleReturnUnit({dynamic hint}) => executeNormal(FlutterRustBridgeTask( callFfi: (port_) => inner.wire_handle_return_unit(port_), parseSuccessData: _wire2api_unit, constMeta: const FlutterRustBridgeTaskConstMeta( @@ -472,10 +441,8 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Future handleVecU8({required Uint8List v, dynamic hint}) => - executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - inner.wire_handle_vec_u8(port_, _api2wire_uint_8_list(v)), + Future handleVecU8({required Uint8List v, dynamic hint}) => executeNormal(FlutterRustBridgeTask( + callFfi: (port_) => inner.wire_handle_vec_u8(port_, _api2wire_uint_8_list(v)), parseSuccessData: _wire2api_uint_8_list, constMeta: const FlutterRustBridgeTaskConstMeta( debugName: "handle_vec_u8", @@ -485,11 +452,9 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Future handleVecOfPrimitive( - {required int n, dynamic hint}) => + Future handleVecOfPrimitive({required int n, dynamic hint}) => executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - inner.wire_handle_vec_of_primitive(port_, _api2wire_i32(n)), + callFfi: (port_) => inner.wire_handle_vec_of_primitive(port_, _api2wire_i32(n)), parseSuccessData: _wire2api_vec_of_primitive_pack, constMeta: const FlutterRustBridgeTaskConstMeta( debugName: "handle_vec_of_primitive", @@ -499,11 +464,9 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Future handleZeroCopyVecOfPrimitive( - {required int n, dynamic hint}) => + Future handleZeroCopyVecOfPrimitive({required int n, dynamic hint}) => executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => inner.wire_handle_zero_copy_vec_of_primitive( - port_, _api2wire_i32(n)), + callFfi: (port_) => inner.wire_handle_zero_copy_vec_of_primitive(port_, _api2wire_i32(n)), parseSuccessData: _wire2api_zero_copy_vec_of_primitive_pack, constMeta: const FlutterRustBridgeTaskConstMeta( debugName: "handle_zero_copy_vec_of_primitive", @@ -513,11 +476,10 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Future handleStruct( - {required MySize arg, required MySize boxed, dynamic hint}) => + Future handleStruct({required MySize arg, required MySize boxed, dynamic hint}) => executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => inner.wire_handle_struct(port_, - _api2wire_box_autoadd_my_size(arg), _api2wire_box_my_size(boxed)), + callFfi: (port_) => + inner.wire_handle_struct(port_, _api2wire_box_autoadd_my_size(arg), _api2wire_box_my_size(boxed)), parseSuccessData: _wire2api_my_size, constMeta: const FlutterRustBridgeTaskConstMeta( debugName: "handle_struct", @@ -527,10 +489,8 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Future handleNewtype({required NewTypeInt arg, dynamic hint}) => - executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => inner.wire_handle_newtype( - port_, _api2wire_box_autoadd_new_type_int(arg)), + Future handleNewtype({required NewTypeInt arg, dynamic hint}) => executeNormal(FlutterRustBridgeTask( + callFfi: (port_) => inner.wire_handle_newtype(port_, _api2wire_box_autoadd_new_type_int(arg)), parseSuccessData: _wire2api_new_type_int, constMeta: const FlutterRustBridgeTaskConstMeta( debugName: "handle_newtype", @@ -540,11 +500,9 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Future> handleListOfStruct( - {required List l, dynamic hint}) => + Future> handleListOfStruct({required List l, dynamic hint}) => executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - inner.wire_handle_list_of_struct(port_, _api2wire_list_my_size(l)), + callFfi: (port_) => inner.wire_handle_list_of_struct(port_, _api2wire_list_my_size(l)), parseSuccessData: _wire2api_list_my_size, constMeta: const FlutterRustBridgeTaskConstMeta( debugName: "handle_list_of_struct", @@ -554,11 +512,9 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Future> handleStringList( - {required List names, dynamic hint}) => + Future> handleStringList({required List names, dynamic hint}) => executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - inner.wire_handle_string_list(port_, _api2wire_StringList(names)), + callFfi: (port_) => inner.wire_handle_string_list(port_, _api2wire_StringList(names)), parseSuccessData: _wire2api_StringList, constMeta: const FlutterRustBridgeTaskConstMeta( debugName: "handle_string_list", @@ -568,11 +524,8 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Future handleComplexStruct( - {required MyTreeNode s, dynamic hint}) => - executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => inner.wire_handle_complex_struct( - port_, _api2wire_box_autoadd_my_tree_node(s)), + Future handleComplexStruct({required MyTreeNode s, dynamic hint}) => executeNormal(FlutterRustBridgeTask( + callFfi: (port_) => inner.wire_handle_complex_struct(port_, _api2wire_box_autoadd_my_tree_node(s)), parseSuccessData: _wire2api_my_tree_node, constMeta: const FlutterRustBridgeTaskConstMeta( debugName: "handle_complex_struct", @@ -582,8 +535,7 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Uint8List handleSyncReturn({required String mode, dynamic hint}) => - executeSync(FlutterRustBridgeSyncTask( + Uint8List handleSyncReturn({required String mode, dynamic hint}) => executeSync(FlutterRustBridgeSyncTask( callFfi: () => inner.wire_handle_sync_return(_api2wire_String(mode)), constMeta: const FlutterRustBridgeTaskConstMeta( debugName: "handle_sync_return", @@ -593,10 +545,8 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Stream handleStream({required String arg, dynamic hint}) => - executeStream(FlutterRustBridgeTask( - callFfi: (port_) => - inner.wire_handle_stream(port_, _api2wire_String(arg)), + Stream handleStream({required String arg, dynamic hint}) => executeStream(FlutterRustBridgeTask( + callFfi: (port_) => inner.wire_handle_stream(port_, _api2wire_String(arg)), parseSuccessData: _wire2api_String, constMeta: const FlutterRustBridgeTaskConstMeta( debugName: "handle_stream", @@ -606,8 +556,7 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Stream handleStreamOfStruct({dynamic hint}) => - executeStream(FlutterRustBridgeTask( + Stream handleStreamOfStruct({dynamic hint}) => executeStream(FlutterRustBridgeTask( callFfi: (port_) => inner.wire_handle_stream_of_struct(port_), parseSuccessData: _wire2api_my_stream_entry, constMeta: const FlutterRustBridgeTaskConstMeta( @@ -629,8 +578,7 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Future returnPanic({dynamic hint}) => - executeNormal(FlutterRustBridgeTask( + Future returnPanic({dynamic hint}) => executeNormal(FlutterRustBridgeTask( callFfi: (port_) => inner.wire_return_panic(port_), parseSuccessData: _wire2api_i32, constMeta: const FlutterRustBridgeTaskConstMeta( @@ -641,11 +589,9 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Future handleOptionalReturn( - {required double left, required double right, dynamic hint}) => + Future handleOptionalReturn({required double left, required double right, dynamic hint}) => executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => inner.wire_handle_optional_return( - port_, _api2wire_f64(left), _api2wire_f64(right)), + callFfi: (port_) => inner.wire_handle_optional_return(port_, _api2wire_f64(left), _api2wire_f64(right)), parseSuccessData: _wire2api_opt_box_autoadd_f64, constMeta: const FlutterRustBridgeTaskConstMeta( debugName: "handle_optional_return", @@ -655,10 +601,8 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Future handleOptionalStruct({String? document, dynamic hint}) => - executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => inner.wire_handle_optional_struct( - port_, _api2wire_opt_String(document)), + Future handleOptionalStruct({String? document, dynamic hint}) => executeNormal(FlutterRustBridgeTask( + callFfi: (port_) => inner.wire_handle_optional_struct(port_, _api2wire_opt_String(document)), parseSuccessData: _wire2api_opt_box_autoadd_element, constMeta: const FlutterRustBridgeTaskConstMeta( debugName: "handle_optional_struct", @@ -668,11 +612,10 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Future handleOptionalIncrement( - {ExoticOptionals? opt, dynamic hint}) => + Future handleOptionalIncrement({ExoticOptionals? opt, dynamic hint}) => executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => inner.wire_handle_optional_increment( - port_, _api2wire_opt_box_autoadd_exotic_optionals(opt)), + callFfi: (port_) => + inner.wire_handle_optional_increment(port_, _api2wire_opt_box_autoadd_exotic_optionals(opt)), parseSuccessData: _wire2api_opt_box_autoadd_exotic_optionals, constMeta: const FlutterRustBridgeTaskConstMeta( debugName: "handle_optional_increment", @@ -682,10 +625,8 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Future handleIncrementBoxedOptional({double? opt, dynamic hint}) => - executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => inner.wire_handle_increment_boxed_optional( - port_, _api2wire_opt_box_f64(opt)), + Future handleIncrementBoxedOptional({double? opt, dynamic hint}) => executeNormal(FlutterRustBridgeTask( + callFfi: (port_) => inner.wire_handle_increment_boxed_optional(port_, _api2wire_opt_box_f64(opt)), parseSuccessData: _wire2api_f64, constMeta: const FlutterRustBridgeTaskConstMeta( debugName: "handle_increment_boxed_optional", @@ -717,24 +658,14 @@ class FlutterRustBridgeExampleImpl parseSuccessData: _wire2api_String, constMeta: const FlutterRustBridgeTaskConstMeta( debugName: "handle_option_box_arguments", - argNames: [ - "i8Box", - "u8Box", - "i32Box", - "i64Box", - "f64Box", - "boolbox", - "structbox" - ], + argNames: ["i8Box", "u8Box", "i32Box", "i64Box", "f64Box", "boolbox", "structbox"], ), argValues: [i8Box, u8Box, i32Box, i64Box, f64Box, boolbox, structbox], hint: hint, )); - Future handleReturnEnum({required String input, dynamic hint}) => - executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - inner.wire_handle_return_enum(port_, _api2wire_String(input)), + Future handleReturnEnum({required String input, dynamic hint}) => executeNormal(FlutterRustBridgeTask( + callFfi: (port_) => inner.wire_handle_return_enum(port_, _api2wire_String(input)), parseSuccessData: _wire2api_opt_weekdays, constMeta: const FlutterRustBridgeTaskConstMeta( debugName: "handle_return_enum", @@ -744,11 +675,9 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Future handleEnumParameter( - {required Weekdays weekday, dynamic hint}) => + Future handleEnumParameter({required Weekdays weekday, dynamic hint}) => executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => inner.wire_handle_enum_parameter( - port_, _api2wire_weekdays(weekday)), + callFfi: (port_) => inner.wire_handle_enum_parameter(port_, _api2wire_weekdays(weekday)), parseSuccessData: _wire2api_weekdays, constMeta: const FlutterRustBridgeTaskConstMeta( debugName: "handle_enum_parameter", @@ -758,11 +687,8 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Future handleCustomizedStruct( - {required Customized val, dynamic hint}) => - executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => inner.wire_handle_customized_struct( - port_, _api2wire_box_autoadd_customized(val)), + Future handleCustomizedStruct({required Customized val, dynamic hint}) => executeNormal(FlutterRustBridgeTask( + callFfi: (port_) => inner.wire_handle_customized_struct(port_, _api2wire_box_autoadd_customized(val)), parseSuccessData: _wire2api_unit, constMeta: const FlutterRustBridgeTaskConstMeta( debugName: "handle_customized_struct", @@ -772,11 +698,8 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Future handleEnumStruct( - {required KitchenSink val, dynamic hint}) => - executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => inner.wire_handle_enum_struct( - port_, _api2wire_box_autoadd_kitchen_sink(val)), + Future handleEnumStruct({required KitchenSink val, dynamic hint}) => executeNormal(FlutterRustBridgeTask( + callFfi: (port_) => inner.wire_handle_enum_struct(port_, _api2wire_box_autoadd_kitchen_sink(val)), parseSuccessData: _wire2api_kitchen_sink, constMeta: const FlutterRustBridgeTaskConstMeta( debugName: "handle_enum_struct", @@ -786,10 +709,8 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Future useImportedStruct({required MyStruct myStruct, dynamic hint}) => - executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => inner.wire_use_imported_struct( - port_, _api2wire_box_autoadd_my_struct(myStruct)), + Future useImportedStruct({required MyStruct myStruct, dynamic hint}) => executeNormal(FlutterRustBridgeTask( + callFfi: (port_) => inner.wire_use_imported_struct(port_, _api2wire_box_autoadd_my_struct(myStruct)), parseSuccessData: _wire2api_bool, constMeta: const FlutterRustBridgeTaskConstMeta( debugName: "use_imported_struct", @@ -799,10 +720,8 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Future useImportedEnum({required MyEnum myEnum, dynamic hint}) => - executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - inner.wire_use_imported_enum(port_, _api2wire_my_enum(myEnum)), + Future useImportedEnum({required MyEnum myEnum, dynamic hint}) => executeNormal(FlutterRustBridgeTask( + callFfi: (port_) => inner.wire_use_imported_enum(port_, _api2wire_my_enum(myEnum)), parseSuccessData: _wire2api_bool, constMeta: const FlutterRustBridgeTaskConstMeta( debugName: "use_imported_enum", @@ -812,8 +731,7 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Future getAppSettings({dynamic hint}) => - executeNormal(FlutterRustBridgeTask( + Future getAppSettings({dynamic hint}) => executeNormal(FlutterRustBridgeTask( callFfi: (port_) => inner.wire_get_app_settings(port_), parseSuccessData: _wire2api_application_settings, constMeta: const FlutterRustBridgeTaskConstMeta( @@ -824,11 +742,9 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Future isAppEmbedded( - {required ApplicationSettings appSettings, dynamic hint}) => + Future isAppEmbedded({required ApplicationSettings appSettings, dynamic hint}) => executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => inner.wire_is_app_embedded( - port_, _api2wire_box_autoadd_application_settings(appSettings)), + callFfi: (port_) => inner.wire_is_app_embedded(port_, _api2wire_box_autoadd_application_settings(appSettings)), parseSuccessData: _wire2api_bool, constMeta: const FlutterRustBridgeTaskConstMeta( debugName: "is_app_embedded", @@ -838,8 +754,7 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Future getMessage({dynamic hint}) => - executeNormal(FlutterRustBridgeTask( + Future getMessage({dynamic hint}) => executeNormal(FlutterRustBridgeTask( callFfi: (port_) => inner.wire_get_message(port_), parseSuccessData: _wire2api_application_message, constMeta: const FlutterRustBridgeTaskConstMeta( @@ -850,8 +765,7 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Future getArray({dynamic hint}) => - executeNormal(FlutterRustBridgeTask( + Future getArray({dynamic hint}) => executeNormal(FlutterRustBridgeTask( callFfi: (port_) => inner.wire_get_array(port_), parseSuccessData: _wire2api_uint_8_list, constMeta: const FlutterRustBridgeTaskConstMeta( @@ -862,8 +776,7 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Future> getComplexArray({dynamic hint}) => - executeNormal(FlutterRustBridgeTask( + Future> getComplexArray({dynamic hint}) => executeNormal(FlutterRustBridgeTask( callFfi: (port_) => inner.wire_get_complex_array(port_), parseSuccessData: _wire2api_list_point, constMeta: const FlutterRustBridgeTaskConstMeta( @@ -874,8 +787,7 @@ class FlutterRustBridgeExampleImpl hint: hint, )); - Future getUsize({required int u, dynamic hint}) => - executeNormal(FlutterRustBridgeTask( + Future getUsize({required int u, dynamic hint}) => executeNormal(FlutterRustBridgeTask( callFfi: (port_) => inner.wire_get_usize(port_, _api2wire_usize(u)), parseSuccessData: _wire2api_usize, constMeta: const FlutterRustBridgeTaskConstMeta( @@ -899,8 +811,7 @@ class FlutterRustBridgeExampleImpl return ans; } - ffi.Pointer _api2wire_ZeroCopyBuffer_Uint8List( - Uint8List raw) { + ffi.Pointer _api2wire_ZeroCopyBuffer_Uint8List(Uint8List raw) { return _api2wire_uint_8_list(raw); } @@ -912,15 +823,13 @@ class FlutterRustBridgeExampleImpl return raw ? 1 : 0; } - ffi.Pointer _api2wire_box_application_env( - ApplicationEnv raw) { + ffi.Pointer _api2wire_box_application_env(ApplicationEnv raw) { final ptr = inner.new_box_application_env(); _api_fill_to_wire_application_env(raw, ptr.ref); return ptr; } - ffi.Pointer - _api2wire_box_autoadd_application_settings(ApplicationSettings raw) { + ffi.Pointer _api2wire_box_autoadd_application_settings(ApplicationSettings raw) { final ptr = inner.new_box_autoadd_application_settings(); _api_fill_to_wire_application_settings(raw, ptr.ref); return ptr; @@ -936,15 +845,13 @@ class FlutterRustBridgeExampleImpl return inner.new_box_autoadd_bool(raw); } - ffi.Pointer _api2wire_box_autoadd_customized( - Customized raw) { + ffi.Pointer _api2wire_box_autoadd_customized(Customized raw) { final ptr = inner.new_box_autoadd_customized(); _api_fill_to_wire_customized(raw, ptr.ref); return ptr; } - ffi.Pointer _api2wire_box_autoadd_exotic_optionals( - ExoticOptionals raw) { + ffi.Pointer _api2wire_box_autoadd_exotic_optionals(ExoticOptionals raw) { final ptr = inner.new_box_autoadd_exotic_optionals(); _api_fill_to_wire_exotic_optionals(raw, ptr.ref); return ptr; @@ -962,8 +869,7 @@ class FlutterRustBridgeExampleImpl return inner.new_box_autoadd_i64(raw); } - ffi.Pointer _api2wire_box_autoadd_kitchen_sink( - KitchenSink raw) { + ffi.Pointer _api2wire_box_autoadd_kitchen_sink(KitchenSink raw) { final ptr = inner.new_box_autoadd_kitchen_sink(); _api_fill_to_wire_kitchen_sink(raw, ptr.ref); return ptr; @@ -981,15 +887,13 @@ class FlutterRustBridgeExampleImpl return ptr; } - ffi.Pointer _api2wire_box_autoadd_my_tree_node( - MyTreeNode raw) { + ffi.Pointer _api2wire_box_autoadd_my_tree_node(MyTreeNode raw) { final ptr = inner.new_box_autoadd_my_tree_node(); _api_fill_to_wire_my_tree_node(raw, ptr.ref); return ptr; } - ffi.Pointer _api2wire_box_autoadd_new_type_int( - NewTypeInt raw) { + ffi.Pointer _api2wire_box_autoadd_new_type_int(NewTypeInt raw) { final ptr = inner.new_box_autoadd_new_type_int(); _api_fill_to_wire_new_type_int(raw, ptr.ref); return ptr; @@ -999,8 +903,7 @@ class FlutterRustBridgeExampleImpl return inner.new_box_bool(raw); } - ffi.Pointer _api2wire_box_exotic_optionals( - ExoticOptionals raw) { + ffi.Pointer _api2wire_box_exotic_optionals(ExoticOptionals raw) { final ptr = inner.new_box_exotic_optionals(); _api_fill_to_wire_exotic_optionals(raw, ptr.ref); return ptr; @@ -1088,8 +991,7 @@ class FlutterRustBridgeExampleImpl return ans; } - ffi.Pointer _api2wire_list_application_env_var( - List raw) { + ffi.Pointer _api2wire_list_application_env_var(List raw) { final ans = inner.new_list_application_env_var(raw.length); for (var i = 0; i < raw.length; ++i) { _api_fill_to_wire_application_env_var(raw[i], ans.ref.ptr[i]); @@ -1097,8 +999,7 @@ class FlutterRustBridgeExampleImpl return ans; } - ffi.Pointer _api2wire_list_attribute( - List raw) { + ffi.Pointer _api2wire_list_attribute(List raw) { final ans = inner.new_list_attribute(raw.length); for (var i = 0; i < raw.length; ++i) { _api_fill_to_wire_attribute(raw[i], ans.ref.ptr[i]); @@ -1114,8 +1015,7 @@ class FlutterRustBridgeExampleImpl return ans; } - ffi.Pointer _api2wire_list_my_tree_node( - List raw) { + ffi.Pointer _api2wire_list_my_tree_node(List raw) { final ans = inner.new_list_my_tree_node(raw.length); for (var i = 0; i < raw.length; ++i) { _api_fill_to_wire_my_tree_node(raw[i], ans.ref.ptr[i]); @@ -1123,8 +1023,7 @@ class FlutterRustBridgeExampleImpl return ans; } - ffi.Pointer - _api2wire_list_opt_box_autoadd_attribute(List raw) { + ffi.Pointer _api2wire_list_opt_box_autoadd_attribute(List raw) { final ans = inner.new_list_opt_box_autoadd_attribute(raw.length); for (var i = 0; i < raw.length; ++i) { _api_fill_to_wire_opt_box_autoadd_attribute(raw[i], ans.ref.ptr[i]); @@ -1140,13 +1039,11 @@ class FlutterRustBridgeExampleImpl return raw == null ? ffi.nullptr : _api2wire_String(raw); } - ffi.Pointer _api2wire_opt_ZeroCopyBuffer_Uint8List( - Uint8List? raw) { + ffi.Pointer _api2wire_opt_ZeroCopyBuffer_Uint8List(Uint8List? raw) { return raw == null ? ffi.nullptr : _api2wire_ZeroCopyBuffer_Uint8List(raw); } - ffi.Pointer _api2wire_opt_box_autoadd_attribute( - Attribute? raw) { + ffi.Pointer _api2wire_opt_box_autoadd_attribute(Attribute? raw) { return raw == null ? ffi.nullptr : _api2wire_box_autoadd_attribute(raw); } @@ -1154,11 +1051,8 @@ class FlutterRustBridgeExampleImpl return raw == null ? ffi.nullptr : _api2wire_box_autoadd_bool(raw); } - ffi.Pointer _api2wire_opt_box_autoadd_exotic_optionals( - ExoticOptionals? raw) { - return raw == null - ? ffi.nullptr - : _api2wire_box_autoadd_exotic_optionals(raw); + ffi.Pointer _api2wire_opt_box_autoadd_exotic_optionals(ExoticOptionals? raw) { + return raw == null ? ffi.nullptr : _api2wire_box_autoadd_exotic_optionals(raw); } ffi.Pointer _api2wire_opt_box_autoadd_f64(double? raw) { @@ -1173,8 +1067,7 @@ class FlutterRustBridgeExampleImpl return raw == null ? ffi.nullptr : _api2wire_box_autoadd_i64(raw); } - ffi.Pointer _api2wire_opt_box_autoadd_new_type_int( - NewTypeInt? raw) { + ffi.Pointer _api2wire_opt_box_autoadd_new_type_int(NewTypeInt? raw) { return raw == null ? ffi.nullptr : _api2wire_box_autoadd_new_type_int(raw); } @@ -1182,8 +1075,7 @@ class FlutterRustBridgeExampleImpl return raw == null ? ffi.nullptr : _api2wire_box_bool(raw); } - ffi.Pointer _api2wire_opt_box_exotic_optionals( - ExoticOptionals? raw) { + ffi.Pointer _api2wire_opt_box_exotic_optionals(ExoticOptionals? raw) { return raw == null ? ffi.nullptr : _api2wire_box_exotic_optionals(raw); } @@ -1207,13 +1099,11 @@ class FlutterRustBridgeExampleImpl return raw == null ? ffi.nullptr : _api2wire_box_u8(raw); } - ffi.Pointer _api2wire_opt_float_32_list( - Float32List? raw) { + ffi.Pointer _api2wire_opt_float_32_list(Float32List? raw) { return raw == null ? ffi.nullptr : _api2wire_float_32_list(raw); } - ffi.Pointer _api2wire_opt_float_64_list( - Float64List? raw) { + ffi.Pointer _api2wire_opt_float_64_list(Float64List? raw) { return raw == null ? ffi.nullptr : _api2wire_float_64_list(raw); } @@ -1229,16 +1119,12 @@ class FlutterRustBridgeExampleImpl return raw == null ? ffi.nullptr : _api2wire_int_8_list(raw); } - ffi.Pointer _api2wire_opt_list_attribute( - List? raw) { + ffi.Pointer _api2wire_opt_list_attribute(List? raw) { return raw == null ? ffi.nullptr : _api2wire_list_attribute(raw); } - ffi.Pointer - _api2wire_opt_list_opt_box_autoadd_attribute(List? raw) { - return raw == null - ? ffi.nullptr - : _api2wire_list_opt_box_autoadd_attribute(raw); + ffi.Pointer _api2wire_opt_list_opt_box_autoadd_attribute(List? raw) { + return raw == null ? ffi.nullptr : _api2wire_list_opt_box_autoadd_attribute(raw); } ffi.Pointer _api2wire_opt_uint_8_list(Uint8List? raw) { @@ -1269,19 +1155,16 @@ class FlutterRustBridgeExampleImpl // Section: api_fill_to_wire - void _api_fill_to_wire_application_env( - ApplicationEnv apiObj, wire_ApplicationEnv wireObj) { + void _api_fill_to_wire_application_env(ApplicationEnv apiObj, wire_ApplicationEnv wireObj) { wireObj.vars = _api2wire_list_application_env_var(apiObj.vars); } - void _api_fill_to_wire_application_env_var( - ApplicationEnvVar apiObj, wire_ApplicationEnvVar wireObj) { + void _api_fill_to_wire_application_env_var(ApplicationEnvVar apiObj, wire_ApplicationEnvVar wireObj) { wireObj.field0 = _api2wire_String(apiObj.field0); wireObj.field1 = _api2wire_bool(apiObj.field1); } - void _api_fill_to_wire_application_settings( - ApplicationSettings apiObj, wire_ApplicationSettings wireObj) { + void _api_fill_to_wire_application_settings(ApplicationSettings apiObj, wire_ApplicationSettings wireObj) { wireObj.name = _api2wire_String(apiObj.name); wireObj.version = _api2wire_String(apiObj.version); wireObj.mode = _api2wire_application_mode(apiObj.mode); @@ -1293,24 +1176,20 @@ class FlutterRustBridgeExampleImpl wireObj.value = _api2wire_String(apiObj.value); } - void _api_fill_to_wire_box_application_env( - ApplicationEnv apiObj, ffi.Pointer wireObj) { + void _api_fill_to_wire_box_application_env(ApplicationEnv apiObj, ffi.Pointer wireObj) { _api_fill_to_wire_application_env(apiObj, wireObj.ref); } void _api_fill_to_wire_box_autoadd_application_settings( - ApplicationSettings apiObj, - ffi.Pointer wireObj) { + ApplicationSettings apiObj, ffi.Pointer wireObj) { _api_fill_to_wire_application_settings(apiObj, wireObj.ref); } - void _api_fill_to_wire_box_autoadd_attribute( - Attribute apiObj, ffi.Pointer wireObj) { + void _api_fill_to_wire_box_autoadd_attribute(Attribute apiObj, ffi.Pointer wireObj) { _api_fill_to_wire_attribute(apiObj, wireObj.ref); } - void _api_fill_to_wire_box_autoadd_customized( - Customized apiObj, ffi.Pointer wireObj) { + void _api_fill_to_wire_box_autoadd_customized(Customized apiObj, ffi.Pointer wireObj) { _api_fill_to_wire_customized(apiObj, wireObj.ref); } @@ -1319,54 +1198,44 @@ class FlutterRustBridgeExampleImpl _api_fill_to_wire_exotic_optionals(apiObj, wireObj.ref); } - void _api_fill_to_wire_box_autoadd_kitchen_sink( - KitchenSink apiObj, ffi.Pointer wireObj) { + void _api_fill_to_wire_box_autoadd_kitchen_sink(KitchenSink apiObj, ffi.Pointer wireObj) { _api_fill_to_wire_kitchen_sink(apiObj, wireObj.ref); } - void _api_fill_to_wire_box_autoadd_my_size( - MySize apiObj, ffi.Pointer wireObj) { + void _api_fill_to_wire_box_autoadd_my_size(MySize apiObj, ffi.Pointer wireObj) { _api_fill_to_wire_my_size(apiObj, wireObj.ref); } - void _api_fill_to_wire_box_autoadd_my_struct( - MyStruct apiObj, ffi.Pointer wireObj) { + void _api_fill_to_wire_box_autoadd_my_struct(MyStruct apiObj, ffi.Pointer wireObj) { _api_fill_to_wire_my_struct(apiObj, wireObj.ref); } - void _api_fill_to_wire_box_autoadd_my_tree_node( - MyTreeNode apiObj, ffi.Pointer wireObj) { + void _api_fill_to_wire_box_autoadd_my_tree_node(MyTreeNode apiObj, ffi.Pointer wireObj) { _api_fill_to_wire_my_tree_node(apiObj, wireObj.ref); } - void _api_fill_to_wire_box_autoadd_new_type_int( - NewTypeInt apiObj, ffi.Pointer wireObj) { + void _api_fill_to_wire_box_autoadd_new_type_int(NewTypeInt apiObj, ffi.Pointer wireObj) { _api_fill_to_wire_new_type_int(apiObj, wireObj.ref); } - void _api_fill_to_wire_box_exotic_optionals( - ExoticOptionals apiObj, ffi.Pointer wireObj) { + void _api_fill_to_wire_box_exotic_optionals(ExoticOptionals apiObj, ffi.Pointer wireObj) { _api_fill_to_wire_exotic_optionals(apiObj, wireObj.ref); } - void _api_fill_to_wire_box_kitchen_sink( - KitchenSink apiObj, ffi.Pointer wireObj) { + void _api_fill_to_wire_box_kitchen_sink(KitchenSink apiObj, ffi.Pointer wireObj) { _api_fill_to_wire_kitchen_sink(apiObj, wireObj.ref); } - void _api_fill_to_wire_box_my_size( - MySize apiObj, ffi.Pointer wireObj) { + void _api_fill_to_wire_box_my_size(MySize apiObj, ffi.Pointer wireObj) { _api_fill_to_wire_my_size(apiObj, wireObj.ref); } - void _api_fill_to_wire_customized( - Customized apiObj, wire_Customized wireObj) { + void _api_fill_to_wire_customized(Customized apiObj, wire_Customized wireObj) { wireObj.final_field = _api2wire_String(apiObj.finalField); wireObj.non_final_field = _api2wire_opt_String(apiObj.nonFinalField); } - void _api_fill_to_wire_exotic_optionals( - ExoticOptionals apiObj, wire_ExoticOptionals wireObj) { + void _api_fill_to_wire_exotic_optionals(ExoticOptionals apiObj, wire_ExoticOptionals wireObj) { wireObj.int32 = _api2wire_opt_box_autoadd_i32(apiObj.int32); wireObj.int64 = _api2wire_opt_box_autoadd_i64(apiObj.int64); wireObj.float64 = _api2wire_opt_box_autoadd_f64(apiObj.float64); @@ -1379,16 +1248,12 @@ class FlutterRustBridgeExampleImpl wireObj.float32list = _api2wire_opt_float_32_list(apiObj.float32List); wireObj.float64list = _api2wire_opt_float_64_list(apiObj.float64List); wireObj.attributes = _api2wire_opt_list_attribute(apiObj.attributes); - wireObj.attributes_nullable = - _api2wire_list_opt_box_autoadd_attribute(apiObj.attributesNullable); - wireObj.nullable_attributes = - _api2wire_opt_list_opt_box_autoadd_attribute(apiObj.nullableAttributes); - wireObj.newtypeint = - _api2wire_opt_box_autoadd_new_type_int(apiObj.newtypeint); + wireObj.attributes_nullable = _api2wire_list_opt_box_autoadd_attribute(apiObj.attributesNullable); + wireObj.nullable_attributes = _api2wire_opt_list_opt_box_autoadd_attribute(apiObj.nullableAttributes); + wireObj.newtypeint = _api2wire_opt_box_autoadd_new_type_int(apiObj.newtypeint); } - void _api_fill_to_wire_kitchen_sink( - KitchenSink apiObj, wire_KitchenSink wireObj) { + void _api_fill_to_wire_kitchen_sink(KitchenSink apiObj, wire_KitchenSink wireObj) { if (apiObj is Empty) { wireObj.tag = 0; return; @@ -1403,23 +1268,19 @@ class FlutterRustBridgeExampleImpl if (apiObj is Nested) { wireObj.tag = 2; wireObj.kind = inner.inflate_KitchenSink_Nested(); - wireObj.kind.ref.Nested.ref.field0 = - _api2wire_box_kitchen_sink(apiObj.field0); + wireObj.kind.ref.Nested.ref.field0 = _api2wire_box_kitchen_sink(apiObj.field0); wireObj.kind.ref.Nested.ref.field1 = _api2wire_i32(apiObj.field1); } if (apiObj is Optional) { wireObj.tag = 3; wireObj.kind = inner.inflate_KitchenSink_Optional(); - wireObj.kind.ref.Optional.ref.field0 = - _api2wire_opt_box_autoadd_i32(apiObj.field0); - wireObj.kind.ref.Optional.ref.field1 = - _api2wire_opt_box_autoadd_i32(apiObj.field1); + wireObj.kind.ref.Optional.ref.field0 = _api2wire_opt_box_autoadd_i32(apiObj.field0); + wireObj.kind.ref.Optional.ref.field1 = _api2wire_opt_box_autoadd_i32(apiObj.field1); } if (apiObj is Buffer) { wireObj.tag = 4; wireObj.kind = inner.inflate_KitchenSink_Buffer(); - wireObj.kind.ref.Buffer.ref.field0 = - _api2wire_ZeroCopyBuffer_Uint8List(apiObj.field0); + wireObj.kind.ref.Buffer.ref.field0 = _api2wire_ZeroCopyBuffer_Uint8List(apiObj.field0); } if (apiObj is Enums) { wireObj.tag = 5; @@ -1437,39 +1298,31 @@ class FlutterRustBridgeExampleImpl wireObj.content = _api2wire_bool(apiObj.content); } - void _api_fill_to_wire_my_tree_node( - MyTreeNode apiObj, wire_MyTreeNode wireObj) { + void _api_fill_to_wire_my_tree_node(MyTreeNode apiObj, wire_MyTreeNode wireObj) { wireObj.value_i32 = _api2wire_i32(apiObj.valueI32); wireObj.value_vec_u8 = _api2wire_uint_8_list(apiObj.valueVecU8); wireObj.value_boolean = _api2wire_bool(apiObj.valueBoolean); wireObj.children = _api2wire_list_my_tree_node(apiObj.children); } - void _api_fill_to_wire_new_type_int( - NewTypeInt apiObj, wire_NewTypeInt wireObj) { + void _api_fill_to_wire_new_type_int(NewTypeInt apiObj, wire_NewTypeInt wireObj) { wireObj.field0 = _api2wire_i64(apiObj.field0); } - void _api_fill_to_wire_opt_box_autoadd_attribute( - Attribute? apiObj, ffi.Pointer wireObj) { - if (apiObj != null) - _api_fill_to_wire_box_autoadd_attribute(apiObj, wireObj); + void _api_fill_to_wire_opt_box_autoadd_attribute(Attribute? apiObj, ffi.Pointer wireObj) { + if (apiObj != null) _api_fill_to_wire_box_autoadd_attribute(apiObj, wireObj); } void _api_fill_to_wire_opt_box_autoadd_exotic_optionals( ExoticOptionals? apiObj, ffi.Pointer wireObj) { - if (apiObj != null) - _api_fill_to_wire_box_autoadd_exotic_optionals(apiObj, wireObj); + if (apiObj != null) _api_fill_to_wire_box_autoadd_exotic_optionals(apiObj, wireObj); } - void _api_fill_to_wire_opt_box_autoadd_new_type_int( - NewTypeInt? apiObj, ffi.Pointer wireObj) { - if (apiObj != null) - _api_fill_to_wire_box_autoadd_new_type_int(apiObj, wireObj); + void _api_fill_to_wire_opt_box_autoadd_new_type_int(NewTypeInt? apiObj, ffi.Pointer wireObj) { + if (apiObj != null) _api_fill_to_wire_box_autoadd_new_type_int(apiObj, wireObj); } - void _api_fill_to_wire_opt_box_exotic_optionals( - ExoticOptionals? apiObj, ffi.Pointer wireObj) { + void _api_fill_to_wire_opt_box_exotic_optionals(ExoticOptionals? apiObj, ffi.Pointer wireObj) { if (apiObj != null) _api_fill_to_wire_box_exotic_optionals(apiObj, wireObj); } } @@ -1529,8 +1382,7 @@ Uint8List _wire2api_ZeroCopyBuffer_Uint8List(dynamic raw) { ApplicationEnv _wire2api_application_env(dynamic raw) { final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); return ApplicationEnv( vars: _wire2api_list_application_env_var(arr[0]), ); @@ -1538,8 +1390,7 @@ ApplicationEnv _wire2api_application_env(dynamic raw) { ApplicationEnvVar _wire2api_application_env_var(dynamic raw) { final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); return ApplicationEnvVar( field0: _wire2api_String(arr[0]), field1: _wire2api_bool(arr[1]), @@ -1570,8 +1421,7 @@ ApplicationMode _wire2api_application_mode(dynamic raw) { ApplicationSettings _wire2api_application_settings(dynamic raw) { final arr = raw as List; - if (arr.length != 4) - throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); + if (arr.length != 4) throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); return ApplicationSettings( name: _wire2api_String(arr[0]), version: _wire2api_String(arr[1]), @@ -1582,8 +1432,7 @@ ApplicationSettings _wire2api_application_settings(dynamic raw) { Attribute _wire2api_attribute(dynamic raw) { final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); return Attribute( key: _wire2api_String(arr[0]), value: _wire2api_String(arr[1]), @@ -1636,8 +1485,7 @@ KitchenSink _wire2api_box_kitchen_sink(dynamic raw) { Element _wire2api_element(dynamic raw) { final arr = raw as List; - if (arr.length != 4) - throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); + if (arr.length != 4) throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); return Element( tag: _wire2api_opt_String(arr[0]), text: _wire2api_opt_String(arr[1]), @@ -1648,8 +1496,7 @@ Element _wire2api_element(dynamic raw) { ExoticOptionals _wire2api_exotic_optionals(dynamic raw) { final arr = raw as List; - if (arr.length != 15) - throw Exception('unexpected arr length: expect 15 but see ${arr.length}'); + if (arr.length != 15) throw Exception('unexpected arr length: expect 15 but see ${arr.length}'); return ExoticOptionals( int32: _wire2api_opt_box_autoadd_i32(arr[0]), int64: _wire2api_opt_box_autoadd_i64(arr[1]), @@ -1771,9 +1618,7 @@ List _wire2api_list_my_tree_node(dynamic raw) { } List _wire2api_list_opt_box_autoadd_attribute(dynamic raw) { - return (raw as List) - .map(_wire2api_opt_box_autoadd_attribute) - .toList(); + return (raw as List).map(_wire2api_opt_box_autoadd_attribute).toList(); } List _wire2api_list_point(dynamic raw) { @@ -1782,8 +1627,7 @@ List _wire2api_list_point(dynamic raw) { MySize _wire2api_my_size(dynamic raw) { final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); return MySize( width: _wire2api_i32(arr[0]), height: _wire2api_i32(arr[1]), @@ -1792,8 +1636,7 @@ MySize _wire2api_my_size(dynamic raw) { MyStreamEntry _wire2api_my_stream_entry(dynamic raw) { final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); return MyStreamEntry( hello: _wire2api_String(arr[0]), ); @@ -1801,8 +1644,7 @@ MyStreamEntry _wire2api_my_stream_entry(dynamic raw) { MyTreeNode _wire2api_my_tree_node(dynamic raw) { final arr = raw as List; - if (arr.length != 4) - throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); + if (arr.length != 4) throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); return MyTreeNode( valueI32: _wire2api_i32(arr[0]), valueVecU8: _wire2api_uint_8_list(arr[1]), @@ -1813,8 +1655,7 @@ MyTreeNode _wire2api_my_tree_node(dynamic raw) { NewTypeInt _wire2api_new_type_int(dynamic raw) { final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); return NewTypeInt( field0: _wire2api_i64(arr[0]), ); @@ -1902,8 +1743,7 @@ Weekdays? _wire2api_opt_weekdays(dynamic raw) { Point _wire2api_point(dynamic raw) { final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); return Point( x: _wire2api_f32(arr[0]), y: _wire2api_f32(arr[1]), @@ -1952,8 +1792,7 @@ int _wire2api_usize(dynamic raw) { VecOfPrimitivePack _wire2api_vec_of_primitive_pack(dynamic raw) { final arr = raw as List; - if (arr.length != 10) - throw Exception('unexpected arr length: expect 10 but see ${arr.length}'); + if (arr.length != 10) throw Exception('unexpected arr length: expect 10 but see ${arr.length}'); return VecOfPrimitivePack( int8List: _wire2api_int_8_list(arr[0]), uint8List: _wire2api_uint_8_list(arr[1]), @@ -1972,11 +1811,9 @@ Weekdays _wire2api_weekdays(dynamic raw) { return Weekdays.values[raw]; } -ZeroCopyVecOfPrimitivePack _wire2api_zero_copy_vec_of_primitive_pack( - dynamic raw) { +ZeroCopyVecOfPrimitivePack _wire2api_zero_copy_vec_of_primitive_pack(dynamic raw) { final arr = raw as List; - if (arr.length != 10) - throw Exception('unexpected arr length: expect 10 but see ${arr.length}'); + if (arr.length != 10) throw Exception('unexpected arr length: expect 10 but see ${arr.length}'); return ZeroCopyVecOfPrimitivePack( int8List: _wire2api_ZeroCopyBuffer_Int8List(arr[0]), uint8List: _wire2api_ZeroCopyBuffer_Uint8List(arr[1]), @@ -2000,17 +1837,13 @@ ZeroCopyVecOfPrimitivePack _wire2api_zero_copy_vec_of_primitive_pack( /// generated by flutter_rust_bridge class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { /// Holds the symbol lookup function. - final ffi.Pointer Function(String symbolName) - _lookup; + final ffi.Pointer Function(String symbolName) _lookup; /// The symbols are looked up in [dynamicLibrary]. - FlutterRustBridgeExampleWire(ffi.DynamicLibrary dynamicLibrary) - : _lookup = dynamicLibrary.lookup; + FlutterRustBridgeExampleWire(ffi.DynamicLibrary dynamicLibrary) : _lookup = dynamicLibrary.lookup; /// The symbols are looked up with [lookup]. - FlutterRustBridgeExampleWire.fromLookup( - ffi.Pointer Function(String symbolName) - lookup) + FlutterRustBridgeExampleWire.fromLookup(ffi.Pointer Function(String symbolName) lookup) : _lookup = lookup; void wire_simple_adder( @@ -2025,12 +1858,9 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _wire_simple_adderPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Int32, ffi.Int32)>>('wire_simple_adder'); - late final _wire_simple_adder = - _wire_simple_adderPtr.asFunction(); + late final _wire_simple_adderPtr = + _lookup>('wire_simple_adder'); + late final _wire_simple_adder = _wire_simple_adderPtr.asFunction(); void wire_primitive_types( int port_, @@ -2048,12 +1878,10 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _wire_primitive_typesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Int32, ffi.Int64, ffi.Double, - ffi.Uint8)>>('wire_primitive_types'); - late final _wire_primitive_types = _wire_primitive_typesPtr - .asFunction(); + late final _wire_primitive_typesPtr = + _lookup>( + 'wire_primitive_types'); + late final _wire_primitive_types = _wire_primitive_typesPtr.asFunction(); void wire_primitive_u32( int port_, @@ -2066,10 +1894,8 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { } late final _wire_primitive_u32Ptr = - _lookup>( - 'wire_primitive_u32'); - late final _wire_primitive_u32 = - _wire_primitive_u32Ptr.asFunction(); + _lookup>('wire_primitive_u32'); + late final _wire_primitive_u32 = _wire_primitive_u32Ptr.asFunction(); void wire_handle_string( int port_, @@ -2081,12 +1907,10 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _wire_handle_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>('wire_handle_string'); - late final _wire_handle_string = _wire_handle_stringPtr - .asFunction)>(); + late final _wire_handle_stringPtr = + _lookup)>>('wire_handle_string'); + late final _wire_handle_string = + _wire_handle_stringPtr.asFunction)>(); void wire_handle_return_unit( int port_, @@ -2097,10 +1921,8 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { } late final _wire_handle_return_unitPtr = - _lookup>( - 'wire_handle_return_unit'); - late final _wire_handle_return_unit = - _wire_handle_return_unitPtr.asFunction(); + _lookup>('wire_handle_return_unit'); + late final _wire_handle_return_unit = _wire_handle_return_unitPtr.asFunction(); void wire_handle_vec_u8( int port_, @@ -2112,12 +1934,10 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _wire_handle_vec_u8Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>('wire_handle_vec_u8'); - late final _wire_handle_vec_u8 = _wire_handle_vec_u8Ptr - .asFunction)>(); + late final _wire_handle_vec_u8Ptr = + _lookup)>>('wire_handle_vec_u8'); + late final _wire_handle_vec_u8 = + _wire_handle_vec_u8Ptr.asFunction)>(); void wire_handle_vec_of_primitive( int port_, @@ -2130,10 +1950,8 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { } late final _wire_handle_vec_of_primitivePtr = - _lookup>( - 'wire_handle_vec_of_primitive'); - late final _wire_handle_vec_of_primitive = - _wire_handle_vec_of_primitivePtr.asFunction(); + _lookup>('wire_handle_vec_of_primitive'); + late final _wire_handle_vec_of_primitive = _wire_handle_vec_of_primitivePtr.asFunction(); void wire_handle_zero_copy_vec_of_primitive( int port_, @@ -2146,11 +1964,9 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { } late final _wire_handle_zero_copy_vec_of_primitivePtr = - _lookup>( - 'wire_handle_zero_copy_vec_of_primitive'); + _lookup>('wire_handle_zero_copy_vec_of_primitive'); late final _wire_handle_zero_copy_vec_of_primitive = - _wire_handle_zero_copy_vec_of_primitivePtr - .asFunction(); + _wire_handle_zero_copy_vec_of_primitivePtr.asFunction(); void wire_handle_struct( int port_, @@ -2164,12 +1980,11 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _wire_handle_structPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer, - ffi.Pointer)>>('wire_handle_struct'); - late final _wire_handle_struct = _wire_handle_structPtr.asFunction< - void Function(int, ffi.Pointer, ffi.Pointer)>(); + late final _wire_handle_structPtr = + _lookup, ffi.Pointer)>>( + 'wire_handle_struct'); + late final _wire_handle_struct = + _wire_handle_structPtr.asFunction, ffi.Pointer)>(); void wire_handle_newtype( int port_, @@ -2181,12 +1996,10 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _wire_handle_newtypePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>('wire_handle_newtype'); - late final _wire_handle_newtype = _wire_handle_newtypePtr - .asFunction)>(); + late final _wire_handle_newtypePtr = + _lookup)>>('wire_handle_newtype'); + late final _wire_handle_newtype = + _wire_handle_newtypePtr.asFunction)>(); void wire_handle_list_of_struct( int port_, @@ -2198,12 +2011,11 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _wire_handle_list_of_structPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>('wire_handle_list_of_struct'); - late final _wire_handle_list_of_struct = _wire_handle_list_of_structPtr - .asFunction)>(); + late final _wire_handle_list_of_structPtr = + _lookup)>>( + 'wire_handle_list_of_struct'); + late final _wire_handle_list_of_struct = + _wire_handle_list_of_structPtr.asFunction)>(); void wire_handle_string_list( int port_, @@ -2215,12 +2027,11 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _wire_handle_string_listPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>('wire_handle_string_list'); - late final _wire_handle_string_list = _wire_handle_string_listPtr - .asFunction)>(); + late final _wire_handle_string_listPtr = + _lookup)>>( + 'wire_handle_string_list'); + late final _wire_handle_string_list = + _wire_handle_string_listPtr.asFunction)>(); void wire_handle_complex_struct( int port_, @@ -2232,12 +2043,11 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _wire_handle_complex_structPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>('wire_handle_complex_struct'); - late final _wire_handle_complex_struct = _wire_handle_complex_structPtr - .asFunction)>(); + late final _wire_handle_complex_structPtr = + _lookup)>>( + 'wire_handle_complex_struct'); + late final _wire_handle_complex_struct = + _wire_handle_complex_structPtr.asFunction)>(); WireSyncReturnStruct wire_handle_sync_return( ffi.Pointer mode, @@ -2247,12 +2057,11 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _wire_handle_sync_returnPtr = _lookup< - ffi.NativeFunction< - WireSyncReturnStruct Function( - ffi.Pointer)>>('wire_handle_sync_return'); - late final _wire_handle_sync_return = _wire_handle_sync_returnPtr.asFunction< - WireSyncReturnStruct Function(ffi.Pointer)>(); + late final _wire_handle_sync_returnPtr = + _lookup)>>( + 'wire_handle_sync_return'); + late final _wire_handle_sync_return = + _wire_handle_sync_returnPtr.asFunction)>(); void wire_handle_stream( int port_, @@ -2264,12 +2073,10 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _wire_handle_streamPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>('wire_handle_stream'); - late final _wire_handle_stream = _wire_handle_streamPtr - .asFunction)>(); + late final _wire_handle_streamPtr = + _lookup)>>('wire_handle_stream'); + late final _wire_handle_stream = + _wire_handle_streamPtr.asFunction)>(); void wire_handle_stream_of_struct( int port_, @@ -2280,10 +2087,8 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { } late final _wire_handle_stream_of_structPtr = - _lookup>( - 'wire_handle_stream_of_struct'); - late final _wire_handle_stream_of_struct = - _wire_handle_stream_of_structPtr.asFunction(); + _lookup>('wire_handle_stream_of_struct'); + late final _wire_handle_stream_of_struct = _wire_handle_stream_of_structPtr.asFunction(); void wire_return_err( int port_, @@ -2293,11 +2098,8 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _wire_return_errPtr = - _lookup>( - 'wire_return_err'); - late final _wire_return_err = - _wire_return_errPtr.asFunction(); + late final _wire_return_errPtr = _lookup>('wire_return_err'); + late final _wire_return_err = _wire_return_errPtr.asFunction(); void wire_return_panic( int port_, @@ -2307,11 +2109,8 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _wire_return_panicPtr = - _lookup>( - 'wire_return_panic'); - late final _wire_return_panic = - _wire_return_panicPtr.asFunction(); + late final _wire_return_panicPtr = _lookup>('wire_return_panic'); + late final _wire_return_panic = _wire_return_panicPtr.asFunction(); void wire_handle_optional_return( int port_, @@ -2325,12 +2124,10 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _wire_handle_optional_returnPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Double, - ffi.Double)>>('wire_handle_optional_return'); - late final _wire_handle_optional_return = _wire_handle_optional_returnPtr - .asFunction(); + late final _wire_handle_optional_returnPtr = + _lookup>('wire_handle_optional_return'); + late final _wire_handle_optional_return = + _wire_handle_optional_returnPtr.asFunction(); void wire_handle_optional_struct( int port_, @@ -2342,12 +2139,11 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _wire_handle_optional_structPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>('wire_handle_optional_struct'); - late final _wire_handle_optional_struct = _wire_handle_optional_structPtr - .asFunction)>(); + late final _wire_handle_optional_structPtr = + _lookup)>>( + 'wire_handle_optional_struct'); + late final _wire_handle_optional_struct = + _wire_handle_optional_structPtr.asFunction)>(); void wire_handle_optional_increment( int port_, @@ -2359,13 +2155,11 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _wire_handle_optional_incrementPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'wire_handle_optional_increment'); + late final _wire_handle_optional_incrementPtr = + _lookup)>>( + 'wire_handle_optional_increment'); late final _wire_handle_optional_increment = - _wire_handle_optional_incrementPtr - .asFunction)>(); + _wire_handle_optional_incrementPtr.asFunction)>(); void wire_handle_increment_boxed_optional( int port_, @@ -2377,13 +2171,11 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _wire_handle_increment_boxed_optionalPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'wire_handle_increment_boxed_optional'); + late final _wire_handle_increment_boxed_optionalPtr = + _lookup)>>( + 'wire_handle_increment_boxed_optional'); late final _wire_handle_increment_boxed_optional = - _wire_handle_increment_boxed_optionalPtr - .asFunction)>(); + _wire_handle_increment_boxed_optionalPtr.asFunction)>(); void wire_handle_option_box_arguments( int port_, @@ -2408,28 +2200,19 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { } late final _wire_handle_option_box_argumentsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'wire_handle_option_box_arguments'); - late final _wire_handle_option_box_arguments = - _wire_handle_option_box_argumentsPtr.asFunction< - void Function( - int, + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer)>>('wire_handle_option_box_arguments'); + late final _wire_handle_option_box_arguments = _wire_handle_option_box_argumentsPtr.asFunction< + void Function(int, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); void wire_handle_return_enum( int port_, @@ -2441,12 +2224,11 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _wire_handle_return_enumPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>('wire_handle_return_enum'); - late final _wire_handle_return_enum = _wire_handle_return_enumPtr - .asFunction)>(); + late final _wire_handle_return_enumPtr = + _lookup)>>( + 'wire_handle_return_enum'); + late final _wire_handle_return_enum = + _wire_handle_return_enumPtr.asFunction)>(); void wire_handle_enum_parameter( int port_, @@ -2459,10 +2241,8 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { } late final _wire_handle_enum_parameterPtr = - _lookup>( - 'wire_handle_enum_parameter'); - late final _wire_handle_enum_parameter = - _wire_handle_enum_parameterPtr.asFunction(); + _lookup>('wire_handle_enum_parameter'); + late final _wire_handle_enum_parameter = _wire_handle_enum_parameterPtr.asFunction(); void wire_handle_customized_struct( int port_, @@ -2474,12 +2254,11 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _wire_handle_customized_structPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>('wire_handle_customized_struct'); - late final _wire_handle_customized_struct = _wire_handle_customized_structPtr - .asFunction)>(); + late final _wire_handle_customized_structPtr = + _lookup)>>( + 'wire_handle_customized_struct'); + late final _wire_handle_customized_struct = + _wire_handle_customized_structPtr.asFunction)>(); void wire_handle_enum_struct( int port_, @@ -2491,12 +2270,11 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _wire_handle_enum_structPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>('wire_handle_enum_struct'); - late final _wire_handle_enum_struct = _wire_handle_enum_structPtr - .asFunction)>(); + late final _wire_handle_enum_structPtr = + _lookup)>>( + 'wire_handle_enum_struct'); + late final _wire_handle_enum_struct = + _wire_handle_enum_structPtr.asFunction)>(); void wire_use_imported_struct( int port_, @@ -2508,12 +2286,10 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _wire_use_imported_structPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>('wire_use_imported_struct'); - late final _wire_use_imported_struct = _wire_use_imported_structPtr - .asFunction)>(); + late final _wire_use_imported_structPtr = + _lookup)>>('wire_use_imported_struct'); + late final _wire_use_imported_struct = + _wire_use_imported_structPtr.asFunction)>(); void wire_use_imported_enum( int port_, @@ -2526,10 +2302,8 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { } late final _wire_use_imported_enumPtr = - _lookup>( - 'wire_use_imported_enum'); - late final _wire_use_imported_enum = - _wire_use_imported_enumPtr.asFunction(); + _lookup>('wire_use_imported_enum'); + late final _wire_use_imported_enum = _wire_use_imported_enumPtr.asFunction(); void wire_get_app_settings( int port_, @@ -2540,10 +2314,8 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { } late final _wire_get_app_settingsPtr = - _lookup>( - 'wire_get_app_settings'); - late final _wire_get_app_settings = - _wire_get_app_settingsPtr.asFunction(); + _lookup>('wire_get_app_settings'); + late final _wire_get_app_settings = _wire_get_app_settingsPtr.asFunction(); void wire_is_app_embedded( int port_, @@ -2555,12 +2327,11 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _wire_is_app_embeddedPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>('wire_is_app_embedded'); - late final _wire_is_app_embedded = _wire_is_app_embeddedPtr - .asFunction)>(); + late final _wire_is_app_embeddedPtr = + _lookup)>>( + 'wire_is_app_embedded'); + late final _wire_is_app_embedded = + _wire_is_app_embeddedPtr.asFunction)>(); void wire_get_message( int port_, @@ -2570,11 +2341,8 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _wire_get_messagePtr = - _lookup>( - 'wire_get_message'); - late final _wire_get_message = - _wire_get_messagePtr.asFunction(); + late final _wire_get_messagePtr = _lookup>('wire_get_message'); + late final _wire_get_message = _wire_get_messagePtr.asFunction(); void wire_get_array( int port_, @@ -2584,11 +2352,8 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _wire_get_arrayPtr = - _lookup>( - 'wire_get_array'); - late final _wire_get_array = - _wire_get_arrayPtr.asFunction(); + late final _wire_get_arrayPtr = _lookup>('wire_get_array'); + late final _wire_get_array = _wire_get_arrayPtr.asFunction(); void wire_get_complex_array( int port_, @@ -2599,10 +2364,8 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { } late final _wire_get_complex_arrayPtr = - _lookup>( - 'wire_get_complex_array'); - late final _wire_get_complex_array = - _wire_get_complex_arrayPtr.asFunction(); + _lookup>('wire_get_complex_array'); + late final _wire_get_complex_array = _wire_get_complex_arrayPtr.asFunction(); void wire_get_usize( int port_, @@ -2615,10 +2378,8 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { } late final _wire_get_usizePtr = - _lookup>( - 'wire_get_usize'); - late final _wire_get_usize = - _wire_get_usizePtr.asFunction(); + _lookup>('wire_get_usize'); + late final _wire_get_usize = _wire_get_usizePtr.asFunction(); ffi.Pointer new_StringList( int len, @@ -2628,42 +2389,37 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _new_StringListPtr = _lookup< - ffi.NativeFunction Function(ffi.Int32)>>( - 'new_StringList'); - late final _new_StringList = _new_StringListPtr - .asFunction Function(int)>(); + late final _new_StringListPtr = + _lookup Function(ffi.Int32)>>('new_StringList'); + late final _new_StringList = _new_StringListPtr.asFunction Function(int)>(); ffi.Pointer new_box_application_env() { return _new_box_application_env(); } late final _new_box_application_envPtr = - _lookup Function()>>( - 'new_box_application_env'); - late final _new_box_application_env = _new_box_application_envPtr - .asFunction Function()>(); + _lookup Function()>>('new_box_application_env'); + late final _new_box_application_env = + _new_box_application_envPtr.asFunction Function()>(); ffi.Pointer new_box_autoadd_application_settings() { return _new_box_autoadd_application_settings(); } - late final _new_box_autoadd_application_settingsPtr = _lookup< - ffi.NativeFunction Function()>>( - 'new_box_autoadd_application_settings'); + late final _new_box_autoadd_application_settingsPtr = + _lookup Function()>>( + 'new_box_autoadd_application_settings'); late final _new_box_autoadd_application_settings = - _new_box_autoadd_application_settingsPtr - .asFunction Function()>(); + _new_box_autoadd_application_settingsPtr.asFunction Function()>(); ffi.Pointer new_box_autoadd_attribute() { return _new_box_autoadd_attribute(); } late final _new_box_autoadd_attributePtr = - _lookup Function()>>( - 'new_box_autoadd_attribute'); - late final _new_box_autoadd_attribute = _new_box_autoadd_attributePtr - .asFunction Function()>(); + _lookup Function()>>('new_box_autoadd_attribute'); + late final _new_box_autoadd_attribute = + _new_box_autoadd_attributePtr.asFunction Function()>(); ffi.Pointer new_box_autoadd_bool( bool value, @@ -2674,31 +2430,26 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { } late final _new_box_autoadd_boolPtr = - _lookup Function(ffi.Uint8)>>( - 'new_box_autoadd_bool'); - late final _new_box_autoadd_bool = _new_box_autoadd_boolPtr - .asFunction Function(int)>(); + _lookup Function(ffi.Uint8)>>('new_box_autoadd_bool'); + late final _new_box_autoadd_bool = _new_box_autoadd_boolPtr.asFunction Function(int)>(); ffi.Pointer new_box_autoadd_customized() { return _new_box_autoadd_customized(); } late final _new_box_autoadd_customizedPtr = - _lookup Function()>>( - 'new_box_autoadd_customized'); - late final _new_box_autoadd_customized = _new_box_autoadd_customizedPtr - .asFunction Function()>(); + _lookup Function()>>('new_box_autoadd_customized'); + late final _new_box_autoadd_customized = + _new_box_autoadd_customizedPtr.asFunction Function()>(); ffi.Pointer new_box_autoadd_exotic_optionals() { return _new_box_autoadd_exotic_optionals(); } late final _new_box_autoadd_exotic_optionalsPtr = - _lookup Function()>>( - 'new_box_autoadd_exotic_optionals'); + _lookup Function()>>('new_box_autoadd_exotic_optionals'); late final _new_box_autoadd_exotic_optionals = - _new_box_autoadd_exotic_optionalsPtr - .asFunction Function()>(); + _new_box_autoadd_exotic_optionalsPtr.asFunction Function()>(); ffi.Pointer new_box_autoadd_f64( double value, @@ -2709,10 +2460,8 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { } late final _new_box_autoadd_f64Ptr = - _lookup Function(ffi.Double)>>( - 'new_box_autoadd_f64'); - late final _new_box_autoadd_f64 = _new_box_autoadd_f64Ptr - .asFunction Function(double)>(); + _lookup Function(ffi.Double)>>('new_box_autoadd_f64'); + late final _new_box_autoadd_f64 = _new_box_autoadd_f64Ptr.asFunction Function(double)>(); ffi.Pointer new_box_autoadd_i32( int value, @@ -2723,10 +2472,8 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { } late final _new_box_autoadd_i32Ptr = - _lookup Function(ffi.Int32)>>( - 'new_box_autoadd_i32'); - late final _new_box_autoadd_i32 = _new_box_autoadd_i32Ptr - .asFunction Function(int)>(); + _lookup Function(ffi.Int32)>>('new_box_autoadd_i32'); + late final _new_box_autoadd_i32 = _new_box_autoadd_i32Ptr.asFunction Function(int)>(); ffi.Pointer new_box_autoadd_i64( int value, @@ -2737,60 +2484,52 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { } late final _new_box_autoadd_i64Ptr = - _lookup Function(ffi.Int64)>>( - 'new_box_autoadd_i64'); - late final _new_box_autoadd_i64 = _new_box_autoadd_i64Ptr - .asFunction Function(int)>(); + _lookup Function(ffi.Int64)>>('new_box_autoadd_i64'); + late final _new_box_autoadd_i64 = _new_box_autoadd_i64Ptr.asFunction Function(int)>(); ffi.Pointer new_box_autoadd_kitchen_sink() { return _new_box_autoadd_kitchen_sink(); } late final _new_box_autoadd_kitchen_sinkPtr = - _lookup Function()>>( - 'new_box_autoadd_kitchen_sink'); - late final _new_box_autoadd_kitchen_sink = _new_box_autoadd_kitchen_sinkPtr - .asFunction Function()>(); + _lookup Function()>>('new_box_autoadd_kitchen_sink'); + late final _new_box_autoadd_kitchen_sink = + _new_box_autoadd_kitchen_sinkPtr.asFunction Function()>(); ffi.Pointer new_box_autoadd_my_size() { return _new_box_autoadd_my_size(); } late final _new_box_autoadd_my_sizePtr = - _lookup Function()>>( - 'new_box_autoadd_my_size'); - late final _new_box_autoadd_my_size = _new_box_autoadd_my_sizePtr - .asFunction Function()>(); + _lookup Function()>>('new_box_autoadd_my_size'); + late final _new_box_autoadd_my_size = _new_box_autoadd_my_sizePtr.asFunction Function()>(); ffi.Pointer new_box_autoadd_my_struct() { return _new_box_autoadd_my_struct(); } late final _new_box_autoadd_my_structPtr = - _lookup Function()>>( - 'new_box_autoadd_my_struct'); - late final _new_box_autoadd_my_struct = _new_box_autoadd_my_structPtr - .asFunction Function()>(); + _lookup Function()>>('new_box_autoadd_my_struct'); + late final _new_box_autoadd_my_struct = + _new_box_autoadd_my_structPtr.asFunction Function()>(); ffi.Pointer new_box_autoadd_my_tree_node() { return _new_box_autoadd_my_tree_node(); } late final _new_box_autoadd_my_tree_nodePtr = - _lookup Function()>>( - 'new_box_autoadd_my_tree_node'); - late final _new_box_autoadd_my_tree_node = _new_box_autoadd_my_tree_nodePtr - .asFunction Function()>(); + _lookup Function()>>('new_box_autoadd_my_tree_node'); + late final _new_box_autoadd_my_tree_node = + _new_box_autoadd_my_tree_nodePtr.asFunction Function()>(); ffi.Pointer new_box_autoadd_new_type_int() { return _new_box_autoadd_new_type_int(); } late final _new_box_autoadd_new_type_intPtr = - _lookup Function()>>( - 'new_box_autoadd_new_type_int'); - late final _new_box_autoadd_new_type_int = _new_box_autoadd_new_type_intPtr - .asFunction Function()>(); + _lookup Function()>>('new_box_autoadd_new_type_int'); + late final _new_box_autoadd_new_type_int = + _new_box_autoadd_new_type_intPtr.asFunction Function()>(); ffi.Pointer new_box_bool( bool value, @@ -2800,21 +2539,17 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _new_box_boolPtr = - _lookup Function(ffi.Uint8)>>( - 'new_box_bool'); - late final _new_box_bool = - _new_box_boolPtr.asFunction Function(int)>(); + late final _new_box_boolPtr = _lookup Function(ffi.Uint8)>>('new_box_bool'); + late final _new_box_bool = _new_box_boolPtr.asFunction Function(int)>(); ffi.Pointer new_box_exotic_optionals() { return _new_box_exotic_optionals(); } late final _new_box_exotic_optionalsPtr = - _lookup Function()>>( - 'new_box_exotic_optionals'); - late final _new_box_exotic_optionals = _new_box_exotic_optionalsPtr - .asFunction Function()>(); + _lookup Function()>>('new_box_exotic_optionals'); + late final _new_box_exotic_optionals = + _new_box_exotic_optionalsPtr.asFunction Function()>(); ffi.Pointer new_box_f64( double value, @@ -2824,11 +2559,8 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _new_box_f64Ptr = - _lookup Function(ffi.Double)>>( - 'new_box_f64'); - late final _new_box_f64 = - _new_box_f64Ptr.asFunction Function(double)>(); + late final _new_box_f64Ptr = _lookup Function(ffi.Double)>>('new_box_f64'); + late final _new_box_f64 = _new_box_f64Ptr.asFunction Function(double)>(); ffi.Pointer new_box_i32( int value, @@ -2838,11 +2570,8 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _new_box_i32Ptr = - _lookup Function(ffi.Int32)>>( - 'new_box_i32'); - late final _new_box_i32 = - _new_box_i32Ptr.asFunction Function(int)>(); + late final _new_box_i32Ptr = _lookup Function(ffi.Int32)>>('new_box_i32'); + late final _new_box_i32 = _new_box_i32Ptr.asFunction Function(int)>(); ffi.Pointer new_box_i64( int value, @@ -2852,11 +2581,8 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _new_box_i64Ptr = - _lookup Function(ffi.Int64)>>( - 'new_box_i64'); - late final _new_box_i64 = - _new_box_i64Ptr.asFunction Function(int)>(); + late final _new_box_i64Ptr = _lookup Function(ffi.Int64)>>('new_box_i64'); + late final _new_box_i64 = _new_box_i64Ptr.asFunction Function(int)>(); ffi.Pointer new_box_i8( int value, @@ -2866,31 +2592,23 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _new_box_i8Ptr = - _lookup Function(ffi.Int8)>>( - 'new_box_i8'); - late final _new_box_i8 = - _new_box_i8Ptr.asFunction Function(int)>(); + late final _new_box_i8Ptr = _lookup Function(ffi.Int8)>>('new_box_i8'); + late final _new_box_i8 = _new_box_i8Ptr.asFunction Function(int)>(); ffi.Pointer new_box_kitchen_sink() { return _new_box_kitchen_sink(); } late final _new_box_kitchen_sinkPtr = - _lookup Function()>>( - 'new_box_kitchen_sink'); - late final _new_box_kitchen_sink = _new_box_kitchen_sinkPtr - .asFunction Function()>(); + _lookup Function()>>('new_box_kitchen_sink'); + late final _new_box_kitchen_sink = _new_box_kitchen_sinkPtr.asFunction Function()>(); ffi.Pointer new_box_my_size() { return _new_box_my_size(); } - late final _new_box_my_sizePtr = - _lookup Function()>>( - 'new_box_my_size'); - late final _new_box_my_size = - _new_box_my_sizePtr.asFunction Function()>(); + late final _new_box_my_sizePtr = _lookup Function()>>('new_box_my_size'); + late final _new_box_my_size = _new_box_my_sizePtr.asFunction Function()>(); ffi.Pointer new_box_u8( int value, @@ -2900,11 +2618,8 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _new_box_u8Ptr = - _lookup Function(ffi.Uint8)>>( - 'new_box_u8'); - late final _new_box_u8 = - _new_box_u8Ptr.asFunction Function(int)>(); + late final _new_box_u8Ptr = _lookup Function(ffi.Uint8)>>('new_box_u8'); + late final _new_box_u8 = _new_box_u8Ptr.asFunction Function(int)>(); ffi.Pointer new_float_32_list( int len, @@ -2914,12 +2629,9 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _new_float_32_listPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>('new_float_32_list'); - late final _new_float_32_list = _new_float_32_listPtr - .asFunction Function(int)>(); + late final _new_float_32_listPtr = + _lookup Function(ffi.Int32)>>('new_float_32_list'); + late final _new_float_32_list = _new_float_32_listPtr.asFunction Function(int)>(); ffi.Pointer new_float_64_list( int len, @@ -2929,12 +2641,9 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _new_float_64_listPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>('new_float_64_list'); - late final _new_float_64_list = _new_float_64_listPtr - .asFunction Function(int)>(); + late final _new_float_64_listPtr = + _lookup Function(ffi.Int32)>>('new_float_64_list'); + late final _new_float_64_list = _new_float_64_listPtr.asFunction Function(int)>(); ffi.Pointer new_int_32_list( int len, @@ -2944,12 +2653,9 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _new_int_32_listPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>('new_int_32_list'); - late final _new_int_32_list = _new_int_32_listPtr - .asFunction Function(int)>(); + late final _new_int_32_listPtr = + _lookup Function(ffi.Int32)>>('new_int_32_list'); + late final _new_int_32_list = _new_int_32_listPtr.asFunction Function(int)>(); ffi.Pointer new_int_64_list( int len, @@ -2959,12 +2665,9 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _new_int_64_listPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>('new_int_64_list'); - late final _new_int_64_list = _new_int_64_listPtr - .asFunction Function(int)>(); + late final _new_int_64_listPtr = + _lookup Function(ffi.Int32)>>('new_int_64_list'); + late final _new_int_64_list = _new_int_64_listPtr.asFunction Function(int)>(); ffi.Pointer new_int_8_list( int len, @@ -2974,11 +2677,9 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _new_int_8_listPtr = _lookup< - ffi.NativeFunction Function(ffi.Int32)>>( - 'new_int_8_list'); - late final _new_int_8_list = _new_int_8_listPtr - .asFunction Function(int)>(); + late final _new_int_8_listPtr = + _lookup Function(ffi.Int32)>>('new_int_8_list'); + late final _new_int_8_list = _new_int_8_listPtr.asFunction Function(int)>(); ffi.Pointer new_list_application_env_var( int len, @@ -2988,12 +2689,11 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _new_list_application_env_varPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>('new_list_application_env_var'); - late final _new_list_application_env_var = _new_list_application_env_varPtr - .asFunction Function(int)>(); + late final _new_list_application_env_varPtr = + _lookup Function(ffi.Int32)>>( + 'new_list_application_env_var'); + late final _new_list_application_env_var = + _new_list_application_env_varPtr.asFunction Function(int)>(); ffi.Pointer new_list_attribute( int len, @@ -3003,12 +2703,9 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _new_list_attributePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>('new_list_attribute'); - late final _new_list_attribute = _new_list_attributePtr - .asFunction Function(int)>(); + late final _new_list_attributePtr = + _lookup Function(ffi.Int32)>>('new_list_attribute'); + late final _new_list_attribute = _new_list_attributePtr.asFunction Function(int)>(); ffi.Pointer new_list_my_size( int len, @@ -3018,12 +2715,9 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _new_list_my_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>('new_list_my_size'); - late final _new_list_my_size = _new_list_my_sizePtr - .asFunction Function(int)>(); + late final _new_list_my_sizePtr = + _lookup Function(ffi.Int32)>>('new_list_my_size'); + late final _new_list_my_size = _new_list_my_sizePtr.asFunction Function(int)>(); ffi.Pointer new_list_my_tree_node( int len, @@ -3033,15 +2727,12 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _new_list_my_tree_nodePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>('new_list_my_tree_node'); - late final _new_list_my_tree_node = _new_list_my_tree_nodePtr - .asFunction Function(int)>(); + late final _new_list_my_tree_nodePtr = + _lookup Function(ffi.Int32)>>('new_list_my_tree_node'); + late final _new_list_my_tree_node = + _new_list_my_tree_nodePtr.asFunction Function(int)>(); - ffi.Pointer - new_list_opt_box_autoadd_attribute( + ffi.Pointer new_list_opt_box_autoadd_attribute( int len, ) { return _new_list_opt_box_autoadd_attribute( @@ -3049,13 +2740,11 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _new_list_opt_box_autoadd_attributePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>('new_list_opt_box_autoadd_attribute'); - late final _new_list_opt_box_autoadd_attribute = - _new_list_opt_box_autoadd_attributePtr.asFunction< - ffi.Pointer Function(int)>(); + late final _new_list_opt_box_autoadd_attributePtr = + _lookup Function(ffi.Int32)>>( + 'new_list_opt_box_autoadd_attribute'); + late final _new_list_opt_box_autoadd_attribute = _new_list_opt_box_autoadd_attributePtr + .asFunction Function(int)>(); ffi.Pointer new_uint_8_list( int len, @@ -3065,63 +2754,54 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { ); } - late final _new_uint_8_listPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>('new_uint_8_list'); - late final _new_uint_8_list = _new_uint_8_listPtr - .asFunction Function(int)>(); + late final _new_uint_8_listPtr = + _lookup Function(ffi.Int32)>>('new_uint_8_list'); + late final _new_uint_8_list = _new_uint_8_listPtr.asFunction Function(int)>(); ffi.Pointer inflate_KitchenSink_Primitives() { return _inflate_KitchenSink_Primitives(); } late final _inflate_KitchenSink_PrimitivesPtr = - _lookup Function()>>( - 'inflate_KitchenSink_Primitives'); + _lookup Function()>>('inflate_KitchenSink_Primitives'); late final _inflate_KitchenSink_Primitives = - _inflate_KitchenSink_PrimitivesPtr - .asFunction Function()>(); + _inflate_KitchenSink_PrimitivesPtr.asFunction Function()>(); ffi.Pointer inflate_KitchenSink_Nested() { return _inflate_KitchenSink_Nested(); } late final _inflate_KitchenSink_NestedPtr = - _lookup Function()>>( - 'inflate_KitchenSink_Nested'); - late final _inflate_KitchenSink_Nested = _inflate_KitchenSink_NestedPtr - .asFunction Function()>(); + _lookup Function()>>('inflate_KitchenSink_Nested'); + late final _inflate_KitchenSink_Nested = + _inflate_KitchenSink_NestedPtr.asFunction Function()>(); ffi.Pointer inflate_KitchenSink_Optional() { return _inflate_KitchenSink_Optional(); } late final _inflate_KitchenSink_OptionalPtr = - _lookup Function()>>( - 'inflate_KitchenSink_Optional'); - late final _inflate_KitchenSink_Optional = _inflate_KitchenSink_OptionalPtr - .asFunction Function()>(); + _lookup Function()>>('inflate_KitchenSink_Optional'); + late final _inflate_KitchenSink_Optional = + _inflate_KitchenSink_OptionalPtr.asFunction Function()>(); ffi.Pointer inflate_KitchenSink_Buffer() { return _inflate_KitchenSink_Buffer(); } late final _inflate_KitchenSink_BufferPtr = - _lookup Function()>>( - 'inflate_KitchenSink_Buffer'); - late final _inflate_KitchenSink_Buffer = _inflate_KitchenSink_BufferPtr - .asFunction Function()>(); + _lookup Function()>>('inflate_KitchenSink_Buffer'); + late final _inflate_KitchenSink_Buffer = + _inflate_KitchenSink_BufferPtr.asFunction Function()>(); ffi.Pointer inflate_KitchenSink_Enums() { return _inflate_KitchenSink_Enums(); } late final _inflate_KitchenSink_EnumsPtr = - _lookup Function()>>( - 'inflate_KitchenSink_Enums'); - late final _inflate_KitchenSink_Enums = _inflate_KitchenSink_EnumsPtr - .asFunction Function()>(); + _lookup Function()>>('inflate_KitchenSink_Enums'); + late final _inflate_KitchenSink_Enums = + _inflate_KitchenSink_EnumsPtr.asFunction Function()>(); void free_WireSyncReturnStruct( WireSyncReturnStruct val, @@ -3132,10 +2812,9 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { } late final _free_WireSyncReturnStructPtr = - _lookup>( - 'free_WireSyncReturnStruct'); - late final _free_WireSyncReturnStruct = _free_WireSyncReturnStructPtr - .asFunction(); + _lookup>('free_WireSyncReturnStruct'); + late final _free_WireSyncReturnStruct = + _free_WireSyncReturnStructPtr.asFunction(); void store_dart_post_cobject( DartPostCObjectFnType ptr, @@ -3146,10 +2825,8 @@ class FlutterRustBridgeExampleWire implements FlutterRustBridgeWireBase { } late final _store_dart_post_cobjectPtr = - _lookup>( - 'store_dart_post_cobject'); - late final _store_dart_post_cobject = _store_dart_post_cobjectPtr - .asFunction(); + _lookup>('store_dart_post_cobject'); + late final _store_dart_post_cobject = _store_dart_post_cobjectPtr.asFunction(); } class wire_uint_8_list extends ffi.Struct { @@ -3389,6 +3066,5 @@ class wire_ApplicationSettings extends ffi.Struct { } typedef uintptr_t = ffi.Uint64; -typedef DartPostCObjectFnType = ffi.Pointer< - ffi.NativeFunction)>>; +typedef DartPostCObjectFnType = ffi.Pointer)>>; typedef DartPort = ffi.Int64; diff --git a/frb_example/pure_dart/dart/lib/bridge_generated.freezed.dart b/frb_example/pure_dart/dart/lib/bridge_generated.freezed.dart index 0cae910e58..555a7299af 100644 --- a/frb_example/pure_dart/dart/lib/bridge_generated.freezed.dart +++ b/frb_example/pure_dart/dart/lib/bridge_generated.freezed.dart @@ -64,14 +64,12 @@ mixin _$ApplicationMessage { /// @nodoc abstract class $ApplicationMessageCopyWith<$Res> { - factory $ApplicationMessageCopyWith( - ApplicationMessage value, $Res Function(ApplicationMessage) then) = + factory $ApplicationMessageCopyWith(ApplicationMessage value, $Res Function(ApplicationMessage) then) = _$ApplicationMessageCopyWithImpl<$Res>; } /// @nodoc -class _$ApplicationMessageCopyWithImpl<$Res> - implements $ApplicationMessageCopyWith<$Res> { +class _$ApplicationMessageCopyWithImpl<$Res> implements $ApplicationMessageCopyWith<$Res> { _$ApplicationMessageCopyWithImpl(this._value, this._then); final ApplicationMessage _value; @@ -80,29 +78,26 @@ class _$ApplicationMessageCopyWithImpl<$Res> } /// @nodoc -abstract class $DisplayMessageCopyWith<$Res> { - factory $DisplayMessageCopyWith( - DisplayMessage value, $Res Function(DisplayMessage) then) = - _$DisplayMessageCopyWithImpl<$Res>; +abstract class _$$DisplayMessageCopyWith<$Res> { + factory _$$DisplayMessageCopyWith(_$DisplayMessage value, $Res Function(_$DisplayMessage) then) = + __$$DisplayMessageCopyWithImpl<$Res>; $Res call({String field0}); } /// @nodoc -class _$DisplayMessageCopyWithImpl<$Res> - extends _$ApplicationMessageCopyWithImpl<$Res> - implements $DisplayMessageCopyWith<$Res> { - _$DisplayMessageCopyWithImpl( - DisplayMessage _value, $Res Function(DisplayMessage) _then) - : super(_value, (v) => _then(v as DisplayMessage)); +class __$$DisplayMessageCopyWithImpl<$Res> extends _$ApplicationMessageCopyWithImpl<$Res> + implements _$$DisplayMessageCopyWith<$Res> { + __$$DisplayMessageCopyWithImpl(_$DisplayMessage _value, $Res Function(_$DisplayMessage) _then) + : super(_value, (v) => _then(v as _$DisplayMessage)); @override - DisplayMessage get _value => super._value as DisplayMessage; + _$DisplayMessage get _value => super._value as _$DisplayMessage; @override $Res call({ Object? field0 = freezed, }) { - return _then(DisplayMessage( + return _then(_$DisplayMessage( field0 == freezed ? _value.field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -128,18 +123,17 @@ class _$DisplayMessage implements DisplayMessage { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is DisplayMessage && + other is _$DisplayMessage && const DeepCollectionEquality().equals(other.field0, field0)); } @override - int get hashCode => - Object.hash(runtimeType, const DeepCollectionEquality().hash(field0)); + int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(field0)); @JsonKey(ignore: true) @override - $DisplayMessageCopyWith get copyWith => - _$DisplayMessageCopyWithImpl(this, _$identity); + _$$DisplayMessageCopyWith<_$DisplayMessage> get copyWith => + __$$DisplayMessageCopyWithImpl<_$DisplayMessage>(this, _$identity); @override @optionalTypeArgs @@ -215,35 +209,31 @@ abstract class DisplayMessage implements ApplicationMessage { String get field0 => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $DisplayMessageCopyWith get copyWith => - throw _privateConstructorUsedError; + _$$DisplayMessageCopyWith<_$DisplayMessage> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $RenderPixelCopyWith<$Res> { - factory $RenderPixelCopyWith( - RenderPixel value, $Res Function(RenderPixel) then) = - _$RenderPixelCopyWithImpl<$Res>; +abstract class _$$RenderPixelCopyWith<$Res> { + factory _$$RenderPixelCopyWith(_$RenderPixel value, $Res Function(_$RenderPixel) then) = + __$$RenderPixelCopyWithImpl<$Res>; $Res call({int x, int y}); } /// @nodoc -class _$RenderPixelCopyWithImpl<$Res> - extends _$ApplicationMessageCopyWithImpl<$Res> - implements $RenderPixelCopyWith<$Res> { - _$RenderPixelCopyWithImpl( - RenderPixel _value, $Res Function(RenderPixel) _then) - : super(_value, (v) => _then(v as RenderPixel)); +class __$$RenderPixelCopyWithImpl<$Res> extends _$ApplicationMessageCopyWithImpl<$Res> + implements _$$RenderPixelCopyWith<$Res> { + __$$RenderPixelCopyWithImpl(_$RenderPixel _value, $Res Function(_$RenderPixel) _then) + : super(_value, (v) => _then(v as _$RenderPixel)); @override - RenderPixel get _value => super._value as RenderPixel; + _$RenderPixel get _value => super._value as _$RenderPixel; @override $Res call({ Object? x = freezed, Object? y = freezed, }) { - return _then(RenderPixel( + return _then(_$RenderPixel( x: x == freezed ? _value.x : x // ignore: cast_nullable_to_non_nullable @@ -275,21 +265,18 @@ class _$RenderPixel implements RenderPixel { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is RenderPixel && + other is _$RenderPixel && const DeepCollectionEquality().equals(other.x, x) && const DeepCollectionEquality().equals(other.y, y)); } @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(x), - const DeepCollectionEquality().hash(y)); + int get hashCode => + Object.hash(runtimeType, const DeepCollectionEquality().hash(x), const DeepCollectionEquality().hash(y)); @JsonKey(ignore: true) @override - $RenderPixelCopyWith get copyWith => - _$RenderPixelCopyWithImpl(this, _$identity); + _$$RenderPixelCopyWith<_$RenderPixel> get copyWith => __$$RenderPixelCopyWithImpl<_$RenderPixel>(this, _$identity); @override @optionalTypeArgs @@ -361,30 +348,25 @@ class _$RenderPixel implements RenderPixel { } abstract class RenderPixel implements ApplicationMessage { - const factory RenderPixel({required final int x, required final int y}) = - _$RenderPixel; + const factory RenderPixel({required final int x, required final int y}) = _$RenderPixel; int get x => throw _privateConstructorUsedError; int get y => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $RenderPixelCopyWith get copyWith => - throw _privateConstructorUsedError; + _$$RenderPixelCopyWith<_$RenderPixel> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $ExitCopyWith<$Res> { - factory $ExitCopyWith(Exit value, $Res Function(Exit) then) = - _$ExitCopyWithImpl<$Res>; +abstract class _$$ExitCopyWith<$Res> { + factory _$$ExitCopyWith(_$Exit value, $Res Function(_$Exit) then) = __$$ExitCopyWithImpl<$Res>; } /// @nodoc -class _$ExitCopyWithImpl<$Res> extends _$ApplicationMessageCopyWithImpl<$Res> - implements $ExitCopyWith<$Res> { - _$ExitCopyWithImpl(Exit _value, $Res Function(Exit) _then) - : super(_value, (v) => _then(v as Exit)); +class __$$ExitCopyWithImpl<$Res> extends _$ApplicationMessageCopyWithImpl<$Res> implements _$$ExitCopyWith<$Res> { + __$$ExitCopyWithImpl(_$Exit _value, $Res Function(_$Exit) _then) : super(_value, (v) => _then(v as _$Exit)); @override - Exit get _value => super._value as Exit; + _$Exit get _value => super._value as _$Exit; } /// @nodoc @@ -399,8 +381,7 @@ class _$Exit implements Exit { @override bool operator ==(dynamic other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is Exit); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$Exit); } @override @@ -484,8 +465,7 @@ mixin _$KitchenSink { @optionalTypeArgs TResult when({ required TResult Function() empty, - required TResult Function(int int32, double float64, bool boolean) - primitives, + required TResult Function(int int32, double float64, bool boolean) primitives, required TResult Function(KitchenSink field0, int field1) nested, required TResult Function(int? field0, int? field1) optional, required TResult Function(Uint8List field0) buffer, @@ -548,9 +528,7 @@ mixin _$KitchenSink { /// @nodoc abstract class $KitchenSinkCopyWith<$Res> { - factory $KitchenSinkCopyWith( - KitchenSink value, $Res Function(KitchenSink) then) = - _$KitchenSinkCopyWithImpl<$Res>; + factory $KitchenSinkCopyWith(KitchenSink value, $Res Function(KitchenSink) then) = _$KitchenSinkCopyWithImpl<$Res>; } /// @nodoc @@ -563,19 +541,16 @@ class _$KitchenSinkCopyWithImpl<$Res> implements $KitchenSinkCopyWith<$Res> { } /// @nodoc -abstract class $EmptyCopyWith<$Res> { - factory $EmptyCopyWith(Empty value, $Res Function(Empty) then) = - _$EmptyCopyWithImpl<$Res>; +abstract class _$$EmptyCopyWith<$Res> { + factory _$$EmptyCopyWith(_$Empty value, $Res Function(_$Empty) then) = __$$EmptyCopyWithImpl<$Res>; } /// @nodoc -class _$EmptyCopyWithImpl<$Res> extends _$KitchenSinkCopyWithImpl<$Res> - implements $EmptyCopyWith<$Res> { - _$EmptyCopyWithImpl(Empty _value, $Res Function(Empty) _then) - : super(_value, (v) => _then(v as Empty)); +class __$$EmptyCopyWithImpl<$Res> extends _$KitchenSinkCopyWithImpl<$Res> implements _$$EmptyCopyWith<$Res> { + __$$EmptyCopyWithImpl(_$Empty _value, $Res Function(_$Empty) _then) : super(_value, (v) => _then(v as _$Empty)); @override - Empty get _value => super._value as Empty; + _$Empty get _value => super._value as _$Empty; } /// @nodoc @@ -590,8 +565,7 @@ class _$Empty implements Empty { @override bool operator ==(dynamic other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is Empty); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$Empty); } @override @@ -601,8 +575,7 @@ class _$Empty implements Empty { @optionalTypeArgs TResult when({ required TResult Function() empty, - required TResult Function(int int32, double float64, bool boolean) - primitives, + required TResult Function(int int32, double float64, bool boolean) primitives, required TResult Function(KitchenSink field0, int field1) nested, required TResult Function(int? field0, int? field1) optional, required TResult Function(Uint8List field0) buffer, @@ -690,21 +663,19 @@ abstract class Empty implements KitchenSink { } /// @nodoc -abstract class $PrimitivesCopyWith<$Res> { - factory $PrimitivesCopyWith( - Primitives value, $Res Function(Primitives) then) = - _$PrimitivesCopyWithImpl<$Res>; +abstract class _$$PrimitivesCopyWith<$Res> { + factory _$$PrimitivesCopyWith(_$Primitives value, $Res Function(_$Primitives) then) = + __$$PrimitivesCopyWithImpl<$Res>; $Res call({int int32, double float64, bool boolean}); } /// @nodoc -class _$PrimitivesCopyWithImpl<$Res> extends _$KitchenSinkCopyWithImpl<$Res> - implements $PrimitivesCopyWith<$Res> { - _$PrimitivesCopyWithImpl(Primitives _value, $Res Function(Primitives) _then) - : super(_value, (v) => _then(v as Primitives)); +class __$$PrimitivesCopyWithImpl<$Res> extends _$KitchenSinkCopyWithImpl<$Res> implements _$$PrimitivesCopyWith<$Res> { + __$$PrimitivesCopyWithImpl(_$Primitives _value, $Res Function(_$Primitives) _then) + : super(_value, (v) => _then(v as _$Primitives)); @override - Primitives get _value => super._value as Primitives; + _$Primitives get _value => super._value as _$Primitives; @override $Res call({ @@ -712,7 +683,7 @@ class _$PrimitivesCopyWithImpl<$Res> extends _$KitchenSinkCopyWithImpl<$Res> Object? float64 = freezed, Object? boolean = freezed, }) { - return _then(Primitives( + return _then(_$Primitives( int32: int32 == freezed ? _value.int32 : int32 // ignore: cast_nullable_to_non_nullable @@ -732,8 +703,7 @@ class _$PrimitivesCopyWithImpl<$Res> extends _$KitchenSinkCopyWithImpl<$Res> /// @nodoc class _$Primitives implements Primitives { - const _$Primitives( - {required this.int32, required this.float64, required this.boolean}); + const _$Primitives({required this.int32, required this.float64, required this.boolean}); /// Dart field comment @override @@ -752,30 +722,25 @@ class _$Primitives implements Primitives { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is Primitives && + other is _$Primitives && const DeepCollectionEquality().equals(other.int32, int32) && const DeepCollectionEquality().equals(other.float64, float64) && const DeepCollectionEquality().equals(other.boolean, boolean)); } @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(int32), - const DeepCollectionEquality().hash(float64), - const DeepCollectionEquality().hash(boolean)); + int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(int32), + const DeepCollectionEquality().hash(float64), const DeepCollectionEquality().hash(boolean)); @JsonKey(ignore: true) @override - $PrimitivesCopyWith get copyWith => - _$PrimitivesCopyWithImpl(this, _$identity); + _$$PrimitivesCopyWith<_$Primitives> get copyWith => __$$PrimitivesCopyWithImpl<_$Primitives>(this, _$identity); @override @optionalTypeArgs TResult when({ required TResult Function() empty, - required TResult Function(int int32, double float64, bool boolean) - primitives, + required TResult Function(int int32, double float64, bool boolean) primitives, required TResult Function(KitchenSink field0, int field1) nested, required TResult Function(int? field0, int? field1) optional, required TResult Function(Uint8List field0) buffer, @@ -859,44 +824,38 @@ class _$Primitives implements Primitives { } abstract class Primitives implements KitchenSink { - const factory Primitives( - {required final int int32, - required final double float64, - required final bool boolean}) = _$Primitives; + const factory Primitives({required final int int32, required final double float64, required final bool boolean}) = + _$Primitives; /// Dart field comment int get int32 => throw _privateConstructorUsedError; double get float64 => throw _privateConstructorUsedError; bool get boolean => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $PrimitivesCopyWith get copyWith => - throw _privateConstructorUsedError; + _$$PrimitivesCopyWith<_$Primitives> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $NestedCopyWith<$Res> { - factory $NestedCopyWith(Nested value, $Res Function(Nested) then) = - _$NestedCopyWithImpl<$Res>; +abstract class _$$NestedCopyWith<$Res> { + factory _$$NestedCopyWith(_$Nested value, $Res Function(_$Nested) then) = __$$NestedCopyWithImpl<$Res>; $Res call({KitchenSink field0, int field1}); $KitchenSinkCopyWith<$Res> get field0; } /// @nodoc -class _$NestedCopyWithImpl<$Res> extends _$KitchenSinkCopyWithImpl<$Res> - implements $NestedCopyWith<$Res> { - _$NestedCopyWithImpl(Nested _value, $Res Function(Nested) _then) - : super(_value, (v) => _then(v as Nested)); +class __$$NestedCopyWithImpl<$Res> extends _$KitchenSinkCopyWithImpl<$Res> implements _$$NestedCopyWith<$Res> { + __$$NestedCopyWithImpl(_$Nested _value, $Res Function(_$Nested) _then) : super(_value, (v) => _then(v as _$Nested)); @override - Nested get _value => super._value as Nested; + _$Nested get _value => super._value as _$Nested; @override $Res call({ Object? field0 = freezed, Object? field1 = freezed, }) { - return _then(Nested( + return _then(_$Nested( field0 == freezed ? _value.field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -935,28 +894,24 @@ class _$Nested implements Nested { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is Nested && + other is _$Nested && const DeepCollectionEquality().equals(other.field0, field0) && const DeepCollectionEquality().equals(other.field1, field1)); } @override int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(field0), - const DeepCollectionEquality().hash(field1)); + runtimeType, const DeepCollectionEquality().hash(field0), const DeepCollectionEquality().hash(field1)); @JsonKey(ignore: true) @override - $NestedCopyWith get copyWith => - _$NestedCopyWithImpl(this, _$identity); + _$$NestedCopyWith<_$Nested> get copyWith => __$$NestedCopyWithImpl<_$Nested>(this, _$identity); @override @optionalTypeArgs TResult when({ required TResult Function() empty, - required TResult Function(int int32, double float64, bool boolean) - primitives, + required TResult Function(int int32, double float64, bool boolean) primitives, required TResult Function(KitchenSink field0, int field1) nested, required TResult Function(int? field0, int? field1) optional, required TResult Function(Uint8List field0) buffer, @@ -1045,31 +1000,29 @@ abstract class Nested implements KitchenSink { KitchenSink get field0 => throw _privateConstructorUsedError; int get field1 => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $NestedCopyWith get copyWith => throw _privateConstructorUsedError; + _$$NestedCopyWith<_$Nested> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $OptionalCopyWith<$Res> { - factory $OptionalCopyWith(Optional value, $Res Function(Optional) then) = - _$OptionalCopyWithImpl<$Res>; +abstract class _$$OptionalCopyWith<$Res> { + factory _$$OptionalCopyWith(_$Optional value, $Res Function(_$Optional) then) = __$$OptionalCopyWithImpl<$Res>; $Res call({int? field0, int? field1}); } /// @nodoc -class _$OptionalCopyWithImpl<$Res> extends _$KitchenSinkCopyWithImpl<$Res> - implements $OptionalCopyWith<$Res> { - _$OptionalCopyWithImpl(Optional _value, $Res Function(Optional) _then) - : super(_value, (v) => _then(v as Optional)); +class __$$OptionalCopyWithImpl<$Res> extends _$KitchenSinkCopyWithImpl<$Res> implements _$$OptionalCopyWith<$Res> { + __$$OptionalCopyWithImpl(_$Optional _value, $Res Function(_$Optional) _then) + : super(_value, (v) => _then(v as _$Optional)); @override - Optional get _value => super._value as Optional; + _$Optional get _value => super._value as _$Optional; @override $Res call({ Object? field0 = freezed, Object? field1 = freezed, }) { - return _then(Optional( + return _then(_$Optional( field0 == freezed ? _value.field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -1102,28 +1055,24 @@ class _$Optional implements Optional { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is Optional && + other is _$Optional && const DeepCollectionEquality().equals(other.field0, field0) && const DeepCollectionEquality().equals(other.field1, field1)); } @override int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(field0), - const DeepCollectionEquality().hash(field1)); + runtimeType, const DeepCollectionEquality().hash(field0), const DeepCollectionEquality().hash(field1)); @JsonKey(ignore: true) @override - $OptionalCopyWith get copyWith => - _$OptionalCopyWithImpl(this, _$identity); + _$$OptionalCopyWith<_$Optional> get copyWith => __$$OptionalCopyWithImpl<_$Optional>(this, _$identity); @override @optionalTypeArgs TResult when({ required TResult Function() empty, - required TResult Function(int int32, double float64, bool boolean) - primitives, + required TResult Function(int int32, double float64, bool boolean) primitives, required TResult Function(KitchenSink field0, int field1) nested, required TResult Function(int? field0, int? field1) optional, required TResult Function(Uint8List field0) buffer, @@ -1213,31 +1162,27 @@ abstract class Optional implements KitchenSink { int? get field0 => throw _privateConstructorUsedError; int? get field1 => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $OptionalCopyWith get copyWith => - throw _privateConstructorUsedError; + _$$OptionalCopyWith<_$Optional> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $BufferCopyWith<$Res> { - factory $BufferCopyWith(Buffer value, $Res Function(Buffer) then) = - _$BufferCopyWithImpl<$Res>; +abstract class _$$BufferCopyWith<$Res> { + factory _$$BufferCopyWith(_$Buffer value, $Res Function(_$Buffer) then) = __$$BufferCopyWithImpl<$Res>; $Res call({Uint8List field0}); } /// @nodoc -class _$BufferCopyWithImpl<$Res> extends _$KitchenSinkCopyWithImpl<$Res> - implements $BufferCopyWith<$Res> { - _$BufferCopyWithImpl(Buffer _value, $Res Function(Buffer) _then) - : super(_value, (v) => _then(v as Buffer)); +class __$$BufferCopyWithImpl<$Res> extends _$KitchenSinkCopyWithImpl<$Res> implements _$$BufferCopyWith<$Res> { + __$$BufferCopyWithImpl(_$Buffer _value, $Res Function(_$Buffer) _then) : super(_value, (v) => _then(v as _$Buffer)); @override - Buffer get _value => super._value as Buffer; + _$Buffer get _value => super._value as _$Buffer; @override $Res call({ Object? field0 = freezed, }) { - return _then(Buffer( + return _then(_$Buffer( field0 == freezed ? _value.field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -1263,25 +1208,22 @@ class _$Buffer implements Buffer { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is Buffer && + other is _$Buffer && const DeepCollectionEquality().equals(other.field0, field0)); } @override - int get hashCode => - Object.hash(runtimeType, const DeepCollectionEquality().hash(field0)); + int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(field0)); @JsonKey(ignore: true) @override - $BufferCopyWith get copyWith => - _$BufferCopyWithImpl(this, _$identity); + _$$BufferCopyWith<_$Buffer> get copyWith => __$$BufferCopyWithImpl<_$Buffer>(this, _$identity); @override @optionalTypeArgs TResult when({ required TResult Function() empty, - required TResult Function(int int32, double float64, bool boolean) - primitives, + required TResult Function(int int32, double float64, bool boolean) primitives, required TResult Function(KitchenSink field0, int field1) nested, required TResult Function(int? field0, int? field1) optional, required TResult Function(Uint8List field0) buffer, @@ -1369,30 +1311,27 @@ abstract class Buffer implements KitchenSink { Uint8List get field0 => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $BufferCopyWith get copyWith => throw _privateConstructorUsedError; + _$$BufferCopyWith<_$Buffer> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $EnumsCopyWith<$Res> { - factory $EnumsCopyWith(Enums value, $Res Function(Enums) then) = - _$EnumsCopyWithImpl<$Res>; +abstract class _$$EnumsCopyWith<$Res> { + factory _$$EnumsCopyWith(_$Enums value, $Res Function(_$Enums) then) = __$$EnumsCopyWithImpl<$Res>; $Res call({Weekdays field0}); } /// @nodoc -class _$EnumsCopyWithImpl<$Res> extends _$KitchenSinkCopyWithImpl<$Res> - implements $EnumsCopyWith<$Res> { - _$EnumsCopyWithImpl(Enums _value, $Res Function(Enums) _then) - : super(_value, (v) => _then(v as Enums)); +class __$$EnumsCopyWithImpl<$Res> extends _$KitchenSinkCopyWithImpl<$Res> implements _$$EnumsCopyWith<$Res> { + __$$EnumsCopyWithImpl(_$Enums _value, $Res Function(_$Enums) _then) : super(_value, (v) => _then(v as _$Enums)); @override - Enums get _value => super._value as Enums; + _$Enums get _value => super._value as _$Enums; @override $Res call({ Object? field0 = freezed, }) { - return _then(Enums( + return _then(_$Enums( field0 == freezed ? _value.field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -1418,25 +1357,22 @@ class _$Enums implements Enums { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is Enums && + other is _$Enums && const DeepCollectionEquality().equals(other.field0, field0)); } @override - int get hashCode => - Object.hash(runtimeType, const DeepCollectionEquality().hash(field0)); + int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(field0)); @JsonKey(ignore: true) @override - $EnumsCopyWith get copyWith => - _$EnumsCopyWithImpl(this, _$identity); + _$$EnumsCopyWith<_$Enums> get copyWith => __$$EnumsCopyWithImpl<_$Enums>(this, _$identity); @override @optionalTypeArgs TResult when({ required TResult Function() empty, - required TResult Function(int int32, double float64, bool boolean) - primitives, + required TResult Function(int int32, double float64, bool boolean) primitives, required TResult Function(KitchenSink field0, int field1) nested, required TResult Function(int? field0, int? field1) optional, required TResult Function(Uint8List field0) buffer, @@ -1524,5 +1460,5 @@ abstract class Enums implements KitchenSink { Weekdays get field0 => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $EnumsCopyWith get copyWith => throw _privateConstructorUsedError; + _$$EnumsCopyWith<_$Enums> get copyWith => throw _privateConstructorUsedError; }