No Description

functions.dart 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import 'package:flutter/material.dart';
  2. FlatButton newButton(context,route,text){
  3. return new FlatButton(
  4. //minWidth: 300.0,
  5. //height: 100.0,
  6. onPressed: (){
  7. Navigator.pushNamed(context, route);
  8. },
  9. child: Text(text,
  10. style: TextStyle(fontSize: 36),
  11. ),
  12. color: Colors.purple,
  13. //shape: new RoundedRectangleBorder(borderRadius: new BorderRadius.circular(50)),
  14. padding: EdgeInsets.all(25),
  15. );
  16. }
  17. FlatButton verOficinaButton(context,name){
  18. return new FlatButton(
  19. minWidth: 300.0,
  20. height: 100.0,
  21. child: Text(name,
  22. style: TextStyle(fontSize: 36),
  23. ),
  24. onPressed: () {
  25. print(name);
  26. },
  27. padding: new EdgeInsets.all(0.0),
  28. color: Colors.purple,
  29. );
  30. }
  31. SizedBox spaceBetween(){
  32. return new SizedBox(height: 16);
  33. }
  34. List newButton2(context,route,text){
  35. return [new FlatButton(
  36. //minWidth: 300.0,
  37. //height: 100.0,
  38. onPressed: (){
  39. Navigator.pushNamed(context, route);
  40. },
  41. child: Text(text,
  42. style: TextStyle(fontSize: 36),
  43. ),
  44. color: Colors.purple,
  45. //shape: new RoundedRectangleBorder(borderRadius: new BorderRadius.circular(50)),
  46. padding: EdgeInsets.all(25),
  47. )
  48. ,
  49. new SizedBox(height: 16)
  50. ];
  51. }