Skip to content

Commit

Permalink
chore: v0.3.3
Browse files Browse the repository at this point in the history
* updated dependencies and removed unused ones
* added flutter as a submodule for easier f-droid updates
  • Loading branch information
IllusionMan1212 committed Feb 5, 2023
1 parent 3935faf commit 638a12f
Show file tree
Hide file tree
Showing 5 changed files with 168 additions and 190 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "3rdparty/flutter"]
path = 3rdparty/flutter
url = https://github.com/flutter/flutter
1 change: 1 addition & 0 deletions 3rdparty/flutter
Submodule flutter added at b8f539
18 changes: 9 additions & 9 deletions lib/search_result.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ class SearchResult extends StatelessWidget {

final String title;
final String artist;
final String url;
final String artistUrl;
final Uri url;
final Uri artistUrl;
final String thumbnail;
final int id;

SearchResult.fromJson(Map<String, dynamic> json, {Key? key})
: title = json['meta']['title'],
artist = json['meta']['primaryArtist']['name'],
url = json['url'],
artistUrl = json['meta']['primaryArtist']['url'],
url = Uri.parse(json['url']),
artistUrl = Uri.parse(json['meta']['primaryArtist']['url']),
thumbnail = json['resources']['thumbnail'],
id = json['id'],
super(key: key);
Expand All @@ -36,15 +36,15 @@ class SearchResult extends StatelessWidget {
title: "Open Artist Page in Genius",
icon: Icons.library_music,
onTap: () async {
if (!await launch(artistUrl)) {
if (!await launchUrl(artistUrl)) {
throw 'could not launch $artistUrl';
}
}),
OptionItem(
title: "Open Song Page in Genius",
icon: Icons.music_note,
onTap: () async {
if (!await launch(url)) {
if (!await launchUrl(url)) {
throw 'could not launch $url';
}
})
Expand Down Expand Up @@ -78,7 +78,7 @@ class SearchResult extends StatelessWidget {
builder: (context) => LyricsPage(
title: title,
artist: artist,
url: url,
url: url.toString(),
),
),
);
Expand Down Expand Up @@ -113,7 +113,7 @@ class SearchResult extends StatelessWidget {
Text(
title,
style: TextStyle(
color: Theme.of(context).textTheme.bodyText1?.color,
color: Theme.of(context).textTheme.bodyLarge?.color,
fontSize: 18,
fontWeight: FontWeight.bold,
),
Expand All @@ -122,7 +122,7 @@ class SearchResult extends StatelessWidget {
Text(
artist,
style: TextStyle(
color: Theme.of(context).textTheme.subtitle1?.color,
color: Theme.of(context).textTheme.titleMedium?.color,
fontSize: 14,
),
overflow: TextOverflow.ellipsis,
Expand Down
Loading

0 comments on commit 638a12f

Please sign in to comment.