No Description

home.dart 2.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. //aqui termina lo que merge
  79. ],
  80. ),
  81. ),
  82. );
  83. }
  84. }