Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CollegeButton extends StatelessWidget{
- final String collegename;
- final Widget collegewidget;
- final Color color1;
- final Color color2;
- CollegeButton
- ({
- this.collegename,
- this.collegewidget,
- this.color1=Colors.cyanAccent,
- this.color2=Colors.yellowAccent
- });
- @override
- Widget build(BuildContext context) {
- return Container(padding: EdgeInsets.fromLTRB(0,0,0,0),
- decoration: BoxDecoration(color: color1),
- width: 90, height: 40,
- child: FlatButton(child: Text(collegename,style:TextStyle(color: color2),),
- onPressed: ()=>Navigator.push(context, MaterialPageRoute(
- builder: (BuildContext context) => collegewidget
- )),),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement