-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.dart
97 lines (74 loc) · 2.65 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
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:mandi/goat.dart';
import 'package:mandi/login.dart';
import 'package:mandi/registration.dart';
import 'package:mandi/buyerPage.dart';
import 'cow.dart';
void main() => runApp(MaterialApp(//home:MyApp()
initialRoute: '/',
routes: {
'/': (context) => MyApp(),
'/login': (context) => login(),
'/RegisterPage':(context)=>register(),
'/BuyerPage':(context)=>buyer(),
'/cow':(context)=>cow(),
'/goat':(context)=>goat(),
}
));
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar:AppBar(title:Text('Mandi'),backgroundColor:Colors.teal,) ,
body:Container(
/*decoration:BoxDecoration(
image:DecorationImage(image: AssetImage
("images/bg.png"),
fit:BoxFit.cover,
),
),*/
child: Column(
mainAxisAlignment:MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
ClipRRect(
borderRadius: BorderRadius.circular(136.0),
child:Image.asset('images/cow.png',height:95.0,width:85.0,),),
ShaderMask(
blendMode: BlendMode.srcATop,
shaderCallback: (rect) {
return LinearGradient(
colors:<Color>[Colors.green, Colors.red],
tileMode: TileMode.mirror,
).createShader(rect);
},
child: Center(child: const Text('Who are you?',style: TextStyle(fontSize: 28,fontWeight:FontWeight.bold),)),
),
ShaderMask(
blendMode: BlendMode.srcATop,
shaderCallback: (rect) {
return LinearGradient(
colors:[Colors.red, Colors.pink.shade900],
tileMode: TileMode.mirror,
).createShader(rect);
},
child: FlatButton(onPressed:(){Navigator.pushNamed(context, '/BuyerPage');},child:Text('A Buyer',style: TextStyle(fontSize: 27,fontWeight:FontWeight.bold),),),
),
ShaderMask(
blendMode: BlendMode.srcATop,
shaderCallback: (rect) {
return LinearGradient(
colors:[Colors.red, Colors.pink.shade900],
tileMode: TileMode.mirror,
).createShader(rect);
},
child: FlatButton(onPressed:(){Navigator.pushNamed(context, '/login');},
child:Text('A Seller',style: TextStyle(fontSize: 27,fontWeight:FontWeight.bold),),),
),
],
),
),
);
}
}