|
|
|
@ -59,25 +59,21 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin |
|
|
|
return AppBar( |
|
|
|
backgroundColor: Colors.white, |
|
|
|
elevation: 0, |
|
|
|
centerTitle: false, |
|
|
|
centerTitle: true, |
|
|
|
toolbarHeight: 56, |
|
|
|
titleSpacing: 16, |
|
|
|
titleSpacing: 0, |
|
|
|
title: Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
mainAxisSize: MainAxisSize.min, |
|
|
|
children: [ |
|
|
|
_buildTabButton(title: '推荐', index: 0), |
|
|
|
const SizedBox(width: 16), |
|
|
|
const SizedBox(width: 28), |
|
|
|
_buildTabButton(title: '同城', index: 1), |
|
|
|
const Spacer(), |
|
|
|
Image.asset( |
|
|
|
Assets.imagesOnlineIcon, |
|
|
|
width: 20, |
|
|
|
height: 20, |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
bottom: PreferredSize( |
|
|
|
preferredSize: const Size.fromHeight(8), |
|
|
|
child: const SizedBox(height: 8), |
|
|
|
bottom: const PreferredSize( |
|
|
|
preferredSize: Size.fromHeight(4), |
|
|
|
child: SizedBox(height: 4), |
|
|
|
), |
|
|
|
); |
|
|
|
} |
|
|
|
@ -93,26 +89,25 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin |
|
|
|
} |
|
|
|
}, |
|
|
|
child: Column( |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
mainAxisSize: MainAxisSize.min, |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
children: [ |
|
|
|
Text( |
|
|
|
title, |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 22, |
|
|
|
fontWeight: FontWeight.w700, |
|
|
|
color: selected ? Colors.black : const Color(0xFF999999), |
|
|
|
), |
|
|
|
), |
|
|
|
const SizedBox(height: 4), |
|
|
|
AnimatedContainer( |
|
|
|
duration: const Duration(milliseconds: 200), |
|
|
|
height: 4, |
|
|
|
width: selected ? 28 : 0, |
|
|
|
decoration: BoxDecoration( |
|
|
|
color: const Color(0xFF6C63FF), |
|
|
|
borderRadius: BorderRadius.circular(2), |
|
|
|
fontSize: selected ? 19 : 17, |
|
|
|
fontWeight: selected ? FontWeight.w700 : FontWeight.w400, |
|
|
|
color: selected ? const Color(0xFF333333) : const Color(0xFF999999), |
|
|
|
), |
|
|
|
), |
|
|
|
const SizedBox(height: 6), |
|
|
|
selected |
|
|
|
? Image.asset( |
|
|
|
Assets.imagesTabChangeIcon, |
|
|
|
width: 32, |
|
|
|
height: 8, |
|
|
|
) |
|
|
|
: const SizedBox(height: 8), |
|
|
|
], |
|
|
|
), |
|
|
|
); |
|
|
|
@ -211,9 +206,9 @@ class _CardHeader extends StatelessWidget { |
|
|
|
const Text( |
|
|
|
'林园园', |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 20, |
|
|
|
fontWeight: FontWeight.w700, |
|
|
|
color: Color(0xFF333333), |
|
|
|
fontSize: 15, |
|
|
|
fontWeight: FontWeight.w500, |
|
|
|
color: Color.fromRGBO(51, 51, 51, 1), |
|
|
|
), |
|
|
|
), |
|
|
|
const SizedBox(width: 6), |
|
|
|
@ -221,16 +216,16 @@ class _CardHeader extends StatelessWidget { |
|
|
|
Container( |
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 2), |
|
|
|
decoration: BoxDecoration( |
|
|
|
color: const Color(0xFFEFFBF3), |
|
|
|
color: Color.fromRGBO(234, 255, 219, 1), |
|
|
|
borderRadius: BorderRadius.circular(12), |
|
|
|
), |
|
|
|
child: const Text( |
|
|
|
'在线', |
|
|
|
style: TextStyle(fontSize: 12, color: Color(0xFF2ED573)), |
|
|
|
style: TextStyle(fontSize: 12, color: Color.fromRGBO(38, 199, 124, 1)), |
|
|
|
), |
|
|
|
), |
|
|
|
const SizedBox(width: 6), |
|
|
|
// 实名徽标 |
|
|
|
// 实名徽, |
|
|
|
Container( |
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 2), |
|
|
|
decoration: BoxDecoration( |
|
|
|
@ -239,11 +234,11 @@ class _CardHeader extends StatelessWidget { |
|
|
|
), |
|
|
|
child: Row( |
|
|
|
children: [ |
|
|
|
Image.asset(Assets.imagesVerifiedIcon, width: 12, height: 12), |
|
|
|
Image.asset(Assets.imagesVerifiedIcon, width: 14, height: 12), |
|
|
|
const SizedBox(width: 4), |
|
|
|
const Text( |
|
|
|
'实名', |
|
|
|
style: TextStyle(fontSize: 12, color: Color(0xFF6C63FF)), |
|
|
|
style: TextStyle(fontSize: 9, color: Color.fromRGBO(160, 92, 255, 1)), |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
@ -253,13 +248,13 @@ class _CardHeader extends StatelessWidget { |
|
|
|
const SizedBox(height: 4), |
|
|
|
const Text( |
|
|
|
'23岁 · 白云区', |
|
|
|
style: TextStyle(fontSize: 16, color: Color(0xFF666666)), |
|
|
|
style: TextStyle(fontSize: 12, color: Color.fromRGBO(51, 51, 51, 1)), |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
if (showHi) |
|
|
|
Image.asset(Assets.imagesHiIcon, width: 64, height: 32), |
|
|
|
Image.asset(Assets.imagesHiIcon, width: 40, height: 20), |
|
|
|
], |
|
|
|
); |
|
|
|
} |
|
|
|
|