Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update flutter version for code analysis and fix linter issues. #737

Merged
merged 1 commit into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all 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 .github/workflows/code-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
distribution: temurin
- uses: subosito/[email protected]
with:
flutter-version: '3.24.0'
flutter-version: '3.27.3'
cache: true

- name: Install dependencies for google_ml_kit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class LoadingIndicator extends StatelessWidget {
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.all(16),
color: Colors.black.withOpacity(0.8),
color: Colors.black.withAlpha(204),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
Expand Down
4 changes: 3 additions & 1 deletion packages/example/lib/vision_detector_views/camera_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,9 @@ class _CameraViewState extends State<CameraView> {
// * bgra8888 for iOS
if (format == null ||
(Platform.isAndroid && format != InputImageFormat.nv21) ||
(Platform.isIOS && format != InputImageFormat.bgra8888)) return null;
(Platform.isIOS && format != InputImageFormat.bgra8888)) {
return null;
}

// since format is constraint to nv21 or bgra8888, both only have one plane
if (image.planes.length != 1) return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class SegmentationPainter extends CustomPainter {
).round();

final double opacity = confidences[(y * width) + x] * 0.5;
paint.color = color.withOpacity(opacity);
paint.color = color.withAlpha((opacity * 255).round());
canvas.drawCircle(Offset(tx.toDouble(), ty.toDouble()), 2, paint);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class SubjectSegmentationPainter extends CustomPainter {
.round();

final double opacity = confidences[(y * subjectWidth) + x] * 0.5;
paint.color = color.withOpacity(opacity);
paint.color = color.withAlpha((opacity * 255).round());
canvas.drawCircle(Offset(tx.toDouble(), ty.toDouble()), 2, paint);
}
}
Expand Down
Loading