Showing
1 changed file
with
48 additions
and
14 deletions
... | @@ -26,6 +26,7 @@ class PoemDetailPage extends StatefulWidget { | ... | @@ -26,6 +26,7 @@ class PoemDetailPage extends StatefulWidget { |
26 | class _PoemDetailPageState extends State<PoemDetailPage> { | 26 | class _PoemDetailPageState extends State<PoemDetailPage> { |
27 | @override | 27 | @override |
28 | Widget build(BuildContext context) { | 28 | Widget build(BuildContext context) { |
29 | + const poemStr = "清晨入古寺,初日照高林。\n竹径通幽处,禅房花木深。\n山光悦鸟性,潭影空人心。\n万籁此都寂,但余钟磬音。"; | ||
29 | return Scaffold( | 30 | return Scaffold( |
30 | appBar: MyAppBar( | 31 | appBar: MyAppBar( |
31 | isBack: true, | 32 | isBack: true, |
... | @@ -56,11 +57,14 @@ class _PoemDetailPageState extends State<PoemDetailPage> { | ... | @@ -56,11 +57,14 @@ class _PoemDetailPageState extends State<PoemDetailPage> { |
56 | Container( | 57 | Container( |
57 | margin: const EdgeInsets.symmetric( | 58 | margin: const EdgeInsets.symmetric( |
58 | vertical: 30.0, horizontal: 20.0), | 59 | vertical: 30.0, horizontal: 20.0), |
59 | - height: MediaQuery.of(context).size.height - 140 - widget.poemPanelHeight, | 60 | + height: MediaQuery.of(context).size.height - |
61 | + 140 - | ||
62 | + widget.poemPanelHeight, | ||
60 | width: double.infinity, | 63 | width: double.infinity, |
61 | decoration: BoxDecoration( | 64 | decoration: BoxDecoration( |
62 | color: Colors.grey.shade200.withOpacity(0.1), | 65 | color: Colors.grey.shade200.withOpacity(0.1), |
63 | - border: Border.all(color: Colors.grey.shade50, width: 0.5), // 边色与边宽度 | 66 | + border: Border.all( |
67 | + color: Colors.grey.shade50, width: 0.5), // 边色与边宽度 | ||
64 | // borderRadius: BorderRadius.circular(2.0), | 68 | // borderRadius: BorderRadius.circular(2.0), |
65 | ), | 69 | ), |
66 | child: ClipRect( | 70 | child: ClipRect( |
... | @@ -93,20 +97,39 @@ class _PoemDetailPageState extends State<PoemDetailPage> { | ... | @@ -93,20 +97,39 @@ class _PoemDetailPageState extends State<PoemDetailPage> { |
93 | ), | 97 | ), |
94 | ), | 98 | ), |
95 | Gaps.vGap12, | 99 | Gaps.vGap12, |
96 | - const Text( | 100 | + Stack( |
97 | - "清晨入古寺,初日照高林。\n竹径通幽处,禅房花木深。\n山光悦鸟性,潭影空人心。\n万籁此都寂,但余钟磬音。", | 101 | + alignment: Alignment.center, |
102 | + children: const [//TODO 字体是否描边? | ||
103 | + // Text( | ||
104 | + // poemStr, | ||
105 | + // style: TextStyle( | ||
106 | + // fontFamily: "ZCOOLXiaoWei", | ||
107 | + // fontSize: 24.0, | ||
108 | + // foreground: Paint() | ||
109 | + // ..style = PaintingStyle.stroke | ||
110 | + // ..strokeWidth = 1 | ||
111 | + // ..color = Colors.black, | ||
112 | + // ), | ||
113 | + // ), | ||
114 | + Text( | ||
115 | + poemStr, | ||
98 | style: TextStyle( | 116 | style: TextStyle( |
99 | color: Colors.white, | 117 | color: Colors.white, |
100 | fontFamily: "ZCOOLXiaoWei", | 118 | fontFamily: "ZCOOLXiaoWei", |
101 | - fontSize: 24.0), | 119 | + fontSize: 24.0, |
120 | + ), | ||
121 | + ), | ||
122 | + ], | ||
102 | ), | 123 | ), |
103 | Gaps.vGap24, | 124 | Gaps.vGap24, |
104 | Container( | 125 | Container( |
105 | alignment: Alignment.centerLeft, | 126 | alignment: Alignment.centerLeft, |
106 | - padding: const EdgeInsets.symmetric(vertical: 5.0, horizontal: 10.0), | 127 | + padding: const EdgeInsets.symmetric( |
128 | + vertical: 5.0, horizontal: 10.0), | ||
107 | child: const Text( | 129 | child: const Text( |
108 | "100位用户朗读录制提交了“临境”", | 130 | "100位用户朗读录制提交了“临境”", |
109 | - style: TextStyle(color: Colors.white, fontSize: 15.0), | 131 | + style: TextStyle( |
132 | + color: Colors.white, fontSize: 15.0), | ||
110 | ), | 133 | ), |
111 | ), | 134 | ), |
112 | Expanded( | 135 | Expanded( |
... | @@ -114,19 +137,23 @@ class _PoemDetailPageState extends State<PoemDetailPage> { | ... | @@ -114,19 +137,23 @@ class _PoemDetailPageState extends State<PoemDetailPage> { |
114 | padding: const EdgeInsets.symmetric( | 137 | padding: const EdgeInsets.symmetric( |
115 | vertical: 5.0, horizontal: 10.0), | 138 | vertical: 5.0, horizontal: 10.0), |
116 | width: double.infinity, | 139 | width: double.infinity, |
117 | - child: ListView.builder( | 140 | + child: ListView.builder(itemBuilder: |
118 | - itemBuilder: (BuildContext context, int index) { | 141 | + (BuildContext context, int index) { |
119 | return Wrap( | 142 | return Wrap( |
120 | spacing: 5.0, | 143 | spacing: 5.0, |
121 | - crossAxisAlignment: WrapCrossAlignment.center, | 144 | + crossAxisAlignment: |
145 | + WrapCrossAlignment.center, | ||
122 | children: const [ | 146 | children: const [ |
123 | Icon( | 147 | Icon( |
124 | Icons.play_circle_outline, | 148 | Icons.play_circle_outline, |
125 | size: 16.0, | 149 | size: 16.0, |
150 | + color: Colors.white, | ||
126 | ), | 151 | ), |
127 | Text( | 152 | Text( |
128 | "普通话", | 153 | "普通话", |
129 | - style: TextStyle(color: Colors.white, fontSize: 16.0), | 154 | + style: TextStyle( |
155 | + color: Colors.white, | ||
156 | + fontSize: 16.0), | ||
130 | ) | 157 | ) |
131 | ], | 158 | ], |
132 | ); | 159 | ); |
... | @@ -140,16 +167,23 @@ class _PoemDetailPageState extends State<PoemDetailPage> { | ... | @@ -140,16 +167,23 @@ class _PoemDetailPageState extends State<PoemDetailPage> { |
140 | mainAxisSize: MainAxisSize.min, | 167 | mainAxisSize: MainAxisSize.min, |
141 | children: [ | 168 | children: [ |
142 | IconButton( | 169 | IconButton( |
143 | - icon: const Icon(Icons.mic_none, size: 36.0,), | 170 | + icon: const Icon( |
171 | + Icons.mic_none, | ||
172 | + size: 36.0, | ||
173 | + ), | ||
144 | onPressed: () {}, | 174 | onPressed: () {}, |
145 | ), | 175 | ), |
146 | Gaps.hGap16, | 176 | Gaps.hGap16, |
147 | IconButton( | 177 | IconButton( |
148 | - icon: const Icon(Icons.camera_alt_outlined, size: 36.0,), | 178 | + icon: const Icon( |
179 | + Icons.camera_alt_outlined, | ||
180 | + size: 36.0, | ||
181 | + ), | ||
149 | onPressed: () {}, | 182 | onPressed: () {}, |
150 | ) | 183 | ) |
151 | ], | 184 | ], |
152 | - ),), | 185 | + ), |
186 | + ), | ||
153 | ], | 187 | ], |
154 | ), | 188 | ), |
155 | ), | 189 | ), | ... | ... |
-
Please register or login to post a comment