-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
12 changed files
with
169 additions
and
12 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
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
35 changes: 32 additions & 3 deletions
35
lib/src/features/albums/presentation/album_card/album_card_placeholder.dart
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,14 +1,43 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:shimmer/shimmer.dart'; | ||
|
||
/// A widget display placeholder for album | ||
class AlbumCardPlaceholder extends StatelessWidget { | ||
const AlbumCardPlaceholder({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
margin: const EdgeInsets.symmetric(horizontal: 8.0), | ||
child: const Text('Placeholder'), | ||
margin: EdgeInsets.symmetric(horizontal: 8.0), | ||
child: Shimmer.fromColors( | ||
baseColor: Colors.grey.shade300, | ||
highlightColor: Colors.grey.shade100, | ||
child: Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: <Widget>[ | ||
Container( | ||
width: 130, | ||
height: 120, | ||
color: Colors.white, | ||
), | ||
const SizedBox( | ||
height: 6, | ||
), | ||
Container( | ||
width: 130, | ||
height: 8, | ||
color: Colors.white, | ||
), | ||
const SizedBox( | ||
height: 6, | ||
), | ||
Container( | ||
width: 80, | ||
height: 8, | ||
color: Colors.white, | ||
), | ||
], | ||
), | ||
), | ||
); | ||
} | ||
} |
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
36 changes: 32 additions & 4 deletions
36
lib/src/features/songs/presentation/song_card/song_card_placeholder.dart
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
66 changes: 66 additions & 0 deletions
66
lib/src/features/songs/presentation/song_tile/song_tile_placeholder.dart
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,66 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:shimmer/shimmer.dart'; | ||
|
||
class SongTilePlaceholder extends StatelessWidget { | ||
const SongTilePlaceholder({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
margin: const EdgeInsets.symmetric(horizontal: 8.0), | ||
child: Shimmer.fromColors( | ||
baseColor: Colors.grey.shade300, | ||
highlightColor: Colors.grey.shade100, | ||
child: SizedBox( | ||
height: 100, | ||
child: Row( | ||
children: [ | ||
Padding( | ||
padding: const EdgeInsets.all(8.0), | ||
child: Container( | ||
width: 120, | ||
height: 80, | ||
color: Colors.white, | ||
), | ||
), | ||
Expanded( | ||
child: Padding( | ||
padding: const EdgeInsets.all(8.0), | ||
child: Padding( | ||
padding: const EdgeInsets.fromLTRB(0.0, 2.0, 0.0, 2.0), | ||
child: Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
mainAxisAlignment: MainAxisAlignment.start, | ||
children: [ | ||
Container( | ||
width: 100, | ||
height: 16, | ||
color: Colors.white, | ||
), | ||
const SizedBox( | ||
height: 8, | ||
), | ||
Container( | ||
width: 200, | ||
height: 16, | ||
color: Colors.white, | ||
), | ||
const SizedBox( | ||
height: 8, | ||
), | ||
Container( | ||
width: 40, | ||
height: 16, | ||
color: Colors.white, | ||
), | ||
], | ||
), | ||
), | ||
),) | ||
], | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} |
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