poem_detail.dart
1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:one_poem/res/gaps.dart';
import 'package:one_poem/util/theme_utils.dart';
import 'package:one_poem/util/toast_utils.dart';
import 'package:one_poem/widgets/load_image.dart';
import 'package:one_poem/widgets/my_app_bar.dart';
class PoemDetailPage extends StatefulWidget {
const PoemDetailPage({
Key? key,
this.onPop,
required this.poemId,
}) : super(key: key);
final int poemId;
final Function? onPop;
@override
_PoemDetailPageState createState() => _PoemDetailPageState();
}
class _PoemDetailPageState extends State<PoemDetailPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
// extendBodyBehindAppBar: true,// appbar背景透明
appBar: MyAppBar(
isShowButtons: true,
funcLeft: () {
print("xxxxx");
},
),
body: Container(
decoration: const BoxDecoration(
color: Colors.black,
image: DecorationImage(
image: AssetImage("assets/images/poem/poem_background.png"),
fit: BoxFit.fill,
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: const [
Text("题破山寺后禅院"),
Gaps.vGap24,
Text("常建"),
Text("清晨入古寺,初日照高林。"),
Text("竹径通幽处,禅房花木深。"),
Text("山光悦鸟性,潭影空人心。"),
Text("万籁此都寂,但余钟磬音。"),
Gaps.vGap24,
Text("100位用户朗读拍摄提交了“临境”"),
],
),
alignment: Alignment.topLeft,
),
);
}
}