You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
1.9 KiB

11 months ago
import 'package:flutter/widgets.dart';
import 'package:get/get.dart';
class HomeViewModel extends GetxController {
void removeSong(int index) {
listDetailArr.removeAt(index);
}
final txtSearch = TextEditingController().obs;
final all =['你好'];
final songsArr = [
{
"image": "assets/img/song_cover1.png",
"name": "晴天",
"artists": "周杰伦"
11 months ago
},
{
"image": "assets/img/song_cover2.png",
"name": "光年之外",
"artists": "邓紫棋"
11 months ago
},
{
"image": "assets/img/song_cover3.png",
"name": "起风了",
"artists": "买辣椒也用券"
11 months ago
},
].obs;
final listArr = [
{
"image": "assets/img/list_pic1.png",
"text": "流行音乐精选",
11 months ago
},
{
"image": "assets/img/list_pic2.png",
"text": "经典老歌回忆",
11 months ago
},
{
"image": "assets/img/list_pic3.png",
"text": "摇滚音乐精选",
11 months ago
},
{
"image": "assets/img/list_pic4.png",
"text": "轻音乐放松",
11 months ago
},
].obs;
final listDetailArr = [
{
"rank": "1",
"name": "背对背拥抱",
"artists": ""
},
{
"rank": "2",
"name": "背对背拥抱",
"artists": "林俊杰"
},
{
"rank": "3",
"name": "背对背拥抱r",
"artists": "林俊杰"
},
{
"rank": "4",
"name": "背对背拥抱",
"artists": "林俊杰"
},
{
"rank": "5",
"name": "背对背拥抱",
"artists": "林俊杰"
},
{
"rank": "6",
"name": "背对背拥抱",
"artists": "林俊杰"
},
{
"rank": "7",
"name": "背对背拥抱",
"artists": "林俊杰"
},
{
"rank": "8",
"name": "背对背拥抱",
"artists": "林俊杰"
},
{
"rank": "9",
"name": "背对背拥抱",
"artists": "林俊杰"
},
].obs;
}