diff --git a/pkgs/ffigen/test/native_objc_test/protocol_test.dart b/pkgs/ffigen/test/native_objc_test/protocol_test.dart index 4cb7beda8..d6176506e 100644 --- a/pkgs/ffigen/test/native_objc_test/protocol_test.dart +++ b/pkgs/ffigen/test/native_objc_test/protocol_test.dart @@ -414,8 +414,9 @@ void main() { expect(MyProtocol.optionalMethod_.isAvailable, isTrue); expect(MyProtocol.disabledMethod.isAvailable, isFalse); - expect(() => - MyProtocol.disabledMethod.implement(ObjCProtocolBuilder(), () => 123), + expect( + () => MyProtocol.disabledMethod + .implement(ObjCProtocolBuilder(), () => 123), throwsA(isA())); }); }); diff --git a/pkgs/objective_c/lib/src/internal.dart b/pkgs/objective_c/lib/src/internal.dart index e6c0e4c40..b65b58b95 100644 --- a/pkgs/objective_c/lib/src/internal.dart +++ b/pkgs/objective_c/lib/src/internal.dart @@ -34,8 +34,7 @@ final class FailedToLoadClassException implements Exception { FailedToLoadClassException(this.clazz); @override - String toString() => - '$runtimeType: Failed to load Objective-C class: $clazz'; + String toString() => '$runtimeType: Failed to load Objective-C class: $clazz'; } final class FailedToLoadProtocolException implements Exception { @@ -78,8 +77,7 @@ final class ObjCRuntimeError extends Error { extension GetProtocolName on Pointer { /// Returns the name of the protocol. - String get name => - c.getProtocolName(this).cast().toDartString(); + String get name => c.getProtocolName(this).cast().toDartString(); } /// Only for use by ffigen bindings. diff --git a/pkgs/objective_c/lib/src/protocol_builder.dart b/pkgs/objective_c/lib/src/protocol_builder.dart index 3c054877d..c70a12b8f 100644 --- a/pkgs/objective_c/lib/src/protocol_builder.dart +++ b/pkgs/objective_c/lib/src/protocol_builder.dart @@ -5,8 +5,8 @@ import 'dart:ffi'; import 'c_bindings_generated.dart' as c; -import 'internal.dart' show - FailedToLoadProtocolMethodException, GetProtocolName, ObjCBlockBase; +import 'internal.dart' + show FailedToLoadProtocolMethodException, GetProtocolName, ObjCBlockBase; import 'objective_c_bindings_generated.dart' as objc; import 'selector.dart'; @@ -43,7 +43,8 @@ class ObjCProtocolMethod { final ObjCBlockBase Function(T) _createBlock; /// Only for use by ffigen bindings. - ObjCProtocolMethod(this._proto, this._sel, this._signature, this._createBlock); + ObjCProtocolMethod( + this._proto, this._sel, this._signature, this._createBlock); /// Implement this method on the protocol [builder] using a Dart [function]. /// @@ -76,8 +77,8 @@ class ObjCProtocolListenableMethod final ObjCBlockBase Function(T) _createListenerBlock; /// Only for use by ffigen bindings. - ObjCProtocolListenableMethod(super._proto, super._sel, super._signature, super._createBlock, - this._createListenerBlock); + ObjCProtocolListenableMethod(super._proto, super._sel, super._signature, + super._createBlock, this._createListenerBlock); /// Implement this method on the protocol [builder] as a listener using a Dart /// [function].