【发布时间】:2021-05-18 20:30:58
【问题描述】:
这是我的问题,我正在尝试实现视频背景播放器,而不是我尝试使用 gif 的图像背景,但渲染只有 256 种颜色。非常感谢,我一直在努力整合,但没有成功
class Login extends StatelessWidget {
static const your_client_id = '0000000000000000';
final FirebaseAuth _auth = FirebaseAuth.instance;
static const your_redirect_url =
'https://xxxxxxx.firebaseapp.com/__/auth/handler';
final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>();
@override
Widget build(BuildContext context) {
return WillPopScope(
child: Scaffold(
backgroundColor: Colors.white,
body: Container(
constraints: BoxConstraints.expand(),
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage("asset/images/bg.jpg"),
fit: BoxFit.cover,
)
),
试图用这段代码替换我的容器内容,我不知道这样做是否正确
Container(
width: *screen width*,
height: *screen height*,
child: Stack(
children: <Widget>[
Center(
child: Transform.scale(
scale: 3.9, //change this number as needed
AspectRatio(
aspectRatio: _controller.value.aspectRatio,
child: VideoPlayer(_controller),
),
),
),
【问题讨论】:
标签: android flutter dart video-player