Toggle navigation
Toggle navigation
This project
Loading...
Sign in
OnePoem
/
OnePoem-App
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
reason
2022-01-01 12:20:25 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0ca718ddedc477cdaaad3200a81ab242ef7d0771
0ca718dd
1 parent
a3558c1d
字体是否需要描边?
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
30 deletions
lib/poem/page/poem_detail.dart
lib/poem/page/poem_detail.dart
View file @
0ca718d
...
...
@@ -26,6 +26,7 @@ class PoemDetailPage extends StatefulWidget {
class
_PoemDetailPageState
extends
State
<
PoemDetailPage
>
{
@override
Widget
build
(
BuildContext
context
)
{
const
poemStr
=
"清晨入古寺,初日照高林。
\n
竹径通幽处,禅房花木深。
\n
山光悦鸟性,潭影空人心。
\n
万籁此都寂,但余钟磬音。"
;
return
Scaffold
(
appBar:
MyAppBar
(
isBack:
true
,
...
...
@@ -56,11 +57,14 @@ class _PoemDetailPageState extends State<PoemDetailPage> {
Container
(
margin:
const
EdgeInsets
.
symmetric
(
vertical:
30.0
,
horizontal:
20.0
),
height:
MediaQuery
.
of
(
context
).
size
.
height
-
140
-
widget
.
poemPanelHeight
,
height:
MediaQuery
.
of
(
context
).
size
.
height
-
140
-
widget
.
poemPanelHeight
,
width:
double
.
infinity
,
decoration:
BoxDecoration
(
color:
Colors
.
grey
.
shade200
.
withOpacity
(
0.1
),
border:
Border
.
all
(
color:
Colors
.
grey
.
shade50
,
width:
0.5
),
// 边色与边宽度
border:
Border
.
all
(
color:
Colors
.
grey
.
shade50
,
width:
0.5
),
// 边色与边宽度
// borderRadius: BorderRadius.circular(2.0),
),
child:
ClipRect
(
...
...
@@ -93,20 +97,39 @@ class _PoemDetailPageState extends State<PoemDetailPage> {
),
),
Gaps
.
vGap12
,
const
Text
(
"清晨入古寺,初日照高林。
\n
竹径通幽处,禅房花木深。
\n
山光悦鸟性,潭影空人心。
\n
万籁此都寂,但余钟磬音。"
,
style:
TextStyle
(
color:
Colors
.
white
,
fontFamily:
"ZCOOLXiaoWei"
,
fontSize:
24.0
),
Stack
(
alignment:
Alignment
.
center
,
children:
const
[
//TODO 字体是否描边?
// Text(
// poemStr,
// style: TextStyle(
// fontFamily: "ZCOOLXiaoWei",
// fontSize: 24.0,
// foreground: Paint()
// ..style = PaintingStyle.stroke
// ..strokeWidth = 1
// ..color = Colors.black,
// ),
// ),
Text
(
poemStr
,
style:
TextStyle
(
color:
Colors
.
white
,
fontFamily:
"ZCOOLXiaoWei"
,
fontSize:
24.0
,
),
),
],
),
Gaps
.
vGap24
,
Container
(
alignment:
Alignment
.
centerLeft
,
padding:
const
EdgeInsets
.
symmetric
(
vertical:
5.0
,
horizontal:
10.0
),
padding:
const
EdgeInsets
.
symmetric
(
vertical:
5.0
,
horizontal:
10.0
),
child:
const
Text
(
"100位用户朗读录制提交了“临境”"
,
style:
TextStyle
(
color:
Colors
.
white
,
fontSize:
15.0
),
style:
TextStyle
(
color:
Colors
.
white
,
fontSize:
15.0
),
),
),
Expanded
(
...
...
@@ -114,23 +137,27 @@ class _PoemDetailPageState extends State<PoemDetailPage> {
padding:
const
EdgeInsets
.
symmetric
(
vertical:
5.0
,
horizontal:
10.0
),
width:
double
.
infinity
,
child:
ListView
.
builder
(
itemBuilder:
(
BuildContext
context
,
int
index
)
{
return
Wrap
(
spacing:
5.0
,
crossAxisAlignment:
WrapCrossAlignment
.
center
,
children:
const
[
Icon
(
Icons
.
play_circle_outline
,
size:
16.0
,
),
Text
(
"普通话"
,
style:
TextStyle
(
color:
Colors
.
white
,
fontSize:
16.0
),
)
],
);
}),
child:
ListView
.
builder
(
itemBuilder:
(
BuildContext
context
,
int
index
)
{
return
Wrap
(
spacing:
5.0
,
crossAxisAlignment:
WrapCrossAlignment
.
center
,
children:
const
[
Icon
(
Icons
.
play_circle_outline
,
size:
16.0
,
color:
Colors
.
white
,
),
Text
(
"普通话"
,
style:
TextStyle
(
color:
Colors
.
white
,
fontSize:
16.0
),
)
],
);
}),
),
),
Container
(
...
...
@@ -140,16 +167,23 @@ class _PoemDetailPageState extends State<PoemDetailPage> {
mainAxisSize:
MainAxisSize
.
min
,
children:
[
IconButton
(
icon:
const
Icon
(
Icons
.
mic_none
,
size:
36.0
,),
icon:
const
Icon
(
Icons
.
mic_none
,
size:
36.0
,
),
onPressed:
()
{},
),
Gaps
.
hGap16
,
IconButton
(
icon:
const
Icon
(
Icons
.
camera_alt_outlined
,
size:
36.0
,),
icon:
const
Icon
(
Icons
.
camera_alt_outlined
,
size:
36.0
,
),
onPressed:
()
{},
)
],
),),
),
),
],
),
),
...
...
Please
register
or
login
to post a comment