mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: lint
mod: tweaks opt: publish page Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -18,7 +18,7 @@ import 'package:intl/intl.dart';
|
||||
enum MemberTabType { none, home, dynamic, contribute, favorite, bangumi }
|
||||
|
||||
extension MemberTabTypeExt on MemberTabType {
|
||||
String get title => ['默认', '首页', '动态', '投稿', '收藏', '番剧'][index];
|
||||
String get title => const ['默认', '首页', '动态', '投稿', '收藏', '番剧'][index];
|
||||
}
|
||||
|
||||
class MemberController extends CommonDataController<SpaceData, dynamic>
|
||||
@@ -192,7 +192,7 @@ class MemberController extends CommonDataController<SpaceData, dynamic>
|
||||
Utils.shareText('https://space.bilibili.com/$mid');
|
||||
}
|
||||
|
||||
void _onBlock() async {
|
||||
Future<void> _onBlock() async {
|
||||
dynamic res = await VideoHttp.relationMod(
|
||||
mid: mid,
|
||||
act: relation.value != 128 ? 5 : 6,
|
||||
@@ -203,7 +203,7 @@ class MemberController extends CommonDataController<SpaceData, dynamic>
|
||||
}
|
||||
}
|
||||
|
||||
void onFollow(BuildContext context) async {
|
||||
Future<void> onFollow(BuildContext context) async {
|
||||
if (mid == ownerMid) {
|
||||
Get.toNamed('/editProfile');
|
||||
} else if (relation.value == 128) {
|
||||
|
||||
@@ -103,9 +103,9 @@ class _MemberPageState extends State<MemberPage> {
|
||||
if (_userController.isFollowed == 1)
|
||||
PopupMenuItem(
|
||||
onTap: _userController.onRemoveFan,
|
||||
child: Row(
|
||||
child: const Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: const [
|
||||
children: [
|
||||
Icon(Icons.remove_circle_outline_outlined, size: 19),
|
||||
SizedBox(width: 10),
|
||||
Text('移除粉丝'),
|
||||
@@ -197,7 +197,7 @@ class _MemberPageState extends State<MemberPage> {
|
||||
],
|
||||
),
|
||||
)
|
||||
: Center(child: const Text('EMPTY')),
|
||||
: const Center(child: Text('EMPTY')),
|
||||
);
|
||||
},
|
||||
)
|
||||
@@ -288,7 +288,7 @@ class _MemberPageState extends State<MemberPage> {
|
||||
: GestureDetector(
|
||||
onTap: _userController.onReload,
|
||||
behavior: HitTestBehavior.opaque,
|
||||
child: SizedBox(height: 56, width: double.infinity),
|
||||
child: const SizedBox(height: 56, width: double.infinity),
|
||||
),
|
||||
Error() => _errorWidget(userState.errMsg),
|
||||
};
|
||||
|
||||
@@ -55,7 +55,7 @@ class UserInfoCard extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
Utils.numFormat(count),
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
@@ -72,7 +72,7 @@ class UserInfoCard extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
_buildHeader(BuildContext context, ThemeData theme) {
|
||||
Widget _buildHeader(BuildContext context, ThemeData theme) {
|
||||
bool darken = theme.brightness == Brightness.dark;
|
||||
String imgUrl = (darken
|
||||
? images.nightImgurl?.isEmpty == true
|
||||
@@ -109,7 +109,7 @@ class UserInfoCard extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
_buildLeft(BuildContext context, ThemeData theme) => [
|
||||
List<Widget> _buildLeft(BuildContext context, ThemeData theme) => [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
child: Wrap(
|
||||
@@ -158,7 +158,7 @@ class UserInfoCard extends StatelessWidget {
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
height: 1,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 10,
|
||||
@@ -205,7 +205,7 @@ class UserInfoCard extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
const TextSpan(
|
||||
text: ' ',
|
||||
)
|
||||
],
|
||||
@@ -267,7 +267,7 @@ class UserInfoCard extends StatelessWidget {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(6)),
|
||||
color: isLight
|
||||
? theme.colorScheme.errorContainer
|
||||
: theme.colorScheme.error,
|
||||
@@ -302,7 +302,7 @@ class UserInfoCard extends StatelessWidget {
|
||||
}),
|
||||
];
|
||||
|
||||
_buildRight(BuildContext context, ThemeData theme) => Column(
|
||||
Column _buildRight(BuildContext context, ThemeData theme) => Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Row(
|
||||
@@ -327,7 +327,7 @@ class UserInfoCard extends StatelessWidget {
|
||||
}
|
||||
},
|
||||
)
|
||||
: SizedBox(
|
||||
: const SizedBox(
|
||||
height: 15,
|
||||
width: 1,
|
||||
child: VerticalDivider(),
|
||||
@@ -362,10 +362,7 @@ class UserInfoCard extends StatelessWidget {
|
||||
),
|
||||
padding: EdgeInsets.zero,
|
||||
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
visualDensity: const VisualDensity(
|
||||
horizontal: -2,
|
||||
vertical: -2,
|
||||
),
|
||||
visualDensity: VisualDensity.compact,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
@@ -377,10 +374,7 @@ class UserInfoCard extends StatelessWidget {
|
||||
backgroundColor: relation != 0
|
||||
? theme.colorScheme.onInverseSurface
|
||||
: null,
|
||||
visualDensity: const VisualDensity(
|
||||
horizontal: -2,
|
||||
vertical: -2,
|
||||
),
|
||||
visualDensity: VisualDensity.compact,
|
||||
),
|
||||
child: Text.rich(
|
||||
style: TextStyle(
|
||||
@@ -421,7 +415,7 @@ class UserInfoCard extends StatelessWidget {
|
||||
],
|
||||
);
|
||||
|
||||
_buildAvatar(BuildContext context) => Hero(
|
||||
Hero _buildAvatar(BuildContext context) => Hero(
|
||||
tag: card.face ?? '',
|
||||
child: Avatar(
|
||||
avatar: card.face ?? '',
|
||||
@@ -435,7 +429,7 @@ class UserInfoCard extends StatelessWidget {
|
||||
.imageView(imgList: [SourceModel(url: card.face.http2https)]),
|
||||
));
|
||||
|
||||
_buildV(BuildContext context, ThemeData theme) => Column(
|
||||
Column _buildV(BuildContext context, ThemeData theme) => Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -533,7 +527,7 @@ class UserInfoCard extends StatelessWidget {
|
||||
);
|
||||
});
|
||||
|
||||
_buildH(BuildContext context, ThemeData theme) => Column(
|
||||
Column _buildH(BuildContext context, ThemeData theme) => Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
||||
Reference in New Issue
Block a user