-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.dart
34 lines (32 loc) · 903 Bytes
/
home.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
import 'package:flutter/material.dart';
import 'main.dart';
dec() {
return Container(
decoration:const BoxDecoration(
gradient: LinearGradient(
colors: <Color> [
Color(0xFF0D47A1),
Color(0xFF1976D2),
Color(0xFF42A5F5),
]
),
),
padding: EdgeInsets.all(10),
child: Text('Back to Home Page' ,
style: TextStyle(fontSize: 20 , color: Colors.white)),
);
}
class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
// TODO: implement build
return RaisedButton(
onPressed: () {
Navigator.push(context,
MaterialPageRoute(builder: (context) => MyApp()) );
},
padding: EdgeInsets.all(0),
child: dec(),
);
}
}