-
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.
- Loading branch information
Showing
5 changed files
with
261 additions
and
181 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
class Album { | ||
String cover = 'assets/default.png'; | ||
|
||
String name = "album"; | ||
String artist = "artist"; | ||
String genre = "genre"; | ||
double averageRating = 5.0; | ||
|
||
Album( | ||
{required this.cover, | ||
required this.name, | ||
required this.artist, | ||
required this.genre, | ||
required this.averageRating}); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
abstract class DisplayAlbum extends StatelessWidget { | ||
const DisplayAlbum({super.key}); | ||
|
||
bool dateIsToday(DateTime date) { | ||
DateTime timeNow = DateTime.now(); | ||
return ((date.year == timeNow.year) && | ||
(date.month == timeNow.month) && | ||
(date.day == timeNow.day)); | ||
} | ||
|
||
bool dateIsYesterday(DateTime date) { | ||
DateTime timeNow = DateTime.now(); | ||
return ((date.year == timeNow.year) && | ||
(date.month == timeNow.month) && | ||
(date.day == (timeNow.day - 1))); | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) => displayAlbum(context); | ||
|
||
Widget displayAlbum(BuildContext context); | ||
} |
Oops, something went wrong.