@@ -50,7 +50,6 @@ Icon chatIcon = Icon(Icons.chat);
5050Icon shareIcon = Icon (Icons .share);
5151
5252class _FeedPageFourState extends State <FeedPageFour > {
53-
5453 Widget _cardAction (Icon icon, int number) {
5554 return Container (
5655 margin: EdgeInsets .only (bottom: 20 ),
@@ -129,58 +128,50 @@ class _FeedPageFourState extends State<FeedPageFour> {
129128 );
130129 }
131130
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+ );
132142
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+ );
145160
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 )),
163171 )
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+ );
184175
185176 Widget _socialActionRow () {
186177 return Container (
@@ -200,9 +191,7 @@ class _FeedPageFourState extends State<FeedPageFour> {
200191 return Column (
201192 children: < Widget > [
202193 timeText (),
203- Expanded (
204- child: descriptionText ()
205- ),
194+ Expanded (child: descriptionText ()),
206195 _socialActionRow ()
207196 ],
208197 );
@@ -225,20 +214,18 @@ class _FeedPageFourState extends State<FeedPageFour> {
225214
226215 Widget _avatarCard () {
227216 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 ,
237227 ),
238- boxShadow: SHADOW ,
239- ),
240- )
241- );
228+ ));
242229 }
243230
244231 Widget _imagesCard () {
@@ -249,21 +236,63 @@ class _FeedPageFourState extends State<FeedPageFour> {
249236 height: 250 ,
250237 width: 370 ,
251238 decoration: BoxDecoration (
252- color: Colors .red,
253239 borderRadius: BorderRadius .circular (22 ),
254240 boxShadow: SHADOW ,
255241 ),
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+ ),
256289 ),
257290 );
258291 }
259292
260293 Widget _stackClipperCard () {
261294 return Stack (
262- children: < Widget > [
263- _pinkCard (),
264- _avatarCard (),
265- _imagesCard ()
266- ],
295+ children: < Widget > [_pinkCard (), _avatarCard (), _imagesCard ()],
267296 );
268297 }
269298
@@ -274,6 +303,7 @@ class _FeedPageFourState extends State<FeedPageFour> {
274303 height: 100 ,
275304 ),
276305 _stackClipperCard (),
306+ _stackClipperCard (),
277307 ],
278308 );
279309 }
0 commit comments