|
|
|
@ -261,71 +261,7 @@ class _UserViewState extends State<UserView> {
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Get.to(const MyMusicView());
|
|
|
|
|
},
|
|
|
|
|
child: Column(
|
|
|
|
|
children: List.generate(playlistNames.length, (index) {
|
|
|
|
|
return Dismissible(
|
|
|
|
|
key: Key(playlistNames[index]),
|
|
|
|
|
direction: DismissDirection.endToStart,
|
|
|
|
|
background: Container(
|
|
|
|
|
color: Colors.red,
|
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
|
padding: const EdgeInsets.only(right: 20.0),
|
|
|
|
|
child: const Icon(
|
|
|
|
|
Icons.delete,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
confirmDismiss: (direction) async {
|
|
|
|
|
return await _showDeleteConfirmationDialog(
|
|
|
|
|
context, index);
|
|
|
|
|
},
|
|
|
|
|
onDismissed: (direction) {
|
|
|
|
|
setState(() {
|
|
|
|
|
playlistNames.removeAt(index);
|
|
|
|
|
playlistid.removeAt(index);
|
|
|
|
|
playlistCount--;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: ListTile(
|
|
|
|
|
title: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Image.asset("assets/img/artist_pic.png"),
|
|
|
|
|
const SizedBox(
|
|
|
|
|
width: 30,
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Text(
|
|
|
|
|
playlistNames[index],
|
|
|
|
|
style: const TextStyle(fontSize: 18),
|
|
|
|
|
),
|
|
|
|
|
const Text(
|
|
|
|
|
'0首',
|
|
|
|
|
style: TextStyle(fontSize: 18),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Image.asset(
|
|
|
|
|
"assets/img/user_next.png",
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
const SizedBox(
|
|
|
|
|
height: 20,
|
|
|
|
|
),
|
|
|
|
@ -482,13 +418,15 @@ class _UserViewState extends State<UserView> {
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
String enteredSongName = _controller.text;
|
|
|
|
|
playlistCount++;
|
|
|
|
|
//playlistCount++;
|
|
|
|
|
// Add the new playlist
|
|
|
|
|
setState(() {
|
|
|
|
|
playlistNames.add(enteredSongName);
|
|
|
|
|
//playlistNames.add(enteredSongName);
|
|
|
|
|
_fetchSonglistData();
|
|
|
|
|
});
|
|
|
|
|
// songlistName: _controller.text,
|
|
|
|
|
SonglistBean bean = await SonglistApi().addSonglist(
|
|
|
|
|
songlistName: _controller.text,
|
|
|
|
|
songlistName: enteredSongName,
|
|
|
|
|
Authorization: AppData().currentToken);
|
|
|
|
|
},
|
|
|
|
|
style: TextButton.styleFrom(
|
|
|
|
|