-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from harikris001:dev
version update Ui and backend changes
- Loading branch information
Showing
20 changed files
with
310 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,34 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_riverpod/flutter_riverpod.dart'; | ||
import 'package:jam_it/features/home/view/widgets/search_list.dart'; | ||
import 'package:jam_it/features/home/viewmodel/query_viewmodel.dart'; | ||
|
||
class SearchPage extends ConsumerWidget { | ||
const SearchPage({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context, WidgetRef ref) { | ||
final serachController = TextEditingController(); | ||
return Scaffold( | ||
appBar: AppBar( | ||
title: const Text( | ||
"Search", | ||
style: TextStyle(fontSize: 20, fontWeight: FontWeight.w600), | ||
), | ||
centerTitle: true, | ||
), | ||
body: Padding( | ||
padding: const EdgeInsets.symmetric(horizontal: 14.0), | ||
child: Column( | ||
children: [ | ||
TextField( | ||
controller: serachController, | ||
onChanged: (value) => | ||
ref.read(queryNotifierProvider.notifier).updateQuery(value), | ||
), | ||
const SearchList(), | ||
], | ||
), | ||
), | ||
); | ||
} | ||
} | ||
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class AboutInfo extends StatelessWidget { | ||
const AboutInfo({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return AboutDialog( | ||
applicationName: "Jam-It!", | ||
applicationIcon: Image.asset( | ||
"assets/images/appicon.png", | ||
height: 80, | ||
width: 80, | ||
), | ||
applicationVersion: "0.1.3", | ||
applicationLegalese: "© Made by Harikrishna.", | ||
children: const [ | ||
Text("A Crowd source initiative"), | ||
Text( | ||
"Support the project on GitHub", | ||
style: TextStyle(fontWeight: FontWeight.w300), | ||
) | ||
], | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_riverpod/flutter_riverpod.dart'; | ||
import 'package:jam_it/core/providers/current_song_notifier.dart'; | ||
import 'package:jam_it/core/theme/app_pallete.dart'; | ||
import 'package:jam_it/core/widgets/Loader/loader.dart'; | ||
import 'package:jam_it/features/home/viewmodel/home_viewmodel.dart'; | ||
|
||
class SearchList extends ConsumerWidget { | ||
const SearchList({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context, WidgetRef ref) { | ||
return ref.watch(getSearchResultProvider).when( | ||
data: (data) { | ||
return ListView.builder( | ||
shrinkWrap: true, | ||
itemCount: data.length, | ||
itemBuilder: (context, index) { | ||
final song = data[index]; | ||
return ListTile( | ||
onTap: () => ref | ||
.watch(currentSongNotifierProvider.notifier) | ||
.updateSong(song), | ||
leading: CircleAvatar( | ||
backgroundImage: NetworkImage(song.thumbnail_url), | ||
radius: 35, | ||
backgroundColor: Pallete.backgroundColor, | ||
), | ||
title: Text( | ||
song.song_name, | ||
style: const TextStyle( | ||
fontSize: 15, fontWeight: FontWeight.w700), | ||
), | ||
subtitle: Text( | ||
song.artist, | ||
style: const TextStyle( | ||
fontSize: 13, fontWeight: FontWeight.w600), | ||
), | ||
); | ||
}, | ||
); | ||
}, | ||
error: (error, stackTrace) { | ||
return const Center( | ||
child: Text("Some error occured"), | ||
); | ||
}, | ||
loading: () => const Loader(), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import 'package:riverpod_annotation/riverpod_annotation.dart'; | ||
|
||
part 'query_viewmodel.g.dart'; | ||
|
||
@riverpod | ||
class QueryNotifier extends _$QueryNotifier { | ||
@override | ||
String build() { | ||
return ""; | ||
} | ||
|
||
void updateQuery(String query) { | ||
state = query; | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.