@@ -88,7 +88,7 @@ class _ProjectSubPageState extends State<ProjectSubPage>
88
88
await Future .delayed (Duration (seconds: 2 ));
89
89
Response res =
90
90
await dio.get ('https://www.wanandroid.com/article/listproject/0/json' );
91
- await dio.get ('https://www.wanandroid.com/lg/collect/list/0/json' );
91
+ await dio.get ('https://www.wanandroid.com/lg/collect/list/0/json' );
92
92
BaseEntity baseEntity = BaseEntity .fromJson (res.data);
93
93
BaseListEntity <List > baseListEntity =
94
94
BaseListEntity .fromJson (baseEntity.data);
@@ -438,10 +438,11 @@ class _ProjectSubPageState extends State<ProjectSubPage>
438
438
///项目item
439
439
Widget projectItem (ProjectEntity data) {
440
440
return Card (
441
+ elevation: 0.5 ,
441
442
shape: RoundedRectangleBorder (borderRadius: BorderRadius .circular (pt (6 ))),
442
443
clipBehavior: Clip .antiAlias,
443
444
child: GestureDetector (
444
- onTap: (){
445
+ onTap: () {
445
446
print ('click item' );
446
447
t ();
447
448
},
@@ -469,13 +470,30 @@ class _ProjectSubPageState extends State<ProjectSubPage>
469
470
},
470
471
),
471
472
Positioned (
472
- bottom: pt (4 ),
473
- left: pt (4 ),
474
- child: Text (
475
- data.author,
476
- style: TextStyle (color: Colors .white, fontSize: 11 ),
477
- maxLines: 1 ,
478
- overflow: TextOverflow .ellipsis,
473
+ bottom: 0 ,
474
+ left: 0 ,
475
+ right: 0 ,
476
+ child: Container (
477
+ decoration: BoxDecoration (
478
+ gradient: LinearGradient (
479
+ colors: [
480
+ Colors .transparent,
481
+ Colors .black26,
482
+ ],
483
+ begin: Alignment .topCenter,
484
+ end: Alignment .bottomCenter,
485
+ )),
486
+ padding: EdgeInsets .only (
487
+ left: pt (4 ),
488
+ bottom: pt (2 ),
489
+ top: pt (10 ),
490
+ ),
491
+ child: Text (
492
+ data.author,
493
+ style: TextStyle (color: Colors .white, fontSize: 11 ),
494
+ maxLines: 1 ,
495
+ overflow: TextOverflow .ellipsis,
496
+ ),
479
497
),
480
498
),
481
499
],
@@ -487,16 +505,17 @@ class _ProjectSubPageState extends State<ProjectSubPage>
487
505
data.title,
488
506
maxLines: 1 ,
489
507
overflow: TextOverflow .ellipsis,
490
- style: TextStyle (fontSize: 14 ,fontWeight: FontWeight .w500),
508
+ style: TextStyle (fontSize: 14 , fontWeight: FontWeight .w500),
491
509
),
492
510
),
493
511
GestureDetector (
494
512
behavior: HitTestBehavior .opaque,
495
- onTap: (){
513
+ onTap: () {
496
514
print ('click type ${data .chapterName }' );
497
515
},
498
516
child: Padding (
499
- padding: EdgeInsets .only (bottom: pt (6 ), left: pt (4 ), right: pt (4 )),
517
+ padding:
518
+ EdgeInsets .only (bottom: pt (6 ), left: pt (4 ), right: pt (4 )),
500
519
child: Row (
501
520
children: < Widget > [
502
521
Text (
@@ -524,7 +543,7 @@ class _ProjectSubPageState extends State<ProjectSubPage>
524
543
: WColors .hint_color_dark,
525
544
size: pt (15 ),
526
545
),
527
- onTap: (){
546
+ onTap: () {
528
547
print ('click fav ${data .collect }' );
529
548
},
530
549
),
0 commit comments