File tree 1 file changed +11
-2
lines changed
packages/video_player/video_player/test
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 5
5
import 'dart:async' ;
6
6
import 'dart:io' ;
7
7
import 'dart:math' as math;
8
+ import 'dart:typed_data' ;
8
9
9
10
import 'package:flutter/material.dart' ;
10
11
import 'package:flutter/services.dart' ;
@@ -160,8 +161,16 @@ void main() {
160
161
await tester.pumpWidget (VideoPlayer (controller));
161
162
final Transform actualRotationCorrection =
162
163
find.byType (Transform ).evaluate ().single.widget as Transform ;
163
- expect (
164
- actualRotationCorrection.transform, equals (Matrix4 .rotationZ (math.pi)));
164
+ final Float64List actualRotationCorrectionStorage =
165
+ actualRotationCorrection.transform.storage;
166
+ final Float64List expectedMatrixStorage =
167
+ Matrix4 .rotationZ (math.pi).storage;
168
+ expect (actualRotationCorrectionStorage.length,
169
+ equals (expectedMatrixStorage.length));
170
+ for (int i = 0 ; i < actualRotationCorrectionStorage.length; i++ ) {
171
+ expect (actualRotationCorrectionStorage[i],
172
+ moreOrLessEquals (expectedMatrixStorage[i]));
173
+ }
165
174
});
166
175
167
176
testWidgets ('no transform when rotationCorrection is zero' ,
You can’t perform that action at this time.
0 commit comments