mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-09 19:47:47 +08:00
ui improve
This commit is contained in:
@@ -88,13 +88,13 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||||||
// 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: Text(widget.title),
|
title: Text(widget.title),
|
||||||
),
|
),
|
||||||
body: Center(
|
body: const Center(
|
||||||
// Center is a layout widget. It takes a single child and positions it
|
// Center is a layout widget. It takes a single child and positions it
|
||||||
// in the middle of the parent.
|
// in the middle of the parent.
|
||||||
child: Row(
|
child: Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
NavDrawer(),
|
NavDrawer(),
|
||||||
const SearchPage(),
|
SearchPage(),
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: FloatingActionButton(
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
import 'package:ui/APIs.dart';
|
import 'package:ui/APIs.dart';
|
||||||
@@ -38,26 +37,43 @@ class _SearchPageState extends State<SearchPage> {
|
|||||||
for (final item in list) {
|
for (final item in list) {
|
||||||
var m = item as Map<String, dynamic>;
|
var m = item as Map<String, dynamic>;
|
||||||
cards.add(Card(
|
cards.add(Card(
|
||||||
margin: const EdgeInsets.all(10),
|
margin: const EdgeInsets.all(4),
|
||||||
child: Row(
|
clipBehavior: Clip.hardEdge,
|
||||||
children: <Widget>[
|
child: InkWell(
|
||||||
Flexible(
|
//splashColor: Colors.blue.withAlpha(30),
|
||||||
child: SizedBox(
|
onTap: () {
|
||||||
width: 150,
|
//showDialog(context: context, builder: builder)
|
||||||
height: 200,
|
debugPrint('Card tapped.');
|
||||||
child: Image.network(
|
},
|
||||||
tmdbImgBaseUrl + m["poster_path"],
|
child: Row(
|
||||||
fit: BoxFit.contain,
|
children: <Widget>[
|
||||||
|
Flexible(
|
||||||
|
child: SizedBox(
|
||||||
|
width: 150,
|
||||||
|
height: 200,
|
||||||
|
child: Image.network(
|
||||||
|
tmdbImgBaseUrl + m["poster_path"],
|
||||||
|
fit: BoxFit.contain,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
Flexible(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
m["name"],
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 14, fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
const Text(""),
|
||||||
|
Text(m["overview"])
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
Flexible(
|
)));
|
||||||
child: ListTile(title: Text(m["name"])),
|
|
||||||
),
|
|
||||||
Flexible(child: Text(m["overview"]))
|
|
||||||
],
|
|
||||||
),
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return Expanded(
|
return Expanded(
|
||||||
|
|||||||
Reference in New Issue
Block a user