Skip to content

Commit 22bdc94

Browse files
committed
ui fixes and text chagnes
1 parent 27be94a commit 22bdc94

22 files changed

+754
-206
lines changed

assets/images/peep_lady_one.svg

Lines changed: 14 additions & 0 deletions
Loading

assets/images/peep_lady_two.svg

Lines changed: 15 additions & 0 deletions
Loading

assets/images/peep_man_one.svg

Lines changed: 15 additions & 0 deletions
Loading

lib/blog/blog.dart

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,14 @@ class Blog {
1010
const Blog(
1111
{this.title, this.description, this.bgColor, this.user, this.time});
1212
}
13+
14+
class BlogWithSize {
15+
final String title;
16+
final String description;
17+
final Color bgColor;
18+
final double width;
19+
final double height;
20+
21+
const BlogWithSize(
22+
{this.title, this.description, this.bgColor, this.width, this.height});
23+
}

lib/blog/blog_card_type_one.dart

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class BlogCardTypeOne extends StatelessWidget {
2525
color: wood_smoke,
2626
offset: Offset(
2727
0.0, // Move to right 10 horizontally
28-
4.0, // Move to bottom 5 Vertically
28+
6.0, // Move to bottom 5 Vertically
2929
),
3030
)
3131
],
@@ -44,7 +44,7 @@ class BlogCardTypeOne extends StatelessWidget {
4444
height: 24,
4545
),
4646
Text(
47-
"Work with us and forget about others",
47+
blog.title,
4848
style: TextStyle(
4949
fontSize: 36,
5050
fontWeight: FontWeight.bold,
@@ -57,16 +57,17 @@ class BlogCardTypeOne extends StatelessWidget {
5757
mainAxisAlignment: MainAxisAlignment.spaceBetween,
5858
children: <Widget>[
5959
Column(
60+
crossAxisAlignment: CrossAxisAlignment.start,
6061
children: <Widget>[
6162
Text(
62-
"Alisa Red",
63+
blog.user,
6364
style: TextStyle(
6465
fontSize: 17,
6566
fontWeight: FontWeight.bold,
6667
color: wood_smoke),
6768
),
6869
Text(
69-
"33 March, 20",
70+
blog.time,
7071
style: TextStyle(
7172
fontSize: 13,
7273
fontWeight: FontWeight.normal,
@@ -78,6 +79,8 @@ class BlogCardTypeOne extends StatelessWidget {
7879
borderColor: wood_smoke,
7980
color: lightening_yellow,
8081
text: "Follow",
82+
height: 48,
83+
size: 120,
8184
callback: () {},
8285
shadowColor: wood_smoke,
8386
),

lib/blog/blog_card_type_three.dart

Lines changed: 76 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ import 'package:contraflutterkit/login/login_text.dart';
22
import 'package:contraflutterkit/utils/colors.dart';
33
import 'package:flutter/cupertino.dart';
44
import 'package:flutter/material.dart';
5+
import 'package:flutter_svg/svg.dart';
56

67
import 'blog.dart';
78

89
class BlogCardTypeThree extends StatelessWidget {
910
final VoidCallback onTap;
1011
final Blog blog;
12+
final bool isSubType;
1113

12-
const BlogCardTypeThree({this.onTap, this.blog});
14+
const BlogCardTypeThree({this.onTap, this.blog, this.isSubType});
1315

1416
@override
1517
Widget build(BuildContext context) {
@@ -42,28 +44,78 @@ class BlogCardTypeThree extends StatelessWidget {
4244
width: 48,
4345
height: 48,
4446
),
47+
SizedBox(
48+
width: 20,
49+
),
4550
Text(
46-
"Lamborci Mona",
51+
blog.user,
4752
style: TextStyle(
4853
color: wood_smoke,
4954
fontSize: 15,
5055
fontWeight: FontWeight.w800),
5156
)
5257
],
5358
),
54-
SizedBox(
55-
height: 24,
56-
),
57-
Text(
58-
"Work with us and forget about others",
59-
style: TextStyle(
60-
fontSize: 36,
61-
fontWeight: FontWeight.bold,
62-
color: wood_smoke),
63-
),
64-
SizedBox(
65-
height: 48,
66-
),
59+
isSubType
60+
? Container(
61+
height: 200,
62+
margin: EdgeInsets.symmetric(vertical: 24),
63+
width: MediaQuery.of(context).size.width,
64+
decoration: ShapeDecoration(
65+
shadows: [
66+
BoxShadow(
67+
color: Colors.red,
68+
offset: Offset(
69+
0.0, // Move to right 10 horizontally
70+
0.0, // Move to bottom 5 Vertically
71+
),
72+
)
73+
],
74+
color: carribean_green,
75+
shape: RoundedRectangleBorder(
76+
borderRadius: BorderRadius.all(Radius.circular(16)),
77+
side: BorderSide(color: wood_smoke, width: 2)),
78+
),
79+
child: Stack(
80+
alignment: Alignment.centerLeft,
81+
children: <Widget>[
82+
Positioned.fill(
83+
child: Align(
84+
alignment: Alignment.centerLeft,
85+
child: SvgPicture.asset(
86+
"assets/images/peep_lady_two.svg"))),
87+
Positioned.fill(
88+
child: Align(
89+
alignment: Alignment.center,
90+
child: SvgPicture.asset(
91+
"assets/images/peep_man_one.svg"))),
92+
Positioned.fill(
93+
child: Align(
94+
alignment: Alignment.centerRight,
95+
child: SvgPicture.asset(
96+
"assets/images/peep_lady_one.svg")))
97+
],
98+
),
99+
)
100+
: Container(
101+
child: Column(
102+
children: <Widget>[
103+
SizedBox(
104+
height: 24,
105+
),
106+
Text(
107+
blog.title,
108+
style: TextStyle(
109+
fontSize: 36,
110+
fontWeight: FontWeight.bold,
111+
color: wood_smoke),
112+
),
113+
SizedBox(
114+
height: 48,
115+
),
116+
],
117+
),
118+
),
67119
Row(
68120
mainAxisAlignment: MainAxisAlignment.spaceBetween,
69121
children: <Widget>[
@@ -79,6 +131,9 @@ class BlogCardTypeThree extends StatelessWidget {
79131
Icons.chat_bubble_outline,
80132
color: wood_smoke,
81133
),
134+
SizedBox(
135+
width: 10,
136+
),
82137
LoginText(
83138
text: "324",
84139
size: 13,
@@ -87,6 +142,9 @@ class BlogCardTypeThree extends StatelessWidget {
87142
],
88143
),
89144
),
145+
SizedBox(
146+
width: 20,
147+
),
90148
Expanded(
91149
flex: 1,
92150
child: Row(
@@ -95,6 +153,9 @@ class BlogCardTypeThree extends StatelessWidget {
95153
Icons.favorite_border,
96154
color: wood_smoke,
97155
),
156+
SizedBox(
157+
width: 10,
158+
),
98159
LoginText(
99160
text: "3.2k",
100161
size: 13,

lib/blog/blog_card_type_two.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,17 @@ class BlogCardTypeTwo extends StatelessWidget {
3535
crossAxisAlignment: CrossAxisAlignment.start,
3636
children: <Widget>[
3737
Text(
38-
"by Lara Trina • 12 March, 20",
38+
"by " + blog.user + " • " + blog.time,
3939
style: TextStyle(
4040
fontSize: 12, fontWeight: FontWeight.bold, color: trout),
4141
),
4242
SizedBox(
4343
height: 24,
4444
),
4545
Text(
46-
"I’m post title, Please keep it 2 line onely...",
46+
blog.title,
47+
maxLines: 2,
48+
overflow: TextOverflow.ellipsis,
4749
style: TextStyle(
4850
fontSize: 24,
4951
fontWeight: FontWeight.w800,

0 commit comments

Comments
 (0)