YuYouShui_Branch
黎超凡 2 years ago
parent 747b8f98a2
commit 97d7ac7776

@ -24,10 +24,11 @@ void main() async{
// //
await database.insert('CollectionInfo', { await database.insert('CollectionInfo', {
'CollectionID': 0, 'CollectionID': 4,
'MuseumName': '博物馆名称', 'MuseumName': '天津市博物馆',
'CollectionName': '示例藏品', 'CollectionName': '嬴霝德壶',
'CollectionDetail': '这是示例藏品的详细描述', 'CollectionDetail':'西周 一级\n'
'高44.6厘米 口径14.5厘米\n',
}); });
await database.close(); await database.close();

@ -1,29 +1,26 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class MuseumInfoExtendPage extends StatelessWidget { class MuseumInfoExtendPage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: Text('天津博物馆'), title: Text('天津博物馆'),
backgroundColor: Colors.green backgroundColor: Colors.green,
), ),
body: Center( body: Center(
child: Text( child: Padding(
'天津博物馆(天津美术馆、李叔同故居纪念\n' padding: const EdgeInsets.all(16.0), //
'位于天津市河西区平江道62号是展示\n' child: Text(
'中国古代艺术及天津城市发展历史的大型艺\n' ' 天津博物馆的馆藏特色是中国历代艺术品和近现代历史文献、地方史料并重截至2019年末'
'术历史类综合性博物,是天津地区最大的集\n' '有古代青铜器、陶瓷器、书法、绘画、玉器、玺印、文房用具、甲骨、'
'收藏、保护、研究、陈列、教育为一体的大\n' '货币、邮票、敦煌遗书、竹木牙角器、地方民间工艺及近代历史文献等各类藏品近20万件'
'型公益性文化机构和对外文化交流的窗口。\n' '图书资料20万册 珍贵文物137909件/套。\n'
'天津博物馆的前身可追溯至民国七年1918\n' ' 2008年天津博物馆被评为国家一级博物馆是全国青少年爱国主义教育基地。'
'6月1日正式成立了天津博物院2004\n' '2018年10月11日天津博物馆入选“全国中小学生研学实践教育基地”名单。',
'年由原天津市艺术博物馆和天津市历史博物\n' style: TextStyle(
'馆合并组建2007年底天津博物馆旧馆对\n' fontSize: 18,
'外免费开放2008年天津博物馆新馆开工\n' ),
'建设2012年5月天津博物馆新馆建成对\n'
'外开放。\n',
style: TextStyle(//
fontSize: 18,
), ),
), ),
), ),

@ -42,20 +42,75 @@ class _MuseumInfoPageState extends State<MuseumInfoPage> {
children: [ children: [
// //
AutoImageSlider(), AutoImageSlider(),
_buildCustomButton('查看博物馆信息', 45, 10, () { Padding(
Navigator.of(context).push( padding: const EdgeInsets.all(16.0),
MaterialPageRoute( child: Align(
builder: (context) => MuseumInfoExtendPage(), alignment: Alignment.centerLeft, //
child: InkWell(
onTap: () {
// MuseumInfoExtendPage
Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => MuseumInfoExtendPage(),
),
);
},
child: Text(
' 天津博物馆位于天津市河西区平江道62号'
'是展示中国古代艺术及天津城市发展历史的大型艺术历史类综合性博物,'
'是天津地区最大的集收藏、保护、研究、陈列、教育为一体的大型公益性文化机构和对外文化交流的窗口。\n'
' 天津博物馆的前身可追溯至民国七年1918年6月1日正式成立了天津博物院'
'2004年由原天津市艺术博物馆和天津市历史博物馆合并组建2007年底天津博物馆旧馆对外免费开放'
'2008年天津博物馆新馆开工建设'
'2012年5月天津博物馆新馆建成对外开放。',
style: TextStyle(
fontSize: 16,
color: Colors.black, //
),
textAlign: TextAlign.left,
),
), ),
); ),
}), ),
_buildCustomButton('查看馆藏信息', 45, 20, () { Row(
Navigator.of(context).push( mainAxisAlignment: MainAxisAlignment.center, //
MaterialPageRoute( children: [
builder: (context) => CollectionListPage(), SizedBox(width: 20),
InkWell(
onTap: () {
Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => CollectionListPage(),
),
);
},
child: Column(
children: [
Container(
width: 80,
height: 80,
decoration: BoxDecoration(
color: Colors.green,
shape: BoxShape.circle,
),
child: Icon(
Icons.calendar_view_month, //
color: Colors.white,
size: 40,
),
),
Text(
'馆藏信息',
style: TextStyle(
fontSize: 18,
color: Colors.black,
),
),
],
),
), ),
); ],
}), ),
], ],
), ),
), ),
@ -132,30 +187,3 @@ class _AutoImageSliderState extends State<AutoImageSlider> {
); );
} }
} }
//
Widget _buildCustomButton(String buttonText, double height, double verticalOffset, void Function() onPressed) {
return SizedBox(
height: height,
child: Transform.translate(
offset: Offset(0, verticalOffset),
child: ElevatedButton(
onPressed: onPressed,
style: ElevatedButton.styleFrom(
backgroundColor: Colors.green,
padding: const EdgeInsets.symmetric(
horizontal: 12,
vertical: 10,
),
),
child: Text(
buttonText,
style: TextStyle(
color: Colors.white,
fontSize: 18,
),
),
),
),
);
}

Loading…
Cancel
Save