From 476660bf3e3201cd6008473719714274ca4611ac Mon Sep 17 00:00:00 2001 From: Herwig Birke Date: Fri, 3 May 2024 12:29:17 +0200 Subject: [PATCH] set web renderer --- lib/data/tvshows.dart | 4 +- lib/widgets/movies/details/detailsScreen.dart | 4 +- .../tvshows/details/detailsScreen.dart | 4 +- web/index.html | 96 ++++++++++--------- 4 files changed, 57 insertions(+), 51 deletions(-) diff --git a/lib/data/tvshows.dart b/lib/data/tvshows.dart index 2a7339a..ff410f3 100644 --- a/lib/data/tvshows.dart +++ b/lib/data/tvshows.dart @@ -152,7 +152,9 @@ class TVShow { download: json['download'], overview: '', backdropPath: '', - seasonStatus: [], + seasonStatus: json['seasons'] + .map((json) => Season.fromJson(json)) + .toList(), languages: '', networks: '', originCountries: '', diff --git a/lib/widgets/movies/details/detailsScreen.dart b/lib/widgets/movies/details/detailsScreen.dart index 96fe0f5..7286a82 100644 --- a/lib/widgets/movies/details/detailsScreen.dart +++ b/lib/widgets/movies/details/detailsScreen.dart @@ -323,10 +323,10 @@ class MovieDetailsScreen extends StatelessWidget { return Stack(children: [ Container( decoration: BoxDecoration( - image: DecorationImage( + image: movieDetails.backdropPath.isNotEmpty ? DecorationImage( image: NetworkImage(url), fit: BoxFit.cover, - ), + ) : null, ), ), SingleChildScrollView( diff --git a/lib/widgets/tvshows/details/detailsScreen.dart b/lib/widgets/tvshows/details/detailsScreen.dart index 4a9f862..b6ceca1 100644 --- a/lib/widgets/tvshows/details/detailsScreen.dart +++ b/lib/widgets/tvshows/details/detailsScreen.dart @@ -342,10 +342,10 @@ class TVShowDetailsScreen extends StatelessWidget { return Stack(children: [ Container( decoration: BoxDecoration( - image: DecorationImage( + image: tvShowDetails.backdropPath.isNotEmpty ? DecorationImage( image: NetworkImage(url), fit: BoxFit.cover, - ), + ) : null, ), ), SingleChildScrollView( diff --git a/web/index.html b/web/index.html index 8dfd7fb..ff9fdf6 100644 --- a/web/index.html +++ b/web/index.html @@ -1,63 +1,67 @@ - - + This is a placeholder for base href that will be replaced by the value of + the `--base-href` argument provided to `flutter build`. + --> + - - - + + + - - - - - + + + + + - - + + - multimedia - + multimedia + - - - - - + + + - +