-
-
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.
Separate logic song detail screen pv and without pv
- Loading branch information
Showing
7 changed files
with
310 additions
and
201 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
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
46 changes: 46 additions & 0 deletions
46
lib/src/features/songs/presentation/song_detail_screen/widgets/song_detail_with_pv.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,46 @@ | ||
|
||
import 'package:flutter/material.dart'; | ||
import 'package:vocadb_app/src/features/songs/domain/song.dart'; | ||
import 'package:vocadb_app/src/features/songs/presentation/song_detail_screen/widgets/song_detail_albums_section.dart'; | ||
import 'package:vocadb_app/src/features/songs/presentation/song_detail_screen/widgets/song_detail_artists_section.dart'; | ||
import 'package:vocadb_app/src/features/songs/presentation/song_detail_screen/widgets/song_detail_button_bar.dart'; | ||
import 'package:vocadb_app/src/features/songs/presentation/song_detail_screen/widgets/song_detail_derived_section.dart'; | ||
import 'package:vocadb_app/src/features/songs/presentation/song_detail_screen/widgets/song_detail_info_section.dart'; | ||
import 'package:vocadb_app/src/features/songs/presentation/song_detail_screen/widgets/song_detail_pv_player.dart'; | ||
import 'package:vocadb_app/src/features/songs/presentation/song_detail_screen/widgets/song_detail_pvs_section.dart'; | ||
import 'package:vocadb_app/src/features/songs/presentation/song_detail_screen/widgets/song_detail_related_section.dart'; | ||
import 'package:vocadb_app/src/features/songs/presentation/song_detail_screen/widgets/song_detail_tags_section.dart'; | ||
import 'package:vocadb_app/src/features/songs/presentation/song_detail_screen/widgets/song_detail_web_links_section.dart'; | ||
|
||
class SongDetailWithPV extends StatelessWidget { | ||
final Song song; | ||
|
||
final Widget? pvPlayerWidget; | ||
|
||
final VoidCallback? onTapLyricButton; | ||
|
||
const SongDetailWithPV({super.key, required this.song, this.pvPlayerWidget, this.onTapLyricButton}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Column(children: [ | ||
pvPlayerWidget ?? SongDetailPVPlayer(song: song), | ||
Expanded( | ||
child: ListView( | ||
children: [ | ||
SongDetailButtonBar(song: song, onTapLyricButton: onTapLyricButton), | ||
SongDetailInfoSection(song: song), | ||
SongDetailTagsSection(song: song), | ||
SongDetailArtistsSection(song: song), | ||
SongDetailPVsSection(song: song), | ||
SongDetailAlbumsSection(song: song), | ||
SongDetailDerivedSongsSection(song: song), | ||
SongDetailRelatedSection(song: song), | ||
SongDetailWebLinksSection(song: song), | ||
], | ||
), | ||
), | ||
]); | ||
} | ||
} | ||
|
45 changes: 45 additions & 0 deletions
45
lib/src/features/songs/presentation/song_detail_screen/widgets/song_detail_without_pv.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,45 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:vocadb_app/src/features/songs/domain/song.dart'; | ||
import 'package:vocadb_app/src/features/songs/presentation/song_detail_screen/widgets/song_detail_albums_section.dart'; | ||
import 'package:vocadb_app/src/features/songs/presentation/song_detail_screen/widgets/song_detail_artists_section.dart'; | ||
import 'package:vocadb_app/src/features/songs/presentation/song_detail_screen/widgets/song_detail_button_bar.dart'; | ||
import 'package:vocadb_app/src/features/songs/presentation/song_detail_screen/widgets/song_detail_derived_section.dart'; | ||
import 'package:vocadb_app/src/features/songs/presentation/song_detail_screen/widgets/song_detail_info_section.dart'; | ||
import 'package:vocadb_app/src/features/songs/presentation/song_detail_screen/widgets/song_detail_pv_player.dart'; | ||
import 'package:vocadb_app/src/features/songs/presentation/song_detail_screen/widgets/song_detail_pvs_section.dart'; | ||
import 'package:vocadb_app/src/features/songs/presentation/song_detail_screen/widgets/song_detail_related_section.dart'; | ||
import 'package:vocadb_app/src/features/songs/presentation/song_detail_screen/widgets/song_detail_tags_section.dart'; | ||
import 'package:vocadb_app/src/features/songs/presentation/song_detail_screen/widgets/song_detail_web_links_section.dart'; | ||
import 'package:vocadb_app/src/features/songs/presentation/song_detail_screen/widgets/song_hero_image.dart'; | ||
|
||
class SongDetailWithoutPV extends StatelessWidget { | ||
final Song song; | ||
|
||
final VoidCallback? onTapLyricButton; | ||
|
||
const SongDetailWithoutPV({super.key, required this.song, this.onTapLyricButton}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Column(children: [ | ||
SongHeroImage( | ||
imageUrl: song.imageUrl!, | ||
), | ||
Expanded( | ||
child: ListView( | ||
children: [ | ||
SongDetailButtonBar(song: song, onTapLyricButton: onTapLyricButton), | ||
SongDetailInfoSection(song: song), | ||
SongDetailTagsSection(song: song), | ||
SongDetailArtistsSection(song: song), | ||
SongDetailPVsSection(song: song), | ||
SongDetailAlbumsSection(song: song), | ||
SongDetailDerivedSongsSection(song: song), | ||
SongDetailRelatedSection(song: song), | ||
SongDetailWebLinksSection(song: song), | ||
], | ||
), | ||
), | ||
]); | ||
} | ||
} |
Oops, something went wrong.