Skip to content

Commit ba400a9

Browse files
HakkyuKimbwikbs
authored andcommitted
[multi-packages] Resolve some linter warnings (flutter-tizen#234)
* Resolve some linter warnings * Change back to pickImage after pub upgrade * Update based on review * Use clear comments * Resolve flutter analyze warnings in 2.5.1 * Ignore impl doc warnings for url_launcher
1 parent 2d73536 commit ba400a9

File tree

14 files changed

+65
-38
lines changed

14 files changed

+65
-38
lines changed

packages/messageport/example/integration_test/messageport_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
import 'dart:async';
66

77
import 'package:flutter_test/flutter_test.dart';
8-
import 'package:messageport_tizen/messageport_tizen.dart';
98
import 'package:integration_test/integration_test.dart';
9+
import 'package:messageport_tizen/messageport_tizen.dart';
1010

1111
void main() {
1212
IntegrationTestWidgetsFlutterBinding.ensureInitialized();

packages/messageport/example/lib/main.dart

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore_for_file: public_member_api_docs
2+
13
import 'dart:async';
24
import 'package:flutter/material.dart';
35

packages/messageport/lib/messageport_tizen.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class RemotePort {
8080
return _manager.sendWithLocalPort(this, localPort, message);
8181
}
8282

83-
// Checks whether remote port is registered in remote application.
83+
/// Checks whether remote port is registered in remote application.
8484
Future<bool> check() async {
8585
return _manager.checkForRemotePort(remoteAppId, portName, trusted);
8686
}
@@ -95,6 +95,7 @@ class RemotePort {
9595
final bool trusted;
9696
}
9797

98+
// ignore: avoid_classes_with_only_static_members
9899
/// API for accessing MessagePorts in Tizen.
99100
class TizenMessagePort {
100101
/// Creates Local Port

packages/messageport/lib/src/messageport_manager.dart

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
// ignore_for_file: public_member_api_docs
6+
57
import 'dart:async';
68

79
import 'package:flutter/services.dart';

packages/package_info_plus/lib/package_info_plus_tizen.dart

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import 'package:package_info_plus_platform_interface/package_info_platform_inter
1515
/// being set to Linux's.
1616
/// https://github.com/fluttercommunity/plus_plugins/blob/c7c942d1d19595a536c6ae18168d3781ddef7785/packages/package_info_plus/lib/package_info_plus.dart#L43-L55
1717
class PackageInfoPlugin extends PackageInfoPlatform {
18+
/// Tells [PackageInfo] to use [MethodChannelPackageInfo] as the default
19+
/// instance of [PackageInfoPlatform].
1820
static void register() {
1921
// ignore: invalid_use_of_visible_for_testing_member
2022
PackageInfo.disablePackageInfoPlatformOverride = true;

packages/path_provider/example/integration_test/path_provider_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
import 'dart:io';
66
import 'package:flutter_test/flutter_test.dart';
7-
import 'package:path_provider/path_provider.dart';
87
import 'package:integration_test/integration_test.dart';
8+
import 'package:path_provider/path_provider.dart';
99

1010
void main() {
1111
IntegrationTestWidgetsFlutterBinding.ensureInitialized();

packages/permission_handler/example/integration_test/permission_handler_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// @dart = 2.9
22

33
import 'package:flutter_test/flutter_test.dart';
4-
import 'package:permission_handler/permission_handler.dart';
54
import 'package:integration_test/integration_test.dart';
5+
import 'package:permission_handler/permission_handler.dart';
66

77
void main() {
88
IntegrationTestWidgetsFlutterBinding.ensureInitialized();

packages/permission_handler/example/lib/main.dart

+37-34
Original file line numberDiff line numberDiff line change
@@ -15,43 +15,44 @@ class BaseflowPluginExample extends StatelessWidget {
1515

1616
@override
1717
Widget build(BuildContext context) {
18-
return MaterialApp(
19-
title: 'Baseflow $pluginName',
20-
theme: ThemeData(
21-
accentColor: Colors.white60,
22-
backgroundColor: const Color.fromRGBO(48, 49, 60, 0.8),
23-
buttonTheme: ButtonThemeData(
24-
buttonColor: themeMaterialColor.shade500,
25-
disabledColor: themeMaterialColor.withRed(200),
26-
splashColor: themeMaterialColor.shade50,
27-
textTheme: ButtonTextTheme.primary,
18+
final theme = ThemeData(
19+
backgroundColor: const Color.fromRGBO(48, 49, 60, 0.8),
20+
buttonTheme: ButtonThemeData(
21+
buttonColor: themeMaterialColor.shade500,
22+
disabledColor: themeMaterialColor.withRed(200),
23+
splashColor: themeMaterialColor.shade50,
24+
textTheme: ButtonTextTheme.primary,
25+
),
26+
bottomAppBarColor: const Color.fromRGBO(57, 58, 71, 1),
27+
hintColor: themeMaterialColor.shade500,
28+
primarySwatch: createMaterialColor(const Color.fromRGBO(48, 49, 60, 1)),
29+
textTheme: TextTheme(
30+
bodyText1: TextStyle(
31+
color: Colors.white,
32+
fontSize: 16,
33+
height: 1.3,
2834
),
29-
bottomAppBarColor: const Color.fromRGBO(57, 58, 71, 1),
30-
hintColor: themeMaterialColor.shade500,
31-
primarySwatch: createMaterialColor(const Color.fromRGBO(48, 49, 60, 1)),
32-
textTheme: TextTheme(
33-
bodyText1: TextStyle(
34-
color: Colors.white,
35-
fontSize: 16,
36-
height: 1.3,
37-
),
38-
bodyText2: TextStyle(
39-
color: Colors.white,
40-
fontSize: 18,
41-
height: 1.2,
42-
),
43-
button: TextStyle(color: Colors.white),
44-
headline1: TextStyle(
45-
color: Colors.white,
46-
fontSize: 18,
47-
),
35+
bodyText2: TextStyle(
36+
color: Colors.white,
37+
fontSize: 18,
38+
height: 1.2,
4839
),
49-
visualDensity: VisualDensity.adaptivePlatformDensity,
50-
inputDecorationTheme: InputDecorationTheme(
51-
fillColor: const Color.fromRGBO(37, 37, 37, 1),
52-
filled: true,
40+
button: TextStyle(color: Colors.white),
41+
headline1: TextStyle(
42+
color: Colors.white,
43+
fontSize: 18,
5344
),
5445
),
46+
visualDensity: VisualDensity.adaptivePlatformDensity,
47+
inputDecorationTheme: InputDecorationTheme(
48+
fillColor: const Color.fromRGBO(37, 37, 37, 1),
49+
filled: true,
50+
),
51+
);
52+
return MaterialApp(
53+
title: 'Baseflow $pluginName',
54+
theme: theme.copyWith(
55+
colorScheme: theme.colorScheme.copyWith(secondary: Colors.white60)),
5556
home: AppHome(title: 'Baseflow $pluginName example app'),
5657
);
5758
}
@@ -150,6 +151,8 @@ class _AppHomeState extends State<AppHome> {
150151
}
151152

152153
Color _bottomAppBarIconColor(int page) {
153-
return _currentPage == page ? Colors.white : Theme.of(context).accentColor;
154+
return _currentPage == page
155+
? Colors.white
156+
: Theme.of(context).colorScheme.secondary;
154157
}
155158
}

packages/share_plus/lib/share_plus_tizen.dart

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import 'package:share_plus_platform_interface/share_plus_platform_interface.dart
1515
/// being set to Linux's.
1616
/// https://github.com/fluttercommunity/plus_plugins/blob/fc6864f21cf1d1f6db47a3c938f24370362d00cd/packages/share_plus/lib/share_plus.dart#L30-L42
1717
class SharePlugin extends SharePlatform {
18+
/// Tells [Share] to use [MethodChannelShare] as the default
19+
/// instance of [SharePlatform].
1820
static void register() {
1921
// ignore: invalid_use_of_visible_for_testing_member
2022
Share.disableSharePlatformOverride = true;

packages/url_launcher/lib/src/app_control.dart

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
// ignore_for_file: public_member_api_docs
6+
57
import 'dart:ffi';
68

79
import 'package:ffi/ffi.dart';

packages/url_launcher/lib/src/types.dart

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
// ignore_for_file: public_member_api_docs
6+
57
import 'dart:ffi';
68

79
import 'package:ffi/ffi.dart';

packages/wearable_rotary/example/lib/custom_page_view.dart

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore_for_file: public_member_api_docs
2+
13
import 'dart:async';
24

35
import 'package:flutter/material.dart';

packages/wearable_rotary/example/lib/main.dart

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore_for_file: public_member_api_docs
2+
13
import 'package:flutter/material.dart';
24

35
import './custom_page_view.dart';

packages/wearable_rotary/lib/wearable_rotary.dart

+7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const String _channelName = 'flutter.wearable_rotary.channel';
44

55
const EventChannel _channel = EventChannel(_channelName);
66

7+
/// A broadcast stream of events from the device rotary sensor.
78
Stream<RotaryEvent> get rotaryEvents {
89
_rotaryEvents ??= _channel
910
.receiveBroadcastStream()
@@ -13,8 +14,14 @@ Stream<RotaryEvent> get rotaryEvents {
1314

1415
Stream<RotaryEvent>? _rotaryEvents;
1516

17+
/// Discrete reading from an rotary sensor. Rotary sensor measure the rotation
18+
/// of the wearable device. The event refers to a single "click" of rotatation
19+
/// angle which may differ by device.
1620
enum RotaryEvent {
21+
/// A roation event in the clockwise direction.
1722
clockwise,
23+
24+
/// A roation event in the counter clockwise direction.
1825
counterClockwise,
1926
}
2027

0 commit comments

Comments
 (0)