fresh start

This commit is contained in:
2024-06-18 15:06:57 +02:00
parent 34e8e7ad45
commit a478324698
43 changed files with 227 additions and 102 deletions

View File

@@ -1,34 +1,50 @@
# Install Operating system and dependencies
FROM ubuntu:20.04
#FROM ubuntu:22.04
FROM debian:latest AS build-env
ENV DEBIAN_FRONTEND=noninteractive
#ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get update
#RUN apt-get upgrade -y
#RUN apt-get --fix-missing update
RUN apt-get install -y curl git wget unzip libgconf-2-4 gdb libstdc++6 libglu1-mesa fonts-droid-fallback python3
RUN apt-get clean
#RUN apt-get install -y curl git unzip
#RUN apt-get install -y curl git unzip xz-utils zip libglu1-mesa
#RUN apt-get install -y curl git unzip wget python3 fonts-droid-fallback
#RUN apt-get clean
ENV DEBIAN_FRONTEND=dialog
ENV PUB_HOSTED_URL=https://pub.flutter-io.cn
ENV FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
#ENV DEBIAN_FRONTEND=dialog
#ENV PUB_HOSTED_URL=https://pub.flutter-io.cn
#ENV FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
# download Flutter SDK from Flutter Github repo
RUN git clone https://github.com/flutter/flutter.git /usr/local/flutter
RUN git clone -b master https://github.com/flutter/flutter.git /usr/local/flutter
#RUN git clone https://github.com/flutter/flutter.git /usr/local/flutter
# Set flutter environment path
ENV PATH="/usr/local/flutter/bin:/usr/local/flutter/bin/cache/dart-sdk/bin:${PATH}"
#ENV PATH "$PATH:/home/developer/flutter/bin"
# Run flutter doctor
RUN flutter doctor
#RUN flutter pub get
#RUN rmdir /usr/local/flutter/bin/cache
#RUN flutter pub cache repair
#RUN dart pub add args:^2.4.2
#RUN flutter dart pub add args:^2.4.2
RUN flutter doctor -v
# Enable flutter web
RUN flutter channel master
RUN flutter upgrade
#RUN flutter pub add web:^0.5.0
RUN flutter config --enable-web
# Copy files to container and build
RUN mkdir /app/
COPY . /app/
WORKDIR /app/
RUN flutter pub add web:^0.5.0
RUN flutter upgrade
RUN flutter build web
# Record the exposed port

View File

@@ -26,7 +26,7 @@ class AuthCheck extends StatelessWidget {
}
// Connection state not active, show loading indicator
return CircularProgressIndicator();
return const CircularProgressIndicator();
},
);
}

View File

@@ -21,7 +21,7 @@ class _BuildPatientsListState extends State<BuildPatientsList> {
Widget build(BuildContext context) {
return ListView.separated(
separatorBuilder: (BuildContext context, int index) {
return Divider();
return const Divider();
},
itemCount: widget.patients.length,
itemBuilder: (context, index) {
@@ -37,7 +37,7 @@ class _BuildPatientsListState extends State<BuildPatientsList> {
arguments: widget.patients[index]);
});
},
trailing: Icon(Icons.arrow_forward),
trailing: const Icon(Icons.arrow_forward),
)
: Container();
},

View File

@@ -17,13 +17,13 @@ class _MyAppDrawerState extends State<MyAppDrawer> {
padding: EdgeInsets.zero,
children: [
DrawerHeader(
child: Text(widget.drawerTitle as String),
decoration: const BoxDecoration(
color: Colors.blueAccent,
),
child: Text(widget.drawerTitle),
),
ListTile(
title: Text("Home"),
title: const Text("Home"),
onTap: () {
Navigator.of(context).pushNamed('/home');
},

View File

@@ -21,8 +21,9 @@ class _MyPassFieldState extends State<MyPassField> {
void _toggleObscured() {
setState(() {
_obscured = !_obscured;
if (textFieldFocusNode.hasPrimaryFocus)
if (textFieldFocusNode.hasPrimaryFocus) {
return; // If focus is on text field, dont unfocus
}
textFieldFocusNode.canRequestFocus =
false; // Prevents focus if tap on eye
});

View File

@@ -37,7 +37,7 @@ class _HomeState extends State<Home> {
builder: (contexts, snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
return Scaffold(
appBar: MyAppBar(barTitle: "Mzanzi Innovation Hub"),
appBar: const MyAppBar(barTitle: "Mzanzi Innovation Hub"),
drawer: MyAppDrawer(
drawerTitle: useremail,
),
@@ -46,7 +46,7 @@ class _HomeState extends State<Home> {
),
);
} else {
return Center(child: CircularProgressIndicator());
return const Center(child: CircularProgressIndicator());
}
},
);

View File

@@ -66,7 +66,7 @@ class _PatientManagerState extends State<PatientManager> {
future: futurePatients,
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return const CircularProgressIndicator();
return const Center(child: CircularProgressIndicator());
} else if (snapshot.hasData) {
final patientsList = snapshot.data!;

View File

@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:patient_manager/components/PatientDetails.dart';
import 'package:patient_manager/components/patientDetails.dart';
import 'package:patient_manager/components/myAppBar.dart';
import 'package:patient_manager/components/patientNotes.dart';
import 'package:patient_manager/objects/patients.dart';

View File

@@ -14,7 +14,7 @@ class RouteGenerator {
switch (settings.name) {
case '/':
return MaterialPageRoute(builder: (_) => AuthCheck());
return MaterialPageRoute(builder: (_) => const AuthCheck());
case '/home':
return MaterialPageRoute(builder: (_) => const Home());
case '/patient-manager':

View File

@@ -6,13 +6,17 @@ import FlutterMacOS
import Foundation
import app_links
import google_sign_in_ios
import path_provider_foundation
import shared_preferences_foundation
import sign_in_with_apple
import url_launcher_macos
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
AppLinksMacosPlugin.register(with: registry.registrar(forPlugin: "AppLinksMacosPlugin"))
FLTGoogleSignInPlugin.register(with: registry.registrar(forPlugin: "FLTGoogleSignInPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
SignInWithApplePlugin.register(with: registry.registrar(forPlugin: "SignInWithApplePlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
}

View File

@@ -21,10 +21,10 @@ packages:
dependency: transitive
description:
name: app_links
sha256: "3ced568a5d9e309e99af71285666f1f3117bddd0bd5b3317979dccc1a40cada4"
sha256: "42dc15aecf2618ace4ffb74a2e58a50e45cd1b9f2c17c8f0cafe4c297f08c815"
url: "https://pub.dev"
source: hosted
version: "3.5.1"
version: "4.0.1"
archive:
dependency: transitive
description:
@@ -34,13 +34,13 @@ packages:
source: hosted
version: "3.4.10"
args:
dependency: transitive
dependency: "direct main"
description:
name: args
sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596
sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a"
url: "https://pub.dev"
source: hosted
version: "2.4.2"
version: "2.5.0"
async:
dependency: transitive
description:
@@ -65,6 +65,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.1"
buffer:
dependency: transitive
description:
name: buffer
sha256: "389da2ec2c16283c8787e0adaede82b1842102f8c8aae2f49003a766c5c6b3d1"
url: "https://pub.dev"
source: hosted
version: "1.2.3"
build:
dependency: transitive
description:
@@ -93,10 +101,10 @@ packages:
dependency: transitive
description:
name: build_modules
sha256: "66f0f746a239ff6cceba9d235a679ec70a6d9037ddddb36a24a0791a639a8486"
sha256: "9987d67a29081872e730468295fc565e9a2b377ca3673337c1d4e41d57c6cd7c"
url: "https://pub.dev"
source: hosted
version: "5.0.7"
version: "5.0.8"
build_resolvers:
dependency: transitive
description:
@@ -109,10 +117,10 @@ packages:
dependency: "direct dev"
description:
name: build_runner
sha256: "581bacf68f89ec8792f5e5a0b2c4decd1c948e97ce659dc783688c8a88fbec21"
sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22"
url: "https://pub.dev"
source: hosted
version: "2.4.8"
version: "2.4.9"
build_runner_core:
dependency: transitive
description:
@@ -125,10 +133,10 @@ packages:
dependency: "direct dev"
description:
name: build_web_compilers
sha256: aad1d705faa53d060e7ccb7855ee74705a8e3d9ea1634e63e362cc2c1bd47afa
sha256: "9071a94aa67787cebdd9e76837c9d2af61fb5242db541244f6a0b6249afafb46"
url: "https://pub.dev"
source: hosted
version: "4.0.9"
version: "4.0.10"
built_collection:
dependency: transitive
description:
@@ -141,10 +149,10 @@ packages:
dependency: transitive
description:
name: built_value
sha256: fedde275e0a6b798c3296963c5cd224e3e1b55d0e478d5b7e65e6b540f363a0e
sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb
url: "https://pub.dev"
source: hosted
version: "8.9.1"
version: "8.9.2"
characters:
dependency: transitive
description:
@@ -205,10 +213,10 @@ packages:
dependency: "direct main"
description:
name: cupertino_icons
sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d
sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
url: "https://pub.dev"
source: hosted
version: "1.0.6"
version: "1.0.8"
dart_style:
dependency: transitive
description:
@@ -292,10 +300,10 @@ packages:
dependency: transitive
description:
name: frontend_server_client
sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612"
sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694
url: "https://pub.dev"
source: hosted
version: "3.2.0"
version: "4.0.0"
functions_client:
dependency: transitive
description:
@@ -312,14 +320,62 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.2"
google_identity_services_web:
dependency: transitive
description:
name: google_identity_services_web
sha256: "0c56c2c5d60d6dfaf9725f5ad4699f04749fb196ee5a70487a46ef184837ccf6"
url: "https://pub.dev"
source: hosted
version: "0.3.0+2"
google_sign_in:
dependency: transitive
description:
name: google_sign_in
sha256: "0b8787cb9c1a68ad398e8010e8c8766bfa33556d2ab97c439fb4137756d7308f"
url: "https://pub.dev"
source: hosted
version: "6.2.1"
google_sign_in_android:
dependency: transitive
description:
name: google_sign_in_android
sha256: "7647893c65e6720973f0e579051c8f84b877b486614d9f70a404259c41a4632e"
url: "https://pub.dev"
source: hosted
version: "6.1.23"
google_sign_in_ios:
dependency: transitive
description:
name: google_sign_in_ios
sha256: "1e0d4fde6cc07a8ff423f6bc931e83a74163d6af702004bacaee752649fdd2e7"
url: "https://pub.dev"
source: hosted
version: "5.7.5"
google_sign_in_platform_interface:
dependency: transitive
description:
name: google_sign_in_platform_interface
sha256: "1f6e5787d7a120cc0359ddf315c92309069171306242e181c09472d1b00a2971"
url: "https://pub.dev"
source: hosted
version: "2.4.5"
google_sign_in_web:
dependency: transitive
description:
name: google_sign_in_web
sha256: a278ea2d01013faf341cbb093da880d0f2a552bbd1cb6ee90b5bebac9ba69d77
url: "https://pub.dev"
source: hosted
version: "0.12.3+2"
gotrue:
dependency: transitive
description:
name: gotrue
sha256: "1bf6354278a98b8a1867263e94921da8a239de07e9babceab2b4e80af651a098"
sha256: a0eee21a7e8ec09e6bbd5c9a36e31e423827b575ba6fc2dd049805dcfaac5b02
url: "https://pub.dev"
source: hosted
version: "2.5.1"
version: "2.6.0"
graphs:
dependency: transitive
description:
@@ -337,7 +393,7 @@ packages:
source: hosted
version: "2.1.0"
http:
dependency: transitive
dependency: "direct main"
description:
name: http
sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba
@@ -372,10 +428,10 @@ packages:
dependency: transitive
description:
name: js
sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
url: "https://pub.dev"
source: hosted
version: "0.7.1"
version: "0.6.7"
json_annotation:
dependency: transitive
description:
@@ -440,6 +496,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.5"
mysql_client:
dependency: "direct main"
description:
name: mysql_client
sha256: "6a0fdcbe3e0721c637f97ad24649be2f70dbce2b21ede8f962910e640f753fc2"
url: "https://pub.dev"
source: hosted
version: "0.0.27"
package_config:
dependency: transitive
description:
@@ -460,18 +524,18 @@ packages:
dependency: transitive
description:
name: path_provider
sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b
sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161
url: "https://pub.dev"
source: hosted
version: "2.1.2"
version: "2.1.3"
path_provider_android:
dependency: transitive
description:
name: path_provider_android
sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668"
sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d
url: "https://pub.dev"
source: hosted
version: "2.2.2"
version: "2.2.4"
path_provider_foundation:
dependency: transitive
description:
@@ -524,10 +588,10 @@ packages:
dependency: transitive
description:
name: pointycastle
sha256: "43ac87de6e10afabc85c445745a7b799e04de84cebaa4fd7bf55a5e1e9604d29"
sha256: "70fe966348fe08c34bf929582f1d8247d9d9408130723206472b4687227e4333"
url: "https://pub.dev"
source: hosted
version: "3.7.4"
version: "3.8.0"
pool:
dependency: transitive
description:
@@ -572,10 +636,10 @@ packages:
dependency: transitive
description:
name: realtime_client
sha256: efb053dd11e2b3cfcc1aa11b3a41842f109d582adccb244a56ed58acf2f6b9f5
sha256: "492a1ab568b3812cb345aad8dd09b3936877edba81a6ab6f5fdf365c155797e1"
url: "https://pub.dev"
source: hosted
version: "2.0.2"
version: "2.0.4"
retry:
dependency: transitive
description:
@@ -604,18 +668,18 @@ packages:
dependency: transitive
description:
name: shared_preferences
sha256: "81429e4481e1ccfb51ede496e916348668fd0921627779233bd24cc3ff6abd02"
sha256: d3bbe5553a986e83980916ded2f0b435ef2e1893dfaa29d5a7a790d0eca12180
url: "https://pub.dev"
source: hosted
version: "2.2.2"
version: "2.2.3"
shared_preferences_android:
dependency: transitive
description:
name: shared_preferences_android
sha256: "8568a389334b6e83415b6aae55378e158fbc2314e074983362d20c562780fb06"
sha256: "1ee8bf911094a1b592de7ab29add6f826a7331fb854273d55918693d5364a1f2"
url: "https://pub.dev"
source: hosted
version: "2.2.1"
version: "2.2.2"
shared_preferences_foundation:
dependency: transitive
description:
@@ -672,6 +736,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.4"
sign_in_with_apple:
dependency: transitive
description:
name: sign_in_with_apple
sha256: "0975c23b9f8b30a80e27d5659a75993a093d4cb5f4eb7d23a9ccc586fea634e0"
url: "https://pub.dev"
source: hosted
version: "5.0.0"
sign_in_with_apple_platform_interface:
dependency: transitive
description:
name: sign_in_with_apple_platform_interface
sha256: a5883edee09ed6be19de19e7d9f618a617fe41a6fa03f76d082dfb787e9ea18d
url: "https://pub.dev"
source: hosted
version: "1.0.0"
sign_in_with_apple_web:
dependency: transitive
description:
name: sign_in_with_apple_web
sha256: "44b66528f576e77847c14999d5e881e17e7223b7b0625a185417829e5306f47a"
url: "https://pub.dev"
source: hosted
version: "1.0.1"
sky_engine:
dependency: transitive
description: flutter
@@ -737,26 +825,26 @@ packages:
dependency: transitive
description:
name: supabase
sha256: b4bde1a8c4ebbc7bbad929f4a884f277343351bcc795a9b1e9e6a0a4148ad1fb
sha256: b652dab5f3041ae85c94358bf9142b3c85655446ab9a78e1b40bbd41b9d8087b
url: "https://pub.dev"
source: hosted
version: "2.0.9"
version: "2.1.1"
supabase_auth_ui:
dependency: "direct main"
description:
name: supabase_auth_ui
sha256: "9c12964ee213a0b6d5f26d4e7d5818a57df6a7060a7cf8a16bb54c4e5f46c666"
sha256: d8bdfbe957b3028780c3074574b790588c48a4a75d895e95d63404ebf7686653
url: "https://pub.dev"
source: hosted
version: "0.4.1"
version: "0.4.4"
supabase_flutter:
dependency: "direct main"
description:
name: supabase_flutter
sha256: c425b1f7c1915a4208e9fcf85bfc10e60af0db5149a5cf4b33b7f4003c3a9a4b
sha256: cfbe0ad4e3e7a0d4621340323d3c9da5326e7a19689b93359f130f7a27b3c284
url: "https://pub.dev"
source: hosted
version: "2.4.0"
version: "2.5.1"
term_glyph:
dependency: transitive
description:
@@ -781,6 +869,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.1"
tuple:
dependency: transitive
description:
name: tuple
sha256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151
url: "https://pub.dev"
source: hosted
version: "2.0.2"
typed_data:
dependency: transitive
description:
@@ -793,18 +889,18 @@ packages:
dependency: transitive
description:
name: url_launcher
sha256: "0ecc004c62fd3ed36a2ffcbe0dd9700aee63bd7532d0b642a488b1ec310f492e"
sha256: "6ce1e04375be4eed30548f10a315826fd933c1e493206eab82eed01f438c8d2e"
url: "https://pub.dev"
source: hosted
version: "6.2.5"
version: "6.2.6"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
sha256: d4ed0711849dd8e33eb2dd69c25db0d0d3fdc37e0a62e629fe32f57a22db2745
sha256: "360a6ed2027f18b73c8d98e159dda67a61b7f2e0f6ec26e86c3ada33b0621775"
url: "https://pub.dev"
source: hosted
version: "6.3.0"
version: "6.3.1"
url_launcher_ios:
dependency: transitive
description:
@@ -918,5 +1014,5 @@ packages:
source: hosted
version: "2.0.0"
sdks:
dart: ">=3.2.4 <3.5.0"
dart: ">=3.2.4 <3.6.0"
flutter: ">=3.16.6"

View File

@@ -39,6 +39,7 @@ dependencies:
supabase_flutter: ^2.4.0
http: ^1.2.0
mysql_client: ^0.0.27
args: 2.5.0
dev_dependencies:
flutter_test:

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
database/binlog.000014 Normal file

Binary file not shown.

View File

@@ -1,5 +1,5 @@
4294967294,472
4294967278,293
4294967294,471
4294967278,288
4294967293,131
4294967293,130
4294967293,129
@@ -141,110 +141,113 @@
4243767282,0
4243767281,0
4294967293,0
4294967279,143
4294967279,30
4294967279,144
4294967279,145
4294967279,31
4294967279,146
4294967279,32
4294967279,33
4294967279,147
4294967279,34
4294967279,148
4294967279,149
4294967279,35
4294967279,149
4294967279,148
4294967279,150
4294967279,36
4294967279,37
4294967279,36
4294967279,151
4294967279,38
4294967279,152
4294967279,153
4294967279,152
4294967279,39
4294967279,41
4294967279,154
4294967279,40
4294967279,158
4294967279,41
4294967279,42
4294967279,156
4294967279,155
4294967279,42
4294967279,157
4294967279,43
4294967279,44
4294967279,45
4294967279,159
4294967279,162
4294967279,45
4294967279,160
4294967279,161
4294967279,46
4294967279,163
4294967279,162
4294967279,47
4294967279,48
4294967279,163
4294967279,49
4294967279,50
4294967279,164
4294967279,165
4294967279,50
4294967279,166
4294967279,167
4294967279,51
4294967279,52
4294967279,167
4294967279,53
4294967279,169
4294967279,170
4294967279,54
4294967279,168
4294967279,170
4294967279,169
4294967279,171
4294967279,55
4294967279,56
4294967279,57
4294967279,173
4294967279,171
4294967279,172
4294967279,175
4294967279,58
4294967279,59
4294967279,173
4294967279,175
4294967279,176
4294967279,60
4294967279,61
4294967279,176
4294967279,177
4294967279,61
4294967279,62
4294967279,178
4294967279,63
4294967279,179
4294967279,64
4294967279,180
4294967279,64
4294967279,181
4294967279,65
4294967279,182
4294967279,66
4294967279,182
4294967279,67
4294967279,183
4294967279,184
4294967279,68
4294967279,185
4294967279,69
4294967279,70
4294967279,185
4294967279,186
4294967279,71
4294967279,187
4294967279,71
4294967279,188
4294967279,72
4294967279,189
4294967279,73
4294967279,189
4294967279,74
4294967279,190
4294967279,191
4294967279,75
4294967279,192
4294967279,191
4294967279,76
4294967279,193
4294967279,77
4294967279,193
4294967279,78
4294967279,194
4294967279,79
4294967279,195
4294967279,79
4294967279,196
4294967279,80
4294967279,81
4294967279,197
4294967279,82
4294967279,198
4294967279,200
4294967279,83
4294967279,199
4294967279,84
4294967279,85
4294967279,86
4294967279,201
4294967279,202
4294967279,203
4294967279,204
4294967279,87

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -9,6 +9,10 @@ services:
- .:/app
depends_on:
- mysqldb
networks:
default:
aliases:
- mih-api-hub
mysqldb:
#build: ./database/