add icon
continuous-integration/drone/push Build is passing Details

PROFIL_PAGE_LDE
Lucas Delanier 2 years ago
parent 95c90cc25a
commit 6ffe34bd4f

@ -1,8 +1,6 @@
import 'dart:io';
import 'package:animated_appear/animated_appear.dart';
import 'package:auto_size_text/auto_size_text.dart';
import 'package:circular_reveal_animation/circular_reveal_animation.dart';
import 'package:flutter/Material.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/services.dart';
@ -143,8 +141,14 @@ class _EditablePostComponentState extends State<EditablePostComponent> with Tick
// implement image
child: widget.music == null
? Container(
color: grayColor,
width: double.infinity,
child: Center(
child: Icon(
Icons.headphones,
color: grayColor.withOpacity(0.4),
size: 150,
),
),
)
: Image(
image: NetworkImage(widget.music?.cover ?? ""),

@ -21,6 +21,7 @@ class SearchSongScreen extends StatefulWidget {
class _SearchSongScreenState extends State<SearchSongScreen> {
final ScrollController _scrollController = ScrollController();
final TextEditingController _textEditingController = TextEditingController();
int? playingIndex;
Future<void> resetFullScreen() async {
@ -32,9 +33,18 @@ class _SearchSongScreenState extends State<SearchSongScreen> {
@override
void initState() {
super.initState();
fetchTrendingMusic();
_scrollController.addListener(_scrollListener);
}
Future<void> fetchTrendingMusic() async {
await MyApp.musicViewModel.getMusicsWithPlaylistId('37i9dQZF1DX1X23oiQRTB5').then((value) {
setState(() {
filteredData = value;
});
});
}
Future<void> _scrollListener() async {
if (_scrollController.position.pixels == _scrollController.position.maxScrollExtent) {
filteredData.addAll(await MyApp.musicViewModel
@ -120,8 +130,7 @@ class _SearchSongScreenState extends State<SearchSongScreen> {
onEditingComplete: resetFullScreen,
onSubmitted: (value) async {
if (_textEditingController.text.isEmpty) {
} else if (value == " ") {
print("popular");
fetchTrendingMusic();
} else {
filteredData = await MyApp.musicViewModel.getMusicsWithNameOrArtistName(value);
setState(() {

Loading…
Cancel
Save