|
|
|
@ -1,8 +1,10 @@ |
|
|
|
import 'package:dating_touchme_app/components/home_appbar.dart'; |
|
|
|
import 'package:dating_touchme_app/provide/user_info.dart'; |
|
|
|
import 'package:dating_touchme_app/router/route_paths.dart'; |
|
|
|
import 'package:dating_touchme_app/utils/storage.dart'; |
|
|
|
import 'package:flutter/material.dart'; |
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
import 'package:go_router/go_router.dart'; |
|
|
|
import 'package:provider/provider.dart'; |
|
|
|
|
|
|
|
class LivePage extends StatefulWidget { |
|
|
|
@ -159,149 +161,154 @@ class LiveItem extends StatefulWidget { |
|
|
|
class _LiveItemState extends State<LiveItem> { |
|
|
|
@override |
|
|
|
Widget build(BuildContext context) { |
|
|
|
return ClipRRect( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(20.w)), |
|
|
|
child: Stack( |
|
|
|
children: [ |
|
|
|
Container( |
|
|
|
width: 343.w, |
|
|
|
height: 343.w, |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(20.w)) |
|
|
|
), |
|
|
|
child: Image.network( |
|
|
|
"https://picsum.photos/400", |
|
|
|
return InkWell( |
|
|
|
onTap: (){ |
|
|
|
context.pushNamed(RouteNames.liveRoom, queryParameters: {"id" : "0"}); |
|
|
|
}, |
|
|
|
child: ClipRRect( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(20.w)), |
|
|
|
child: Stack( |
|
|
|
children: [ |
|
|
|
Container( |
|
|
|
width: 343.w, |
|
|
|
height: 343.w, |
|
|
|
), |
|
|
|
), |
|
|
|
Positioned( |
|
|
|
top: 0, |
|
|
|
left: 0, |
|
|
|
child: Stack( |
|
|
|
children: [ |
|
|
|
Image.asset( |
|
|
|
"assets/subscript.png", |
|
|
|
width: 113.w, |
|
|
|
height: 32.w, |
|
|
|
), |
|
|
|
SizedBox( |
|
|
|
height: 32.w, |
|
|
|
child: Row( |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
children: [ |
|
|
|
SizedBox(width: 10.w,), |
|
|
|
Image.asset( |
|
|
|
"assets/location_icon.png", |
|
|
|
width: 12.w, |
|
|
|
height: 14.w, |
|
|
|
), |
|
|
|
SizedBox(width: 6.w,), |
|
|
|
Text( |
|
|
|
"49.9km", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 16.w, |
|
|
|
color: Colors.white, |
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
), |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
if(widget.item["isNew"]) Positioned( |
|
|
|
top: 19.w, |
|
|
|
right: 17.w, |
|
|
|
child: Container( |
|
|
|
width: 79.w, |
|
|
|
height: 26.w, |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(26.w)), |
|
|
|
color: const Color.fromRGBO(0, 0, 0, .3) |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(20.w)) |
|
|
|
), |
|
|
|
child: Row( |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
child: Image.network( |
|
|
|
"https://picsum.photos/400", |
|
|
|
width: 343.w, |
|
|
|
height: 343.w, |
|
|
|
), |
|
|
|
), |
|
|
|
Positioned( |
|
|
|
top: 0, |
|
|
|
left: 0, |
|
|
|
child: Stack( |
|
|
|
children: [ |
|
|
|
Container( |
|
|
|
width: 10.w, |
|
|
|
height: 10.w, |
|
|
|
margin: EdgeInsets.only(right: 6.w), |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(10.w)), |
|
|
|
color: const Color.fromRGBO(255, 209, 43, 1) |
|
|
|
), |
|
|
|
Image.asset( |
|
|
|
"assets/subscript.png", |
|
|
|
width: 113.w, |
|
|
|
height: 32.w, |
|
|
|
), |
|
|
|
Text( |
|
|
|
"等待", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 16.w, |
|
|
|
color: Colors.white, |
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
SizedBox( |
|
|
|
height: 32.w, |
|
|
|
child: Row( |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
children: [ |
|
|
|
SizedBox(width: 10.w,), |
|
|
|
Image.asset( |
|
|
|
"assets/location_icon.png", |
|
|
|
width: 12.w, |
|
|
|
height: 14.w, |
|
|
|
), |
|
|
|
SizedBox(width: 6.w,), |
|
|
|
Text( |
|
|
|
"49.9km", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 16.w, |
|
|
|
color: Colors.white, |
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
), |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
Positioned( |
|
|
|
left: 18.w, |
|
|
|
bottom: 13.w, |
|
|
|
child: Column( |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
children: [ |
|
|
|
SizedBox( |
|
|
|
width: 128.w, |
|
|
|
child: Text( |
|
|
|
"一直一直在等你一直一直在等你......", |
|
|
|
maxLines: 1, |
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 16.w, |
|
|
|
color: Colors.white, |
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
), |
|
|
|
), |
|
|
|
if(widget.item["isNew"]) Positioned( |
|
|
|
top: 19.w, |
|
|
|
right: 17.w, |
|
|
|
child: Container( |
|
|
|
width: 79.w, |
|
|
|
height: 26.w, |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(26.w)), |
|
|
|
color: const Color.fromRGBO(0, 0, 0, .3) |
|
|
|
), |
|
|
|
SizedBox(height: 5.w,), |
|
|
|
Row( |
|
|
|
child: Row( |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
children: [ |
|
|
|
Container( |
|
|
|
width: 10.w, |
|
|
|
height: 10.w, |
|
|
|
margin: EdgeInsets.only(right: 6.w), |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(10.w)), |
|
|
|
color: const Color.fromRGBO(255, 209, 43, 1) |
|
|
|
), |
|
|
|
), |
|
|
|
Text( |
|
|
|
"福州 | 28岁", |
|
|
|
"等待", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 22.w, |
|
|
|
color: Colors.white, |
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
fontSize: 16.w, |
|
|
|
color: Colors.white, |
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
), |
|
|
|
), |
|
|
|
SizedBox(width: 11.w,), |
|
|
|
if(widget.item["isNew"]) Container( |
|
|
|
width: 65.w, |
|
|
|
height: 21.w, |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(21.w)), |
|
|
|
color: const Color.fromRGBO(255, 206, 28, .8) |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
Positioned( |
|
|
|
left: 18.w, |
|
|
|
bottom: 13.w, |
|
|
|
child: Column( |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
children: [ |
|
|
|
SizedBox( |
|
|
|
width: 128.w, |
|
|
|
child: Text( |
|
|
|
"一直一直在等你一直一直在等你......", |
|
|
|
maxLines: 1, |
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 16.w, |
|
|
|
color: Colors.white, |
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
), |
|
|
|
child: Center( |
|
|
|
child: Text( |
|
|
|
"新人", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 16.w, |
|
|
|
), |
|
|
|
), |
|
|
|
SizedBox(height: 5.w,), |
|
|
|
Row( |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
children: [ |
|
|
|
Text( |
|
|
|
"福州 | 28岁", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 22.w, |
|
|
|
color: Colors.white, |
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
) |
|
|
|
], |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
) |
|
|
|
], |
|
|
|
SizedBox(width: 11.w,), |
|
|
|
if(widget.item["isNew"]) Container( |
|
|
|
width: 65.w, |
|
|
|
height: 21.w, |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(21.w)), |
|
|
|
color: const Color.fromRGBO(255, 206, 28, .8) |
|
|
|
), |
|
|
|
child: Center( |
|
|
|
child: Text( |
|
|
|
"新人", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 16.w, |
|
|
|
color: Colors.white, |
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
) |
|
|
|
], |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
); |
|
|
|
} |
|
|
|
|