Nessuna descrizione

home.dart 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. import 'package:flutter/material.dart';
  2. import '../widgets/functions.dart';
  3. class Home extends StatefulWidget{
  4. @override
  5. _HomeState createState() => _HomeState();
  6. }
  7. class _HomeState extends State<Home>{
  8. @override
  9. Widget build(BuildContext context){
  10. return Scaffold(
  11. appBar: AppBar(
  12. title: Text('Bienvenido'),
  13. centerTitle: true,
  14. ),
  15. body: Center(
  16. child: ListView(
  17. //mainAxisAlignment: MainAxisAlignment.spaceEvenly,
  18. children: [
  19. //estos dos estaban sin comentar originalmente
  20. //newButton(context,'/verOficinas','Ver Oficinas'),
  21. //spaceBetween(),
  22. //aqui comienza lo que merge
  23. new FlatButton(
  24. minWidth: 300.0,
  25. height: 100.0,
  26. onPressed: (){
  27. Navigator.pushNamed(context, '/verOficinas');
  28. },
  29. child: Text('Ver Oficinas',
  30. style: TextStyle(fontSize: 36),
  31. ),
  32. color: Colors.purple,
  33. ),
  34. new FlatButton(
  35. minWidth: 300.0,
  36. height: 100.0,
  37. onPressed: (){
  38. Navigator.pushNamed(context, '/calendario');
  39. },
  40. child: Text('Buscar Citas',
  41. style: TextStyle(fontSize: 36),
  42. ),
  43. color: Colors.purple,
  44. ),
  45. new FlatButton(
  46. minWidth: 300.0,
  47. height: 100.0,
  48. onPressed: (){
  49. Navigator.pushNamed(context, '/register');
  50. },
  51. child: Text('register',
  52. style: TextStyle(fontSize: 36),
  53. ),
  54. color: Colors.purple,
  55. ),
  56. new FlatButton(
  57. minWidth: 300.0,
  58. height: 100.0,
  59. onPressed: (){
  60. Navigator.pushNamed(context, '/welcome');
  61. },
  62. child: Text('welcome',
  63. style: TextStyle(fontSize: 36),
  64. ),
  65. color: Colors.purple,
  66. ),
  67. new FlatButton(
  68. minWidth: 300.0,
  69. height: 100.0,
  70. onPressed: (){
  71. Navigator.pushNamed(context, '/MyApp');
  72. },
  73. child: Text('MyApp',
  74. style: TextStyle(fontSize: 36),
  75. ),
  76. color: Colors.purple,
  77. ),
  78. new FlatButton(
  79. minWidth: 300.0,
  80. height: 100.0,
  81. onPressed: (){
  82. Navigator.pushNamed(context, '/especialidades');
  83. },
  84. child: Text('especialidades',
  85. style: TextStyle(fontSize: 36),
  86. ),
  87. color: Colors.purple,
  88. ),
  89. //aqui termina lo que merge
  90. ],
  91. ),
  92. ),
  93. );
  94. }
  95. }