mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-08 19:17:53 +08:00
feat: download tmdb img & change name_cn
This commit is contained in:
@@ -12,14 +12,11 @@ import 'package:ui/tv_details.dart';
|
||||
import 'package:ui/weclome.dart';
|
||||
|
||||
void main() {
|
||||
runApp(MyApp());
|
||||
runApp(const MyApp());
|
||||
}
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
final GlobalKey<NavigatorState> _rootNavigatorKey =
|
||||
GlobalKey<NavigatorState>();
|
||||
|
||||
MyApp({super.key});
|
||||
const MyApp({super.key});
|
||||
|
||||
// This widget is the root of your application.
|
||||
@override
|
||||
|
||||
@@ -21,6 +21,7 @@ class APIs {
|
||||
static final loginUrl = "$_baseUrl/api/login";
|
||||
static final loginSettingUrl = "$_baseUrl/api/v1/setting/auth";
|
||||
static final activityUrl = "$_baseUrl/api/v1/activity/";
|
||||
static final imagesUrl = "$_baseUrl/api/v1/img";
|
||||
|
||||
static const tmdbImgBaseUrl = "https://image.tmdb.org/t/p/w500/";
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:ui/providers/APIs.dart';
|
||||
import 'package:ui/providers/server_response.dart';
|
||||
@@ -74,7 +73,7 @@ class SeriesDetails {
|
||||
SeriesDetails.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
tmdbId = json['tmdb_id'];
|
||||
name = json['name'];
|
||||
name = json['name_cn'];
|
||||
originalName = json['original_name'];
|
||||
overview = json['overview'];
|
||||
path = json['path'];
|
||||
|
||||
@@ -133,7 +133,7 @@ class TvSeries {
|
||||
TvSeries.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
tmdbId = json['tmdb_id'];
|
||||
name = json['name'];
|
||||
name = json['name_cn'];
|
||||
originalName = json['original_name'];
|
||||
overview = json['overview'];
|
||||
path = json['path'];
|
||||
|
||||
@@ -110,7 +110,7 @@ class _TvDetailsPageState extends ConsumerState<TvDetailsPage> {
|
||||
width: 150,
|
||||
height: 200,
|
||||
child: Image.network(
|
||||
APIs.tmdbImgBaseUrl + details!.posterPath!,
|
||||
"${APIs.imagesUrl}/${details.id}/poster.jpg",
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -36,7 +36,7 @@ class WelcomePage extends ConsumerWidget {
|
||||
children: <Widget>[
|
||||
Flexible(
|
||||
child: Image.network(
|
||||
APIs.tmdbImgBaseUrl + item.posterPath!,
|
||||
"${APIs.imagesUrl}/${item.id}/poster.jpg" ,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user