@@ -8,43 +8,70 @@ import 'package:flutter_html/flutter_html.dart';
8
8
import 'package:cached_network_image/cached_network_image.dart' ;
9
9
10
10
Widget hawalImage (Post post) {
11
- return Container (
12
-
13
- foregroundDecoration: BoxDecoration (
14
- backgroundBlendMode: BlendMode .overlay,
15
- // borderRadius:
16
- // BorderRadius.all(Radius.circular(20.0)),
11
+ return Stack (
12
+ children: < Widget > [
13
+ Positioned (
14
+
15
+ bottom: 5.0 ,
16
+ right: 0 ,
17
+ left: 0 ,
18
+ child: Container (
19
+
20
+ decoration: BoxDecoration (
21
+ boxShadow: [
22
+ BoxShadow (
23
+ spreadRadius: 10 ,
24
+ blurRadius: 20 ,
25
+ color: Colors .blue,
26
+ offset: new Offset (1.0 , 1.0 ),
27
+ ) ,
28
+ ] ,
29
+ ),
30
+ ),
31
+ ),
17
32
33
+ Container (
18
34
19
- gradient: LinearGradient (
20
- begin: Alignment .topCenter,
21
- end: Alignment .bottomCenter,
22
- stops: [0.1 , 0.5 , 0.7 , 0.9 ],
35
+ foregroundDecoration: BoxDecoration (
23
36
24
- colors: [
25
37
26
- // Colors are easy thanks to Flutter's Colors class.
38
+ backgroundBlendMode: BlendMode .overlay,
39
+ // borderRadius:
40
+ // BorderRadius.all(Radius.circular(20.0)),
27
41
28
- Colors .transparent,
29
- Colors .transparent,
30
- Colors .black45,
31
- Colors .black87 ,
32
- ],
33
42
34
- )),
35
- child: CachedNetworkImage (
36
- fadeInCurve: Curves .decelerate,
37
- repeat: ImageRepeat .noRepeat,
38
- fadeInDuration: Duration (seconds: 5 ),
43
+ gradient: LinearGradient (
44
+ begin: Alignment .topCenter,
45
+ end: Alignment .bottomCenter,
46
+ stops: [0.1 , 0.5 , 0.7 , 0.9 ],
47
+
48
+ colors: [
49
+
50
+ // Colors are easy thanks to Flutter's Colors class.
51
+
52
+ Colors .transparent,
53
+ Colors .transparent,
54
+ Colors .black45,
55
+ Colors .black87 ,
56
+ ],
57
+
58
+ )),
59
+ child: CachedNetworkImage (
60
+ fadeInCurve: Curves .decelerate,
61
+ repeat: ImageRepeat .noRepeat,
62
+ fadeInDuration: Duration (seconds: 5 ),
63
+
64
+ imageUrl: post.featuredMediaUrl == null
65
+ ? 'assets/images/placeholder.png'
66
+ : post.featuredMediaUrl,
67
+ placeholder: Image .asset ('assets/images/placeholder.png' ),
68
+ errorWidget: Container (
69
+ child: Image .asset ('assets/images/placeholder.png' ),
70
+ ),
71
+ ),
72
+ )
73
+ ],
39
74
40
- imageUrl: post.featuredMediaUrl == null
41
- ? 'assets/images/placeholder.png'
42
- : post.featuredMediaUrl,
43
- placeholder: Image .asset ('assets/images/placeholder.png' ),
44
- errorWidget: Container (
45
- child: Image .asset ('assets/images/placeholder.png' ),
46
- ),
47
- ),
48
75
);
49
76
}
50
77
0 commit comments