featured_heading.dart
1.98 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
import 'package:like/widgets/responsive.dart';
import 'package:flutter/material.dart';
class FeaturedHeading extends StatelessWidget {
const FeaturedHeading({
Key? key,
required this.screenSize,
}) : super(key: key);
final Size screenSize;
@override
Widget build(BuildContext context) {
return Padding(
padding: EdgeInsets.only(
top: screenSize.height * 0.06,
left: screenSize.width / 15,
right: screenSize.width / 15,
),
child: ResponsiveWidget.isSmallScreen(context)
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Row(),
Text(
'Featured',
style: TextStyle(
fontSize: 24,
fontFamily: 'Montserrat',
fontWeight: FontWeight.bold,
),
),
SizedBox(height: 5),
Text(
'Unique wildlife tours & destinations',
textAlign: TextAlign.end,
style: Theme.of(context).primaryTextTheme.subtitle1,
),
SizedBox(height: 10),
],
)
: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
'Featured',
style: TextStyle(
fontSize: 40,
fontFamily: 'Montserrat',
fontWeight: FontWeight.bold,
),
),
Expanded(
child: Text(
'Unique wildlife tours & destinations',
textAlign: TextAlign.end,
style: Theme.of(context).primaryTextTheme.subtitle1,
),
),
],
),
);
}
}