|
|
|
|
@ -1,3 +1,4 @@
|
|
|
|
|
import 'package:barcode_scan2/barcode_scan2.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/config/config.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
|
|
|
|
@ -20,6 +21,7 @@ import 'package:diplomaticquarterapp/routes.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/theme/colors.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/theme/theme_notifier.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/theme/theme_value.dart';
|
|
|
|
|
@ -329,6 +331,19 @@ class _AppDrawerState extends State<AppDrawer> {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
InkWell(
|
|
|
|
|
child: DrawerItem(TranslationBase.of(context).pharmacyLiveCare, SvgPicture.asset("assets/images/new/Live_Care.svg"),
|
|
|
|
|
isImageIcon: true,
|
|
|
|
|
bottomLine: false,
|
|
|
|
|
textColor: Theme.of(context).textTheme.bodyText1.color,
|
|
|
|
|
iconColor: Theme.of(context).textTheme.bodyText1.color,
|
|
|
|
|
sideArrow: true,
|
|
|
|
|
letterSpacing: -0.84,
|
|
|
|
|
projectProvider: projectProvider),
|
|
|
|
|
onTap: () {
|
|
|
|
|
readQRCode();
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
InkWell(
|
|
|
|
|
child: Stack(
|
|
|
|
|
children: [
|
|
|
|
|
@ -471,6 +486,19 @@ class _AppDrawerState extends State<AppDrawer> {
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
readQRCode() async {
|
|
|
|
|
String result = (await BarcodeScanner.scan())?.rawContent;
|
|
|
|
|
print(result);
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
LiveCareService service = new LiveCareService();
|
|
|
|
|
service.getPatientInfoByQR(result, context).then((res) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
}).catchError((err) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
print(err);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
drawerNavigator(context, routeName) {
|
|
|
|
|
Navigator.of(context).pushNamed(routeName);
|
|
|
|
|
}
|
|
|
|
|
|