-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathmain.dart
121 lines (115 loc) · 3.71 KB
/
main.dart
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
import 'package:flutter/material.dart';
import 'package:youtube/select.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData.light(),
home: MyPage(),
);
}
}
class MyPage extends StatefulWidget {
@override
_MyPageState createState() => _MyPageState();
}
class _MyPageState extends State<MyPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.transparent,
elevation: 0,
title: ListTile(
trailing: Icon(
Icons.clear_all,
color: Colors.black,
),
),
),
body: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
"Rent or",
style: TextStyle(
foreground: Paint()..shader = linearGradient2,
fontSize: 35,
fontWeight: FontWeight.bold),
),
Text(
"Service your Car",
style: TextStyle(
foreground: Paint()..shader = linearGradient1,
fontSize: 35,
fontWeight: FontWeight.bold),
),
SizedBox(
height: 5,
),
Row(
children: <Widget>[
Icon(
Icons.location_on,
color: Colors.grey,
),
Text(
"Mumbai, India",
style: TextStyle(
color: Colors.grey,
fontSize: 15,
fontWeight: FontWeight.bold),
),
],
),
Image.asset(
"assets/carmovingcolor.gif",
fit: BoxFit.cover,
width: double.infinity,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(23.0),
gradient: LinearGradient(colors: [
Color(0xFFFF1000),
Color(0xFF2508FF),
], begin: Alignment.centerRight, end: Alignment.centerLeft),
),
height: 50,
width: MediaQuery.of(context).size.width,
child: RaisedButton(
elevation: 0,
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => SelectPage()),
);
},
color: Colors.transparent,
child: Text(
"Get Started",
style: TextStyle(
color: Colors.white,
fontSize: 22,
fontWeight: FontWeight.bold),
),
),
),
],
),
),
),
);
}
}
final Shader linearGradient1 = LinearGradient(
colors: <Color>[Color(0xFFFF1000), Color(0xFF2508FF)],
).createShader(Rect.fromLTWH(0.0, 0.0, 200.0, 70.0));
final Shader linearGradient2 = LinearGradient(
colors: <Color>[Color(0xFF2508FF), Color(0xFFFF1000)],
).createShader(Rect.fromLTWH(0.0, 0.0, 200.0, 70.0));