This repository was archived by the owner on Feb 22, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
packages/video_player/video_player/test Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 55import 'dart:async' ;
66import 'dart:io' ;
77import 'dart:math' as math;
8+ import 'dart:typed_data' ;
89
910import 'package:flutter/material.dart' ;
1011import 'package:flutter/services.dart' ;
@@ -160,8 +161,16 @@ void main() {
160161 await tester.pumpWidget (VideoPlayer (controller));
161162 final Transform actualRotationCorrection =
162163 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+ }
165174 });
166175
167176 testWidgets ('no transform when rotationCorrection is zero' ,
You can’t perform that action at this time.
0 commit comments