video: fixed background color
This commit is contained in:
parent
2ef43c5b24
commit
98f3e2ebd0
1 changed files with 13 additions and 28 deletions
|
@ -72,26 +72,14 @@ class AvesVideoState extends State<AvesVideo> {
|
|||
statusWidgetBuilder: (context, controller, status) => const SizedBox.shrink(),
|
||||
textureBuilder: (context, controller, info) {
|
||||
var id = controller.textureId;
|
||||
if (id == null) {
|
||||
return AspectRatio(
|
||||
aspectRatio: entry.displayAspectRatio,
|
||||
child: Container(
|
||||
color: Colors.green,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget child = Container(
|
||||
color: Colors.blue,
|
||||
child: Texture(
|
||||
var child = id != null
|
||||
? Texture(
|
||||
textureId: id,
|
||||
),
|
||||
)
|
||||
: Container(
|
||||
color: Colors.black,
|
||||
);
|
||||
|
||||
if (!controller.autoRotate) {
|
||||
return child;
|
||||
}
|
||||
|
||||
final degree = entry.catalogMetadata?.videoRotation ?? 0;
|
||||
if (degree != 0) {
|
||||
child = RotatedBox(
|
||||
|
@ -100,17 +88,14 @@ class AvesVideoState extends State<AvesVideo> {
|
|||
);
|
||||
}
|
||||
|
||||
child = AspectRatio(
|
||||
return Center(
|
||||
child: AspectRatio(
|
||||
aspectRatio: entry.displayAspectRatio,
|
||||
child: child,
|
||||
);
|
||||
|
||||
return Container(
|
||||
child: child,
|
||||
alignment: Alignment.center,
|
||||
color: Colors.transparent,
|
||||
),
|
||||
);
|
||||
},
|
||||
backgroundColor: Colors.transparent,
|
||||
)
|
||||
: Image(
|
||||
image: UriImage(uri: entry.uri, mimeType: entry.mimeType),
|
||||
|
|
Loading…
Reference in a new issue