fix: 修复合并后出现的一些BUG,修复排行榜更多按钮溢出,移除更多弹出面板中的“查看详细”和“取消”按钮,修复底部菜单栏溢出的问题,

master
Spark 2 weeks ago
parent b76c58a7fb
commit 0f0341fc19

@ -1,2 +0,0 @@
#Sun Oct 27 00:29:01 HKT 2024
java.home=E\:\\Program Files\\Android\\Android Studio\\jbr

@ -1,8 +0,0 @@
## This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Sun Oct 27 00:29:01 HKT 2024
sdk.dir=E\:\\Android\\Sdk

@ -1,18 +1,11 @@
buildscript {
ext.kotlin_version = '1.7.10'
repositories {
maven { url 'https://maven.aliyun.com/repository/public/' }
maven { url 'https://maven.aliyun.com/repository/central'}
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/spring'}
maven { url 'https://maven.aliyun.com/repository/gradle-plugin'}
maven { url 'https://maven.aliyun.com/repository/apache-snapshots'}
google()
mavenCentral()
}
dependencies {
//
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
@ -20,13 +13,6 @@ buildscript {
allprojects {
repositories {
// 使Maven
maven { url 'https://maven.aliyun.com/repository/public/' }
maven { url 'https://maven.aliyun.com/repository/central'}
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/spring'}
maven { url 'https://maven.aliyun.com/repository/gradle-plugin'}
maven { url 'https://maven.aliyun.com/repository/apache-snapshots'}
google()
mavenCentral()
mavenCentral()

Binary file not shown.

Binary file not shown.

@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=file:///E:/Flutter/MusicAPP/android/gradle/wrapper/gradle-7.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip

@ -12,8 +12,6 @@ import '../common_widget/Song_widegt.dart';
import '../common_widget/list_cell.dart';
import '../models/getMusicList_bean.dart';
import 'music_view.dart';
import '../api/api_music_likes.dart'; // API
import '../models/universal_bean.dart';
class HomeView extends StatefulWidget {
const HomeView({super.key});
@ -44,6 +42,15 @@ class _HomeViewState extends State<HomeView> {
setState(() {
songs = [
Song(
artistPic: bean1.coverPath!,
title: bean1.name!,
artist: bean1.singerName!,
musicurl: bean1.musicPath!,
pic: bean1.coverPath!,
id: bean1.id!,
likes: bean1.likeOrNot!,
collection: bean1.collectOrNot!),
Song(
artistPic: bean2.coverPath!,
title: bean2.name!,
@ -340,7 +347,7 @@ class _HomeViewState extends State<HomeView> {
bool likesnot = false; //
return Container(
height: 210,
height: 150,
padding: const EdgeInsets.only(top: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
@ -404,49 +411,6 @@ class _HomeViewState extends State<HomeView> {
),
],
),
const SizedBox(
height: 10,
),
ElevatedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => MusicView(
song: songs[index],
initialSongIndex: index,
),
),
);
},
child: const Text(
"查看详情页",
style: TextStyle(color: Colors.black, fontSize: 18),
),
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xffE6F4F1),
padding: const EdgeInsets.symmetric(vertical: 8),
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.zero,
),
),
),
ElevatedButton(
onPressed: () => Navigator.pop(context),
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xff429482),
padding: const EdgeInsets.symmetric(vertical: 8),
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.zero,
),
),
child: const Text(
"取消",
style: TextStyle(color: Colors.black, fontSize: 18),
),
),
],
),
);

@ -5,38 +5,34 @@ import 'package:music_player_miao/view/user/user_view.dart';
import '../home_view.dart';
import '../release_view.dart';
class MainTabView extends StatefulWidget {
const MainTabView({super.key});
@override
State<MainTabView> createState() => _MainTabViewState();
}
class _MainTabViewState extends State<MainTabView> with SingleTickerProviderStateMixin{
class _MainTabViewState extends State<MainTabView> with SingleTickerProviderStateMixin {
TabController? controller;
int selectTab = 0;
final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>();
@override
void initState() {
// TODO: implement initState
super.initState();
controller = TabController(length: 4, vsync: this);
controller?.addListener(() {
selectTab = controller?.index ?? 0;
setState(() {
});
setState(() {});
});
}
@override
void dispose() {
// TODO: implement dispose
super.dispose();
controller?.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
@ -51,55 +47,55 @@ class _MainTabViewState extends State<MainTabView> with SingleTickerProviderStat
UserView()
],
),
bottomNavigationBar: BottomAppBar(
bottomNavigationBar: Container(
color: Colors.white,
elevation: 0,
child: TabBar(
controller: controller,
indicatorColor: Colors.transparent,
indicatorWeight: 3,
labelColor: Colors.black,
labelStyle: const TextStyle(
fontSize: 12
),
labelStyle: const TextStyle(fontSize: 12), //
unselectedLabelColor: const Color(0xffCDCDCD),
unselectedLabelStyle: const TextStyle(
fontSize: 12
),
unselectedLabelStyle: const TextStyle(fontSize: 12), //
tabs: [
Tab(
text:
"首页",
icon:Image.asset(
selectTab == 0?"assets/img/home_tab.png":"assets/img/home_tab_un.png",
width: 45,height: 45,),
height: 60, //
icon: Image.asset(
selectTab == 0 ? "assets/img/home_tab.png" : "assets/img/home_tab_un.png",
width: 32, //
height: 32,
),
text: "首页",
),
Tab(
text:
"排行榜",
icon:Image.asset(
selectTab == 1?"assets/img/list_tab.png":"assets/img/list_tab_un.png",
width: 45,height: 45,),
height: 60,
icon: Image.asset(
selectTab == 1 ? "assets/img/list_tab.png" : "assets/img/list_tab_un.png",
width: 32,
height: 32,
),
text: "排行榜",
),
Tab(
text:
"发布",
icon:Image.asset(selectTab == 2?"assets/img/music_tab.png":"assets/img/music_tab_un.png",
width: 45,height: 45,),
height: 60,
icon: Image.asset(
selectTab == 2 ? "assets/img/music_tab.png" : "assets/img/music_tab_un.png",
width: 32,
height: 32,
),
text: "发布",
),
Tab(
text:
"个人",
icon:Image.asset(selectTab == 3?"assets/img/user_tab.png":"assets/img/user_tab_un.png",
width: 45,height: 45,),
height: 60,
icon: Image.asset(
selectTab == 3 ? "assets/img/user_tab.png" : "assets/img/user_tab_un.png",
width: 32,
height: 32,
),
text: "个人",
),
],
),
),
);
}
}
}

@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:music_player_miao/common_widget/app_data.dart';
import '../api/api_music_rank.dart';
import '../common_widget/rank_song_row.dart';
import '../common/download_manager.dart';
import '../models/getRank_bean.dart';
import '../view_model/rank_view_model.dart';
import 'music_view.dart';
@ -23,6 +23,8 @@ class _RankViewState extends State<RankView> {
List rankMusicPath = [];
List<Song> songs = [];
final downloadManager = Get.put(DownloadManager());
void initState() {
super.initState();
_fetchSonglistData();
@ -158,8 +160,16 @@ class _RankViewState extends State<RankView> {
context,
MaterialPageRoute(
builder: (context) => MusicView(
song: songs[index],
songList: songs,
initialSongIndex: index,
onSongStatusChanged: (index, isCollected, isLiked) {
setState(() {
//
songs[index].collection = isCollected;
songs[index].likes = isLiked;
downloadManager.updateSongInfo(songs[index].id, isCollected, isLiked);
});
},
),
),
);
@ -228,7 +238,7 @@ class _RankViewState extends State<RankView> {
),
),
const SizedBox(
width: 20,
width: 18,
),
],
),
@ -273,7 +283,7 @@ class _RankViewState extends State<RankView> {
backgroundColor: Colors.white,
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(30))),
builder: (context) =>Container(
height: 210,
height: 150,
padding: const EdgeInsets.only(top: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
@ -333,49 +343,6 @@ class _RankViewState extends State<RankView> {
),
],
),
const SizedBox(height: 10,),
ElevatedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => MusicView(
song: songs[index],
initialSongIndex: index,
),
),
);
},
child: Text(
"查看详情页",
style: const TextStyle(color:Colors.black,fontSize: 18),
),
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xffE6F4F1),
padding: const EdgeInsets.symmetric(vertical: 8),
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.zero,
),
),
),
ElevatedButton(
onPressed: () =>Navigator.pop(context),
child: Text(
"取消",
style: const TextStyle(color:Colors.black,fontSize: 18),
),
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xff429482),
padding: const EdgeInsets.symmetric(vertical: 8),
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.zero,
),
),
),
],
),
)

@ -446,7 +446,7 @@ class _MyDownloadViewState extends State<MyDownloadView> {
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(top: Radius.circular(30))),
builder: (context) => Container(
height: 180,
height: 150,
padding: const EdgeInsets.only(top: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
@ -499,24 +499,6 @@ class _MyDownloadViewState extends State<MyDownloadView> {
),
],
),
const SizedBox(
height: 22,
),
ElevatedButton(
onPressed: () => Navigator.pop(context),
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xff429482),
padding: const EdgeInsets.symmetric(vertical: 8),
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.zero,
),
),
child: const Text(
"取消",
style: TextStyle(color: Colors.black, fontSize: 18),
),
),
],
),
));

Loading…
Cancel
Save