logo和名称替换
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:hgmj/assets_tool/images.dart';
|
||||
import 'package:hgmj/tools_base/widget/net_image_widget.dart';
|
||||
import 'package:wydj/assets_tool/images.dart';
|
||||
import 'package:wydj/tools_base/widget/net_image_widget.dart';
|
||||
|
||||
import '../../hj_utils/widget_utils.dart';
|
||||
import 'live_detail_page.dart';
|
||||
@@ -29,7 +29,8 @@ class LiveItemWidget extends StatelessWidget {
|
||||
if (action != null) {
|
||||
action?.call();
|
||||
} else {
|
||||
Get.to(() => LiveDetailPage(anchor: anchor), preventDuplicates: false);
|
||||
Get.to(() => LiveDetailPage(anchor: anchor),
|
||||
preventDuplicates: false);
|
||||
}
|
||||
},
|
||||
child: _buildContent(),
|
||||
@@ -50,7 +51,8 @@ class LiveItemWidget extends StatelessWidget {
|
||||
return Stack(
|
||||
children: [
|
||||
Positioned.fill(
|
||||
child: NetworkImageLoader(imageUrl: anchor?.coverImg ?? '', encrypt: false),
|
||||
child: NetworkImageLoader(
|
||||
imageUrl: anchor?.coverImg ?? '', encrypt: false),
|
||||
),
|
||||
Positioned(
|
||||
left: 4,
|
||||
@@ -61,7 +63,10 @@ class LiveItemWidget extends StatelessWidget {
|
||||
textAlign: TextAlign.start,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 1,
|
||||
style: TextStyle(fontSize: 12, color: Colors.white, fontWeight: FontWeight.w400),
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w400),
|
||||
)),
|
||||
Positioned(
|
||||
top: 0,
|
||||
@@ -84,7 +89,10 @@ class LiveItemWidget extends StatelessWidget {
|
||||
),
|
||||
child: Text(
|
||||
'王牌主播',
|
||||
style: TextStyle(fontSize: 10, color: Colors.white, fontWeight: FontWeight.w400),
|
||||
style: TextStyle(
|
||||
fontSize: 10,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w400),
|
||||
),
|
||||
)),
|
||||
],
|
||||
@@ -135,7 +143,8 @@ class LiveItemWidget extends StatelessWidget {
|
||||
),
|
||||
padding: EdgeInsets.all(2),
|
||||
child: ClipOval(
|
||||
child: NetworkImageLoader(imageUrl: anchor?.coverImg ?? '', encrypt: false),
|
||||
child: NetworkImageLoader(
|
||||
imageUrl: anchor?.coverImg ?? '', encrypt: false),
|
||||
),
|
||||
),
|
||||
)),
|
||||
@@ -158,7 +167,10 @@ class LiveItemWidget extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
anchor?.name ?? '',
|
||||
style: TextStyle(fontSize: 14, color: Colors.white, fontWeight: FontWeight.w400),
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w400),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
@@ -178,7 +190,10 @@ class LiveItemWidget extends StatelessWidget {
|
||||
),
|
||||
child: Text(
|
||||
'霸占TA>',
|
||||
style: TextStyle(fontSize: 10, color: Color(0xff6A00FF), fontWeight: FontWeight.w400),
|
||||
style: TextStyle(
|
||||
fontSize: 10,
|
||||
color: Color(0xff6A00FF),
|
||||
fontWeight: FontWeight.w400),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -195,14 +210,18 @@ class LiveItemWidget extends StatelessWidget {
|
||||
return Stack(
|
||||
children: [
|
||||
Positioned.fill(
|
||||
child: NetworkImageLoader(imageUrl: anchor?.coverImg ?? '', encrypt: false),
|
||||
child: NetworkImageLoader(
|
||||
imageUrl: anchor?.coverImg ?? '', encrypt: false),
|
||||
),
|
||||
Positioned(
|
||||
left: 6,
|
||||
bottom: 6,
|
||||
child: Text(
|
||||
anchor?.name ?? '',
|
||||
style: TextStyle(fontSize: 12, color: Colors.white, fontWeight: FontWeight.w400),
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w400),
|
||||
)),
|
||||
if (index != null && index! < 4)
|
||||
Positioned(
|
||||
@@ -234,7 +253,10 @@ class LiveItemWidget extends StatelessWidget {
|
||||
bottom: 6,
|
||||
child: Text(
|
||||
anchor?.name ?? '',
|
||||
style: TextStyle(fontSize: 12, color: Colors.white, fontWeight: FontWeight.w400),
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w400),
|
||||
)),
|
||||
],
|
||||
);
|
||||
@@ -262,7 +284,10 @@ class LiveItemWidget extends StatelessWidget {
|
||||
bottom: 6,
|
||||
child: Text(
|
||||
anchor?.name ?? '',
|
||||
style: TextStyle(fontSize: 12, color: Colors.white, fontWeight: FontWeight.w400),
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w400),
|
||||
)),
|
||||
Positioned(
|
||||
right: 6,
|
||||
@@ -274,14 +299,19 @@ class LiveItemWidget extends StatelessWidget {
|
||||
height: 8,
|
||||
width: 8,
|
||||
decoration: BoxDecoration(
|
||||
color: (anchor?.isOnline ?? false) ? Color(0xff0AEBED) : Color(0xff656565),
|
||||
color: (anchor?.isOnline ?? false)
|
||||
? Color(0xff0AEBED)
|
||||
: Color(0xff656565),
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 4),
|
||||
Text(
|
||||
(anchor?.isOnline ?? false) ? '直播中' : '离线',
|
||||
style: TextStyle(fontSize: 10, color: Colors.white, fontWeight: FontWeight.w400),
|
||||
style: TextStyle(
|
||||
fontSize: 10,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w400),
|
||||
)
|
||||
],
|
||||
)),
|
||||
@@ -298,7 +328,10 @@ class LiveItemWidget extends StatelessWidget {
|
||||
),
|
||||
child: Text(
|
||||
'${anchor?.viewCount?.humanizeFormat() ?? 0}人观众',
|
||||
style: TextStyle(fontSize: 10, color: Colors.white, fontWeight: FontWeight.w400),
|
||||
style: TextStyle(
|
||||
fontSize: 10,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w400),
|
||||
),
|
||||
)),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user