Skip to content

Commit

Permalink
[all] fix linter warnings and bump SDK constraints to pass analysis (f…
Browse files Browse the repository at this point in the history
…luttercommunity#175)

* [all] fix linter warnings to pass analysis

* [all] update SDK constraints
  • Loading branch information
jpnurmi authored Mar 5, 2021
1 parent 6ceda52 commit e975d40
Show file tree
Hide file tree
Showing 57 changed files with 76 additions and 77 deletions.
2 changes: 1 addition & 1 deletion melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,5 @@ dev_dependencies:
pedantic: 1.10.0

environment:
sdk: ">=2.12.0-0 <3.0.0"
sdk: ">=2.12.0 <3.0.0"
flutter: ">=1.12.13+hotfix.5"
6 changes: 3 additions & 3 deletions packages/android_alarm_manager_plus/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,6 @@ class _AlarmHomePageState extends State<_AlarmHomePage> {
],
),
ElevatedButton(
child: Text(
'Schedule OneShot Alarm',
),
key: ValueKey('RegisterOneShotAlarm'),
onPressed: () async {
await AndroidAlarmManager.oneShot(
Expand All @@ -146,6 +143,9 @@ class _AlarmHomePageState extends State<_AlarmHomePage> {
wakeup: true,
);
},
child: Text(
'Schedule OneShot Alarm',
),
),
],
),
Expand Down
2 changes: 1 addition & 1 deletion packages/android_alarm_manager_plus/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ flutter:
pluginClass: AndroidAlarmManagerPlugin

environment:
sdk: ">=2.12.0-133.7.beta <3.0.0"
sdk: ">=2.12.0 <3.0.0"
flutter: ">=1.12.13+hotfix.5"
24 changes: 12 additions & 12 deletions packages/android_intent_plus/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,21 @@ class MyHomePage extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
ElevatedButton(
onPressed: _createAlarm,
child: const Text(
'Tap here to set an alarm\non weekdays at 9:30pm.'),
onPressed: _createAlarm,
),
ElevatedButton(
child: const Text('Tap here to launch Intent with Chooser'),
onPressed: _openChooser,
child: const Text('Tap here to launch Intent with Chooser'),
),
ElevatedButton(
child: const Text('Tap here to send Intent as broadcast'),
onPressed: _sendBroadcast,
child: const Text('Tap here to send Intent as broadcast'),
),
ElevatedButton(
child: const Text('Tap here to test explicit intents.'),
onPressed: () => _openExplicitIntentsView(context),
child: const Text('Tap here to test explicit intents.'),
),
],
),
Expand Down Expand Up @@ -192,43 +192,43 @@ class ExplicitIntentsWidget extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
ElevatedButton(
onPressed: _openGoogleMapsStreetView,
child: const Text(
'Tap here to display panorama\nimagery in Google Street View.'),
onPressed: _openGoogleMapsStreetView,
),
ElevatedButton(
child: const Text('Tap here to display\na map in Google Maps.'),
onPressed: _displayMapInGoogleMaps,
child: const Text('Tap here to display\na map in Google Maps.'),
),
ElevatedButton(
onPressed: _launchTurnByTurnNavigationInGoogleMaps,
child: const Text(
'Tap here to launch turn-by-turn\nnavigation in Google Maps.'),
onPressed: _launchTurnByTurnNavigationInGoogleMaps,
),
ElevatedButton(
child: const Text('Tap here to open link in Google Chrome.'),
onPressed: _openLinkInGoogleChrome,
child: const Text('Tap here to open link in Google Chrome.'),
),
ElevatedButton(
child: const Text('Tap here to start activity in new task.'),
onPressed: _startActivityInNewTask,
child: const Text('Tap here to start activity in new task.'),
),
ElevatedButton(
onPressed: _testExplicitIntentFallback,
child: const Text(
'Tap here to test explicit intent fallback to implicit.'),
onPressed: _testExplicitIntentFallback,
),
ElevatedButton(
onPressed: _openLocationSettingsConfiguration,
child: const Text(
'Tap here to open Location Settings Configuration',
),
onPressed: _openLocationSettingsConfiguration,
),
ElevatedButton(
onPressed: _openApplicationDetails,
child: const Text(
'Tap here to open Application Details',
),
onPressed: _openApplicationDetails,
),
],
),
Expand Down
2 changes: 1 addition & 1 deletion packages/android_intent_plus/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ dev_dependencies:
pedantic: ^1.10.0

environment:
sdk: ">=2.12.0-133.7.beta <3.0.0"
sdk: ">=2.12.0 <3.0.0"
flutter: ">=1.12.13+hotfix.5"
4 changes: 2 additions & 2 deletions packages/battery_plus/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ class _MyHomePageState extends State<MyHomePage> {
child: Text('$_batteryState'),
),
floatingActionButton: FloatingActionButton(
child: const Icon(Icons.battery_unknown),
onPressed: () async {
final batteryLevel = await _battery.batteryLevel;
// ignore: unawaited_futures
Expand All @@ -72,15 +71,16 @@ class _MyHomePageState extends State<MyHomePage> {
content: Text('Battery: $batteryLevel%'),
actions: <Widget>[
TextButton(
child: const Text('OK'),
onPressed: () {
Navigator.pop(context);
},
child: const Text('OK'),
)
],
),
);
},
child: const Icon(Icons.battery_unknown),
),
);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/battery_plus/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: battery_plus_example
description: Demonstrates how to use the battery_plus plugin.

environment:
sdk: '>=2.12.0-259.9.beta <3.0.0'
sdk: '>=2.12.0 <3.0.0'

dependencies:
flutter:
Expand Down
2 changes: 1 addition & 1 deletion packages/battery_plus/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ dev_dependencies:
pedantic: ^1.10.0

environment:
sdk: '>=2.12.0-0 <3.0.0'
sdk: '>=2.12.0 <3.0.0'
flutter: '>=1.12.13+hotfix.5'
2 changes: 1 addition & 1 deletion packages/battery_plus_linux/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/
version: 1.0.0

environment:
sdk: ">=2.12.0-0 <3.0.0"
sdk: ">=2.12.0 <3.0.0"
flutter: ">=1.20.0"

dependencies:
Expand Down
2 changes: 1 addition & 1 deletion packages/battery_plus_macos/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/
version: 1.0.0

environment:
sdk: ">=2.12.0-0 <3.0.0"
sdk: ">=2.12.0 <3.0.0"
flutter: '>=1.20.0'

dependencies:
Expand Down
2 changes: 1 addition & 1 deletion packages/battery_plus_platform_interface/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ homepage: https://plus.fluttercommunity.dev/
repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/

environment:
sdk: ">=2.12.0-0 <3.0.0"
sdk: ">=2.12.0 <3.0.0"
flutter: ">=1.17.0"

dependencies:
Expand Down
2 changes: 1 addition & 1 deletion packages/battery_plus_web/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ dependencies:
sdk: flutter

environment:
sdk: ">=2.12.0-0 <3.0.0"
sdk: ">=2.12.0 <3.0.0"
flutter: '>=1.20.0'
2 changes: 1 addition & 1 deletion packages/battery_plus_windows/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ homepage: https://plus.fluttercommunity.dev/
repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/

environment:
sdk: ">=2.12.0-0 <3.0.0"
sdk: ">=2.12.0 <3.0.0"
flutter: ">=1.20.0"

dependencies:
Expand Down
2 changes: 1 addition & 1 deletion packages/connectivity_plus/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: connectivity_plus_example
description: Demonstrates how to use the connectivity_plus plugin.

environment:
sdk: '>=2.12.0-259.9.beta <3.0.0'
sdk: '>=2.12.0 <3.0.0'

dependencies:
flutter:
Expand Down
2 changes: 1 addition & 1 deletion packages/connectivity_plus/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ homepage: https://plus.fluttercommunity.dev/
repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/

environment:
sdk: ">=2.12.0-0 <3.0.0"
sdk: ">=2.12.0 <3.0.0"
flutter: ">=1.12.13+hotfix.5"

flutter:
Expand Down
2 changes: 1 addition & 1 deletion packages/connectivity_plus_linux/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/
version: 1.0.0

environment:
sdk: ">=2.12.0-0 <3.0.0"
sdk: ">=2.12.0 <3.0.0"
flutter: ">=1.20.0"

dependencies:
Expand Down
2 changes: 1 addition & 1 deletion packages/connectivity_plus_macos/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ homepage: https://plus.fluttercommunity.dev/
repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/

environment:
sdk: ">=2.12.0-0 <3.0.0"
sdk: ">=2.12.0 <3.0.0"
flutter: '>=1.20.0'

flutter:
Expand Down
2 changes: 1 addition & 1 deletion packages/connectivity_plus_platform_interface/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ homepage: https://plus.fluttercommunity.dev/
repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/

environment:
sdk: ">=2.12.0-0 <3.0.0"
sdk: ">=2.12.0 <3.0.0"
flutter: ">=1.12.13+hotfix.5"

dependencies:
Expand Down
2 changes: 1 addition & 1 deletion packages/connectivity_plus_web/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: connectivity_plus_web_example
description: Example web app for the connectivity plugin

environment:
sdk: ">=2.12.0-0 <3.0.0"
sdk: ">=2.12.0 <3.0.0"
flutter: ">=1.26.0-0"

dependencies:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,15 @@ void main() {
});

group('get onConnectivityChanged', () {
test('puts change events in a Stream', () async {
test('puts change events in a Stream', () {
final connection = MockNetworkInformation();
final plugin =
NetworkInformationApiConnectivityPlugin.withConnection(connection);
final results = plugin.onConnectivityChanged;

// Fake a disconnect-reconnect
await connection.mockChangeValue(downlink: 0, rtt: 0);
await connection.mockChangeValue(
downlink: 10, rtt: 50, effectiveType: '4g');
connection.mockChangeValue(downlink: 0, rtt: 0);
connection.mockChangeValue(downlink: 10, rtt: 50, effectiveType: '4g');

// The stream of results is infinite, so we need to .take(2) for this test to complete.
expect(
Expand Down
2 changes: 1 addition & 1 deletion packages/connectivity_plus_web/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ homepage: https://plus.fluttercommunity.dev/
repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/

environment:
sdk: ">=2.12.0-0 <3.0.0"
sdk: ">=2.12.0 <3.0.0"
flutter: '>=1.20.0'

flutter:
Expand Down
2 changes: 1 addition & 1 deletion packages/connectivity_plus_windows/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/
version: 1.0.0

environment:
sdk: ">=2.12.0-0 <3.0.0"
sdk: ">=2.12.0 <3.0.0"
flutter: ">=1.20.0"

dependencies:
Expand Down
2 changes: 1 addition & 1 deletion packages/device_info_plus/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ flutter:
uses-material-design: true

environment:
sdk: '>=2.12.0-259.9.beta <3.0.0'
sdk: '>=2.12.0 <3.0.0'
2 changes: 1 addition & 1 deletion packages/device_info_plus/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ dev_dependencies:
pedantic: ^1.10.0

environment:
sdk: ">=2.12.0-0 <3.0.0"
sdk: ">=2.12.0 <3.0.0"
flutter: ">=1.12.13+hotfix.5"
2 changes: 1 addition & 1 deletion packages/device_info_plus_linux/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ homepage: https://plus.fluttercommunity.dev/
repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/

environment:
sdk: ">=2.12.0-0 <3.0.0"
sdk: ">=2.12.0 <3.0.0"
flutter: ">=1.17.0"

dependencies:
Expand Down
2 changes: 1 addition & 1 deletion packages/device_info_plus_macos/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/
version: 1.0.0

environment:
sdk: ">=2.12.0-0 <3.0.0"
sdk: ">=2.12.0 <3.0.0"
flutter: ">=1.20.0"

dependencies:
Expand Down
2 changes: 1 addition & 1 deletion packages/device_info_plus_platform_interface/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ dev_dependencies:
pedantic: ^1.10.0

environment:
sdk: ">=2.12.0-0 <3.0.0"
sdk: ">=2.12.0 <3.0.0"
flutter: ">=1.9.1+hotfix.4"
2 changes: 1 addition & 1 deletion packages/device_info_plus_web/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ dev_dependencies:
pedantic: ^1.10.0

environment:
sdk: ">=2.12.0-0 <3.0.0"
sdk: ">=2.12.0 <3.0.0"
flutter: '>=1.20.0'
2 changes: 1 addition & 1 deletion packages/device_info_plus_windows/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ homepage: https://plus.fluttercommunity.dev/
repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/

environment:
sdk: '>=2.12.0-0 <3.0.0'
sdk: '>=2.12.0 <3.0.0'
flutter: '>=1.12.13+hotfix.4'

dependencies:
Expand Down
2 changes: 1 addition & 1 deletion packages/network_info_plus/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: network_info_plus_example
description: Demonstrates how to use the network_info_plus plugin.

environment:
sdk: '>=2.12.0-259.9.beta <3.0.0'
sdk: '>=2.12.0 <3.0.0'

dependencies:
flutter:
Expand Down
2 changes: 1 addition & 1 deletion packages/network_info_plus/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ dev_dependencies:
pedantic: ^1.10.0

environment:
sdk: '>=2.12.0-259.9.beta <3.0.0'
sdk: '>=2.12.0 <3.0.0'
flutter: ">=1.12.13+hotfix.5"
2 changes: 1 addition & 1 deletion packages/network_info_plus_linux/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/
version: 1.0.0

environment:
sdk: '>=2.12.0-259.9.beta <3.0.0'
sdk: '>=2.12.0 <3.0.0'
flutter: ">=1.20.0"

dependencies:
Expand Down
2 changes: 1 addition & 1 deletion packages/network_info_plus_macos/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ flutter:
pluginClass: NetworkInfoPlusPlugin

environment:
sdk: '>=2.12.0-259.9.beta <3.0.0'
sdk: '>=2.12.0 <3.0.0'
flutter: '>=1.20.0'

dependencies:
Expand Down
2 changes: 1 addition & 1 deletion packages/network_info_plus_platform_interface/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ dev_dependencies:
pedantic: ^1.10.0

environment:
sdk: '>=2.12.0-259.9.beta <3.0.0'
sdk: '>=2.12.0 <3.0.0'
flutter: ">=1.12.13+hotfix.5"
2 changes: 1 addition & 1 deletion packages/network_info_plus_web/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
network_info_plus_platform_interface: ^1.0.0

environment:
sdk: '>=2.12.0-259.9.beta <3.0.0'
sdk: '>=2.12.0 <3.0.0'
flutter: '>=1.20.0'

flutter:
Expand Down
Loading

0 comments on commit e975d40

Please sign in to comment.