diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index e9f7430..11eda48 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -1,5 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
index db77bb4..7508d4a 100644
Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
index 17987b7..b641102 100644
Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
index 09d4391..2c094cd 100644
Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
index d5f1c8d..8b3a345 100644
Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
index 4d6372e..3793c60 100644
Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/images/appicon.png b/images/appicon.png
index 6ee10c4..2339073 100644
Binary files a/images/appicon.png and b/images/appicon.png differ
diff --git a/images/logo.png b/images/logo.png
index 3982b86..2339073 100644
Binary files a/images/logo.png and b/images/logo.png differ
diff --git a/images/mobilebg.png b/images/mobilebg.png
index 5d42afb..11114b8 100644
Binary files a/images/mobilebg.png and b/images/mobilebg.png differ
diff --git a/images/mobilebg2.png b/images/mobilebg2.png
index 5ce3749..9984e87 100644
Binary files a/images/mobilebg2.png and b/images/mobilebg2.png differ
diff --git a/images/mobilebg3.png b/images/mobilebg3.png
index 8673834..691db75 100644
Binary files a/images/mobilebg3.png and b/images/mobilebg3.png differ
diff --git a/images/myconnections.png b/images/myconnections.png
index 00d4f80..b22e6af 100644
Binary files a/images/myconnections.png and b/images/myconnections.png differ
diff --git a/images/splashscreen.png b/images/splashscreen.png
index e1ce188..c15473b 100644
Binary files a/images/splashscreen.png and b/images/splashscreen.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
index dc9ada4..34724f3 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
index 28c6bf0..7602b51 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
index 2ccbfd9..7f41342 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
index f091b6b..41b38d4 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
index 4cde121..27348ad 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
index d0ef06e..d3109f0 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
index dcdc230..3f83127 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
index 2ccbfd9..7f41342 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
index c8f9ed8..8429d37 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
index a6d6b86..bed72f0 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
index a6d6b86..bed72f0 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
index 75b2d16..696ff6e 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
index c4df70d..e93cb24 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
index 6a84f41..31bc042 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
index d0e1f58..2c5219c 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ
diff --git a/lib/common/dashboard.dart b/lib/common/dashboard.dart
index 8974232..e0708e5 100644
--- a/lib/common/dashboard.dart
+++ b/lib/common/dashboard.dart
@@ -1,4 +1,7 @@
import 'dart:convert';
+import 'package:doctor/common/qrcode_display.dart';
+import 'package:doctor/common/updateprofile.dart';
+import 'package:doctor/connected_patients/connected_patients.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:image_picker/image_picker.dart';
@@ -129,24 +132,24 @@ class _DashboardState extends State {
shape: BoxShape.circle,
image: DecorationImage(
image: AssetImage(
- "images/seekopinion.png"), // picked file
+ "images/myconnections.png"), // picked file
fit: BoxFit.fitWidth)),
),
onTap: () {
- /* Navigator.push(
+ Navigator.push(
context,
MaterialPageRoute(
- builder: (context) => const SeekOpinion()),
- );*/
+ builder: (context) => const ConnectedPatients()),
+ );
},
),
Text(
- 'Seek Opinion',
+ 'My Connections',
style: dashboardTextStyle(),
),
],
),
- Column(
+ /*Column(
children: [
GestureDetector(
child: Container(
@@ -161,11 +164,11 @@ class _DashboardState extends State {
fit: BoxFit.fitWidth)),
),
onTap: () {
- /*Navigator.push(
+ *//*Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const AllReports()),
- );*/
+ );*//*
},
),
Text(
@@ -173,11 +176,11 @@ class _DashboardState extends State {
style: dashboardTextStyle(),
),
],
- ),
+ ),*/
],
),
),
- Padding(
+ /*Padding(
padding: EdgeInsets.all(10),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -288,7 +291,7 @@ class _DashboardState extends State {
),
],
),
- )
+ )*/
]));
}
@@ -298,16 +301,9 @@ class _DashboardState extends State {
devicedetection();
}
- /*Future uploadProfileApi(image) async {
- var payload = new Map();
- payload["formData"] = image.toString();
- var response1 = await AppSettings.updateProfilePicture(payload);
-
- print(response1);
- }*/
Future pickImageFromGallery() async {
- /* try {
+ try {
final image = await _picker.pickImage(source: ImageSource.gallery);
if (image == null) return;
final imageTemp = File(image.path);
@@ -322,11 +318,11 @@ class _DashboardState extends State {
AppSettings.saveData('profile', jsonDecode(res)['picture'], 'STRING');
} on PlatformException catch (e) {
print('Failed to pick image: $e');
- }*/
+ }
}
Future takeImageFromCamera() async {
- /*try {
+ try {
final image = await _picker.pickImage(source: ImageSource.camera);
if (image == null) return;
final imageTemp = File(image.path);
@@ -340,7 +336,7 @@ class _DashboardState extends State {
AppSettings.saveData('profile', jsonDecode(res)['picture'], 'STRING');
} on PlatformException catch (e) {
print('Failed to pick image: $e');
- }*/
+ }
}
showLogoutAlertDialog(context) {
@@ -427,82 +423,143 @@ class _DashboardState extends State {
children: [
DrawerHeader(
decoration: const BoxDecoration(
- color: buttonColors,
+ color: secondaryColor,
),
child: Row(
+
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
- child: GestureDetector(
- child: Container(
- width: MediaQuery.of(context).size.width * .20,
- height:
+ child: Row(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ GestureDetector(
+ child: Container(
+ width: MediaQuery.of(context).size.width * .20,
+ height:
MediaQuery.of(context).size.height * .15,
- decoration: BoxDecoration(
- shape: BoxShape.circle,
- image: DecorationImage(
- image: (AppSettings.profilePictureUrl !=
- '' &&
+ decoration: BoxDecoration(
+ shape: BoxShape.circle,
+ image: DecorationImage(
+ image: (AppSettings.profilePictureUrl !=
+ '' &&
AppSettings.profilePictureUrl !=
'null')
- ? NetworkImage(AppSettings
- .profilePictureUrl)
- as ImageProvider
- : AssetImage(
+ ? NetworkImage(AppSettings
+ .profilePictureUrl)
+ as ImageProvider
+ : AssetImage(
"images/profile_pic.png"), // picked file
- fit: BoxFit.fitWidth)),
- ),
- onTap: () {
- showModalBottomSheet(
- context: context,
- builder: (BuildContext context) {
- return SizedBox(
- height: 200,
- child: Center(
- child: Row(
- mainAxisAlignment:
+ fit: BoxFit.fitWidth)),
+ ),
+ onTap: () {
+ showModalBottomSheet(
+ context: context,
+ builder: (BuildContext context) {
+ return SizedBox(
+ height: 200,
+ child: Center(
+ child: Row(
+ mainAxisAlignment:
MainAxisAlignment.center,
- children: [
- GestureDetector(
- child: Icon(
- Icons.camera_alt_outlined,
- size: 100,
- color: primaryColor,
- ),
- onTap: () async {
- await takeImageFromCamera();
- Navigator.pop(context);
- },
- ),
- SizedBox(
- width: MediaQuery.of(context)
+ children: [
+ GestureDetector(
+ child: Icon(
+ Icons.camera_alt_outlined,
+ size: 100,
+ color: primaryColor,
+ ),
+ onTap: () async {
+ await takeImageFromCamera();
+ Navigator.pop(context);
+ },
+ ),
+ SizedBox(
+ width: MediaQuery.of(context)
.size
.width *
- .20,
- ),
- GestureDetector(
- child: Icon(
- Icons.photo,
- size: 100,
- color: primaryColor,
- ),
- onTap: () async {
- await pickImageFromGallery();
- Navigator.pop(context);
- },
+ .20,
+ ),
+ GestureDetector(
+ child: Icon(
+ Icons.photo,
+ size: 100,
+ color: primaryColor,
+ ),
+ onTap: () async {
+ await pickImageFromGallery();
+ Navigator.pop(context);
+ },
+ ),
+ ],
),
- ],
- ),
- ),
+ ),
+ );
+ });
+ },
+ ),
+ Container(
+
+ child: AppSettings.qrCode==''?TextButton(
+ child: Text(
+ 'GetQR',
+ style: TextStyle(
+ fontSize: 15,
+ color: Colors.white,
+ decoration: TextDecoration.underline,
+ ),
+ ),
+ onPressed: () async{
+ AppSettings.preLoaderDialog(context);
+
+ try{
+ var value = await AppSettings.generateQRCode();
+ var valueResponse = jsonDecode(value);
+ String dataUri = jsonDecode(value)['qrCodeData'];
+
+ List parts = dataUri.split(",");
+ String? base64String = parts.length == 2 ? parts[1] : null;
+
+ if (base64String != null) {
+
+ print(base64String);
+ AppSettings.qrCode=base64String;
+ } else {
+ print("Invalid data URI");
+ }
+ Navigator.of(context, rootNavigator: true).pop();
+ }
+ catch(e){
+ Navigator.of(context, rootNavigator: true).pop();
+ }
+
+
+
+ },
+ ):GestureDetector(
+ onTap: (){
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => const DisplayQrCode()),
);
- });
- },
+ },
+ child: Container(
+ height:MediaQuery.of(context).size.height * .20,
+ width:MediaQuery.of(context).size.width * .1,
+ child: Image.memory(Uint8List.fromList(base64.decode(AppSettings.qrCode))),
+ ),
+ ),
+
+ )
+ ],
),
),
Text(
- AppSettings.userName,
+ AppSettings.doctorName,
style: drawerHeaderTextStyleNew(),
),
Text(
@@ -536,7 +593,8 @@ class _DashboardState extends State {
)
],
),
- Container()
+
+
],
)),
ListTile(
@@ -557,14 +615,14 @@ class _DashboardState extends State {
],
),
onTap: () {
- /*Navigator.push(
+ Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const UpdateProfile()),
- );*/
+ );
},
),
- Divider(
+ /*Divider(
color: Colors.grey,
),
ListTile(
@@ -757,6 +815,7 @@ class _DashboardState extends State {
},
),
+ */
Divider(
color: Colors.grey,
),
diff --git a/lib/common/login.dart b/lib/common/login.dart
index 1353d46..370980e 100644
--- a/lib/common/login.dart
+++ b/lib/common/login.dart
@@ -104,6 +104,7 @@ class _LoginState extends State {
child: TextFormField(
cursorColor: greyColor,
controller: mobileNumberController,
+ style: textFormFieldFilledTextStyle(),
keyboardType: TextInputType.number,
decoration: textFormFieldDecoration(Icons.phone,'Enter MobileNumber'),
@@ -112,29 +113,30 @@ class _LoginState extends State {
SizedBox(height:MediaQuery.of(context).size.height * .02,),
Container(
child: TextFormField(
- cursorColor: greyColor,
+ cursorColor: secondaryColor,
obscureText: isObscureText,
controller: passwordController,
+ style: textFormFieldFilledTextStyle(),
decoration: InputDecoration(
- fillColor: Colors.white,
+ fillColor: primaryColor,
filled: true,
labelText: 'Password',
- prefixIcon: const Icon(Icons.password, color: greyColor,),
+ prefixIcon: const Icon(Icons.lock, color: secondaryColor,),
labelStyle: const TextStyle(
- color: Colors.black, //<-- SEE HERE
+ color: secondaryColor,fontWeight: FontWeight.bold //<-- SEE HERE
),
border: const OutlineInputBorder(
- borderSide: BorderSide(color: primaryColor)),
+ borderSide: BorderSide(color: secondaryColor)),
focusedBorder: const OutlineInputBorder(
- borderSide: BorderSide(color: primaryColor),
+ borderSide: BorderSide(color: secondaryColor),
),
enabledBorder: const OutlineInputBorder(
- borderSide: BorderSide(color: primaryColor),
+ borderSide: BorderSide(color: secondaryColor),
),
suffixIcon: IconButton(
icon: Icon(
Icons.visibility_off_outlined,
- color: isObscureText==true?greyColor:primaryColor,
+ color: isObscureText==true?greyColor:secondaryColor,
),
onPressed: () {
@@ -181,7 +183,7 @@ class _LoginState extends State {
),
onPressed: () async{
- /* if (mobileNumberController.text != '' &&
+ if (mobileNumberController.text != '' &&
passwordController.text != '') {
AppSettings.preLoaderDialog(context);
@@ -227,7 +229,7 @@ class _LoginState extends State {
else{
AppSettings.longFailedToast("Please enter valid details");
- }*/
+ }
},
child: const Text('Login'),
diff --git a/lib/common/otpscreen.dart b/lib/common/otpscreen.dart
index e86df62..638e273 100644
--- a/lib/common/otpscreen.dart
+++ b/lib/common/otpscreen.dart
@@ -162,7 +162,7 @@ class _OtpScreenState extends State {
_fieldSix.text;
});
- /*if (_otp!.length == 6) {
+ if (_otp!.length == 6) {
AppSettings.preLoaderDialog(context);
bool isOnline = await AppSettings.internetConnectivity();
@@ -200,7 +200,7 @@ class _OtpScreenState extends State {
}
else{
- }*/
+ }
},
child: const Text('Submit')),
)
diff --git a/lib/common/qrcode_display.dart b/lib/common/qrcode_display.dart
new file mode 100644
index 0000000..06a9429
--- /dev/null
+++ b/lib/common/qrcode_display.dart
@@ -0,0 +1,123 @@
+import 'dart:convert';
+import 'dart:io';
+import 'dart:ui';
+import 'package:flutter/material.dart';
+import 'package:flutter/rendering.dart';
+import 'package:flutter/services.dart';
+import 'package:doctor/common/settings.dart';
+import 'package:flutter_share/flutter_share.dart';
+import 'package:share/share.dart';
+import 'dart:typed_data';
+import 'package:path_provider/path_provider.dart';
+import 'package:http/http.dart' as http;
+
+
+
+class DisplayQrCode extends StatefulWidget {
+ const DisplayQrCode({Key? key}) : super(key: key);
+
+ @override
+ State createState() => _DisplayQrCodeState();
+}
+
+class _DisplayQrCodeState extends State {
+
+
+
+ Future share(var qr) async {
+ await FlutterShare.share(
+ title: 'Example share',
+ text: 'Example share text',
+ linkUrl: qr,
+ chooserTitle: 'Example Chooser Title');
+ }
+
+ Future shareQRCodeImage1(qrData) async {
+
+ final tempDir = await getTemporaryDirectory();
+ final file = File('${tempDir.path}/qr_code.png');
+ await file.writeAsBytes(Uint8List.fromList(base64.decode(qrData)));
+
+ // Share the image using the share package
+ Share.shareFiles([file.path], text: 'Check out this QR code');
+
+ }
+
+ String imagePath = '';
+
+ Future downloadQRImage() async {
+ final response = await http.get(Uri.parse(AppSettings.qrCode));
+
+ if (response.statusCode == 200) {
+ final directory = await getApplicationDocumentsDirectory();
+ final filePath = '${directory.path}/qr_image.png';
+
+ final File file = File(filePath);
+ await file.writeAsBytes(response.bodyBytes);
+
+ setState(() {
+ imagePath = filePath;
+ });
+ }
+ }
+
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppSettings.appBar('Qr Code'),
+ body: Container(
+ child: Padding(padding: EdgeInsets.all(10),
+ child: Column(
+ children: [
+ Center(
+ child: Container(
+ padding: EdgeInsets.fromLTRB(0, 20, 0, 0),
+ width: MediaQuery.of(context).size.width * .60, // Set the desired width
+ height: MediaQuery.of(context).size.height * .35, // Set the desired height
+ child:
+ Image.memory(Uint8List.fromList(base64.decode(AppSettings.qrCode),),
+ fit: BoxFit.fill),
+ ),
+ ),
+ SizedBox(
+ height:MediaQuery.of(context).size.height * .05,
+ ),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ IconButton(
+ onPressed: () {
+ //share(AppSettings.qrCode);
+ shareQRCodeImage1(AppSettings.qrCode);
+ },
+ icon: Icon(
+ Icons.share,
+ color: primaryColor,
+ size: 40,
+ ),
+ ),
+ /*IconButton(
+ onPressed: () {
+ downloadQRImage();
+ },
+ icon: Icon(
+ Icons.download,
+ color: primaryColor,
+ size: 40,
+ ),
+ ),*/
+ ],
+ )
+ /*Container(
+ padding: EdgeInsets.fromLTRB(0, 20, 0, 0),
+ child: Center(child: Image.memory(Uint8List.fromList(base64.decode(AppSettings.qrCode),),),),
+ )*/
+
+ ],
+ ),),
+ ),
+ );
+
+ }
+}
diff --git a/lib/common/settings.dart b/lib/common/settings.dart
index 159b5ea..31dea47 100644
--- a/lib/common/settings.dart
+++ b/lib/common/settings.dart
@@ -1,20 +1,19 @@
import 'dart:io';
-import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'dart:convert';
import 'package:flutter/services.dart';
import 'package:doctor/common/preloader.dart';
-import 'package:http/http.dart' as http;
import 'package:shared_preferences/shared_preferences.dart';
import 'package:intl/intl.dart';
import 'dart:async';
import 'package:geolocator/geolocator.dart';
import 'package:fluttertoast/fluttertoast.dart';
+import 'package:http/http.dart' as http;
//const Color primaryColor = Color(0XFF1786A3);
const Color primaryColor = Color(0XFF99405B);
-const Color secondaryColor = Color(0XFFA0C899);
-const Color buttonColors = Color(0XFFFFAC1C);
+const Color secondaryColor = Color(0XFFD9D9D9);
+const Color buttonColors = Color(0XFF1786A3);
const Color greyColor = Color(0XFF8F8E8E);
const Color textFieldStartColor = Colors.grey;
const Color screenBackgroundColor = Color(0XFFEAF6FF);
@@ -22,10 +21,10 @@ const Color screenBackgroundColord = Colors.black12;
const Color dashboardbackground = Color(0XFFF5F5F5);
//Color AppBarGradient_1 = Color(0XFF1258F6);
-Color AppBarGradient_1 = Color(0XFF68A85D);
+Color AppBarGradient_1 = Color(0XFF99405B);
TextStyle PreloaderText() {
- return TextStyle(color: Color(0XFF68A85D));
+ return TextStyle(color: Color(0XFF99405B));
}
TextStyle labelTextStyle() {
@@ -170,24 +169,32 @@ TextStyle drawerHeaderTextStyleNew() {
return TextStyle(color: Colors.black, fontSize: 15);
}
+TextStyle textFormFieldFilledTextStyle() {
+ return TextStyle(color: secondaryColor);
+}
+
+
InputDecoration textFormFieldDecoration(IconData icon, var text) {
return InputDecoration(
filled: true,
- fillColor: Colors.white,
+ fillColor: primaryColor,
prefixIcon: Icon(
icon,
- color: greyColor,
+ color: secondaryColor,
),
- border: OutlineInputBorder(borderSide: BorderSide(color: primaryColor)),
+ border: OutlineInputBorder(borderSide: BorderSide(color: secondaryColor)),
focusedBorder: OutlineInputBorder(
- borderSide: BorderSide(color: primaryColor),
+ borderSide: BorderSide(color: secondaryColor),
),
enabledBorder: OutlineInputBorder(
- borderSide: BorderSide(color: primaryColor),
+ borderSide: BorderSide(color: secondaryColor),
),
labelText: text,
+ /*labelStyle: TextStyle(
+ color: myFocusNode.hasFocus ? Colors.blue : Colors.black
+ )*/
labelStyle: TextStyle(
- color: Colors.black, //<-- SEE HERE
+ color: secondaryColor,fontWeight: FontWeight.bold //<-- SEE HERE
),
);
}
@@ -224,19 +231,28 @@ Future preloaderWindow(BuildContext context) async {
class AppSettings {
static SharedPreferences sharedPreferences =
SharedPreferences.getInstance() as SharedPreferences;
- static String userName = '';
- static String userAddress = '';
+ static String doctorName = '';
+ static String specialization = '';
+ static String qualification = '';
+ static List placeOfPractices = [];
+ static String placeOfPractice1 = '';
+ static String placeOfPractice2 = '';
+ static String placeOfPractice3 = '';
+ static String placeOfPracticeAddress1 = '';
+ static String placeOfPracticeAddress2 = '';
+ static String placeOfPracticeAddress3 = '';
+ static String doctorAddress = '';
static String email = '';
static String age = '';
static String gender = '';
static String phoneNumber = '';
static String accessToken = '';
- static String customerId = '';
- static double userLatitude = 0;
- static double userLongitude = 0;
+ static String doctorId = '';
+ static double doctorLatitude = 0;
+ static double doctorLongitude = 0;
static String customerIdsign = '';
static String profileImage = '';
- static List storedPreferenceValidKeys = ['username', 'access_token'];
+ static List storedPreferenceValidKeys = ['doctorname', 'access_token'];
static String preloadText = 'Please wait';
static String latitude = '';
static String longitude = '';
@@ -250,75 +266,31 @@ class AppSettings {
static String serverToken =
'AAAAA66BLaA:APA91bHcmbyiNN8hCL-t-M9oH-u7ZMOl74fcImMM2DQZLgdyY98Wu9XxME-CTPcjpjU6Yy48ouxISrOMb9lpa3PJofh8qciUKMNxV2al-bDvGvPP_VVaH0mrTHzR56hdkGy1Zl-0frDO';
+ static String qrCode = '';
+ static String originalQrCode = '';
+
+
//api urls
- static String host = 'http://35.200.129.165:4000/api/';
- static String loginUrl = host + 'login';
- static String signUpUrl = host + 'users';
+ //static String host = 'http://35.200.129.165:4000/api/';
+ static String host = 'http://cloudh.in:4000/api/';
+ static String loginUrl = host + 'doctorlogin';
+ static String signUpUrl = host + 'addDoctor';
static String sendSmsUrl = host + 'sendSms';
- static String phoneVerificationUrl = host + 'phone';
- static String verifyPhnUrl = host + 'phone';
+ static String phoneVerificationUrl = host + 'doctorphone';
+ static String uploadPicUrl = host + 'uploadsDoctorProfilePicture';
+ static String updateProfileUrl = host + 'updateDoctor';
static String resetTokenUrl = host + 'reset_token';
- static String bmiCaluculateUrl = host + 'insertBMI';
- static String bpCaluculateUrl = host + 'insertBP';
- static String sugarCaluculateUrl = host + 'insertSugar';
- static String profilePicUrl = host + 'users/profile-picture';
- static String inviteFriendUrl = host + 'sendInviteLink';
- static String updateProfileUrl = host + 'update/currentUser';
- static String updateLocationUrl = host + 'updateLocation';
- static String uploadPicUrl = host + 'uploads';
- static String getBmiHistoryUrl = host + 'usersbmi';
- static String getBpHistoryUrl = host + 'usersbp';
- static String getSugarHistoryUrl = host + 'userssugar';
- static String addMedicineTimingsUrl = host + 'medicine-timing';
- static String updateMedicineTimingsUrl = host + 'update-medicine-timing';
- static String getMedicineTimingsUrl = host + 'getmedicineztiming';
- static String findingsUploadPicUrl = host + 'uploads-findings-prescription';
- static String addFindingsUrl = host + 'update-uploads-findingsPictureId-prescription';
- static String addReportsUrl = host + 'update-uploads-reportsPictureId-prescription';
- static String addPrescriptionsUrl = host + 'update-uploads-prescriptionPictureId-prescription';
- static String updateFindingsUploadPicUrl = host + 'update-uploads-findings-prescription';
- static String updateReportsUploadPicUrl = host + 'update-uploads-reports-prescription';
- static String reportsUploadPicUrl = host + 'uploads-reports-prescription';
- static String prescriptionUploadPicUrl = host + 'uploads-prescription-prescription';
- static String updatePrescriptionPicUrl = host + 'update-uploads-prescription-prescription';
- static String recordPrescriptionsUploadPicUrl = host + 'uploads-prescription-prescription';
- static String getAllpharmaciesDataUrl = host + 'getAllPharmacylist';
- static String getAllQuotationRequestsUrl = host + 'userprecription';
- static String getQuotationUrl = host + 'submitPicture';
- static String addPrescriptionUrl = host + 'add-prescription-details';
- static String addRecordsUrl = host + 'add-record';
- static String updateRecordsUrl = host + 'records';
- static String reportMySelfVideoUploadUrl = host + 'reportProblemVideo';
- static String uploadReportMyselfPictureUrl = host + 'reportProblemPicture';
-
- //static String getAllPrescriptionsDataUrl = host + 'usersinglerprecription';
- static String getAllPrescriptionsDataUrl = host + 'getAllPrescriptionDetails';
+ static String generateQRCodeUrl = host + 'generate-qrcode-doctor';
+ static String getAllConectedPatientsDataUrl = host + 'customerDetails';
static String getRecordsDataUrl = host + 'getAllRecords';
- static String deleteRecordUrl = host + 'deleteRecord';
- static String deleteFindingsUrl = host + 'delete-uploads-findings';
- static String deletePrescriptionsUrl = host + 'delete-prescription';
- static String deleteReportsUrl = host + 'delete-report';
- static String deleteRecordsUrl = host + 'delete-url';
- static String deleteBMIDetailsUrl = host + 'deleteBMI';
- static String deleteBPDetailsUrl = host + 'deleteBP';
- static String deleteSugarDetailsUrl = host + 'deleteSugar';
- static String addReportMySelfProblemUrl = host + 'insertReport';
- static String getAllReportProblemDetalisUrl = host + 'userreport';
- static String deleteReportMySelfProblemUrl = host + 'deleteReportProblem';
-
-
-
-
-
+ static String getDynamicCodeUrl = host + 'records';
+ static String dynamicCodeVerificationUrl = host + 'verifyDynamicCode';
static File? updatedImage;
static String image = '';
static String profilePictureUrl = '';
- static var api = {
- 'signIn': host + '/login',
- };
/*Formatter*/
static String formNum(String s) {
@@ -337,6 +309,7 @@ class AppSettings {
/* Preloader */
static GlobalKey preLoaderKey = new GlobalKey();
+
static Future preLoaderDialog(BuildContext context) async {
try {
preLoaderKey = new GlobalKey();
@@ -359,8 +332,7 @@ class AppSettings {
return _headers;
}
- static Future