@@ -50,7 +50,6 @@ Icon chatIcon = Icon(Icons.chat);
50
50
Icon shareIcon = Icon (Icons .share);
51
51
52
52
class _FeedPageFourState extends State <FeedPageFour > {
53
-
54
53
Widget _cardAction (Icon icon, int number) {
55
54
return Container (
56
55
margin: EdgeInsets .only (bottom: 20 ),
@@ -129,58 +128,50 @@ class _FeedPageFourState extends State<FeedPageFour> {
129
128
);
130
129
}
131
130
131
+ Widget timeText () => Container (
132
+ width: double .infinity,
133
+ margin: EdgeInsets .all (20 ),
134
+ child: Text (
135
+ cardConsts[0 ]['time' ],
136
+ textAlign: TextAlign .right,
137
+ style: TextStyle (
138
+ color: Colors .black38,
139
+ fontSize: SizeUtil .getAxisBoth (TEXT_SMALL_2_SIZE )),
140
+ ),
141
+ );
132
142
133
- Widget timeText () => Container (
134
- width: double .infinity,
135
- margin: EdgeInsets .all (20 ),
136
- child: Text (
137
- cardConsts[0 ]['time' ],
138
- textAlign: TextAlign .right,
139
- style: TextStyle (
140
- color: Colors .black38,
141
- fontSize: SizeUtil .getAxisBoth (TEXT_SMALL_2_SIZE )
142
- ),
143
- ),
144
- );
143
+ Widget descriptionText () => Container (
144
+ margin: EdgeInsets .symmetric (horizontal: 20 ),
145
+ child: RichText (
146
+ text: TextSpan (
147
+ text: '${cardConsts [0 ]['author' ]} ' ,
148
+ style: TextStyle (
149
+ fontSize: SizeUtil .getAxisBoth (TEXT_NORMAL_SIZE ),
150
+ fontWeight: FontWeight .bold,
151
+ color: TEXT_BLACK ),
152
+ children: < TextSpan > [
153
+ TextSpan (
154
+ text: cardConsts[0 ]['action' ],
155
+ style: TextStyle (
156
+ fontWeight: FontWeight .normal, color: TEXT_BLACK_LIGHT ))
157
+ ]),
158
+ ),
159
+ );
145
160
146
- Widget descriptionText () => Container (
147
- margin: EdgeInsets .symmetric (horizontal: 20 ),
148
- child: RichText (
149
- text: TextSpan (
150
- text: '${cardConsts [0 ]['author' ]} ' ,
151
- style: TextStyle (
152
- fontSize: SizeUtil .getAxisBoth (TEXT_NORMAL_SIZE ),
153
- fontWeight: FontWeight .bold,
154
- color: TEXT_BLACK
155
- ),
156
- children: < TextSpan > [
157
- TextSpan (
158
- text: cardConsts[0 ]['action' ],
159
- style: TextStyle (
160
- fontWeight: FontWeight .normal,
161
- color: TEXT_BLACK_LIGHT
162
- )
161
+ Widget _socialAction (Icon icon, String number) => Container (
162
+ child: Row (
163
+ children: < Widget > [
164
+ icon,
165
+ SizedBox (width: 7 ),
166
+ Text (
167
+ '$number ' ,
168
+ style: TextStyle (
169
+ color: Colors .black45,
170
+ fontSize: SizeUtil .getAxisBoth (TEXT_SMALL_2_SIZE )),
163
171
)
164
- ]
165
- ),
166
- ),
167
- );
168
-
169
- Widget _socialAction (Icon icon, String number) => Container (
170
- child: Row (
171
- children: < Widget > [
172
- icon,
173
- SizedBox (width: 7 ),
174
- Text (
175
- '$number ' ,
176
- style: TextStyle (
177
- color: Colors .black45,
178
- fontSize: SizeUtil .getAxisBoth (TEXT_SMALL_2_SIZE )
179
- ),
180
- )
181
- ],
182
- ),
183
- );
172
+ ],
173
+ ),
174
+ );
184
175
185
176
Widget _socialActionRow () {
186
177
return Container (
@@ -200,9 +191,7 @@ class _FeedPageFourState extends State<FeedPageFour> {
200
191
return Column (
201
192
children: < Widget > [
202
193
timeText (),
203
- Expanded (
204
- child: descriptionText ()
205
- ),
194
+ Expanded (child: descriptionText ()),
206
195
_socialActionRow ()
207
196
],
208
197
);
@@ -225,20 +214,18 @@ class _FeedPageFourState extends State<FeedPageFour> {
225
214
226
215
Widget _avatarCard () {
227
216
return Positioned (
228
- top: deviceHeight * 0.027 ,
229
- left: deviceWidth * 0.2 ,
230
- child: Container (
231
- height: 60 ,
232
- width: 60 ,
233
- decoration: BoxDecoration (
234
- borderRadius: BorderRadius .circular (7 ),
235
- image: DecorationImage (
236
- image: AssetImage (cardConsts[0 ]['avatar_image' ])
217
+ top: deviceHeight * 0.027 ,
218
+ left: deviceWidth * 0.2 ,
219
+ child: Container (
220
+ height: 60 ,
221
+ width: 60 ,
222
+ decoration: BoxDecoration (
223
+ borderRadius: BorderRadius .circular (7 ),
224
+ image: DecorationImage (
225
+ image: AssetImage (cardConsts[0 ]['avatar_image' ])),
226
+ boxShadow: SHADOW ,
237
227
),
238
- boxShadow: SHADOW ,
239
- ),
240
- )
241
- );
228
+ ));
242
229
}
243
230
244
231
Widget _imagesCard () {
@@ -249,21 +236,63 @@ class _FeedPageFourState extends State<FeedPageFour> {
249
236
height: 250 ,
250
237
width: 370 ,
251
238
decoration: BoxDecoration (
252
- color: Colors .red,
253
239
borderRadius: BorderRadius .circular (22 ),
254
240
boxShadow: SHADOW ,
255
241
),
242
+ child: Row (
243
+ children: < Widget > [
244
+ Expanded (
245
+ flex: 1 ,
246
+ child: Column (
247
+ children: < Widget > [
248
+ Expanded (
249
+ flex: 1 ,
250
+ child: Container (
251
+ constraints: BoxConstraints .expand (),
252
+ decoration: BoxDecoration (
253
+ borderRadius:
254
+ BorderRadius .only (topLeft: Radius .circular (20 )),
255
+ boxShadow: SHADOW ,
256
+ image: DecorationImage (
257
+ fit: BoxFit .cover,
258
+ image: AssetImage (FeedImage .shop_river))),
259
+ ),
260
+ ),
261
+ Expanded (
262
+ flex: 1 ,
263
+ child: Container (
264
+ constraints: BoxConstraints .expand (),
265
+ decoration: BoxDecoration (
266
+ borderRadius: BorderRadius .only (
267
+ bottomLeft: Radius .circular (20 )),
268
+ boxShadow: SHADOW ,
269
+ image: DecorationImage (
270
+ fit: BoxFit .cover,
271
+ image: AssetImage (FeedImage .city))),
272
+ ),
273
+ ),
274
+ ],
275
+ ),
276
+ ),
277
+ Expanded (
278
+ flex: 2 ,
279
+ child: Container (
280
+ constraints: BoxConstraints .expand (),
281
+ child: Image .asset (
282
+ FeedImage .feed12_pic1,
283
+ fit: BoxFit .fill,
284
+ ),
285
+ ),
286
+ ),
287
+ ],
288
+ ),
256
289
),
257
290
);
258
291
}
259
292
260
293
Widget _stackClipperCard () {
261
294
return Stack (
262
- children: < Widget > [
263
- _pinkCard (),
264
- _avatarCard (),
265
- _imagesCard ()
266
- ],
295
+ children: < Widget > [_pinkCard (), _avatarCard (), _imagesCard ()],
267
296
);
268
297
}
269
298
@@ -274,6 +303,7 @@ class _FeedPageFourState extends State<FeedPageFour> {
274
303
height: 100 ,
275
304
),
276
305
_stackClipperCard (),
306
+ _stackClipperCard (),
277
307
],
278
308
);
279
309
}
0 commit comments