-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[video_player] Fix layout issue caused by Transform.rotate not affecting space calculation.
#8685
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
Changes from 10 commits
00cdd54
96b33d9
9de259b
960f01c
5d9b87d
6be9577
5a4ec4f
4bea0c6
b11717b
c5131a3
5ac9565
74062cd
aebd6c4
6da73c9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| ## 2.9.4 | ||
|
|
||
| * Reduces the position update interval from 500ms to 100ms. | ||
| * Fix layout issue caused by Transform.rotate not affecting space calculation. | ||
|
||
|
|
||
| ## 2.9.3 | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,6 @@ | |
|
|
||
| import 'dart:async'; | ||
| import 'dart:io'; | ||
| import 'dart:math' as math; | ||
|
|
||
| import 'package:flutter/foundation.dart'; | ||
| import 'package:flutter/material.dart'; | ||
|
|
@@ -887,12 +886,18 @@ class _VideoPlayerWithRotation extends StatelessWidget { | |
| final Widget child; | ||
|
|
||
| @override | ||
| Widget build(BuildContext context) => rotation == 0 | ||
| ? child | ||
| : Transform.rotate( | ||
| angle: rotation * math.pi / 180, | ||
| child: child, | ||
| ); | ||
| Widget build(BuildContext context) { | ||
| if (rotation == 0) { | ||
| return child; | ||
| } | ||
| if (rotation % 90 != 0) { | ||
| throw ArgumentError('Rotation must be a multiple of 90'); | ||
|
||
| } | ||
| return RotatedBox( | ||
| quarterTurns: rotation ~/ 90, | ||
| child: child, | ||
| ); | ||
| } | ||
| } | ||
|
|
||
| /// Used to configure the [VideoProgressIndicator] widget's colors for how it | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a new version bump; the previous one was lost in a merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue has been fixed. A new version bump has been added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The package's actual version also needs to be bumped.
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8719859349019297185/+/u/Run_package_tests/CHANGELOG_and_version_validation/stdout