-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathcustom_tile.dart
More file actions
95 lines (85 loc) · 2.55 KB
/
custom_tile.dart
File metadata and controls
95 lines (85 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
import 'package:flutter/material.dart';
import 'package:newsapp/screen/home/config/var/var.dart' as configvar;
class CustomTile extends StatelessWidget {
const CustomTile({
Key? key,
required this.screenWidth,
}) : super(key: key);
final double screenWidth;
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.symmetric(
vertical: 10, horizontal: 10),
child: Row(
children: [
Container(
height: 80,
width: 100,
child: ClipRRect(
borderRadius: BorderRadius.circular(8),
child: Image.network(configvar.kanewilliamson,
fit: BoxFit.cover),
),
),
const SizedBox(width: 10),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: screenWidth * 0.65,
child: Text(
'Spin component will be a big factor in Test series, says Kane Williamson',
style: Theme.of(context)
.primaryTextTheme
.bodyText1,
),
),
const SizedBox(
height: 12,
),
Container(
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Icontext(
iconData: Icons.calendar_today,
title: '23-11-2021'),
const SizedBox(width: 0),
],
),
),
],
),
],
));
}
}
class Icontext extends StatelessWidget {
final IconData iconData;
final String title;
Icontext({required this.iconData, required this.title});
@override
Widget build(BuildContext context) {
return Row(children: [
Icon(Icons.calendar_today, size: 14),
Text('23-11-2021', style: Theme.of(context).textTheme.bodyText1),
const SizedBox(
width: 10,
),
const SizedBox(
width: 39,
),
Row(children: [
Icon(Icons.lock_clock, size: 14),
Text('7 min read', style: Theme.of(context).textTheme.bodyText1),
const SizedBox(
width: 13,
),
]
),
],
);
}
}