mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: member prInfo
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -535,12 +535,15 @@ class UserInfoCard extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
..._buildLeft(context),
|
||||
if (card.prInfo?.content?.isNotEmpty == true)
|
||||
Builder(builder: (context) {
|
||||
if (card.prInfo?.content?.isNotEmpty == true) buildPrInfo,
|
||||
const SizedBox(height: 5),
|
||||
],
|
||||
);
|
||||
|
||||
Widget get buildPrInfo => Builder(builder: (context) {
|
||||
final isDark = Theme.of(context).brightness == Brightness.dark;
|
||||
final textColor = isDark
|
||||
? Color(int.parse(
|
||||
'FF${card.prInfo?.textColorNight?.substring(1)}',
|
||||
? Color(int.parse('FF${card.prInfo?.textColorNight?.substring(1)}',
|
||||
radix: 16))
|
||||
: Color(int.parse('FF${card.prInfo?.textColor?.substring(1)}',
|
||||
radix: 16));
|
||||
@@ -552,19 +555,16 @@ class UserInfoCard extends StatelessWidget {
|
||||
},
|
||||
child: Container(
|
||||
margin: const EdgeInsets.only(top: 8),
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
|
||||
color: isDark
|
||||
? Color(int.parse(
|
||||
'FF${card.prInfo?.bgColorNight?.substring(1)}',
|
||||
radix: 16))
|
||||
: Color(int.parse(
|
||||
'FF${card.prInfo?.bgColor?.substring(1)}',
|
||||
: Color(int.parse('FF${card.prInfo?.bgColor?.substring(1)}',
|
||||
radix: 16)),
|
||||
child: Row(
|
||||
children: [
|
||||
if (isDark &&
|
||||
card.prInfo?.iconNight?.isNotEmpty == true) ...[
|
||||
if (isDark && card.prInfo?.iconNight?.isNotEmpty == true) ...[
|
||||
CachedNetworkImage(
|
||||
imageUrl: card.prInfo!.iconNight!,
|
||||
height: 20,
|
||||
@@ -594,10 +594,7 @@ class UserInfoCard extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
const SizedBox(height: 5),
|
||||
],
|
||||
);
|
||||
});
|
||||
|
||||
_buildLiveBadge(context) => GestureDetector(
|
||||
onTap: () {
|
||||
@@ -638,12 +635,17 @@ class UserInfoCard extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
_buildHeader(context),
|
||||
Row(
|
||||
SafeArea(
|
||||
top: false,
|
||||
bottom: false,
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width: MediaQuery.paddingOf(context).left),
|
||||
const SizedBox(width: 20),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
||||
padding: EdgeInsets.only(
|
||||
top: 10,
|
||||
bottom: card.prInfo?.content?.isNotEmpty == true ? 0 : 10,
|
||||
),
|
||||
child: Stack(
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
@@ -668,7 +670,8 @@ class UserInfoCard extends StatelessWidget {
|
||||
bottom: 0,
|
||||
child: _buildBadge(context),
|
||||
),
|
||||
if (live is Map && ((live['liveStatus'] as int?) ?? 0) == 1)
|
||||
if (live is Map &&
|
||||
((live['liveStatus'] as int?) ?? 0) == 1)
|
||||
Positioned(
|
||||
left: 0,
|
||||
bottom: -5,
|
||||
@@ -690,9 +693,10 @@ class UserInfoCard extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Expanded(child: _buildRight(context)),
|
||||
SizedBox(width: MediaQuery.paddingOf(context).right),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (card.prInfo?.content?.isNotEmpty == true) buildPrInfo,
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user