No Description

home.dart 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. import 'package:flutter/material.dart';
  2. class Home extends StatefulWidget{
  3. @override
  4. _HomeState createState() => _HomeState();
  5. }
  6. class _HomeState extends State<Home>{
  7. @override
  8. Widget build(BuildContext context){
  9. return Scaffold(
  10. appBar: AppBar(
  11. title: Text('Bienvenido'),
  12. centerTitle: true,
  13. ),
  14. body: Center(
  15. child: Column(
  16. mainAxisAlignment: MainAxisAlignment.spaceEvenly,
  17. children: [
  18. new FlatButton(
  19. minWidth: 300.0,
  20. height: 100.0,
  21. onPressed: (){
  22. Navigator.pushNamed(context, '/verOficinas');
  23. },
  24. child: Text('Ver Oficinas',
  25. style: TextStyle(fontSize: 36),
  26. ),
  27. color: Colors.purple,
  28. ),
  29. new FlatButton(
  30. minWidth: 300.0,
  31. height: 100.0,
  32. onPressed: (){
  33. Navigator.pushNamed(context, '/calendario');
  34. },
  35. child: Text('Calendario',
  36. style: TextStyle(fontSize: 36),
  37. ),
  38. color: Colors.purple,
  39. ),
  40. new FlatButton(
  41. minWidth: 300.0,
  42. height: 100.0,
  43. onPressed: (){
  44. Navigator.pushNamed(context, '/register');
  45. },
  46. child: Text('register',
  47. style: TextStyle(fontSize: 36),
  48. ),
  49. color: Colors.purple,
  50. ),
  51. new FlatButton(
  52. minWidth: 300.0,
  53. height: 100.0,
  54. onPressed: (){
  55. Navigator.pushNamed(context, '/welcome');
  56. },
  57. child: Text('welcome',
  58. style: TextStyle(fontSize: 36),
  59. ),
  60. color: Colors.purple,
  61. ),
  62. new FlatButton(
  63. minWidth: 300.0,
  64. height: 100.0,
  65. onPressed: (){
  66. Navigator.pushNamed(context, '/MyApp');
  67. },
  68. child: Text('MyApp',
  69. style: TextStyle(fontSize: 36),
  70. ),
  71. color: Colors.purple,
  72. ),
  73. ],
  74. ),
  75. ),
  76. );
  77. }
  78. }