Skip to content

Commit b350716

Browse files
committed
style: increase code line length for enhanced readability
1 parent 4431a6e commit b350716

File tree

5 files changed

+7
-15
lines changed

5 files changed

+7
-15
lines changed

example/lib/main.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ class _MyAppState extends State<MyApp> {
3232
// Platform messages may fail, so we use a try/catch PlatformException.
3333
// We also handle the message potentially returning null.
3434
try {
35-
platformVersion = await _screenshotGuardPlugin.getPlatformVersion() ??
36-
'Unknown platform version';
35+
platformVersion = await _screenshotGuardPlugin.getPlatformVersion() ?? 'Unknown platform version';
3736
} on PlatformException {
3837
platformVersion = 'Failed to get platform version.';
3938
}

example/test/widget_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ void main() {
1818
// Verify that platform version is retrieved.
1919
expect(
2020
find.byWidgetPredicate(
21-
(Widget widget) =>
22-
widget is Text && widget.data!.startsWith('Running on:'),
21+
(Widget widget) => widget is Text && widget.data!.startsWith('Running on:'),
2322
),
2423
findsOneWidget,
2524
);

lib/screenshot_guard_method_channel.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ class MethodChannelScreenshotGuard extends ScreenshotGuardPlatform {
1111

1212
@override
1313
Future<String?> getPlatformVersion() async {
14-
final version =
15-
await methodChannel.invokeMethod<String>('getPlatformVersion');
14+
final version = await methodChannel.invokeMethod<String>('getPlatformVersion');
1615
return version;
1716
}
1817

test/screenshot_guard_method_channel_test.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ void main() {
99
const MethodChannel channel = MethodChannel('screenshot_guard');
1010

1111
setUp(() {
12-
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
13-
.setMockMethodCallHandler(
12+
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockMethodCallHandler(
1413
channel,
1514
(MethodCall methodCall) async {
1615
return '42';
@@ -19,8 +18,7 @@ void main() {
1918
});
2019

2120
tearDown(() {
22-
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
23-
.setMockMethodCallHandler(channel, null);
21+
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockMethodCallHandler(channel, null);
2422
});
2523

2624
test('getPlatformVersion', () async {

test/screenshot_guard_test.dart

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ import 'package:screenshot_guard/screenshot_guard_platform_interface.dart';
44
import 'package:screenshot_guard/screenshot_guard_method_channel.dart';
55
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
66

7-
class MockScreenshotGuardPlatform
8-
with MockPlatformInterfaceMixin
9-
implements ScreenshotGuardPlatform {
7+
class MockScreenshotGuardPlatform with MockPlatformInterfaceMixin implements ScreenshotGuardPlatform {
108
// Mock for enableSecureFlag method
119
@override
1210
Future<void> enableSecureFlag(bool enable) async {
@@ -20,8 +18,7 @@ class MockScreenshotGuardPlatform
2018
}
2119

2220
void main() {
23-
final ScreenshotGuardPlatform initialPlatform =
24-
ScreenshotGuardPlatform.instance;
21+
final ScreenshotGuardPlatform initialPlatform = ScreenshotGuardPlatform.instance;
2522

2623
test('$MethodChannelScreenshotGuard is the default instance', () {
2724
expect(initialPlatform, isInstanceOf<MethodChannelScreenshotGuard>());

0 commit comments

Comments
 (0)