Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
InvertedX committed Oct 3, 2024
1 parent aea3dc8 commit f414042
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,8 @@ class VlcPlayerApi {
/// Constructor for [VlcPlayerApi]. The [binaryMessenger] named argument is
/// available for dependency injection. If it is left null, the default
/// BinaryMessenger will be used which routes to the host platform.
VlcPlayerApi({BinaryMessenger? binaryMessenger}) : _binaryMessenger = binaryMessenger;
VlcPlayerApi({BinaryMessenger? binaryMessenger})
: _binaryMessenger = binaryMessenger;

Future<void> initialize() async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
Expand Down Expand Up @@ -909,7 +910,7 @@ class VlcPlayerApi {
binaryMessenger: _binaryMessenger,
);
final Map<Object?, Object?>? replyMap =
await channel.send(encoded) as Map<Object?, Object?>?;
await channel.send(encoded) as Map<Object?, Object?>?;
if (replyMap == null) {
throw PlatformException(
code: 'channel-error',
Expand All @@ -930,17 +931,20 @@ class VlcPlayerApi {
Future<void> setPosition(PercentagePositionMessage arg) async {
final Object encoded = arg.encode();
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
'dev.flutter.pigeon.VlcPlayerApi.setPosition', const StandardMessageCodec(), binaryMessenger: _binaryMessenger);
'dev.flutter.pigeon.VlcPlayerApi.setPosition',
const StandardMessageCodec(),
binaryMessenger: _binaryMessenger);
final Map<Object?, Object?>? replyMap =
await channel.send(encoded) as Map<Object?, Object?>?;
await channel.send(encoded) as Map<Object?, Object?>?;
if (replyMap == null) {
throw PlatformException(
code: 'channel-error',
message: 'Unable to establish connection on channel.',
details: null,
);
} else if (replyMap['error'] != null) {
final Map<Object?, Object?> error = (replyMap['error'] as Map<Object?, Object?>?)!;
final Map<Object?, Object?> error =
(replyMap['error'] as Map<Object?, Object?>?)!;
throw PlatformException(
code: (error['code'] as String?)!,
message: error['message'] as String?,
Expand All @@ -951,7 +955,6 @@ class VlcPlayerApi {
}
}


Future<PositionMessage> position(ViewMessage arg) async {
final Object encoded = arg.encode();
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
Expand Down

0 comments on commit f414042

Please sign in to comment.