Browse Source

Primer Commit

Carlos 3 years ago
parent
commit
4196d234c5
29 changed files with 259 additions and 1215 deletions
  1. 1
    1
      fast_med_flutter/README.md
  2. 1
    1
      fast_med_flutter/android/app/build.gradle
  3. 1
    1
      fast_med_flutter/android/app/src/debug/AndroidManifest.xml
  4. 3
    12
      fast_med_flutter/android/app/src/main/AndroidManifest.xml
  5. 1
    1
      fast_med_flutter/android/app/src/main/kotlin/googlemaps1/googlemaps1/MainActivity.kt
  6. 1
    1
      fast_med_flutter/android/app/src/main/res/drawable/launch_background.xml
  7. 18
    0
      fast_med_flutter/android/app/src/main/res/values-night/styles.xml
  8. 4
    4
      fast_med_flutter/android/app/src/main/res/values/styles.xml
  9. 1
    1
      fast_med_flutter/android/app/src/profile/AndroidManifest.xml
  10. 1
    0
      fast_med_flutter/ios/Flutter/Debug.xcconfig
  11. 1
    0
      fast_med_flutter/ios/Flutter/Release.xcconfig
  12. 41
    0
      fast_med_flutter/ios/Podfile
  13. 3
    3
      fast_med_flutter/ios/Runner.xcodeproj/project.pbxproj
  14. 1
    1
      fast_med_flutter/ios/Runner/Info.plist
  15. 129
    17
      fast_med_flutter/lib/main.dart
  16. 0
    347
      fast_med_flutter/lib/routes/calendario.dart
  17. 0
    87
      fast_med_flutter/lib/routes/home.dart
  18. 0
    33
      fast_med_flutter/lib/routes/main.dart
  19. 0
    161
      fast_med_flutter/lib/routes/register.dart
  20. 0
    91
      fast_med_flutter/lib/routes/ver_oficinas.dart
  21. 0
    201
      fast_med_flutter/lib/routes/welcome.dart
  22. 0
    13
      fast_med_flutter/lib/widgets/DataTableMySqlDemo/Oficina.dart
  23. 0
    46
      fast_med_flutter/lib/widgets/DataTableMySqlDemo/Services.dart
  24. 0
    1
      fast_med_flutter/lib/widgets/MySQL_DataTable/dud.dart
  25. 0
    0
      fast_med_flutter/lib/widgets/data_table/dud.dart
  26. 0
    1
      fast_med_flutter/lib/widgets/dud.dart
  27. 47
    182
      fast_med_flutter/pubspec.lock
  28. 3
    7
      fast_med_flutter/pubspec.yaml
  29. 2
    2
      fast_med_flutter/test/widget_test.dart

+ 1
- 1
fast_med_flutter/README.md View File

@@ -1,4 +1,4 @@
1
-# fast_med_flutter
1
+# googlemaps1
2 2
 
3 3
 A new Flutter application.
4 4
 

+ 1
- 1
fast_med_flutter/android/app/build.gradle View File

@@ -38,7 +38,7 @@ android {
38 38
 
39 39
     defaultConfig {
40 40
         // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41
-        applicationId "com.example.fast_med_flutter"
41
+        applicationId "googlemaps1.googlemaps1"
42 42
         minSdkVersion 16
43 43
         targetSdkVersion 29
44 44
         versionCode flutterVersionCode.toInteger()

+ 1
- 1
fast_med_flutter/android/app/src/debug/AndroidManifest.xml View File

@@ -1,5 +1,5 @@
1 1
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
-    package="com.example.fast_med_flutter">
2
+    package="googlemaps1.googlemaps1">
3 3
     <!-- Flutter needs it to communicate with the running application
4 4
          to allow setting breakpoints, to provide hot reload, etc.
5 5
     -->

+ 3
- 12
fast_med_flutter/android/app/src/main/AndroidManifest.xml View File

@@ -1,16 +1,7 @@
1 1
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
-    package="com.example.fast_med_flutter">
3
-    <!-- io.flutter.app.FlutterApplication is an android.app.Application that
4
-         calls FlutterMain.startInitialization(this); in its onCreate method.
5
-         In most cases you can leave this as-is, but you if you want to provide
6
-         additional functionality it is fine to subclass or reimplement
7
-         FlutterApplication and put your custom class here. -->
8
-    <!-- Required to fetch data from the internet. -->
9
-    <uses-permission android:name="android.permission.INTERNET" />
10
-
11
-    <application
12
-        android:name="io.flutter.app.FlutterApplication"
13
-        android:label="fast_med_flutter"
2
+    package="googlemaps1.googlemaps1">
3
+   <application
4
+        android:label="googlemaps1"
14 5
         android:icon="@mipmap/ic_launcher">
15 6
         <activity
16 7
             android:name=".MainActivity"

fast_med_flutter/android/app/src/main/kotlin/com/example/fast_med_flutter/MainActivity.kt → fast_med_flutter/android/app/src/main/kotlin/googlemaps1/googlemaps1/MainActivity.kt View File

@@ -1,4 +1,4 @@
1
-package com.example.fast_med_flutter
1
+package googlemaps1.googlemaps1
2 2
 
3 3
 import io.flutter.embedding.android.FlutterActivity
4 4
 

+ 1
- 1
fast_med_flutter/android/app/src/main/res/drawable/launch_background.xml View File

@@ -1,7 +1,7 @@
1 1
 <?xml version="1.0" encoding="utf-8"?>
2 2
 <!-- Modify this file to customize your launch splash screen -->
3 3
 <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4
-    <item android:drawable="@android:color/white" />
4
+    <item android:drawable="?android:colorBackground" />
5 5
 
6 6
     <!-- You can insert your own image assets here -->
7 7
     <!-- <item>

+ 18
- 0
fast_med_flutter/android/app/src/main/res/values-night/styles.xml View File

@@ -0,0 +1,18 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<resources>
3
+    <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
4
+    <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
5
+        <!-- Show a splash screen on the activity. Automatically removed when
6
+             Flutter draws its first frame -->
7
+        <item name="android:windowBackground">@drawable/launch_background</item>
8
+    </style>
9
+    <!-- Theme applied to the Android Window as soon as the process has started.
10
+         This theme determines the color of the Android Window while your
11
+         Flutter UI initializes, as well as behind your Flutter UI while its
12
+         running.
13
+         
14
+         This Theme is only used starting with V2 of Flutter's Android embedding. -->
15
+    <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
16
+        <item name="android:windowBackground">?android:colorBackground</item>
17
+    </style>
18
+</resources>

+ 4
- 4
fast_med_flutter/android/app/src/main/res/values/styles.xml View File

@@ -1,7 +1,7 @@
1 1
 <?xml version="1.0" encoding="utf-8"?>
2 2
 <resources>
3
-    <!-- Theme applied to the Android Window while the process is starting -->
4
-    <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
3
+    <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
4
+    <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
5 5
         <!-- Show a splash screen on the activity. Automatically removed when
6 6
              Flutter draws its first frame -->
7 7
         <item name="android:windowBackground">@drawable/launch_background</item>
@@ -12,7 +12,7 @@
12 12
          running.
13 13
          
14 14
          This Theme is only used starting with V2 of Flutter's Android embedding. -->
15
-    <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
16
-        <item name="android:windowBackground">@android:color/white</item>
15
+    <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
16
+        <item name="android:windowBackground">?android:colorBackground</item>
17 17
     </style>
18 18
 </resources>

+ 1
- 1
fast_med_flutter/android/app/src/profile/AndroidManifest.xml View File

@@ -1,5 +1,5 @@
1 1
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
-    package="com.example.fast_med_flutter">
2
+    package="googlemaps1.googlemaps1">
3 3
     <!-- Flutter needs it to communicate with the running application
4 4
          to allow setting breakpoints, to provide hot reload, etc.
5 5
     -->

+ 1
- 0
fast_med_flutter/ios/Flutter/Debug.xcconfig View File

@@ -1 +1,2 @@
1
+#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
1 2
 #include "Generated.xcconfig"

+ 1
- 0
fast_med_flutter/ios/Flutter/Release.xcconfig View File

@@ -1 +1,2 @@
1
+#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
1 2
 #include "Generated.xcconfig"

+ 41
- 0
fast_med_flutter/ios/Podfile View File

@@ -0,0 +1,41 @@
1
+# Uncomment this line to define a global platform for your project
2
+# platform :ios, '9.0'
3
+
4
+# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5
+ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6
+
7
+project 'Runner', {
8
+  'Debug' => :debug,
9
+  'Profile' => :release,
10
+  'Release' => :release,
11
+}
12
+
13
+def flutter_root
14
+  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15
+  unless File.exist?(generated_xcode_build_settings_path)
16
+    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17
+  end
18
+
19
+  File.foreach(generated_xcode_build_settings_path) do |line|
20
+    matches = line.match(/FLUTTER_ROOT\=(.*)/)
21
+    return matches[1].strip if matches
22
+  end
23
+  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24
+end
25
+
26
+require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27
+
28
+flutter_ios_podfile_setup
29
+
30
+target 'Runner' do
31
+  use_frameworks!
32
+  use_modular_headers!
33
+
34
+  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35
+end
36
+
37
+post_install do |installer|
38
+  installer.pods_project.targets.each do |target|
39
+    flutter_additional_ios_build_settings(target)
40
+  end
41
+end

+ 3
- 3
fast_med_flutter/ios/Runner.xcodeproj/project.pbxproj View File

@@ -299,7 +299,7 @@
299 299
 					"$(inherited)",
300 300
 					"$(PROJECT_DIR)/Flutter",
301 301
 				);
302
-				PRODUCT_BUNDLE_IDENTIFIER = com.example.fastMedFlutter;
302
+				PRODUCT_BUNDLE_IDENTIFIER = googlemaps1.googlemaps1;
303 303
 				PRODUCT_NAME = "$(TARGET_NAME)";
304 304
 				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
305 305
 				SWIFT_VERSION = 5.0;
@@ -431,7 +431,7 @@
431 431
 					"$(inherited)",
432 432
 					"$(PROJECT_DIR)/Flutter",
433 433
 				);
434
-				PRODUCT_BUNDLE_IDENTIFIER = com.example.fastMedFlutter;
434
+				PRODUCT_BUNDLE_IDENTIFIER = googlemaps1.googlemaps1;
435 435
 				PRODUCT_NAME = "$(TARGET_NAME)";
436 436
 				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
437 437
 				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -458,7 +458,7 @@
458 458
 					"$(inherited)",
459 459
 					"$(PROJECT_DIR)/Flutter",
460 460
 				);
461
-				PRODUCT_BUNDLE_IDENTIFIER = com.example.fastMedFlutter;
461
+				PRODUCT_BUNDLE_IDENTIFIER = googlemaps1.googlemaps1;
462 462
 				PRODUCT_NAME = "$(TARGET_NAME)";
463 463
 				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
464 464
 				SWIFT_VERSION = 5.0;

+ 1
- 1
fast_med_flutter/ios/Runner/Info.plist View File

@@ -11,7 +11,7 @@
11 11
 	<key>CFBundleInfoDictionaryVersion</key>
12 12
 	<string>6.0</string>
13 13
 	<key>CFBundleName</key>
14
-	<string>fast_med_flutter</string>
14
+	<string>googlemaps1</string>
15 15
 	<key>CFBundlePackageType</key>
16 16
 	<string>APPL</string>
17 17
 	<key>CFBundleShortVersionString</key>

+ 129
- 17
fast_med_flutter/lib/main.dart View File

@@ -1,19 +1,131 @@
1
-import 'package:fast_med_flutter/routes/home.dart';
2
-import 'package:fast_med_flutter/routes/ver_oficinas.dart';
3
-import 'package:fast_med_flutter/routes/calendario.dart';
4
-import 'package:fast_med_flutter/routes/main.dart';
5
-import 'package:fast_med_flutter/routes/register.dart';
6
-import 'package:fast_med_flutter/routes/welcome.dart';
7 1
 import 'package:flutter/material.dart';
2
+import 'package:url_launcher/url_launcher.dart';
3
+
4
+
5
+void main() {
6
+  runApp(MyApp());
7
+}
8
+
9
+class MyApp extends StatelessWidget {
10
+  // This widget is the root of your application.
11
+  @override
12
+  Widget build(BuildContext context) {
13
+    return MaterialApp(
14
+      title: 'Flutter Demo',
15
+      theme: ThemeData(
16
+        // This is the theme of your application.
17
+        //
18
+        // Try running your application with "flutter run". You'll see the
19
+        // application has a blue toolbar. Then, without quitting the app, try
20
+        // changing the primarySwatch below to Colors.green and then invoke
21
+        // "hot reload" (press "r" in the console where you ran "flutter run",
22
+        // or simply save your changes to "hot reload" in a Flutter IDE).
23
+        // Notice that the counter didn't reset back to zero; the application
24
+        // is not restarted.
25
+        primarySwatch: Colors.blue,
26
+      ),
27
+      home: MyHomePage(title: 'Flutter Demo Home Page'),
28
+    );
29
+  }
30
+}
31
+
32
+class MyHomePage extends StatefulWidget {
33
+  MyHomePage({Key key, this.title}) : super(key: key);
34
+
35
+  // This widget is the home page of your application. It is stateful, meaning
36
+  // that it has a State object (defined below) that contains fields that affect
37
+  // how it looks.
38
+
39
+  // This class is the configuration for the state. It holds the values (in this
40
+  // case the title) provided by the parent (in this case the App widget) and
41
+  // used by the build method of the State. Fields in a Widget subclass are
42
+  // always marked "final".
43
+
44
+  final String title;
45
+
46
+  @override
47
+  _MyHomePageState createState() => _MyHomePageState();
48
+}
49
+
50
+class _MyHomePageState extends State<MyHomePage> {
51
+  int _counter = 0;
52
+
53
+  void _incrementCounter() async {
54
+    setState(() async {
55
+      String destinationLatitude = "18.39007092764153";
56
+      String destinationLongitude = "-65.976216841223";
57
+      String originlatitude = "18.418738017376207";
58
+      String originlongitude = "-66.02565531285634";
59
+
60
+      //const url = 'https://www.google.com/maps/@42.585444,13.007813,6z';
61
+      const url = "https://www.google.com/maps/dir/?api=1&parameters&origin=18.418738017376207,-66.02565531285634&destination=18.39007092764153,-65.976216841223";
62
+      if (await canLaunch(url)) {
63
+      await launch(url);
64
+      } else {
65
+      throw 'Could not launch $url';
66
+      }
67
+
68
+      //String uri = "http://maps.google.com/maps?daddr=" + destinationLatitude + "," + destinationLongitude + " (" + "Doctor" + ")";
69
+      //Intent intent;
70
+      //intent.setAction(Action.ACTION_VIEW);
71
+      //Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
72
+      //intent.setPackage("com.google.android.apps.maps");
73
+      //startActivity(intent);
74
+      //UIApplication.shared.openURL(URL(string:"https://www.google.com/maps/@42.585444,13.007813,6z")!);
75
+      _counter++;
76
+    });
77
+  }
78
+
79
+  @override
80
+  Widget build(BuildContext context) {
81
+    // This method is rerun every time setState is called, for instance as done
82
+    // by the _incrementCounter method above.
83
+    //
84
+    // The Flutter framework has been optimized to make rerunning build methods
85
+    // fast, so that you can just rebuild anything that needs updating rather
86
+    // than having to individually change instances of widgets.
87
+    return Scaffold(
88
+      appBar: AppBar(
89
+        // Here we take the value from the MyHomePage object that was created by
90
+        // the App.build method, and use it to set our appbar title.
91
+        title: Text(widget.title),
92
+      ),
93
+      body: Center(
94
+        // Center is a layout widget. It takes a single child and positions it
95
+        // in the middle of the parent.
96
+        child: Column(
97
+          // Column is also a layout widget. It takes a list of children and
98
+          // arranges them vertically. By default, it sizes itself to fit its
99
+          // children horizontally, and tries to be as tall as its parent.
100
+          //
101
+          // Invoke "debug painting" (press "p" in the console, choose the
102
+          // "Toggle Debug Paint" action from the Flutter Inspector in Android
103
+          // Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
104
+          // to see the wireframe for each widget.
105
+          //
106
+          // Column has various properties to control how it sizes itself and
107
+          // how it positions its children. Here we use mainAxisAlignment to
108
+          // center the children vertically; the main axis here is the vertical
109
+          // axis because Columns are vertical (the cross axis would be
110
+          // horizontal).
111
+          mainAxisAlignment: MainAxisAlignment.center,
112
+          children: <Widget>[
113
+            Text(
114
+              'You have pushed the button this many times:',
115
+            ),
116
+            Text(
117
+              '$_counter',
118
+              style: Theme.of(context).textTheme.headline4,
119
+            ),
120
+          ],
121
+        ),
122
+      ),
123
+      floatingActionButton: FloatingActionButton(
124
+        onPressed: _incrementCounter,
125
+        tooltip: 'Increment',
126
+        child: Icon(Icons.add),
127
+      ), // This trailing comma makes auto-formatting nicer for build methods.
128
+    );
129
+  }
130
+}
8 131
 
9
-void main() => runApp(MaterialApp(
10
-    initialRoute: '/home',
11
-    routes: {
12
-      '/home': (context) => Home(),
13
-      '/verOficinas': (context) => VerOficinas(),
14
-      '/calendario': (context) => Calendario(),
15
-      '/welcome': (context) => WelcomePage(),
16
-      '/register': (context) => RegisterPage(),
17
-      '/MyApp': (context) => MyApp(),
18
-    }
19
-));

+ 0
- 347
fast_med_flutter/lib/routes/calendario.dart View File

@@ -1,347 +0,0 @@
1
-import 'package:flutter/material.dart';
2
-import 'package:intl/date_symbol_data_local.dart';
3
-import 'package:table_calendar/table_calendar.dart';
4
-
5
-// Dias sin Citas Disponibles
6
-final Map<DateTime, List> _holidays = {
7
-  DateTime(2020, 11, 6): ['No Hay Citas'],
8
-  DateTime(2020, 11, 3): ['Dia Elecciones'],
9
-
10
-};
11
-
12
-void main() {
13
-  initializeDateFormatting().then((_) => runApp(Calendario()));
14
-}
15
-
16
-
17
-
18
-class Calendario extends StatelessWidget {
19
-  @override
20
-  Widget build(BuildContext context) {
21
-    return MaterialApp(
22
-      title: 'Citas Disponibles',
23
-      theme: ThemeData(
24
-        primarySwatch: Colors.blue,
25
-      ),
26
-      home: MyHomePage(title: 'Citas Disponibles'),
27
-    );
28
-  }
29
-}
30
-
31
-class MyHomePage extends StatefulWidget {
32
-  MyHomePage({Key key, this.title}) : super(key: key);
33
-
34
-  final String title;
35
-
36
-  @override
37
-  _MyHomePageState createState() => _MyHomePageState();
38
-}
39
-
40
-class _MyHomePageState extends State<MyHomePage> with TickerProviderStateMixin {
41
-  Map<DateTime, List> _events;
42
-  List _selectedEvents;
43
-  AnimationController _animationController;
44
-  CalendarController _calendarController;
45
-
46
-  @override
47
-  void initState() {
48
-    super.initState();
49
-    final _selectedDay = DateTime.now();
50
-
51
-    _events = {
52
-
53
-      _selectedDay.add(Duration(days: 3)): Set.from([ 'Cita Cardiologo', 'Cita Dentista']).toList(),
54
-      _selectedDay.add(Duration(days: 22)): ['Cita Cardiologo', 'Cita Dentista'],
55
-
56
-    };
57
-
58
-    _selectedEvents = _events[_selectedDay] ?? [];
59
-    _calendarController = CalendarController();
60
-
61
-    _animationController = AnimationController(
62
-      vsync: this,
63
-      duration: const Duration(milliseconds: 400),
64
-    );
65
-
66
-    _animationController.forward();
67
-  }
68
-
69
-  @override
70
-  void dispose() {
71
-    _animationController.dispose();
72
-    _calendarController.dispose();
73
-    super.dispose();
74
-  }
75
-
76
-  void _onDaySelected(DateTime day, List events, List holidays) {
77
-    print('CALLBACK: _onDaySelected');
78
-    setState(() {
79
-      _selectedEvents = events;
80
-    });
81
-  }
82
-
83
-  void _onVisibleDaysChanged(DateTime first, DateTime last, CalendarFormat format) {
84
-    print('CALLBACK: _onVisibleDaysChanged');
85
-  }
86
-
87
-  void _onCalendarCreated(DateTime first, DateTime last, CalendarFormat format) {
88
-    print('CALLBACK: _onCalendarCreated');
89
-  }
90
-
91
-  @override
92
-  Widget build(BuildContext context) {
93
-    return Scaffold(
94
-      appBar: AppBar(
95
-        title: Text(widget.title),
96
-      ),
97
-      body: Column(
98
-        mainAxisSize: MainAxisSize.max,
99
-        children: <Widget>[
100
-          // Switch out 2 lines below to play with TableCalendar's settings
101
-          //-----------------------
102
-          _buildTableCalendar(),
103
-          // _buildTableCalendarWithBuilders(),
104
-          const SizedBox(height: 8.0),
105
-          _buildButtons(),
106
-          const SizedBox(height: 8.0),
107
-          Expanded(child: _buildEventList()),
108
-        ],
109
-      ),
110
-    );
111
-  }
112
-  //Back button
113
-  Widget BackButton(BuildContext context){
114
-    return InkWell(
115
-      onTap: (){
116
-        Navigator.pop(context);
117
-      },
118
-      child: Row(
119
-          children: <Widget>[
120
-            Container(
121
-              padding: EdgeInsets.only(left: 0, top:10, bottom: 10),
122
-              child: Icon(Icons.arrow_back_ios, color: Colors.black),
123
-            ),
124
-            Text("Black",
125
-                style: TextStyle(fontSize: 12, fontWeight: FontWeight.w500))
126
-          ]
127
-      ),
128
-    );
129
-  }
130
-
131
-  // Simple TableCalendar configuration (using Styles)
132
-  Widget _buildTableCalendar() {
133
-    return TableCalendar(
134
-      calendarController: _calendarController,
135
-      events: _events,
136
-      holidays: _holidays,
137
-      startingDayOfWeek: StartingDayOfWeek.monday,
138
-      calendarStyle: CalendarStyle(
139
-        selectedColor: Colors.lightBlueAccent,
140
-        todayColor: Colors.blueAccent,
141
-        markersColor: Colors.brown,
142
-        outsideDaysVisible: false,
143
-      ),
144
-      headerStyle: HeaderStyle(
145
-        formatButtonTextStyle: TextStyle().copyWith(color: Colors.white, fontSize: 15.0),
146
-        formatButtonDecoration: BoxDecoration(
147
-          color: Colors.lightBlue,
148
-          borderRadius: BorderRadius.circular(16.0),
149
-        ),
150
-      ),
151
-      onDaySelected: _onDaySelected,
152
-      onVisibleDaysChanged: _onVisibleDaysChanged,
153
-      onCalendarCreated: _onCalendarCreated,
154
-    );
155
-  }
156
-
157
-  // More advanced TableCalendar configuration (using Builders & Styles)
158
-  Widget _buildTableCalendarWithBuilders() {
159
-    return TableCalendar(
160
-      locale: 'pl_PL',
161
-      calendarController: _calendarController,
162
-      events: _events,
163
-      holidays: _holidays,
164
-      initialCalendarFormat: CalendarFormat.month,
165
-      formatAnimation: FormatAnimation.slide,
166
-      startingDayOfWeek: StartingDayOfWeek.sunday,
167
-      availableGestures: AvailableGestures.all,
168
-      availableCalendarFormats: const {
169
-        CalendarFormat.month: '',
170
-        CalendarFormat.week: '',
171
-      },
172
-      calendarStyle: CalendarStyle(
173
-        outsideDaysVisible: false,
174
-        weekendStyle: TextStyle().copyWith(color: Colors.blue),
175
-        holidayStyle: TextStyle().copyWith(color: Colors.blue),
176
-      ),
177
-      daysOfWeekStyle: DaysOfWeekStyle(
178
-        weekendStyle: TextStyle().copyWith(color: Colors.blue),
179
-      ),
180
-      headerStyle: HeaderStyle(
181
-        centerHeaderTitle: true,
182
-        formatButtonVisible: false,
183
-      ),
184
-      builders: CalendarBuilders(
185
-        selectedDayBuilder: (context, date, _) {
186
-          return FadeTransition(
187
-            opacity: Tween(begin: 0.0, end: 1.0).animate(_animationController),
188
-            child: Container(
189
-              margin: const EdgeInsets.all(4.0),
190
-              padding: const EdgeInsets.only(top: 5.0, left: 6.0),
191
-              color: Colors.green,
192
-              width: 100,
193
-              height: 100,
194
-              child: Text(
195
-                '${date.day}',
196
-                style: TextStyle().copyWith(fontSize: 16.0),
197
-              ),
198
-            ),
199
-          );
200
-        },
201
-        todayDayBuilder: (context, date, _) {
202
-          return Container(
203
-            margin: const EdgeInsets.all(4.0),
204
-            padding: const EdgeInsets.only(top: 5.0, left: 6.0),
205
-            color: Colors.amber,
206
-            width: 100,
207
-            height: 100,
208
-            child: Text(
209
-              '${date.day}',
210
-              style: TextStyle().copyWith(fontSize: 16.0),
211
-            ),
212
-          );
213
-        },
214
-        markersBuilder: (context, date, events, holidays) {
215
-          final children = <Widget>[];
216
-
217
-          if (events.isNotEmpty) {
218
-            children.add(
219
-              Positioned(
220
-                right: 1,
221
-                bottom: 1,
222
-                child: _buildEventsMarker(date, events),
223
-              ),
224
-            );
225
-          }
226
-
227
-          if (holidays.isNotEmpty) {
228
-            children.add(
229
-              Positioned(
230
-                right: -2,
231
-                top: -2,
232
-                child: _buildHolidaysMarker(),
233
-              ),
234
-            );
235
-          }
236
-
237
-          return children;
238
-        },
239
-      ),
240
-      onDaySelected: (date, events, holidays) {
241
-        _onDaySelected(date, events, holidays);
242
-        _animationController.forward(from: 0.0);
243
-      },
244
-      onVisibleDaysChanged: _onVisibleDaysChanged,
245
-      onCalendarCreated: _onCalendarCreated,
246
-    );
247
-  }
248
-
249
-  Widget _buildEventsMarker(DateTime date, List events) {
250
-    return AnimatedContainer(
251
-      duration: const Duration(milliseconds: 300),
252
-      decoration: BoxDecoration(
253
-        shape: BoxShape.rectangle,
254
-        color: _calendarController.isSelected(date)
255
-            ? Colors.brown[500]
256
-            : _calendarController.isToday(date) ? Colors.brown : Colors.blue,
257
-      ),
258
-      width: 16.0,
259
-      height: 16.0,
260
-      child: Center(
261
-        child: Text(
262
-          '${events.length}',
263
-          style: TextStyle().copyWith(
264
-            color: Colors.green,
265
-            fontSize: 12.0,
266
-          ),
267
-        ),
268
-      ),
269
-    );
270
-  }
271
-
272
-  Widget _buildHolidaysMarker() {
273
-    return Icon(
274
-      Icons.add_box,
275
-      size: 20.0,
276
-      color: Colors.blueGrey,
277
-    );
278
-  }
279
-
280
-  Widget _buildButtons() {
281
-    final dateTime = _events.keys.elementAt(_events.length - 2);
282
-
283
-    return Column(
284
-      children: <Widget>[
285
-        Row(
286
-          mainAxisSize: MainAxisSize.max,
287
-          mainAxisAlignment: MainAxisAlignment.spaceEvenly,
288
-          children: <Widget>[
289
-            RaisedButton(
290
-              child: Text('Mes'),
291
-              onPressed: () {
292
-                setState(() {
293
-                  _calendarController.setCalendarFormat(CalendarFormat.month);
294
-                });
295
-              },
296
-            ),
297
-            RaisedButton(
298
-              child: Text('2 Semanas'),
299
-              onPressed: () {
300
-                setState(() {
301
-                  _calendarController.setCalendarFormat(CalendarFormat.twoWeeks);
302
-                });
303
-              },
304
-            ),
305
-            RaisedButton(
306
-              child: Text('Semana'),
307
-              onPressed: () {
308
-                setState(() {
309
-                  _calendarController.setCalendarFormat(CalendarFormat.week);
310
-                });
311
-              },
312
-            ),
313
-          ],
314
-        ),
315
-        const SizedBox(height: 8.0),
316
-        RaisedButton(
317
-          child: Text('Recuerde Cita ${dateTime.day}-${dateTime.month}-${dateTime.year}'),
318
-          onPressed: () {
319
-            _calendarController.setSelectedDay(
320
-              DateTime(dateTime.year, dateTime.month, dateTime.day),
321
-              runCallback: true,
322
-            );
323
-          },
324
-        ),
325
-      ],
326
-    );
327
-  }
328
-
329
-
330
-  Widget _buildEventList() {
331
-    return ListView(
332
-      children: _selectedEvents
333
-          .map((event) => Container(
334
-        decoration: BoxDecoration(
335
-          border: Border.all(width: 0.8),
336
-          borderRadius: BorderRadius.circular(12.0),
337
-        ),
338
-        margin: const EdgeInsets.symmetric(horizontal: 8.0, vertical: 4.0),
339
-        child: ListTile(
340
-          title: Text(event.toString()),
341
-          onTap: () => print('$event tapped!'),
342
-        ),
343
-      ))
344
-          .toList(),
345
-    );
346
-  }
347
-}

+ 0
- 87
fast_med_flutter/lib/routes/home.dart View File

@@ -1,87 +0,0 @@
1
-import 'package:flutter/material.dart';
2
-
3
-class Home extends StatefulWidget{
4
-  @override
5
-  _HomeState createState() => _HomeState();
6
-}
7
-
8
-class _HomeState extends State<Home>{
9
-  @override
10
-  Widget build(BuildContext context){
11
-    return Scaffold(
12
-      appBar: AppBar(
13
-        title: Text('Bienvenido'),
14
-        centerTitle: true,
15
-      ),
16
-      body: Center(
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, '/calendario');
37
-              },
38
-              child: Text('Calendario',
39
-                style: TextStyle(fontSize: 36),
40
-              ),
41
-              color: Colors.purple,
42
-
43
-            ),
44
-            new FlatButton(
45
-              minWidth: 300.0,
46
-              height: 100.0,
47
-              onPressed: (){
48
-                Navigator.pushNamed(context, '/register');
49
-              },
50
-              child: Text('register',
51
-                style: TextStyle(fontSize: 36),
52
-              ),
53
-              color: Colors.purple,
54
-
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
-            ),
68
-            new FlatButton(
69
-              minWidth: 300.0,
70
-              height: 100.0,
71
-              onPressed: (){
72
-                Navigator.pushNamed(context, '/MyApp');
73
-              },
74
-              child: Text('MyApp',
75
-                style: TextStyle(fontSize: 36),
76
-              ),
77
-              color: Colors.purple,
78
-
79
-            ),
80
-            ],
81
-        ),
82
-
83
-      ),
84
-
85
-    );
86
-  }
87
-}

+ 0
- 33
fast_med_flutter/lib/routes/main.dart View File

@@ -1,33 +0,0 @@
1
-
2
-import 'package:flutter/cupertino.dart';
3
-import 'package:flutter_login/flutter_login.dart';
4
-import 'package:flutter/material.dart';
5
-import 'package:google_fonts/google_fonts.dart';
6
-import 'register.dart';
7
-import 'welcome.dart';
8
-
9
-// import 'dashboard_screen.dart';
10
-
11
-
12
-
13
-void main() =>  runApp(MyApp());
14
-
15
-
16
-
17
-class MyApp extends StatelessWidget{
18
-  
19
-  static const String title = "FastMed";
20
-
21
-  @override
22
-  Widget build(BuildContext context){
23
-    final textTheme = Theme.of(context).textTheme;
24
-    return MaterialApp(
25
-      title: title,
26
-      theme: ThemeData(
27
-        textTheme: GoogleFonts.cabinTextTheme(textTheme),
28
-        ),
29
-      home: WelcomePage(),
30
-    );
31
-  }
32
-
33
-}

+ 0
- 161
fast_med_flutter/lib/routes/register.dart View File

@@ -1,161 +0,0 @@
1
-import 'package:flutter_login/flutter_login.dart';
2
-import 'package:flutter/material.dart';
3
-import 'package:google_fonts/google_fonts.dart';
4
-
5
-//
6
-//Still to add: 
7
-//  Email verification, that the input has "@" and "."
8
-//  Send email and password to database
9
-//
10
-//
11
-//
12
-
13
-class RegisterPage extends StatefulWidget{
14
-  
15
-  RegisterPage({Key key, this.title}) : super(key: key);
16
-  final String title;
17
-
18
-  @override
19
-  _RegisterPageState createState() => _RegisterPageState();
20
-}
21
-
22
-class _RegisterPageState extends State<RegisterPage> {
23
-
24
-  TextEditingController email;
25
-  TextEditingController password;
26
-  TextEditingController confirmpass;
27
-
28
-  // Future<List> send_data() async {
29
-  //   final data = await
30
-  // }
31
-
32
-  String _SamePass(){
33
-    if(password == confirmpass){
34
-      return "Same password";
35
-    }
36
-    else{
37
-      return "Different passwords";
38
-    }
39
-  }
40
-
41
-  Widget _BackButton(BuildContext context){
42
-    return InkWell(
43
-      onTap: (){
44
-        Navigator.pop(context);
45
-      },
46
-      child: Row(
47
-        children: <Widget>[
48
-          Container(
49
-            padding: EdgeInsets.only(left: 0, top: 10, bottom: 10),
50
-            child: Icon(Icons.arrow_back_ios, color: Colors.black),
51
-          ),
52
-          Text("Back",
53
-          style: TextStyle(fontSize: 12, fontWeight: FontWeight.w500))
54
-        ]
55
-      ),
56
-    );
57
-  }
58
-
59
-  Widget _SubmitButton(BuildContext context){
60
-    return InkWell(
61
-       onTap: (){
62
-
63
-       },
64
-      child: Container(
65
-        padding: EdgeInsets.symmetric(vertical: 10),
66
-        width: 250,
67
-        alignment: Alignment.center,
68
-        decoration: BoxDecoration(
69
-          color: Colors.red,
70
-          borderRadius: BorderRadius.circular(30),
71
-        ),
72
-        child: Text(
73
-          "Submit",
74
-          style: TextStyle(fontSize: 22, color: Colors.white),
75
-        ),
76
-      ),
77
-    );
78
-  }
79
-
80
-  Widget _EntryField(String title, TextEditingController controller, {bool pass = false}){
81
-    return Container(
82
-      padding: EdgeInsets.only(left: 0, top: 10, bottom: 10),
83
-      child: Column(
84
-        crossAxisAlignment: CrossAxisAlignment.start,
85
-      
86
-        children: <Widget> [
87
-          Text(
88
-            title,
89
-            style: TextStyle(fontWeight: FontWeight.bold, fontSize: 15),
90
-          ),
91
-          SizedBox(
92
-            height: 30
93
-          ),
94
-          TextField(
95
-            controller: controller,
96
-            obscureText: pass,
97
-            decoration: InputDecoration(
98
-              border: (
99
-                  UnderlineInputBorder()
100
-              ),
101
-            ),
102
-          )
103
-        ]
104
-      ),
105
-      
106
-    );
107
-  }
108
-
109
-  Widget _Fills(){
110
-    return Column(
111
-      children: <Widget> [
112
-      _EntryField("Email", email),
113
-      _EntryField("Password", password, pass: true),
114
-      _EntryField("Confirm Password", confirmpass, pass: true)
115
-    
116
-    ]
117
-    );
118
-  }
119
-
120
-//add column or stack
121
-  @override
122
-  Widget build(BuildContext context) {
123
-    final height = MediaQuery.of(context).size.height;
124
-    return Scaffold(
125
-      body: Container(
126
-        height: height,
127
-        child: Stack(
128
-          
129
-          children: <Widget>[
130
-            Container(
131
-              padding: EdgeInsets.symmetric(horizontal: 20),
132
-              child: SingleChildScrollView(
133
-                child: Column(
134
-                  crossAxisAlignment: CrossAxisAlignment.center,
135
-                  mainAxisAlignment: MainAxisAlignment.center,
136
-                  children: <Widget>[
137
-                     SizedBox(
138
-                      height: 200,
139
-                    ),
140
-                    _Fills(),
141
-                    //Add code to verify if password and confirm password match
142
-                    SizedBox(
143
-                      height: 20,
144
-                    ),
145
-                    _SubmitButton(context),
146
-                  ],
147
-                ),
148
-              )
149
-            ),
150
-            Positioned(
151
-            top: 12, left: 20, child: _BackButton(context),
152
-          ),
153
-          ],
154
-          
155
-        ),
156
-      )
157
-    );
158
-  }
159
-    
160
-}
161
-

+ 0
- 91
fast_med_flutter/lib/routes/ver_oficinas.dart View File

@@ -1,91 +0,0 @@
1
-import 'package:flutter/material.dart';
2
-import '../widgets/DataTableMySqlDemo/Oficina.dart';
3
-import '../widgets/DataTableMySqlDemo/Services.dart';
4
-import 'dart:async';
5
-
6
-class VerOficinas extends StatefulWidget{
7
-  VerOficinas() : super();
8
-  final String title = 'Oficinas';
9
-  @override
10
-  State<StatefulWidget> viewOficinas() {
11
-    //no se que hago, quizas no lo necesite
12
-    return null;
13
-  }
14
-  _VerOficinasState createState() => _VerOficinasState();
15
-}
16
-
17
-class _VerOficinasState extends State<VerOficinas>{
18
-  List<Oficina> _oficinas;
19
-  List<Oficina> _filterOficinas;
20
-  GlobalKey<ScaffoldState> _scaffoldKey;
21
-  TextEditingController _nameController;//
22
-  Oficina _selectOficina;
23
-  bool _isUpdateing;
24
-
25
-  @override
26
-  void initState() {
27
-    super.initState();
28
-    _oficinas = [];
29
-    // _filterOficinas = [];
30
-    _isUpdateing = false;
31
-    _scaffoldKey = GlobalKey();
32
-    _nameController = TextEditingController();
33
-    _getOficinas();
34
-  }
35
-
36
-  _getOficinas() {
37
-
38
-    return _oficinas;
39
-  }
40
-
41
-
42
-  @override
43
-  Widget build(BuildContext context){
44
-    Services.getOficinas().then((Oficinas) {
45
-      setState(() {
46
-        _oficinas = Oficinas;
47
-        //print(_oficinas);
48
-        //print("Length ${Oficinas.length}");
49
-      });
50
-
51
-    });
52
-    List<Oficina> lista =  _oficinas;
53
-    return Scaffold(
54
-      key: _scaffoldKey,
55
-      appBar: AppBar(
56
-        title: Text('Oficinas'),
57
-        centerTitle: true,
58
-        backgroundColor: Colors.purple,
59
-
60
-      ),
61
-      body: Center(
62
-          child: Column(
63
-            mainAxisAlignment: MainAxisAlignment.spaceEvenly,
64
-            children: lista.map((Oficina data) {
65
-              return FlatButton(
66
-                minWidth: 300.0,
67
-                height: 100.0,
68
-                child: Text(data.name,
69
-                style: TextStyle(fontSize: 36),
70
-                ),
71
-                onPressed: () {
72
-                  print(data.name);
73
-                },
74
-                padding: new EdgeInsets.all(0.0),
75
-                color: Colors.purple,
76
-
77
-              );
78
-            }).toList(),
79
-          ),
80
-          // child: FlatButton(
81
-          //   onPressed: (){
82
-          //     _getOficinas();
83
-          //   },
84
-          //   child: Text('Ver Oficinas'),
85
-          //   color: Colors.purple,
86
-          // )
87
-      ),
88
-
89
-    );
90
-  }
91
-}

+ 0
- 201
fast_med_flutter/lib/routes/welcome.dart View File

@@ -1,201 +0,0 @@
1
-
2
-
3
-import 'package:flutter_login/flutter_login.dart';
4
-import 'package:flutter/material.dart';
5
-import 'package:google_fonts/google_fonts.dart';
6
-import 'register.dart';
7
-
8
-
9
-
10
-
11
-
12
-class WelcomePage extends StatefulWidget {
13
-  WelcomePage({Key key, this.title}) : super(key: key);
14
-
15
-  final String title;
16
-
17
-  @override
18
-  _WelcomePageState createState() => _WelcomePageState();
19
-}
20
-
21
-class _WelcomePageState extends State<WelcomePage> {
22
-
23
-  TextEditingController email;
24
-  TextEditingController password;
25
-
26
-  Widget _message(BuildContext context){
27
-    return RichText(
28
-      textAlign: TextAlign.center,
29
-      text: TextSpan(
30
-          text: "Don't have an account?",
31
-          style: GoogleFonts.cabin(
32
-              fontSize: 18,
33
-              color: Colors.black
34
-          )
35
-      ),
36
-    );
37
-  }
38
-
39
-  Widget _title(BuildContext context){
40
-    return RichText(
41
-      textAlign: TextAlign.center,
42
-      text: TextSpan(
43
-          text: "Welcome to FastMed",
44
-          style: GoogleFonts.cabin(
45
-              fontSize: 30,
46
-              color: Colors.red
47
-          )
48
-      ),
49
-    );
50
-
51
-  }
52
-
53
-  Widget _LoginField(String title, TextEditingController controller, {bool pass = false}){
54
-    return Container(
55
-      padding: EdgeInsets.only(left: 0, top: 10, bottom: 10),
56
-      child: Column(
57
-          crossAxisAlignment: CrossAxisAlignment.start,
58
-
59
-          children: <Widget> [
60
-            Text(
61
-              title,
62
-              style: TextStyle(fontWeight: FontWeight.bold, fontSize: 15),
63
-            ),
64
-            SizedBox(
65
-                height: 30
66
-            ),
67
-            TextField(
68
-              controller: controller,
69
-              obscureText: pass,
70
-              decoration: InputDecoration(
71
-                border: (
72
-                    UnderlineInputBorder(
73
-
74
-                    )
75
-                ),
76
-              ),
77
-            ),
78
-          ]
79
-      ),
80
-
81
-    );
82
-  }
83
-
84
-  Widget _Fills(){
85
-    return Column(
86
-        children: <Widget> [
87
-          _LoginField("Email", email),
88
-          _LoginField("Password", password, pass: true),
89
-
90
-        ]
91
-    );
92
-  }
93
-
94
-
95
-
96
-  // Widget _LogInButton(BuildContext context){
97
-  //   return InkWell(
98
-  //     // onTap: () {
99
-  //     //   Navigator.push(context, MaterialPageRoute(builder: (context)) => __LoginPage())
100
-  //     // },
101
-  //     child: Container(
102
-  //       // width: MediaQuery.of(context).size.width,
103
-  //       width: 200,
104
-  //       // height: ,
105
-  //       padding: EdgeInsets.symmetric(vertical:8),
106
-  //       alignment: Alignment.center,
107
-  //       decoration: BoxDecoration(
108
-  //         color: Colors.red,
109
-  //         // shape:
110
-  //
111
-  //         borderRadius: BorderRadius.circular(30),
112
-  //       ),
113
-  //       child: Text(
114
-  //         "Login",
115
-  //         style: TextStyle(fontSize: 25, color: Colors.white),
116
-  //       ),
117
-  //
118
-  //     )
119
-  //   );
120
-  // }
121
-
122
-  Widget _RegisterButton(BuildContext context){
123
-    return InkWell(
124
-        onTap: () {
125
-          Navigator.push(
126
-              context, MaterialPageRoute(builder: (context) => RegisterPage()));
127
-        },
128
-        child: Container(
129
-          // width: MediaQuery.of(context).size.width,
130
-          width: 180,
131
-          padding: EdgeInsets.symmetric(vertical:8),
132
-          alignment: Alignment.center,
133
-          decoration: BoxDecoration(
134
-            color: Colors.red,
135
-            // shape:
136
-
137
-            borderRadius: BorderRadius.circular(30),
138
-          ),
139
-          child: Text(
140
-            "Register",
141
-            style: TextStyle(fontSize: 22, color: Colors.white),
142
-          ),
143
-
144
-        )
145
-    );
146
-  }
147
-
148
-  @override
149
-  Widget build(BuildContext context) {
150
-    final height = MediaQuery.of(context).size.height;
151
-    return Scaffold(
152
-        body: Container(
153
-          height: height,
154
-          child:Container(
155
-            width: MediaQuery.of(context).size.width,
156
-            padding: EdgeInsets.symmetric(horizontal: 20),
157
-            // height: MediaQuery.of(context).size.height,
158
-            decoration: BoxDecoration(
159
-                borderRadius: BorderRadius.all(Radius.circular(4)),
160
-                boxShadow: [
161
-                  BoxShadow(
162
-                      color: Colors.white,
163
-                      offset: Offset(0,3),
164
-                      blurRadius: 5,
165
-                      spreadRadius: 2)
166
-                ]
167
-
168
-            ),
169
-            child: SingleChildScrollView(
170
-                child: Column(
171
-                  crossAxisAlignment: CrossAxisAlignment.center,
172
-                  mainAxisAlignment: MainAxisAlignment.center,
173
-                  children: <Widget> [
174
-                    SizedBox(
175
-                      height: 80,
176
-                    ),
177
-                    _title(context),
178
-                    SizedBox(
179
-                      height: 150,
180
-                    ),
181
-                    // _LogInButton(context),
182
-                    _Fills(),
183
-                    SizedBox(
184
-                      height: 60,
185
-                    ),
186
-                    _message(context),
187
-                    SizedBox(
188
-                      height: 10,
189
-                    ),
190
-                    _RegisterButton(context),
191
-                    SizedBox(
192
-                      height: 10,
193
-                    )
194
-                  ],
195
-                )
196
-            ),
197
-          ),
198
-        )
199
-    );
200
-  }
201
-}

+ 0
- 13
fast_med_flutter/lib/widgets/DataTableMySqlDemo/Oficina.dart View File

@@ -1,13 +0,0 @@
1
-class Oficina {
2
-  String id;
3
-  String name;
4
-
5
-  Oficina({this.id, this.name});
6
-
7
-  factory Oficina.fromJson(Map<String, dynamic> json) {
8
-    return Oficina (
9
-      id :json['id'] as String,
10
-      name: json['name'] as String,
11
-    );
12
-  }
13
-}

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

@@ -1,46 +0,0 @@
1
-import 'dart:convert';
2
-import 'package:http/http.dart'
3
-  as http;
4
-import 'Oficina.dart';
5
-
6
-class Services {
7
-  static const URL = 'https://ada.uprrp.edu/~oniel.mendez2/json/oficinas.php';
8
-  static const URL_GET_ALL = 'ada.uprrp.edu/~oniel.mendez2/json/getOficinas.php';
9
-  static const URL_LOCAL = 'http://localhost/test/getOficinas.json';
10
-  static const _GET_ALL = "GET_ALL";
11
-
12
-  //get all oficinas
13
-  static Future<List<Oficina>> getOficinas() async {
14
-    try {
15
-      var map = Map<String, dynamic>();
16
-      map['action'] = _GET_ALL;
17
-      //print('antes');
18
-      final response = await http.get(URL_GET_ALL);
19
-      // print('despues');
20
-      // print('getOficinas Response: ${response.body}');
21
-      if (200 == response.statusCode) {
22
-        List<Oficina> list = parseResponse(response.body);
23
-
24
-        return list;
25
-      } else {
26
-        final response = '[{"id":"1","name":"no"},{"id":"2","name":"respondio"},{"id":"3","name":"code: 200"}]';
27
-        List<Oficina> list = parseResponse(response);
28
-        return list; // return an empty list on exception/error
29
-      }
30
-    } catch (e) {
31
-      final response = '[{"id":"1","name":"este"},{"id":"2","name":"es el"},{"id":"3","name":"catch(e)"}]';
32
-      List<Oficina> list = parseResponse(response);
33
-      return list; // return an empty list on exception/error
34
-    }
35
-  }
36
-
37
-  static List<Oficina> parseResponse(String responseBody) {
38
-    final parsed = json.decode(responseBody).cast<Map<String, dynamic>>();
39
-    return parsed.map<Oficina>((json) => Oficina.fromJson(json)).toList();
40
-  }
41
-
42
-  Future<http.Response> fetchAlbum() {
43
-    return http.get('https://jsonplaceholder.typicode.com/albums/1');
44
-  }
45
-
46
-}

+ 0
- 1
fast_med_flutter/lib/widgets/MySQL_DataTable/dud.dart View File

@@ -1 +0,0 @@
1
-import 'dart:convert';

+ 0
- 0
fast_med_flutter/lib/widgets/data_table/dud.dart View File


+ 0
- 1
fast_med_flutter/lib/widgets/dud.dart View File

@@ -1 +0,0 @@
1
-import 'dart:convert';

+ 47
- 182
fast_med_flutter/pubspec.lock View File

@@ -43,20 +43,6 @@ packages:
43 43
       url: "https://pub.dartlang.org"
44 44
     source: hosted
45 45
     version: "1.15.0-nullsafety.3"
46
-  convert:
47
-    dependency: transitive
48
-    description:
49
-      name: convert
50
-      url: "https://pub.dartlang.org"
51
-    source: hosted
52
-    version: "2.1.1"
53
-  crypto:
54
-    dependency: transitive
55
-    description:
56
-      name: crypto
57
-      url: "https://pub.dartlang.org"
58
-    source: hosted
59
-    version: "2.1.5"
60 46
   cupertino_icons:
61 47
     dependency: "direct main"
62 48
     description:
@@ -71,79 +57,28 @@ packages:
71 57
       url: "https://pub.dartlang.org"
72 58
     source: hosted
73 59
     version: "1.2.0-nullsafety.1"
74
-  ffi:
75
-    dependency: transitive
76
-    description:
77
-      name: ffi
78
-      url: "https://pub.dartlang.org"
79
-    source: hosted
80
-    version: "0.1.3"
81
-  file:
82
-    dependency: transitive
83
-    description:
84
-      name: file
85
-      url: "https://pub.dartlang.org"
86
-    source: hosted
87
-    version: "5.2.1"
88
-  flushbar:
89
-    dependency: transitive
90
-    description:
91
-      name: flushbar
92
-      url: "https://pub.dartlang.org"
93
-    source: hosted
94
-    version: "1.10.4"
95 60
   flutter:
96 61
     dependency: "direct main"
97 62
     description: flutter
98 63
     source: sdk
99 64
     version: "0.0.0"
100
-  flutter_login:
101
-    dependency: "direct main"
102
-    description:
103
-      name: flutter_login
104
-      url: "https://pub.dartlang.org"
105
-    source: hosted
106
-    version: "1.0.14"
107 65
   flutter_test:
108 66
     dependency: "direct dev"
109 67
     description: flutter
110 68
     source: sdk
111 69
     version: "0.0.0"
112
-  font_awesome_flutter:
113
-    dependency: transitive
114
-    description:
115
-      name: font_awesome_flutter
116
-      url: "https://pub.dartlang.org"
117
-    source: hosted
118
-    version: "8.10.0"
119
-  google_fonts:
120
-    dependency: "direct main"
121
-    description:
122
-      name: google_fonts
123
-      url: "https://pub.dartlang.org"
124
-    source: hosted
125
-    version: "1.1.1"
126
-  http:
127
-    dependency: "direct main"
128
-    description:
129
-      name: http
130
-      url: "https://pub.dartlang.org"
131
-    source: hosted
132
-    version: "0.12.2"
133
-  http_parser:
70
+  flutter_web_plugins:
134 71
     dependency: transitive
135
-    description:
136
-      name: http_parser
137
-      url: "https://pub.dartlang.org"
138
-    source: hosted
139
-    version: "3.1.4"
140
-  intl:
72
+    description: flutter
73
+    source: sdk
74
+    version: "0.0.0"
75
+  js:
141 76
     dependency: transitive
142 77
     description:
143
-      name: intl
78
+      name: js
144 79
       url: "https://pub.dartlang.org"
145 80
     source: hosted
146
-    version: "0.16.1"
81
+    version: "0.6.3-nullsafety.1"
147 82
   matcher:
148 83
     dependency: transitive
149 84
     description:
@@ -157,14 +92,7 @@ packages:
157 92
       name: meta
158 93
       url: "https://pub.dartlang.org"
159 94
     source: hosted
160
-    version: "1.3.0-nullsafety.3"
161
-  nested:
162
-    dependency: transitive
163
-    description:
164
-      name: nested
165
-      url: "https://pub.dartlang.org"
166
-    source: hosted
167
-    version: "0.0.4"
95
+    version: "1.3.0-nullsafety.4"
168 96
   path:
169 97
     dependency: transitive
170 98
     description:
@@ -172,55 +100,6 @@ packages:
172 100
       url: "https://pub.dartlang.org"
173 101
     source: hosted
174 102
     version: "1.8.0-nullsafety.1"
175
-  path_provider:
176
-    dependency: transitive
177
-    description:
178
-      name: path_provider
179
-      url: "https://pub.dartlang.org"
180
-    source: hosted
181
-    version: "1.6.24"
182
-  path_provider_linux:
183
-    dependency: transitive
184
-    description:
185
-      name: path_provider_linux
186
-      url: "https://pub.dartlang.org"
187
-    source: hosted
188
-    version: "0.0.1+2"
189
-  path_provider_macos:
190
-    dependency: transitive
191
-    description:
192
-      name: path_provider_macos
193
-      url: "https://pub.dartlang.org"
194
-    source: hosted
195
-    version: "0.0.4+6"
196
-  path_provider_platform_interface:
197
-    dependency: transitive
198
-    description:
199
-      name: path_provider_platform_interface
200
-      url: "https://pub.dartlang.org"
201
-    source: hosted
202
-    version: "1.0.4"
203
-  path_provider_windows:
204
-    dependency: transitive
205
-    description:
206
-      name: path_provider_windows
207
-      url: "https://pub.dartlang.org"
208
-    source: hosted
209
-    version: "0.0.4+3"
210
-  pedantic:
211
-    dependency: transitive
212
-    description:
213
-      name: pedantic
214
-      url: "https://pub.dartlang.org"
215
-    source: hosted
216
-    version: "1.9.2"
217
-  platform:
218
-    dependency: transitive
219
-    description:
220
-      name: platform
221
-      url: "https://pub.dartlang.org"
222
-    source: hosted
223
-    version: "2.2.1"
224 103
   plugin_platform_interface:
225 104
     dependency: transitive
226 105
     description:
@@ -228,34 +107,6 @@ packages:
228 107
       url: "https://pub.dartlang.org"
229 108
     source: hosted
230 109
     version: "1.0.3"
231
-  process:
232
-    dependency: transitive
233
-    description:
234
-      name: process
235
-      url: "https://pub.dartlang.org"
236
-    source: hosted
237
-    version: "3.0.13"
238
-  provider:
239
-    dependency: transitive
240
-    description:
241
-      name: provider
242
-      url: "https://pub.dartlang.org"
243
-    source: hosted
244
-    version: "4.3.2+2"
245
-  quiver:
246
-    dependency: transitive
247
-    description:
248
-      name: quiver
249
-      url: "https://pub.dartlang.org"
250
-    source: hosted
251
-    version: "2.1.5"
252
-  simple_gesture_detector:
253
-    dependency: transitive
254
-    description:
255
-      name: simple_gesture_detector
256
-      url: "https://pub.dartlang.org"
257
-    source: hosted
258
-    version: "0.1.4"
259 110
   sky_engine:
260 111
     dependency: transitive
261 112
     description: flutter
@@ -274,7 +125,7 @@ packages:
274 125
       name: stack_trace
275 126
       url: "https://pub.dartlang.org"
276 127
     source: hosted
277
-    version: "1.10.0-nullsafety.1"
128
+    version: "1.10.0-nullsafety.2"
278 129
   stream_channel:
279 130
     dependency: transitive
280 131
     description:
@@ -289,13 +140,6 @@ packages:
289 140
       url: "https://pub.dartlang.org"
290 141
     source: hosted
291 142
     version: "1.1.0-nullsafety.1"
292
-  table_calendar:
293
-    dependency: "direct main"
294
-    description:
295
-      name: table_calendar
296
-      url: "https://pub.dartlang.org"
297
-    source: hosted
298
-    version: "2.3.0"
299 143
   term_glyph:
300 144
     dependency: transitive
301 145
     description:
@@ -310,41 +154,62 @@ packages:
310 154
       url: "https://pub.dartlang.org"
311 155
     source: hosted
312 156
     version: "0.2.19-nullsafety.2"
313
-  transformer_page_view:
157
+  typed_data:
314 158
     dependency: transitive
315 159
     description:
316
-      name: transformer_page_view
160
+      name: typed_data
317 161
       url: "https://pub.dartlang.org"
318 162
     source: hosted
319
-    version: "0.1.6"
320
-  typed_data:
163
+    version: "1.3.0-nullsafety.3"
164
+  url_launcher:
165
+    dependency: "direct main"
166
+    description:
167
+      name: url_launcher
168
+      url: "https://pub.dartlang.org"
169
+    source: hosted
170
+    version: "5.7.10"
171
+  url_launcher_linux:
321 172
     dependency: transitive
322 173
     description:
323
-      name: typed_data
174
+      name: url_launcher_linux
324 175
       url: "https://pub.dartlang.org"
325 176
     source: hosted
326
-    version: "1.3.0-nullsafety.3"
327
-  vector_math:
177
+    version: "0.0.1+4"
178
+  url_launcher_macos:
328 179
     dependency: transitive
329 180
     description:
330
-      name: vector_math
181
+      name: url_launcher_macos
331 182
       url: "https://pub.dartlang.org"
332 183
     source: hosted
333
-    version: "2.1.0-nullsafety.3"
334
-  win32:
184
+    version: "0.0.1+9"
185
+  url_launcher_platform_interface:
186
+    dependency: transitive
187
+    description:
188
+      name: url_launcher_platform_interface
189
+      url: "https://pub.dartlang.org"
190
+    source: hosted
191
+    version: "1.0.9"
192
+  url_launcher_web:
335 193
     dependency: transitive
336 194
     description:
337
-      name: win32
195
+      name: url_launcher_web
338 196
       url: "https://pub.dartlang.org"
339 197
     source: hosted
340
-    version: "1.7.3"
341
-  xdg_directories:
198
+    version: "0.1.5+1"
199
+  url_launcher_windows:
342 200
     dependency: transitive
343 201
     description:
344
-      name: xdg_directories
202
+      name: url_launcher_windows
345 203
       url: "https://pub.dartlang.org"
346 204
     source: hosted
347
-    version: "0.1.2"
205
+    version: "0.0.1+3"
206
+  vector_math:
207
+    dependency: transitive
208
+    description:
209
+      name: vector_math
210
+      url: "https://pub.dartlang.org"
211
+    source: hosted
212
+    version: "2.1.0-nullsafety.3"
348 213
 sdks:
349
-  dart: ">=2.10.0-110 <2.11.0"
350
-  flutter: ">=1.17.0 <2.0.0"
214
+  dart: ">=2.10.0-110 <=2.11.0-213.1.beta"
215
+  flutter: ">=1.22.0 <2.0.0"

+ 3
- 7
fast_med_flutter/pubspec.yaml View File

@@ -1,4 +1,4 @@
1
-name: fast_med_flutter
1
+name: googlemaps1
2 2
 description: A new Flutter application.
3 3
 
4 4
 # The following line prevents the package from being accidentally published to
@@ -24,16 +24,12 @@ dependencies:
24 24
   flutter:
25 25
     sdk: flutter
26 26
 
27
+  url_launcher: ^5.4.0
28
+
27 29
 
28 30
   # The following adds the Cupertino Icons font to your application.
29 31
   # Use with the CupertinoIcons class for iOS style icons.
30 32
   cupertino_icons: ^1.0.0
31
-  table_calendar: ^2,0,1
32
-  flutter_login: ^1.0.14
33
-  google_fonts: ^1.1.1
34
-
35
-  #
36
-  http: ^0.12.2
37 33
 
38 34
 dev_dependencies:
39 35
   flutter_test:

+ 2
- 2
fast_med_flutter/test/widget_test.dart View File

@@ -8,12 +8,12 @@
8 8
 import 'package:flutter/material.dart';
9 9
 import 'package:flutter_test/flutter_test.dart';
10 10
 
11
-import 'package:fast_med_flutter/main.dart';
11
+import 'package:googlemaps1/main.dart';
12 12
 
13 13
 void main() {
14 14
   testWidgets('Counter increments smoke test', (WidgetTester tester) async {
15 15
     // Build our app and trigger a frame.
16
-    await tester.pumpWidget(MaterialApp());
16
+    await tester.pumpWidget(MyApp());
17 17
 
18 18
     // Verify that our counter starts at 0.
19 19
     expect(find.text('0'), findsOneWidget);