poem_publish.dart
4.28 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
import 'package:flutter/material.dart';
import 'package:one_poem/res/resources.dart';
import 'package:one_poem/util/toast_utils.dart';
import 'package:one_poem/widgets/my_app_bar.dart';
class PoemPublish extends StatefulWidget {
const PoemPublish({Key? key, required this.data}) : super(key: key);
final String data;
@override
_PoemPublishState createState() => _PoemPublishState();
}
class _PoemPublishState extends State<PoemPublish> {
@override
void initState() {
super.initState();
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: MyAppBar(
homeMenuHeader: Container(
alignment: Alignment.center,
width: double.infinity,
child: const Text(
"发布临境",
style: TextStyle(
color: Colors.white,
),
),
),
),
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: const EdgeInsets.all(
10.0,
),
child: ConstrainedBox(
constraints: const BoxConstraints(
maxHeight: 200,
maxWidth: double.infinity,
),
child: TextField(
maxLines: 10,
decoration: InputDecoration(
contentPadding: const EdgeInsets.all(10.0),
hintText: '读此一言,仿佛身临其境',
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: BorderSide.none),
filled: true,
fillColor: Colors.grey.shade100,
),
),
),
),
Container(
padding: const EdgeInsets.all(10.0),
alignment: Alignment.centerLeft,
width: double.infinity,
height: 36.0,
child: Wrap(
children: const [
Icon(
Icons.room_outlined,
size: 15,
),
Text(
"我在此地",
style: TextStyle(color: Colors.black45),
),
],
),
),
Container(
padding: const EdgeInsets.all(10.0),
alignment: Alignment.centerLeft,
width: double.infinity,
height: 36.0,
child: Wrap(
children: const [
Icon(
Icons.room_outlined,
size: 15,
),
Text(
"所用口音",
style: TextStyle(color: Colors.black45),
),
Gaps.hGap10,
Text(
"普通话",
style: TextStyle(color: Colors.black45),
),
],
),
),
Gaps.vGap24,
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
height: 36.0,
alignment: Alignment.center,
width: double.infinity,
child: const Text(
"发布临境,让更多人身临其境",
style: TextStyle(fontSize: 12.0),
),
),
Container(
height: 48.0,
alignment: Alignment.center,
width: double.infinity,
child: TextButton(
style: ButtonStyle(
side: MaterialStateProperty.all(
const BorderSide(color: Colors.black54, width: 1),
),
),
onPressed: () {
Toast.show("先不发布了吧。。。。");
},
child: const Text(
"发布",
style: TextStyle(color: Colors.black54, fontSize: 15.0),
),
),
),
],
),
),
],
),
);
}
}