Browse Source

ahora es mas facil añadir otro boton al home

Oniel Mendez 4 years ago
parent
commit
7b3c82b5ae

+ 29
- 9
fast_med_flutter/lib/routes/home.dart View File

@@ -14,16 +14,36 @@ class _HomeState extends State<Home>{
14 14
         centerTitle: true,
15 15
       ),
16 16
       body: Center(
17
-          child: FlatButton(
18
-            minWidth: 300.0,
19
-            height: 100.0,
20
-            onPressed: (){
21
-              Navigator.pushNamed(context, '/verOficinas');
22
-            },
23
-            child: Text('Ver Oficinas'),
24
-            color: Colors.purple,
17
+        child: Column(
18
+          mainAxisAlignment: MainAxisAlignment.spaceEvenly,
19
+          children: [
20
+            new FlatButton(
21
+              minWidth: 300.0,
22
+              height: 100.0,
23
+              onPressed: (){
24
+                Navigator.pushNamed(context, '/verOficinas');
25
+              },
26
+              child: Text('Ver Oficinas',
27
+                style: TextStyle(fontSize: 36),
28
+              ),
29
+              color: Colors.purple,
30
+
31
+            ),
32
+            new FlatButton(
33
+              minWidth: 300.0,
34
+              height: 100.0,
35
+              onPressed: (){
36
+                Navigator.pushNamed(context, '/verOficinas');
37
+              },
38
+              child: Text('Otro boton',
39
+                style: TextStyle(fontSize: 36),
40
+              ),
41
+              color: Colors.purple,
42
+
43
+            ),
44
+            ],
45
+        ),
25 46
 
26
-          )
27 47
       ),
28 48
 
29 49
     );

+ 2
- 2
fast_med_flutter/lib/routes/ver_oficinas.dart View File

@@ -44,8 +44,8 @@ class _VerOficinasState extends State<VerOficinas>{
44 44
     Services.getOficinas().then((Oficinas) {
45 45
       setState(() {
46 46
         _oficinas = Oficinas;
47
-        print(_oficinas);
48
-        print("Length ${Oficinas.length}");
47
+        //print(_oficinas);
48
+        //print("Length ${Oficinas.length}");
49 49
       });
50 50
 
51 51
     });

+ 3
- 3
fast_med_flutter/lib/widgets/DataTableMySqlDemo/Services.dart View File

@@ -14,15 +14,15 @@ class Services {
14 14
     try {
15 15
       var map = Map<String, dynamic>();
16 16
       map['action'] = _GET_ALL;
17
-      print('antes');
17
+      //print('antes');
18 18
       // final response = await http.get(URL_GET_ALL);
19 19
       // print('despues');
20 20
       // print('getOficinas Response: ${response.body}');
21 21
       // if (200 == response.statusCode) {
22 22
       //   List<Oficina> list = parseResponse(response.body);
23 23
       final response = '[{"id":"1","name":"test1"},{"id":"2","name":"test2"},{"id":"3","name":"test3"}]';
24
-      print('despues');
25
-      print('getOficinas Response: $response');
24
+      //print('despues');
25
+      //print('getOficinas Response: $response');
26 26
       if (200 == 200) {
27 27
         List<Oficina> list = parseResponse(response);
28 28
         return list;