summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2023-06-03 23:58:22 -0600
committerIván Ávalos <avalos@disroot.org>2023-06-03 23:58:22 -0600
commitedfff3f7f95d9e35b6dda420ed8e237fc140f6c4 (patch)
treea9024f203bb367c3b045c2d10bf466e6c9038868
parent5430898e02afc95c24a3caf6a91bb82e71b6ab33 (diff)
downloadpmsna1-edfff3f7f95d9e35b6dda420ed8e237fc140f6c4.tar.gz
pmsna1-edfff3f7f95d9e35b6dda420ed8e237fc140f6c4.tar.bz2
pmsna1-edfff3f7f95d9e35b6dda420ed8e237fc140f6c4.zip
Color fixes in popular moviesmain
-rw-r--r--lib/screens/popular_detail_screen.dart47
-rw-r--r--lib/widgets/popular_item.dart14
2 files changed, 47 insertions, 14 deletions
diff --git a/lib/screens/popular_detail_screen.dart b/lib/screens/popular_detail_screen.dart
index 16f7811..857fce4 100644
--- a/lib/screens/popular_detail_screen.dart
+++ b/lib/screens/popular_detail_screen.dart
@@ -50,6 +50,7 @@ class _PopularDetailScreenState extends State<PopularDetailScreen> {
body: NestedScrollView(
headerSliverBuilder: (context, innerBoxIsScrolled) => <Widget>[
SliverAppBar(
+ backgroundColor: Theme.of(context).colorScheme.primary,
expandedHeight: 200.0,
pinned: true,
actions: [
@@ -58,8 +59,9 @@ class _PopularDetailScreenState extends State<PopularDetailScreen> {
builder: (context, snapshot) {
if (snapshot.hasData) {
return snapshot.data == true
- ? IconButton(
- icon: const Icon(Icons.favorite),
+ ? IconButton.filled(
+ icon: Icon(Icons.favorite,
+ color: Theme.of(context).colorScheme.onPrimary),
onPressed: () {
_db.unfavoritePopular(popular).whenComplete(() {
setState(() {});
@@ -161,8 +163,13 @@ class Synopsis extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
- 'Sinopsis',
- style: Theme.of(context).typography.englishLike.titleLarge,
+ 'Sinópsis',
+ style: Theme.of(context)
+ .typography
+ .englishLike
+ .titleLarge
+ ?.copyWith(
+ color: Theme.of(context).colorScheme.onBackground),
),
const SizedBox(height: 10),
Text(popular.overview ?? ""),
@@ -191,7 +198,11 @@ class Rating extends StatelessWidget {
children: [
Text(
'Rating',
- style: Theme.of(context).typography.englishLike.headlineLarge,
+ style: Theme.of(context)
+ .typography
+ .englishLike
+ .headlineLarge
+ ?.copyWith(color: Theme.of(context).colorScheme.onBackground),
),
const SizedBox(height: 16),
Row(
@@ -254,7 +265,11 @@ class _TrailersState extends State<Trailers> {
padding: const EdgeInsets.fromLTRB(16, 16, 16, 0),
child: Text(
'Trailers',
- style: Theme.of(context).typography.englishLike.headlineLarge,
+ style: Theme.of(context)
+ .typography
+ .englishLike
+ .headlineLarge
+ ?.copyWith(color: Theme.of(context).colorScheme.onBackground),
),
),
isLoaded
@@ -302,7 +317,11 @@ class _TrailersState extends State<Trailers> {
style: Theme.of(context)
.typography
.englishLike
- .titleMedium,
+ .titleMedium
+ ?.copyWith(
+ color: Theme.of(context)
+ .colorScheme
+ .onBackground),
),
),
],
@@ -331,11 +350,15 @@ class Casting extends StatelessWidget {
padding: const EdgeInsets.fromLTRB(16, 16, 16, 0),
child: Text(
'Reparto',
- style: Theme.of(context).typography.englishLike.headlineLarge,
+ style: Theme.of(context)
+ .typography
+ .englishLike
+ .headlineLarge
+ ?.copyWith(color: Theme.of(context).colorScheme.onBackground),
),
),
SizedBox(
- height: 350.0,
+ height: 300.0,
child: InfiniteCarousel.builder(
axisDirection: Axis.horizontal,
velocityFactor: 0.5,
@@ -367,7 +390,11 @@ class Casting extends StatelessWidget {
style: Theme.of(context)
.typography
.englishLike
- .titleMedium,
+ .titleMedium
+ ?.copyWith(
+ color: Theme.of(context)
+ .colorScheme
+ .onBackground),
),
Text('como «${credit.character ?? ""}»'),
],
diff --git a/lib/widgets/popular_item.dart b/lib/widgets/popular_item.dart
index 3ef32cd..1cc08bd 100644
--- a/lib/widgets/popular_item.dart
+++ b/lib/widgets/popular_item.dart
@@ -32,12 +32,18 @@ class PopularItem extends StatelessWidget {
),
),
popular.hasFavorite
- ? IconButton(
- icon: const Icon(Icons.favorite),
+ ? IconButton.filled(
+ icon: Icon(
+ Icons.favorite,
+ color: Theme.of(context).colorScheme.onPrimary,
+ ),
onPressed: () => onFavorited(!popular.hasFavorite),
)
- : IconButton(
- icon: const Icon(Icons.favorite_outline),
+ : IconButton.filled(
+ icon: Icon(
+ Icons.favorite_outline,
+ color: Theme.of(context).colorScheme.onPrimary,
+ ),
onPressed: () => onFavorited(!popular.hasFavorite),
),
],