Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
liamappelbe committed Nov 6, 2024
1 parent eb6a18c commit 6a61ba0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
5 changes: 3 additions & 2 deletions pkgs/ffigen/test/native_objc_test/protocol_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<FailedToLoadProtocolMethodException>()));
});
});
Expand Down
6 changes: 2 additions & 4 deletions pkgs/objective_c/lib/src/internal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -78,8 +77,7 @@ final class ObjCRuntimeError extends Error {

extension GetProtocolName on Pointer<c.ObjCProtocol> {
/// Returns the name of the protocol.
String get name =>
c.getProtocolName(this).cast<Utf8>().toDartString();
String get name => c.getProtocolName(this).cast<Utf8>().toDartString();
}

/// Only for use by ffigen bindings.
Expand Down
11 changes: 6 additions & 5 deletions pkgs/objective_c/lib/src/protocol_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -43,7 +43,8 @@ class ObjCProtocolMethod<T extends Function> {
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].
///
Expand Down Expand Up @@ -76,8 +77,8 @@ class ObjCProtocolListenableMethod<T extends Function>
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].
Expand Down

0 comments on commit 6a61ba0

Please sign in to comment.