mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-09 03:27:39 +08:00
fix bug and add icon
This commit is contained in:
@@ -36,7 +36,7 @@ class MyApp extends StatelessWidget {
|
|||||||
// the App.build method, and use it to set our appbar title.
|
// the App.build method, and use it to set our appbar title.
|
||||||
title: Row(
|
title: Row(
|
||||||
children: [
|
children: [
|
||||||
const Text("Polaris 追剧"),
|
const Text("Polaris"),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
width: 100,
|
width: 100,
|
||||||
),
|
),
|
||||||
@@ -129,7 +129,7 @@ class MyApp extends StatelessWidget {
|
|||||||
|
|
||||||
return ProviderScope(
|
return ProviderScope(
|
||||||
child: MaterialApp.router(
|
child: MaterialApp.router(
|
||||||
title: 'Polaris',
|
title: 'Polaris 电影电视剧追踪',
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
// Define the default TextTheme. Use this to specify the default
|
// Define the default TextTheme. Use this to specify the default
|
||||||
// text styling for headlines, titles, bodies of text, and more.
|
// text styling for headlines, titles, bodies of text, and more.
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class _SearchPageState extends ConsumerState<SearchPage> {
|
|||||||
width: 150,
|
width: 150,
|
||||||
height: 200,
|
height: 200,
|
||||||
child: Image.network(
|
child: Image.network(
|
||||||
APIs.tmdbImgBaseUrl + item.posterPath!,
|
"${APIs.tmdbImgBaseUrl}${item.posterPath}",
|
||||||
fit: BoxFit.contain,
|
fit: BoxFit.contain,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -53,13 +53,20 @@ class _SearchPageState extends ConsumerState<SearchPage> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Row(
|
||||||
"${item.name} (${item.firstAirDate?.year})",
|
children: [
|
||||||
style: const TextStyle(
|
Text(
|
||||||
fontSize: 14, fontWeight: FontWeight.bold),
|
"${item.name} (${item.firstAirDate?.year})",
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 10,),
|
||||||
|
item.mediaType == "tv" ? const Icon(Icons.live_tv): const Icon(Icons.movie)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
const Text(""),
|
const Text(""),
|
||||||
Text(item.overview!)
|
Text("${item.overview}")
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -173,8 +180,8 @@ class _SearchPageState extends ConsumerState<SearchPage> {
|
|||||||
print(_storageSelected);
|
print(_storageSelected);
|
||||||
ref
|
ref
|
||||||
.read(searchPageDataProvider.notifier)
|
.read(searchPageDataProvider.notifier)
|
||||||
.submit2Watchlist(
|
.submit2Watchlist(item.id!, _storageSelected,
|
||||||
item.id!, _storageSelected, _resSelected, item.mediaType!);
|
_resSelected, item.mediaType!);
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user