Skip to content
Snippets Groups Projects
Commit 2b4385ee authored by Daniel Furaev's avatar Daniel Furaev
Browse files

daniel sachen

parent 716ce677
No related branches found
No related tags found
No related merge requests found
......@@ -45,8 +45,7 @@ class SearchPage extends State<StateSearcgPage> {
itemCount: songs.length,
itemBuilder: ((context, index) {
Song song = songs[index];
return Card(
return GestureDetector(
child: Padding(
padding: const EdgeInsets.all(10),
child: Row(
......@@ -65,6 +64,9 @@ class SearchPage extends State<StateSearcgPage> {
],
),
),
onTap: () {
// TODO: Abspielen
},
);
})),
)
......@@ -73,14 +75,11 @@ class SearchPage extends State<StateSearcgPage> {
}
updateList(String searchedString) async {
if (searchedString.length >= 3) {
songs = List.empty(growable: true);
var searchList = await spotifyApi.search(searchedString);
for (var element in searchList) {
songs.add(element);
}
} else if (searchedString.isEmpty) {
songs = List.empty(growable: true);
}
}
}
// ignore_for_file: prefer_const_constructors
import 'package:flutter/material.dart';
import '../main.dart';
//Todo Daniel Sidebar
class SettingsDrawer extends StatelessWidget {
const SettingsDrawer({
......@@ -11,11 +12,44 @@ class SettingsDrawer extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Drawer(
backgroundColor: onPrimary,
width: 200,
child: Center(
child: Text("Moin",
style: TextStyle(fontSize: 30, color: onPrimaryContainer)),
child: ListView(
padding: EdgeInsets.zero,
children: [
UserAccountsDrawerHeader(
accountName: Text('Name'),
accountEmail: Text("Email"),
currentAccountPicture: CircleAvatar(
child: ClipOval(
child: Image.network(
"https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxzZWFyY2h8Mnx8cGVyc29ufGVufDB8fDB8fA%3D%3D&w=1000&q=80",
width: 90,
height: 90,
fit: BoxFit.cover,
)),
),
decoration: BoxDecoration(
color: Colors.blue,
image: DecorationImage(
image: NetworkImage(
'https://www.geeklawblog.com/wp-content/uploads/sites/528/2018/12/liprofile.png'),
fit: BoxFit.cover,
)),
),
ListTile(
leading: Icon(Icons.favorite),
title: Text('Favoriten'),
onTap: () {
//TODO: Site to Favorite
},
),
ListTile(
leading: Icon(Icons.exit_to_app),
title: Text('Abmelden'),
onTap: () {
//TODO: Abmelden
},
)
],
),
);
}
......@@ -25,9 +59,7 @@ class Topbar extends StatelessWidget implements PreferredSizeWidget {
final Text title;
final double height = 50;
const Topbar({Key? key, this.title = const Text("Navbar")})
: super(key: key);
const Topbar({Key? key, this.title = const Text("Navbar")}) : super(key: key);
@override
Widget build(BuildContext context) {
......@@ -37,8 +69,7 @@ class Topbar extends StatelessWidget implements PreferredSizeWidget {
title: title,
actions: [
Builder(
builder: (BuildContext context) =>
IconButton(
builder: (BuildContext context) => IconButton(
icon: const Icon(Icons.settings_outlined),
onPressed: () => Scaffold.of(context).openEndDrawer(),
))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment