Skip to content

Commit 7dfa2c7

Browse files
committed
Updates minimum supported SDK version to Flutter 3.13/Dart 3.1
This change is a continuation of this PR. flutter-tizen#675 This change will enable the lint option below and apply the changes. And update the SDK version to apply these lint options. This should be common to all plugins, so apply them together. - unnecessary_null_comparison - unawaited_futures - dangling_library_doc_comments - no_literal_bool_comparisons - unnecessary_library_directive - use_colored_box - use_enums - use_string_in_part_of_directives
1 parent 7a4d26f commit 7dfa2c7

File tree

166 files changed

+395
-372
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+395
-372
lines changed

analysis_options.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ analyzer:
1212
# something (https://github.com/flutter/flutter/issues/143312)
1313
deprecated_member_use: ignore
1414
deprecated_member_use_from_same_package: ignore
15-
unnecessary_null_comparison: ignore # Temporarily ingnored from flutter-tizen.
1615
exclude: # DIFFERENT FROM FLUTTER/FLUTTER
1716
# Ignore generated files
1817
- '**/*.g.dart'
@@ -80,7 +79,7 @@ linter:
8079
# - constant_identifier_names # needs an opt-out https://github.com/dart-lang/linter/issues/204
8180
- control_flow_in_finally
8281
- curly_braces_in_flow_control_structures
83-
# - dangling_library_doc_comments # Temporarily ingnored from flutter-tizen.
82+
- dangling_library_doc_comments
8483
- depend_on_referenced_packages
8584
- deprecated_consistency
8685
# - deprecated_member_use_from_same_package # we allow self-references to deprecated members
@@ -115,7 +114,7 @@ linter:
115114
- no_duplicate_case_values
116115
- no_leading_underscores_for_library_prefixes
117116
- no_leading_underscores_for_local_identifiers
118-
# - no_literal_bool_comparisons # Temporarily ingnored from flutter-tizen.
117+
- no_literal_bool_comparisons
119118
- no_logic_in_create_state
120119
- no_runtimeType_toString # DIFFERENT FROM FLUTTER/FLUTTER
121120
- no_self_assignments
@@ -189,7 +188,7 @@ linter:
189188
# - type_annotate_public_apis # subset of always_specify_types
190189
- type_init_formals
191190
- type_literal_in_constant_pattern
192-
# - unawaited_futures # DIFFERENT FROM FLUTTER/FLUTTER: It's disabled there for "too many false positives"; that's not an issue here, and missing awaits have caused production issues in plugins. # Temporarily ingnored from flutter-tizen.
191+
- unawaited_futures # DIFFERENT FROM FLUTTER/FLUTTER: It's disabled there for "too many false positives"; that's not an issue here, and missing awaits have caused production issues in plugins.
193192
- unnecessary_await_in_return
194193
- unnecessary_brace_in_string_interps
195194
- unnecessary_breaks
@@ -199,7 +198,7 @@ linter:
199198
- unnecessary_getters_setters
200199
# - unnecessary_lambdas # has false positives: https://github.com/dart-lang/linter/issues/498
201200
- unnecessary_late
202-
# - unnecessary_library_directive # Temporarily ingnored from flutter-tizen.
201+
- unnecessary_library_directive
203202
- unnecessary_new
204203
- unnecessary_null_aware_assignments
205204
- unnecessary_null_aware_operator_on_extension_on_nullable
@@ -218,9 +217,9 @@ linter:
218217
- unrelated_type_equality_checks
219218
- unsafe_html
220219
- use_build_context_synchronously
221-
# - use_colored_box # Temporarily ingnored from flutter-tizen.
220+
- use_colored_box
222221
# - use_decorated_box # leads to bugs: DecoratedBox and Container are not equivalent (Container inserts extra padding)
223-
# - use_enums # Temporarily ingnored from flutter-tizen.
222+
- use_enums
224223
- use_full_hex_values_for_flutter_colors
225224
- use_function_type_syntax_for_parameters
226225
- use_if_null_to_convert_nulls_to_bools
@@ -232,7 +231,7 @@ linter:
232231
- use_rethrow_when_possible
233232
- use_setters_to_change_properties
234233
# - use_string_buffers # has false positives: https://github.com/dart-lang/sdk/issues/34182
235-
# - use_string_in_part_of_directives # Temporarily ingnored from flutter-tizen.
234+
- use_string_in_part_of_directives
236235
- use_super_parameters
237236
- use_test_throws_matchers
238237
# - use_to_and_as_if_applicable # has false positives, so we prefer to catch this by code-review

packages/audioplayers/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## NEXT
2+
3+
* Update minimum Flutter and Dart version to 3.13 and 3.1.
4+
15
## 3.0.1
26

37
* Update audioplayers to 5.1.0.

packages/audioplayers/example/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ description: Demonstrates how to use the audioplayers plugin.
33
publish_to: "none"
44

55
environment:
6-
sdk: ">=2.18.0 <4.0.0"
7-
flutter: ">=3.3.0"
6+
sdk: ">=3.1.0 <4.0.0"
7+
flutter: ">=3.13.0"
88

99
dependencies:
1010
audioplayers: ^5.1.0

packages/audioplayers/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ repository: https://github.com/flutter-tizen/plugins/tree/master/packages/audiop
55
version: 3.0.1
66

77
environment:
8-
sdk: ">=2.18.0 <4.0.0"
9-
flutter: ">=3.3.0"
8+
sdk: ">=3.1.0 <4.0.0"
9+
flutter: ">=3.13.0"
1010

1111
flutter:
1212
plugin:

packages/battery_plus/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## NEXT
2+
3+
* Update minimum Flutter and Dart version to 3.13 and 3.1.
4+
15
## 1.1.2
26

37
* Update battery_plus to 4.0.1.

packages/battery_plus/example/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ description: Demonstrates how to use the battery_plus plugin.
33
publish_to: "none"
44

55
environment:
6-
sdk: ">=2.18.0 <4.0.0"
7-
flutter: ">=3.3.0"
6+
sdk: ">=3.1.0 <4.0.0"
7+
flutter: ">=3.13.0"
88

99
dependencies:
1010
battery_plus: ^4.0.1

packages/battery_plus/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ repository: https://github.com/flutter-tizen/plugins/tree/master/packages/batter
55
version: 1.1.2
66

77
environment:
8-
sdk: ">=2.18.0 <4.0.0"
9-
flutter: ">=3.3.0"
8+
sdk: ">=3.1.0 <4.0.0"
9+
flutter: ">=3.13.0"
1010

1111
flutter:
1212
plugin:

packages/camera/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## NEXT
22

3-
* Increase the minimum Flutter version to 3.3.
3+
* Update minimum Flutter and Dart version to 3.13 and 3.1.
4+
* Fix new lint warnings.
45

56
## 0.3.4
67

packages/camera/example/lib/main.dart

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,7 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
250250
child: Center(
251251
child: AspectRatio(
252252
aspectRatio:
253-
localVideoController.value.size != null
254-
? localVideoController.value.aspectRatio
255-
: 1.0,
253+
localVideoController.value.aspectRatio,
256254
child: VideoPlayer(localVideoController)),
257255
),
258256
),
@@ -380,7 +378,7 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
380378
return SizeTransition(
381379
sizeFactor: _exposureModeControlRowAnimation,
382380
child: ClipRect(
383-
child: Container(
381+
child: ColoredBox(
384382
color: Colors.grey.shade50,
385383
child: Column(
386384
children: <Widget>[
@@ -463,7 +461,7 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
463461
return SizeTransition(
464462
sizeFactor: _focusModeControlRowAnimation,
465463
child: ClipRect(
466-
child: Container(
464+
child: ColoredBox(
467465
color: Colors.grey.shade50,
468466
child: Column(
469467
children: <Widget>[
@@ -680,30 +678,23 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
680678
switch (e.code) {
681679
case 'CameraAccessDenied':
682680
showInSnackBar('You have denied camera access.');
683-
break;
684681
case 'CameraAccessDeniedWithoutPrompt':
685682
// iOS only
686683
showInSnackBar('Please go to Settings app to enable camera access.');
687-
break;
688684
case 'CameraAccessRestricted':
689685
// iOS only
690686
showInSnackBar('Camera access is restricted.');
691-
break;
692687
case 'AudioAccessDenied':
693688
showInSnackBar('You have denied audio access.');
694-
break;
695689
case 'AudioAccessDeniedWithoutPrompt':
696690
// iOS only
697691
showInSnackBar('Please go to Settings app to enable audio access.');
698-
break;
699692
case 'AudioAccessRestricted':
700693
// iOS only
701694
showInSnackBar('Audio access is restricted.');
702-
break;
703695
case 'cameraPermission':
704696
// Android & web only
705697
showInSnackBar('Unknown permission error.');
706-
break;
707698
default:
708699
_showCameraException(e);
709700
break;
@@ -1001,7 +992,7 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
1001992
: VideoPlayerController.file(File(videoFile!.path));
1002993

1003994
videoPlayerListener = () {
1004-
if (videoController != null && videoController!.value.size != null) {
995+
if (videoController != null) {
1005996
// Refreshing the state to update video player with the correct ratio.
1006997
if (mounted) {
1007998
setState(() {});

packages/camera/example/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ description: Demonstrates how to use the camera plugin.
33
publish_to: "none"
44

55
environment:
6-
sdk: ">=2.18.0 <4.0.0"
7-
flutter: ">=3.3.0"
6+
sdk: ">=3.1.0 <4.0.0"
7+
flutter: ">=3.13.0"
88

99
dependencies:
1010
camera: ^0.9.4

packages/camera/lib/camera_tizen.dart

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,6 @@ class CameraTizen extends CameraPlatform {
536536
final Map<String, Object?> arguments = _getArgumentDictionary(call);
537537
_deviceEventStreamController.add(DeviceOrientationChangedEvent(
538538
deserializeDeviceOrientation(arguments['orientation']! as String)));
539-
break;
540539
default:
541540
throw MissingPluginException();
542541
}
@@ -556,20 +555,17 @@ class CameraTizen extends CameraPlatform {
556555
deserializeFocusMode(arguments['focusMode']! as String),
557556
arguments['focusPointSupported']! as bool,
558557
));
559-
break;
560558
case 'resolution_changed':
561559
final Map<String, Object?> arguments = _getArgumentDictionary(call);
562560
_cameraEventStreamController.add(CameraResolutionChangedEvent(
563561
cameraId,
564562
arguments['captureWidth']! as double,
565563
arguments['captureHeight']! as double,
566564
));
567-
break;
568565
case 'camera_closing':
569566
_cameraEventStreamController.add(CameraClosingEvent(
570567
cameraId,
571568
));
572-
break;
573569
case 'video_recorded':
574570
final Map<String, Object?> arguments = _getArgumentDictionary(call);
575571
_cameraEventStreamController.add(VideoRecordedEvent(
@@ -579,14 +575,12 @@ class CameraTizen extends CameraPlatform {
579575
? Duration(milliseconds: arguments['maxVideoDuration']! as int)
580576
: null,
581577
));
582-
break;
583578
case 'error':
584579
final Map<String, Object?> arguments = _getArgumentDictionary(call);
585580
_cameraEventStreamController.add(CameraErrorEvent(
586581
cameraId,
587582
arguments['description']! as String,
588583
));
589-
break;
590584
default:
591585
throw MissingPluginException();
592586
}

packages/camera/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ repository: https://github.com/flutter-tizen/plugins/tree/master/packages/camera
55
version: 0.3.4
66

77
environment:
8-
sdk: ">=2.18.0 <4.0.0"
9-
flutter: ">=3.3.0"
8+
sdk: ">=3.1.0 <4.0.0"
9+
flutter: ">=3.13.0"
1010

1111
dependencies:
1212
camera_platform_interface: ^2.1.1

packages/connectivity_plus/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## NEXT
2+
3+
* Update minimum Flutter and Dart version to 3.13 and 3.1.
4+
15
## 1.1.4
26

37
* Update connectivity_plus to 4.0.1.

packages/connectivity_plus/example/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ description: Demonstrates how to use the connectivity_plus_tizen plugin.
33
publish_to: "none"
44

55
environment:
6-
sdk: ">=2.18.0 <4.0.0"
7-
flutter: ">=3.3.0"
6+
sdk: ">=3.1.0 <4.0.0"
7+
flutter: ">=3.13.0"
88

99
dependencies:
1010
connectivity_plus: ^4.0.1

packages/connectivity_plus/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ repository: https://github.com/flutter-tizen/plugins/tree/master/packages/connec
55
version: 1.1.4
66

77
environment:
8-
sdk: ">=2.18.0 <4.0.0"
9-
flutter: ">=3.3.0"
8+
sdk: ">=3.1.0 <4.0.0"
9+
flutter: ">=3.13.0"
1010

1111
flutter:
1212
plugin:

packages/device_info_plus/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## NEXT
2+
3+
* Update minimum Flutter and Dart version to 3.13 and 3.1.
4+
15
## 1.2.0
26

37
* Add `TizenDeviceInfo.data` which represents the device info as a map.

packages/device_info_plus/example/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ description: Demonstrates how to use the device_info_plus_tizen plugin.
33
publish_to: "none"
44

55
environment:
6-
sdk: ">=2.18.0 <4.0.0"
7-
flutter: ">=3.3.0"
6+
sdk: ">=3.1.0 <4.0.0"
7+
flutter: ">=3.13.0"
88

99
dependencies:
1010
device_info_plus_tizen:

packages/device_info_plus/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ repository: https://github.com/flutter-tizen/plugins/tree/master/packages/device
66
version: 1.2.0
77

88
environment:
9-
sdk: ">=2.18.0 <4.0.0"
10-
flutter: ">=3.3.0"
9+
sdk: ">=3.1.0 <4.0.0"
10+
flutter: ">=3.13.0"
1111

1212
flutter:
1313
plugin:

packages/firebase_core/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## NEXT
22

3-
* Increase the minimum Flutter version to 3.3.
3+
* Update minimum Flutter and Dart version to 3.13 and 3.1.
4+
* Fix new lint warnings.
45

56
## 0.1.1
67

packages/firebase_core/example/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ description: An example application demonstrating calls to Firebase Core.
33
publish_to: "none"
44

55
environment:
6-
sdk: ">=2.18.0 <4.0.0"
7-
flutter: ">=3.3.0"
6+
sdk: ">=3.1.0 <4.0.0"
7+
flutter: ">=3.13.0"
88

99
dependencies:
1010
firebase_core: ^2.4.0

packages/firebase_core/lib/firebase_app_tizen.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style license
33
// that can be found in the LICENSE file.
44

5-
part of firebase_core_tizen;
5+
part of 'firebase_core_tizen.dart';
66

77
/// A Dart only implementation of a Firebase app instance.
88
class FirebaseApp extends FirebaseAppPlatform {

packages/firebase_core/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ repository: https://github.com/flutter-tizen/plugins/tree/master/packages/fireba
55
version: 0.1.1
66

77
environment:
8-
sdk: ">=2.18.0 <4.0.0"
9-
flutter: ">=3.3.0"
8+
sdk: ">=3.1.0 <4.0.0"
9+
flutter: ">=3.13.0"
1010

1111
dependencies:
1212
firebase_core_dart: ^1.0.1

packages/flutter_app_badger/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## NEXT
22

3-
* Increase the minimum Flutter version to 3.3.
3+
* Update minimum Flutter and Dart version to 3.13 and 3.1.
44

55
## 0.1.0
66

packages/flutter_app_badger/example/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ description: Demonstrates how to use the flutter_app_badger_tizen plugin.
33
publish_to: "none"
44

55
environment:
6-
sdk: ">=2.18.0 <4.0.0"
7-
flutter: ">=3.3.0"
6+
sdk: ">=3.1.0 <4.0.0"
7+
flutter: ">=3.13.0"
88

99
dependencies:
1010
flutter:

packages/flutter_app_badger/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ repository: https://github.com/flutter-tizen/plugins/tree/master/packages/flutte
55
version: 0.1.0
66

77
environment:
8-
sdk: ">=2.18.0 <4.0.0"
9-
flutter: ">=3.3.0"
8+
sdk: ">=3.1.0 <4.0.0"
9+
flutter: ">=3.13.0"
1010

1111
flutter:
1212
plugin:

0 commit comments

Comments
 (0)