Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/camera/camera/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
onPressed: cameraController != null &&
cameraController.value.isInitialized &&
cameraController.value.isRecordingVideo
? (cameraController.value.isRecordingPaused)
? cameraController.value.isRecordingPaused
? onResumeButtonPressed
: onPauseButtonPressed
: null,
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera_android/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
onPressed: cameraController != null &&
cameraController.value.isInitialized &&
cameraController.value.isRecordingVideo
? (cameraController.value.isRecordingPaused)
? cameraController.value.isRecordingPaused
? onResumeButtonPressed
: onPauseButtonPressed
: null,
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera_avfoundation/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
onPressed: cameraController != null &&
cameraController.value.isInitialized &&
cameraController.value.isRecordingVideo
? (cameraController.value.isRecordingPaused)
? cameraController.value.isRecordingPaused
? onResumeButtonPressed
: onPauseButtonPressed
: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,15 +225,15 @@ class PlacePolygonBodyState extends State<PlacePolygonBody> {
TextButton(
onPressed: (selectedId == null)
? null
: ((polygons[selectedId]!.holes.isNotEmpty)
: (polygons[selectedId]!.holes.isNotEmpty
? null
: () => _addHoles(selectedId)),
child: const Text('add holes'),
),
TextButton(
onPressed: (selectedId == null)
? null
: ((polygons[selectedId]!.holes.isEmpty)
: (polygons[selectedId]!.holes.isEmpty
? null
: () => _removeHoles(selectedId)),
child: const Text('remove holes'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,15 +226,15 @@ class PlacePolygonBodyState extends State<PlacePolygonBody> {
TextButton(
onPressed: (selectedId == null)
? null
: ((polygons[selectedId]!.holes.isNotEmpty)
: (polygons[selectedId]!.holes.isNotEmpty
? null
: () => _addHoles(selectedId)),
child: const Text('add holes'),
),
TextButton(
onPressed: (selectedId == null)
? null
: ((polygons[selectedId]!.holes.isEmpty)
: (polygons[selectedId]!.holes.isEmpty
? null
: () => _removeHoles(selectedId)),
child: const Text('remove holes'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,15 +226,15 @@ class PlacePolygonBodyState extends State<PlacePolygonBody> {
TextButton(
onPressed: (selectedId == null)
? null
: ((polygons[selectedId]!.holes.isNotEmpty)
: (polygons[selectedId]!.holes.isNotEmpty
? null
: () => _addHoles(selectedId)),
child: const Text('add holes'),
),
TextButton(
onPressed: (selectedId == null)
? null
: ((polygons[selectedId]!.holes.isEmpty)
: (polygons[selectedId]!.holes.isEmpty
? null
: () => _removeHoles(selectedId)),
child: const Text('remove holes'),
Expand Down
4 changes: 4 additions & 0 deletions packages/pigeon/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 22.5.1
Comment thread
cbracken marked this conversation as resolved.
Outdated

* Removes unnecessary parenthesis.
Comment thread
FMorschel marked this conversation as resolved.
Outdated

## 22.5.0

* [swift] Adds implementation for `@ProxyApi`.
Expand Down
4 changes: 2 additions & 2 deletions packages/pigeon/lib/dart_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2168,11 +2168,11 @@ String _addGenericTypes(TypeDeclaration type) {
final List<TypeDeclaration> typeArguments = type.typeArguments;
switch (type.baseName) {
case 'List':
return (typeArguments.isEmpty)
return typeArguments.isEmpty
? 'List<Object?>'
: 'List<${_flattenTypeArguments(typeArguments)}>';
case 'Map':
return (typeArguments.isEmpty)
return typeArguments.isEmpty
? 'Map<Object?, Object?>'
: 'Map<${_flattenTypeArguments(typeArguments)}>';
default:
Expand Down
2 changes: 1 addition & 1 deletion packages/pigeon/lib/objc_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1515,7 +1515,7 @@ String _propertyTypeForDartType(TypeDeclaration type,
}

String _capitalize(String str) =>
(str.isEmpty) ? '' : str[0].toUpperCase() + str.substring(1);
str.isEmpty ? '' : str[0].toUpperCase() + str.substring(1);

/// Returns the components of the objc selector that will be generated from
/// [func], ie the strings between the semicolons. [lastSelectorComponent] is
Expand Down
2 changes: 1 addition & 1 deletion packages/pigeon/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: pigeon
description: Code generator tool to make communication between Flutter and the host platform type-safe and easier.
repository: https://github.com/flutter/packages/tree/main/packages/pigeon
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+pigeon%22
version: 22.5.0 # This must match the version in lib/generator_tools.dart
version: 22.5.1 # This must match the version in lib/generator_tools.dart

environment:
sdk: ^3.3.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ Future<void> main() async {
await controller.setNavigationDelegate(NavigationDelegate(
onPageFinished: (_) => pageLoaded.complete(),
onNavigationRequest: (NavigationRequest navigationRequest) {
return (navigationRequest.url.contains('youtube.com'))
return navigationRequest.url.contains('youtube.com')
? NavigationDecision.prevent
: NavigationDecision.navigate;
},
Expand Down Expand Up @@ -654,7 +654,7 @@ Future<void> main() async {
await controller.setNavigationDelegate(NavigationDelegate(
onPageFinished: (_) => pageLoaded.complete(),
onNavigationRequest: (NavigationRequest navigationRequest) {
return (navigationRequest.url.contains('youtube.com'))
return navigationRequest.url.contains('youtube.com')
? NavigationDecision.prevent
: NavigationDecision.navigate;
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ Future<void> main() async {
},
javascriptMode: JavascriptMode.unrestricted,
navigationDelegate: (NavigationRequest request) {
return (request.url.contains('youtube.com'))
return request.url.contains('youtube.com')
? NavigationDecision.prevent
: NavigationDecision.navigate;
},
Expand Down Expand Up @@ -1003,7 +1003,7 @@ Future<void> main() async {
},
javascriptMode: JavascriptMode.unrestricted,
navigationDelegate: (NavigationRequest request) {
return (request.url.contains('youtube.com'))
return request.url.contains('youtube.com')
? NavigationDecision.prevent
: NavigationDecision.navigate;
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ Future<void> main() async {
await delegate.setOnPageFinished((_) => pageLoaded.complete());
await delegate
.setOnNavigationRequest((NavigationRequest navigationRequest) {
return (navigationRequest.url.contains('youtube.com'))
return navigationRequest.url.contains('youtube.com')
? NavigationDecision.prevent
: NavigationDecision.navigate;
});
Expand Down Expand Up @@ -1059,7 +1059,7 @@ Future<void> main() async {
await delegate.setOnPageFinished((_) => pageLoaded.complete());
await delegate
.setOnNavigationRequest((NavigationRequest navigationRequest) {
return (navigationRequest.url.contains('youtube.com'))
return navigationRequest.url.contains('youtube.com')
? NavigationDecision.prevent
: NavigationDecision.navigate;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ Future<void> main() async {
},
javascriptMode: JavascriptMode.unrestricted,
navigationDelegate: (NavigationRequest request) {
return (request.url.contains('youtube.com'))
return request.url.contains('youtube.com')
? NavigationDecision.prevent
: NavigationDecision.navigate;
},
Expand Down Expand Up @@ -1251,7 +1251,7 @@ Future<void> main() async {
},
javascriptMode: JavascriptMode.unrestricted,
navigationDelegate: (NavigationRequest request) {
return (request.url.contains('youtube.com'))
return request.url.contains('youtube.com')
? NavigationDecision.prevent
: NavigationDecision.navigate;
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ Future<void> main() async {
},
javascriptMode: JavascriptMode.unrestricted,
navigationDelegate: (NavigationRequest request) {
return (request.url.contains('youtube.com'))
return request.url.contains('youtube.com')
? NavigationDecision.prevent
: NavigationDecision.navigate;
},
Expand Down Expand Up @@ -1047,7 +1047,7 @@ Future<void> main() async {
},
javascriptMode: JavascriptMode.unrestricted,
navigationDelegate: (NavigationRequest request) {
return (request.url.contains('youtube.com'))
return request.url.contains('youtube.com')
? NavigationDecision.prevent
: NavigationDecision.navigate;
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ Future<void> main() async {
unawaited(delegate.setOnPageFinished((_) => pageLoaded.complete()));
unawaited(
delegate.setOnNavigationRequest((NavigationRequest navigationRequest) {
return (navigationRequest.url.contains('youtube.com'))
return navigationRequest.url.contains('youtube.com')
? NavigationDecision.prevent
: NavigationDecision.navigate;
}),
Expand Down Expand Up @@ -1086,7 +1086,7 @@ Future<void> main() async {
unawaited(delegate.setOnPageFinished((_) => pageLoaded.complete()));
unawaited(delegate
.setOnNavigationRequest((NavigationRequest navigationRequest) {
return (navigationRequest.url.contains('youtube.com'))
return navigationRequest.url.contains('youtube.com')
? NavigationDecision.prevent
: NavigationDecision.navigate;
}));
Expand Down