mod: 直播间背景图片
This commit is contained in:
@ -104,17 +104,19 @@ class NetworkImgLayer extends StatelessWidget {
|
||||
? 0
|
||||
: StyleString.imgRadius.x),
|
||||
),
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
type == 'avatar'
|
||||
? 'assets/images/noface.jpeg'
|
||||
: 'assets/images/loading.png',
|
||||
width: width,
|
||||
height: height,
|
||||
cacheWidth: width.cacheSize(context),
|
||||
cacheHeight: height.cacheSize(context),
|
||||
),
|
||||
),
|
||||
child: type == 'bg'
|
||||
? const SizedBox()
|
||||
: Center(
|
||||
child: Image.asset(
|
||||
type == 'avatar'
|
||||
? 'assets/images/noface.jpeg'
|
||||
: 'assets/images/loading.png',
|
||||
width: width,
|
||||
height: height,
|
||||
cacheWidth: width.cacheSize(context),
|
||||
cacheHeight: height.cacheSize(context),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -75,41 +75,45 @@ class _LiveRoomPageState extends State<LiveRoomPage> {
|
||||
backgroundColor: Colors.black,
|
||||
body: Stack(
|
||||
children: [
|
||||
// Obx(
|
||||
// () => Positioned.fill(
|
||||
// child: Opacity(
|
||||
// opacity: 0.8,
|
||||
// child: _liveRoomController
|
||||
// .roomInfoH5.value.roomInfo?.appBackground !=
|
||||
// '' &&
|
||||
// _liveRoomController
|
||||
// .roomInfoH5.value.roomInfo?.appBackground !=
|
||||
// null
|
||||
// ? NetworkImgLayer(
|
||||
// width: Get.width,
|
||||
// height: Get.height,
|
||||
// src: _liveRoomController
|
||||
// .roomInfoH5.value.roomInfo?.appBackground ??
|
||||
// '',
|
||||
// )
|
||||
// : Image.asset(
|
||||
// 'assets/images/live/default_bg.webp',
|
||||
// width: Get.width,
|
||||
// height: Get.height,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
Positioned.fill(
|
||||
Positioned(
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
child: Opacity(
|
||||
opacity: 0.8,
|
||||
child: Image.asset(
|
||||
'assets/images/live/default_bg.webp',
|
||||
width: Get.width,
|
||||
height: Get.height,
|
||||
fit: BoxFit.cover,
|
||||
// width: Get.width,
|
||||
// height: Get.height,
|
||||
),
|
||||
),
|
||||
),
|
||||
Obx(
|
||||
() => Positioned(
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
child: _liveRoomController
|
||||
.roomInfoH5.value.roomInfo?.appBackground !=
|
||||
'' &&
|
||||
_liveRoomController
|
||||
.roomInfoH5.value.roomInfo?.appBackground !=
|
||||
null
|
||||
? Opacity(
|
||||
opacity: 0.8,
|
||||
child: NetworkImgLayer(
|
||||
width: Get.width,
|
||||
height: Get.height,
|
||||
type: 'bg',
|
||||
src: _liveRoomController
|
||||
.roomInfoH5.value.roomInfo?.appBackground ??
|
||||
'',
|
||||
),
|
||||
)
|
||||
: const SizedBox(),
|
||||
),
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
AppBar(
|
||||
|
Reference in New Issue
Block a user