fix: 修复合并后出现的一些Bug,调整了一些样式

master
Spark 1 week ago
parent 08a374f864
commit 874c491b0d

@ -231,7 +231,7 @@ class _HomeViewState extends State<HomeView> {
],
),
),
const SizedBox(height: 10,),
///
Container(
padding: const EdgeInsets.only(left: 20, right: 20, top: 10),
@ -319,14 +319,16 @@ class _HomeViewState extends State<HomeView> {
),
),
const SizedBox(height: 10,),
///+
Container(
padding: const EdgeInsets.only(left: 20, right: 20, top: 10),
child: const Text(
'每日推荐',
style: TextStyle(fontSize: 22, fontWeight: FontWeight.w500),
style: TextStyle(fontSize: 20, fontWeight: FontWeight.w500),
),
),
const SizedBox(height: 5,),
Container(
padding: const EdgeInsets.only(left: 20, right: 20, top: 5),
height: 186,
@ -334,15 +336,18 @@ class _HomeViewState extends State<HomeView> {
child: MySwiperWidget,
),
const SizedBox(height: 10),
///
Container(
alignment: Alignment.topLeft,
padding: const EdgeInsets.only(left: 20, right: 20, top: 5),
child: const Text(
'精选歌曲',
style: TextStyle(fontSize: 22, fontWeight: FontWeight.w500),
style: TextStyle(fontSize: 20, fontWeight: FontWeight.w500),
),
),
const SizedBox(height: 5,),
ListView.builder(
padding: EdgeInsets.zero,
itemCount: selectedSongs.length,
@ -388,14 +393,16 @@ class _HomeViewState extends State<HomeView> {
},
),
const SizedBox(height: 10,),
///
Container(
padding: const EdgeInsets.only(left: 20, right: 20, top: 5),
child: const Text(
'精选歌单',
style: TextStyle(fontSize: 22, fontWeight: FontWeight.w500),
style: TextStyle(fontSize: 20, fontWeight: FontWeight.w500),
),
),
const SizedBox(height: 5,),
SizedBox(
height: 180,
child: ListView.builder(
@ -483,6 +490,7 @@ class _HomeViewState extends State<HomeView> {
children: [
IconButton(
onPressed: () {
Navigator.pop(context);
Get.to(() => CommentView(
initialSongIndex: index,
));

@ -25,6 +25,7 @@ class _RankViewState extends State<RankView> {
final downloadManager = Get.put(DownloadManager());
@override
void initState() {
super.initState();
_fetchSonglistData();
@ -187,7 +188,7 @@ class _RankViewState extends State<RankView> {
child: RichText(
text: TextSpan(
text: rankNum.toString(),
style: TextStyle(
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w700,
color: Color(0xffCE0000),
@ -221,7 +222,7 @@ class _RankViewState extends State<RankView> {
Text(
rankNames[index],
maxLines: 1,
style: TextStyle(
style: const TextStyle(
color: Colors.black,
fontSize: 16,
fontWeight:
@ -230,7 +231,7 @@ class _RankViewState extends State<RankView> {
Text(
rankSingerName[index],
maxLines: 1,
style: TextStyle(
style: const TextStyle(
color: Colors.black,
fontSize: 14),
)
@ -298,7 +299,7 @@ class _RankViewState extends State<RankView> {
icon: Image.asset("assets/img/list_add.png"),
iconSize: 60,
),
Text("加入歌单")
const Text("加入歌单")
],
),
Column(
@ -308,7 +309,7 @@ class _RankViewState extends State<RankView> {
icon: Image.asset("assets/img/list_download.png"),
iconSize: 60,
),
Text("下载")
const Text("下载")
],
),
Column(
@ -318,7 +319,7 @@ class _RankViewState extends State<RankView> {
icon: Image.asset("assets/img/list_collection.png"),
iconSize: 60,
),
Text("收藏")
const Text("收藏")
],
),
Column(
@ -328,17 +329,19 @@ class _RankViewState extends State<RankView> {
icon: Image.asset("assets/img/list_good.png"),
iconSize: 60,
),
Text("点赞")
const Text("点赞")
],
),
Column(
children: [
IconButton(
onPressed: (){},
onPressed: (){
Navigator.pop(context);
},
icon: Image.asset("assets/img/list_comment.png"),
iconSize: 60,
),
Text("评论")
const Text("评论")
],
),
],

@ -6,7 +6,6 @@ import '../../api/api_client.dart';
import '../../api/api_client_info.dart';
import '../../common_widget/app_data.dart';
import '../../view_model/home_view_model.dart';
import '../../view/main_tab_view/main_tab_view.dart';
class UserInfo extends StatefulWidget {
const UserInfo({super.key});
@ -37,17 +36,7 @@ class _UserInfoState extends State<UserInfo> {
elevation: 0,
leading: IconButton(
onPressed: () {
// MainTabView
Get.back(); //
//
Future.delayed(Duration(milliseconds: 100), () {
// MainTabView TabController
final mainTabController = Get.find<MainTabView>().getController(context);
if (mainTabController != null) {
mainTabController.index = 3; //
}
});
Get.back(result: true);
},
icon: Image.asset(
"assets/img/back.png",
@ -171,7 +160,7 @@ class _UserInfoState extends State<UserInfo> {
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(top: Radius.circular(30))),
builder: (context) => Container(
height: 132,
height: 80,
padding: const EdgeInsets.only(top: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
@ -208,21 +197,6 @@ class _UserInfoState extends State<UserInfo> {
style: TextStyle(color: Colors.black, fontSize: 18),
),
),
ElevatedButton(
onPressed: () => Navigator.pop(context),
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xff429482),
padding: const EdgeInsets.symmetric(vertical: 18),
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.zero,
),
),
child: const Text(
"取消",
style: TextStyle(color: Colors.black, fontSize: 18),
),
),
],
),
),
@ -245,7 +219,11 @@ class _UserInfoState extends State<UserInfo> {
),
actions: <Widget>[
TextButton(
onPressed: () {
onPressed: () async {
_updateNickname();
await ChangeApiClient().changeName(
Authorization: AppData().currentToken,
userName: AppData().currentUsername);
Navigator.of(context).pop();
},
style: TextButton.styleFrom(
@ -256,16 +234,12 @@ class _UserInfoState extends State<UserInfo> {
),
),
child: const Text(
"取消",
"保存",
style: TextStyle(color: Colors.white),
),
),
TextButton(
onPressed: () async {
_updateNickname();
await ChangeApiClient().changeName(
Authorization: AppData().currentToken,
userName: AppData().currentUsername);
onPressed: () {
Navigator.of(context).pop();
},
style: TextButton.styleFrom(
@ -276,7 +250,7 @@ class _UserInfoState extends State<UserInfo> {
),
),
child: const Text(
"保存",
"取消",
style: TextStyle(color: Colors.white),
),
),

@ -31,6 +31,8 @@ class _UserViewState extends State<UserView> {
List playlistNames = [];
List playlistid = [];
int downloadCount = 0;
String avatar = AppData().currentAvatar;
String username = AppData().currentUsername;
final downloadManager = Get.put(DownloadManager());
@ -85,7 +87,7 @@ class _UserViewState extends State<UserView> {
Row(
children: [
Image.network(
AppData().currentAvatar,
avatar,
width: 64,
height: 64,
),
@ -93,7 +95,7 @@ class _UserViewState extends State<UserView> {
width: 25,
),
Text(
AppData().currentUsername,
username,
style: const TextStyle(fontSize: 20),
)
],
@ -424,8 +426,15 @@ class _UserViewState extends State<UserView> {
Column(
children: [
IconButton(
onPressed: () {
Get.to(const UserInfo());
onPressed: () async {
Navigator.pop(context);
bool result = await Get.to(const UserInfo());
if (result) {
setState(() {
avatar = AppData().currentAvatar;
username = AppData().currentUsername;
});
}
},
icon: Image.asset("assets/img/user_infor.png"),
iconSize: 60,
@ -437,6 +446,7 @@ class _UserViewState extends State<UserView> {
children: [
IconButton(
onPressed: () async {
Navigator.pop(context);
UniversalBean bean = await LogoutApiClient().logout(
Authorization: AppData().currentToken,
);
@ -453,21 +463,6 @@ class _UserViewState extends State<UserView> {
],
),
const SizedBox(height: 30),
ElevatedButton(
onPressed: () => Navigator.pop(context),
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xff429482),
padding: const EdgeInsets.symmetric(vertical: 14),
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.zero,
),
),
child: const Text(
"取消",
style: TextStyle(color: Colors.black, fontSize: 18),
),
),
],
),
),

Loading…
Cancel
Save