update album name property to nullable
This commit is contained in:
parent
50d9070995
commit
79df5c21ea
@ -105,7 +105,7 @@ class _MyAppState extends State<MyApp> {
|
|||||||
alignment: Alignment.topLeft,
|
alignment: Alignment.topLeft,
|
||||||
padding: EdgeInsets.only(left: 2.0),
|
padding: EdgeInsets.only(left: 2.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
album.name,
|
album.name ?? "Unnamed Album",
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@ -174,7 +174,7 @@ class AlbumPageState extends State<AlbumPage> {
|
|||||||
icon: Icon(Icons.arrow_back_ios),
|
icon: Icon(Icons.arrow_back_ios),
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
onPressed: () => Navigator.of(context).pop(),
|
||||||
),
|
),
|
||||||
title: Text(widget.album.name),
|
title: Text(widget.album.name ?? "Unnamed Album"),
|
||||||
),
|
),
|
||||||
body: GridView.count(
|
body: GridView.count(
|
||||||
crossAxisCount: 3,
|
crossAxisCount: 3,
|
||||||
|
@ -10,7 +10,7 @@ class Album {
|
|||||||
final MediumType? mediumType;
|
final MediumType? mediumType;
|
||||||
|
|
||||||
/// The name of the album.
|
/// The name of the album.
|
||||||
final String name;
|
final String? name;
|
||||||
|
|
||||||
/// The total number of media in the album.
|
/// The total number of media in the album.
|
||||||
final int count;
|
final int count;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user