Skip to content

Commit

Permalink
Dart format
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernthedev committed Nov 18, 2023
1 parent e15d7fe commit 831e7fc
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
3 changes: 1 addition & 2 deletions lib/pages/logger.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import 'package:routemaster/routemaster.dart';
import '../utils/scroll.dart';

class LogPage extends StatefulWidget {
LogPage({super.key, required String serial})
: logFuture = Adb.logcat(serial);
LogPage({super.key, required String serial}) : logFuture = Adb.logcat(serial);

final Future<Stream<String>> logFuture;
final scrollController = AdjustableScrollController();
Expand Down
13 changes: 8 additions & 5 deletions lib/src/pigeon.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List;
import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer;
import 'package:flutter/services.dart';

List<Object?> wrapResponse({Object? result, PlatformException? error, bool empty = false}) {
List<Object?> wrapResponse(
{Object? result, PlatformException? error, bool empty = false}) {
if (empty) {
return <Object?>[];
}
Expand All @@ -26,14 +27,15 @@ abstract class Native2Flutter {
static void setup(Native2Flutter? api, {BinaryMessenger? binaryMessenger}) {
{
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
'dev.flutter.pigeon.desktop_adb_file_browser.Native2Flutter.onClick', codec,
'dev.flutter.pigeon.desktop_adb_file_browser.Native2Flutter.onClick',
codec,
binaryMessenger: binaryMessenger);
if (api == null) {
channel.setMessageHandler(null);
} else {
channel.setMessageHandler((Object? message) async {
assert(message != null,
'Argument for dev.flutter.pigeon.desktop_adb_file_browser.Native2Flutter.onClick was null.');
'Argument for dev.flutter.pigeon.desktop_adb_file_browser.Native2Flutter.onClick was null.');
final List<Object?> args = (message as List<Object?>?)!;
final bool? arg_forward = (args[0] as bool?);
assert(arg_forward != null,
Expand All @@ -43,8 +45,9 @@ abstract class Native2Flutter {
return wrapResponse(empty: true);
} on PlatformException catch (e) {
return wrapResponse(error: e);
} catch (e) {
return wrapResponse(error: PlatformException(code: 'error', message: e.toString()));
} catch (e) {
return wrapResponse(
error: PlatformException(code: 'error', message: e.toString()));
}
});
}
Expand Down
1 change: 0 additions & 1 deletion lib/utils/file_sort.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

///
/// Sorts directories (ends with /) first then files, finally alphabetical
///
Expand Down
4 changes: 3 additions & 1 deletion lib/widgets/browser/new_file_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ class NewFileDialog extends StatefulWidget {

final ValueNotifier<FileCreation> fileCreation;
const NewFileDialog(
{super.key, required this.fileNameController, required this.fileCreation});
{super.key,
required this.fileNameController,
required this.fileCreation});

@override
State<NewFileDialog> createState() => _NewFileDialogState();
Expand Down
7 changes: 3 additions & 4 deletions pigeon/mouse_event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import 'package:pigeon/pigeon.dart';
@ConfigurePigeon(PigeonOptions(
dartOut: 'lib/src/pigeon.g.dart',
dartOptions: DartOptions(),
cppOptions: CppOptions(namespace: "pigeon", ),
cppOptions: CppOptions(
namespace: "pigeon",
),
cppHeaderOut: 'windows/runner/pigeon.g.h',
cppSourceOut: 'windows/runner/pigeon.g.cpp',
objcHeaderOut: 'macos/Runner/pigeon.g.h',
Expand All @@ -12,7 +14,6 @@ import 'package:pigeon/pigeon.dart';
objcOptions: ObjcOptions(prefix: 'PGN'),
// copyrightHeader: 'pigeons/copyright.txt',
dartPackageName: 'desktop_adb_file_browser',

))

// https://github.com/flutter/flutter/issues/108682
Expand All @@ -26,5 +27,3 @@ abstract class Native2Flutter {
abstract class Flutter2Native {
void random(bool x);
}


0 comments on commit 831e7fc

Please sign in to comment.