Merge pull request #37 from yaso-meth/2025-Jan-week-3-testing-fixes
2025-Jan-week-3-testing-fixes
This commit is contained in:
@@ -6,6 +6,8 @@
|
|||||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||||
<!-- <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> -->
|
<!-- <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> -->
|
||||||
<uses-permission android:name="android.permission.CAMERA" />
|
<uses-permission android:name="android.permission.CAMERA" />
|
||||||
|
<uses-feature android:name="android.hardware.camera" />
|
||||||
|
<uses-permission android:name="android.permission.FLASHLIGHT" />
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
|
||||||
android:maxSdkVersion="32"
|
android:maxSdkVersion="32"
|
||||||
|
|||||||
@@ -13,8 +13,6 @@
|
|||||||
<string>sms</string>
|
<string>sms</string>
|
||||||
<string>tel</string>
|
<string>tel</string>
|
||||||
</array>
|
</array>
|
||||||
<key>NSCameraUsageDescription</key>
|
|
||||||
<string>Camera permission is required for barcode scanning.</string>
|
|
||||||
<key>NSLocationWhenInUseUsageDescription</key>
|
<key>NSLocationWhenInUseUsageDescription</key>
|
||||||
<string>This app needs access to location when open.</string>
|
<string>This app needs access to location when open.</string>
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
|||||||
@@ -287,7 +287,11 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
|
|||||||
});
|
});
|
||||||
if (await SuperTokens.doesSessionExist() ==
|
if (await SuperTokens.doesSessionExist() ==
|
||||||
false) {
|
false) {
|
||||||
Navigator.of(context).popAndPushNamed('/');
|
Navigator.of(context).pop();
|
||||||
|
Navigator.of(context).popAndPushNamed(
|
||||||
|
'/',
|
||||||
|
arguments: AuthArguments(true, false),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@@ -316,7 +320,12 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
|
|||||||
.changeTheme(ThemeMode.dark);
|
.changeTheme(ThemeMode.dark);
|
||||||
//print("Dark Mode: $darkm");
|
//print("Dark Mode: $darkm");
|
||||||
}
|
}
|
||||||
Navigator.of(context).popAndPushNamed('/');
|
Navigator.of(context).pop();
|
||||||
|
Navigator.of(context).popAndPushNamed(
|
||||||
|
'/',
|
||||||
|
arguments: AuthArguments(true, false),
|
||||||
|
);
|
||||||
|
// Navigator.of(context).popAndPushNamed('/',);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Image(image: logoThemeSwitch),
|
child: Image(image: logoThemeSwitch),
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ abstract class AppEnviroment {
|
|||||||
switch (env) {
|
switch (env) {
|
||||||
case Enviroment.dev:
|
case Enviroment.dev:
|
||||||
{
|
{
|
||||||
baseApiUrl = "http://10.0.2.2:8080"; //"http://localhost:8080";
|
baseApiUrl = "http://10.0.2.2:8080"; //Android
|
||||||
|
// baseApiUrl = "http://localhost:8080"; //Web
|
||||||
baseFileUrl = "http://10.0.2.2:9000"; //"http://localhost:9000";
|
baseFileUrl = "http://10.0.2.2:9000"; //"http://localhost:9000";
|
||||||
whatsappAccessToken =
|
whatsappAccessToken =
|
||||||
"EAAPINXuNFdYBOzBjTcvZA2iPXEHbHRF9uNXyP3ihkPRUcBqKNru5g9NKRRKkFaiaITEzO3BMo6CjdUmlDH4qYTW2mzDrZB4Q21ZCEZBgECZCu27vfaOXJZCYQLNxwoXkrZBRYv8ZAP37f69r3z9JxLQxdxn9gwqA3oNZAlBBRapJQzxOr6pZBTdI3bbjbu17ZBIwRcF4JCqPDCNLEZCI3bmHwEd2i2niNMYZD";
|
"EAAPINXuNFdYBOzBjTcvZA2iPXEHbHRF9uNXyP3ihkPRUcBqKNru5g9NKRRKkFaiaITEzO3BMo6CjdUmlDH4qYTW2mzDrZB4Q21ZCEZBgECZCu27vfaOXJZCYQLNxwoXkrZBRYv8ZAP37f69r3z9JxLQxdxn9gwqA3oNZAlBBRapJQzxOr6pZBTdI3bbjbu17ZBIwRcF4JCqPDCNLEZCI3bmHwEd2i2niNMYZD";
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import 'package:Mzansi_Innovation_Hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart';
|
||||||
import 'package:Mzansi_Innovation_Hub/mih_packages/authentication/biometric_check.dart';
|
import 'package:Mzansi_Innovation_Hub/mih_packages/authentication/biometric_check.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
@@ -62,8 +63,9 @@ class _AuthCheckState extends State<AuthCheck> {
|
|||||||
} else if (snapshot.data == false) {
|
} else if (snapshot.data == false) {
|
||||||
return const SignInOrRegister();
|
return const SignInOrRegister();
|
||||||
} else {
|
} else {
|
||||||
return const SizedBox(width: 5, height: 5);
|
return
|
||||||
//const Mihloadingcircle();
|
// const SizedBox(width: 5, height: 5);
|
||||||
|
const Mihloadingcircle();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -112,6 +112,7 @@ class _BiometricCheckState extends State<BiometricCheck> {
|
|||||||
//Heading
|
//Heading
|
||||||
Text(
|
Text(
|
||||||
'Biomentric Authentication',
|
'Biomentric Authentication',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 25,
|
fontSize: 25,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
@@ -182,6 +183,13 @@ class _BiometricCheckState extends State<BiometricCheck> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
// TODO: implement initState
|
||||||
|
super.initState();
|
||||||
|
if (widget.firstBoot == true) authenticateUser();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
if (MzanziInnovationHub.of(context)!.theme.getPlatform() == "Web") {
|
if (MzanziInnovationHub.of(context)!.theme.getPlatform() == "Web") {
|
||||||
|
|||||||
@@ -8,7 +8,9 @@ import 'package:flutter/services.dart';
|
|||||||
import 'package:flutter_swipe_detector/flutter_swipe_detector.dart';
|
import 'package:flutter_swipe_detector/flutter_swipe_detector.dart';
|
||||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
import 'package:google_nav_bar/google_nav_bar.dart';
|
import 'package:google_nav_bar/google_nav_bar.dart';
|
||||||
import 'package:mobile_scanner/mobile_scanner.dart';
|
import 'package:simple_barcode_scanner/simple_barcode_scanner.dart';
|
||||||
|
// import 'package:simple_barcode_scanner/simple_barcode_scanner.dart';
|
||||||
|
// import 'package:mobile_scanner/mobile_scanner.dart';
|
||||||
// import 'package:simple_barcode_scanner/screens/web.dart';
|
// import 'package:simple_barcode_scanner/screens/web.dart';
|
||||||
// import 'package:simple_barcode_scanner/simple_barcode_scanner.dart';
|
// import 'package:simple_barcode_scanner/simple_barcode_scanner.dart';
|
||||||
import '../../main.dart';
|
import '../../main.dart';
|
||||||
@@ -84,9 +86,9 @@ class _MIHHomeState extends State<MIHHome> {
|
|||||||
String appSearch = "";
|
String appSearch = "";
|
||||||
int amount = 10;
|
int amount = 10;
|
||||||
final baseAPI = AppEnviroment.baseApiUrl;
|
final baseAPI = AppEnviroment.baseApiUrl;
|
||||||
final MobileScannerController scannerController = MobileScannerController(
|
// final MobileScannerController scannerController = MobileScannerController(
|
||||||
// required options for the scanner
|
// // required options for the scanner
|
||||||
);
|
// );
|
||||||
|
|
||||||
void setAppsNewPersonal(List<MIHTile> tileList) {
|
void setAppsNewPersonal(List<MIHTile> tileList) {
|
||||||
ImageProvider logo = MzanziInnovationHub.of(context)!.theme.logoImage();
|
ImageProvider logo = MzanziInnovationHub.of(context)!.theme.logoImage();
|
||||||
@@ -417,14 +419,6 @@ class _MIHHomeState extends State<MIHHome> {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
void foundCode(BarcodeCapture bcode) {
|
|
||||||
if (bcode.barcodes.first.rawValue != null) {
|
|
||||||
print(bcode.barcodes.first.rawValue);
|
|
||||||
scannerController.stop();
|
|
||||||
Navigator.of(context).pop();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void setAppsDev(List<MIHTile> tileList) {
|
void setAppsDev(List<MIHTile> tileList) {
|
||||||
if (AppEnviroment.getEnv() == "Dev") {
|
if (AppEnviroment.getEnv() == "Dev") {
|
||||||
tileList.add(MIHTile(
|
tileList.add(MIHTile(
|
||||||
@@ -477,36 +471,37 @@ class _MIHHomeState extends State<MIHHome> {
|
|||||||
));
|
));
|
||||||
tileList.add(MIHTile(
|
tileList.add(MIHTile(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
showDialog(
|
if (MzanziInnovationHub.of(context)!.theme.getPlatform() == "Web") {
|
||||||
barrierDismissible: false,
|
print("================ Web ====================");
|
||||||
context: context,
|
print("here 1");
|
||||||
builder: (context) {
|
try {
|
||||||
// return const MIHErrorMessage(errorType: "Input Error");
|
String? res = await SimpleBarcodeScanner.scanBarcode(
|
||||||
// return const MIHErrorMessage(errorType: "Password Requirements");
|
context,
|
||||||
// return const MIHErrorMessage(errorType: "Invalid Username");
|
barcodeAppBar: const BarcodeAppBar(
|
||||||
// return const MIHErrorMessage(errorType: "Invalid Email");
|
appBarTitle: 'Scan Barcode',
|
||||||
// return const MIHErrorMessage(errorType: "User Exists");
|
centerTitle: true,
|
||||||
// return const MIHErrorMessage(errorType: "Password Match");
|
enableBackButton: true,
|
||||||
// return const MIHErrorMessage(errorType: "Invalid Credentials");
|
backButtonIcon: Icon(Icons.arrow_back),
|
||||||
return MIHWindow(
|
),
|
||||||
fullscreen: false,
|
isShowFlashIcon: true,
|
||||||
windowTitle: "Scanner",
|
delayMillis: 500,
|
||||||
windowBody: [
|
cameraFace: CameraFace.back,
|
||||||
SizedBox(
|
scanFormat: ScanFormat.ONLY_BARCODE,
|
||||||
height: 1000,
|
|
||||||
child: MobileScanner(
|
|
||||||
controller: scannerController,
|
|
||||||
onDetect: foundCode,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
windowTools: [],
|
|
||||||
onWindowTapClose: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
);
|
);
|
||||||
},
|
if (res != null) {
|
||||||
);
|
print(res);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
print(error);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
TextEditingController cardNumberController =
|
||||||
|
TextEditingController();
|
||||||
|
Navigator.of(context).pushNamed(
|
||||||
|
'/scanner',
|
||||||
|
arguments: cardNumberController,
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
tileName: "Scanner - Dev",
|
tileName: "Scanner - Dev",
|
||||||
tileIcon: Icon(
|
tileIcon: Icon(
|
||||||
@@ -954,7 +949,7 @@ class _MIHHomeState extends State<MIHHome> {
|
|||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
child: MIHSearchField(
|
child: MIHSearchField(
|
||||||
controller: searchController,
|
controller: searchController,
|
||||||
hintText: "Search Mzansi Tiles",
|
hintText: "Search Mzansi Packages",
|
||||||
required: false,
|
required: false,
|
||||||
editable: true,
|
editable: true,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
|||||||
@@ -165,8 +165,10 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
|
|||||||
//print(response.statusCode);
|
//print(response.statusCode);
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
Navigator.of(context)
|
Navigator.of(context).popAndPushNamed(
|
||||||
.popAndPushNamed('/', arguments: widget.arguments.signedInUser);
|
'/',
|
||||||
|
arguments: AuthArguments(true, false),
|
||||||
|
);
|
||||||
String message =
|
String message =
|
||||||
"${widget.arguments.signedInUser.email}'s information has been updated successfully!";
|
"${widget.arguments.signedInUser.email}'s information has been updated successfully!";
|
||||||
successPopUp(message);
|
successPopUp(message);
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ import 'package:Mzansi_Innovation_Hub/mih_objects/loyalty_card.dart';
|
|||||||
import 'package:Mzansi_Innovation_Hub/mih_packages/mzansi_wallet/builder/build_loyalty_card_list.dart';
|
import 'package:Mzansi_Innovation_Hub/mih_packages/mzansi_wallet/builder/build_loyalty_card_list.dart';
|
||||||
import 'package:Mzansi_Innovation_Hub/mih_packages/mzansi_wallet/components/mih_card_display.dart';
|
import 'package:Mzansi_Innovation_Hub/mih_packages/mzansi_wallet/components/mih_card_display.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
// import 'package:flutter/services.dart';
|
|
||||||
// import 'package:flutter_barcode_scanner/flutter_barcode_scanner.dart';
|
|
||||||
import 'package:mobile_scanner/mobile_scanner.dart';
|
import 'package:mobile_scanner/mobile_scanner.dart';
|
||||||
import 'package:simple_barcode_scanner/simple_barcode_scanner.dart';
|
import 'package:simple_barcode_scanner/simple_barcode_scanner.dart';
|
||||||
|
|
||||||
@@ -33,7 +31,10 @@ class _LoyaltyCardsState extends State<LoyaltyCards> {
|
|||||||
late Future<List<MIHLoyaltyCard>> cardList;
|
late Future<List<MIHLoyaltyCard>> cardList;
|
||||||
//bool showSelectedCardType = false;
|
//bool showSelectedCardType = false;
|
||||||
final ValueNotifier<String> shopName = ValueNotifier("");
|
final ValueNotifier<String> shopName = ValueNotifier("");
|
||||||
final MobileScannerController scannerController = MobileScannerController();
|
final MobileScannerController scannerController = MobileScannerController(
|
||||||
|
detectionSpeed: DetectionSpeed.unrestricted,
|
||||||
|
);
|
||||||
|
final boxFit = BoxFit.contain;
|
||||||
|
|
||||||
void foundCode(BarcodeCapture bcode) {
|
void foundCode(BarcodeCapture bcode) {
|
||||||
if (bcode.barcodes.first.rawValue != null) {
|
if (bcode.barcodes.first.rawValue != null) {
|
||||||
@@ -46,30 +47,38 @@ class _LoyaltyCardsState extends State<LoyaltyCards> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void openscanner() {
|
void openscanner() async {
|
||||||
showDialog(
|
if (MzanziInnovationHub.of(context)!.theme.getPlatform() == "Web") {
|
||||||
barrierDismissible: false,
|
print("================ Web ====================");
|
||||||
context: context,
|
print("here 1");
|
||||||
builder: (context) {
|
try {
|
||||||
return MIHWindow(
|
String? res = await SimpleBarcodeScanner.scanBarcode(
|
||||||
fullscreen: false,
|
context,
|
||||||
windowTitle: "Scanner",
|
barcodeAppBar: const BarcodeAppBar(
|
||||||
windowBody: [
|
appBarTitle: 'Scan Barcode',
|
||||||
Expanded(
|
centerTitle: true,
|
||||||
child: MobileScanner(
|
enableBackButton: true,
|
||||||
controller: scannerController,
|
backButtonIcon: Icon(Icons.arrow_back),
|
||||||
onDetect: foundCode,
|
),
|
||||||
),
|
isShowFlashIcon: true,
|
||||||
),
|
delayMillis: 500,
|
||||||
],
|
cameraFace: CameraFace.back,
|
||||||
windowTools: [],
|
scanFormat: ScanFormat.ONLY_BARCODE,
|
||||||
onWindowTapClose: () {
|
|
||||||
scannerController.stop();
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
);
|
);
|
||||||
},
|
if (res != null) {
|
||||||
);
|
setState(() {
|
||||||
|
cardNumberController.text = res;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
print(error);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Navigator.of(context).pushNamed(
|
||||||
|
'/scanner',
|
||||||
|
arguments: cardNumberController,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void addCardWindow(BuildContext ctxt) {
|
void addCardWindow(BuildContext ctxt) {
|
||||||
@@ -145,48 +154,8 @@ class _LoyaltyCardsState extends State<LoyaltyCards> {
|
|||||||
),
|
),
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
MIHButton(
|
MIHButton(
|
||||||
onTap:
|
onTap: () async {
|
||||||
// () async {
|
openscanner();
|
||||||
// String bcodeScanResults;
|
|
||||||
// try {
|
|
||||||
// bcodeScanResults = await FlutterBarcodeScanner.scanBarcode(
|
|
||||||
// '#ff6666',
|
|
||||||
// 'Cancel',
|
|
||||||
// true,
|
|
||||||
// ScanMode.BARCODE,
|
|
||||||
// );
|
|
||||||
// } on PlatformException {
|
|
||||||
// bcodeScanResults = "Platform not supported";
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (!mounted) return;
|
|
||||||
// setState(() {
|
|
||||||
// cardNumberController.text = bcodeScanResults;
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
// () {
|
|
||||||
// openscanner();
|
|
||||||
// },
|
|
||||||
() async {
|
|
||||||
print("here");
|
|
||||||
String? res = await SimpleBarcodeScanner.scanBarcode(
|
|
||||||
context,
|
|
||||||
barcodeAppBar: const BarcodeAppBar(
|
|
||||||
appBarTitle: 'Scan Bardcode',
|
|
||||||
centerTitle: true,
|
|
||||||
enableBackButton: true,
|
|
||||||
backButtonIcon: Icon(Icons.arrow_back),
|
|
||||||
),
|
|
||||||
isShowFlashIcon: true,
|
|
||||||
delayMillis: 500,
|
|
||||||
cameraFace: CameraFace.back,
|
|
||||||
scanFormat: ScanFormat.ONLY_BARCODE,
|
|
||||||
);
|
|
||||||
if (res != null) {
|
|
||||||
setState(() {
|
|
||||||
cardNumberController.text = res;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
buttonText: "Scan",
|
buttonText: "Scan",
|
||||||
buttonColor:
|
buttonColor:
|
||||||
|
|||||||
108
Frontend/lib/mih_packages/mzansi_wallet/mih_barcode_scanner.dart
Normal file
108
Frontend/lib/mih_packages/mzansi_wallet/mih_barcode_scanner.dart
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
import 'package:Mzansi_Innovation_Hub/main.dart';
|
||||||
|
import 'package:Mzansi_Innovation_Hub/mih_components/mih_inputs_and_buttons/mih_button.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:mobile_scanner/mobile_scanner.dart';
|
||||||
|
|
||||||
|
class MihBarcodeScanner extends StatefulWidget {
|
||||||
|
final TextEditingController cardNumberController;
|
||||||
|
const MihBarcodeScanner({
|
||||||
|
super.key,
|
||||||
|
required this.cardNumberController,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<MihBarcodeScanner> createState() => _MihBarcodeScannerState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _MihBarcodeScannerState extends State<MihBarcodeScanner> {
|
||||||
|
final MobileScannerController scannerController = MobileScannerController(
|
||||||
|
detectionSpeed: DetectionSpeed.normal,
|
||||||
|
);
|
||||||
|
|
||||||
|
void foundCode(BarcodeCapture bcode) {
|
||||||
|
if (bcode.barcodes.first.rawValue != null) {
|
||||||
|
setState(() {
|
||||||
|
widget.cardNumberController.text = bcode.barcodes.first.rawValue!;
|
||||||
|
});
|
||||||
|
//print(bcode.barcodes.first.rawValue);
|
||||||
|
scannerController.stop();
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return SafeArea(
|
||||||
|
child: Scaffold(
|
||||||
|
body: Stack(
|
||||||
|
children: [
|
||||||
|
MobileScanner(
|
||||||
|
onDetect: foundCode,
|
||||||
|
),
|
||||||
|
Align(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(10.0),
|
||||||
|
child: Container(
|
||||||
|
width: 500,
|
||||||
|
height: 150,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(
|
||||||
|
width: 5,
|
||||||
|
color: MzanziInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Align(
|
||||||
|
alignment: AlignmentDirectional.bottomCenter,
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(10.0),
|
||||||
|
child: MIHButton(
|
||||||
|
onTap: () {
|
||||||
|
scannerController.stop();
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
},
|
||||||
|
buttonText: "Cancel",
|
||||||
|
buttonColor: MzanziInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
textColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// GestureDetector(
|
||||||
|
// onTap: () {
|
||||||
|
// scannerController.stop();
|
||||||
|
// Navigator.of(context).pop();
|
||||||
|
// },
|
||||||
|
// child: const Text(
|
||||||
|
// "Cancel",
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontWeight: FontWeight.bold,
|
||||||
|
// fontSize: 25,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// IconButton(
|
||||||
|
// onPressed: () {},
|
||||||
|
// icon: const Icon(
|
||||||
|
// Icons.flip_camera_android,
|
||||||
|
// size: 30,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -287,7 +287,7 @@ class _PatientViewState extends State<PatientView> {
|
|||||||
checkScreenSize();
|
checkScreenSize();
|
||||||
return SwipeDetector(
|
return SwipeDetector(
|
||||||
onSwipeLeft: (offset) {
|
onSwipeLeft: (offset) {
|
||||||
if (_selectedIndex < 2) {
|
if (_selectedIndex < 3) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_selectedIndex += 1;
|
_selectedIndex += 1;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'package:Mzansi_Innovation_Hub/mih_packages/calculator/calculator.dart';
|
import 'package:Mzansi_Innovation_Hub/mih_packages/calculator/calculator.dart';
|
||||||
import 'package:Mzansi_Innovation_Hub/mih_packages/mih_policy_tos/mih_privacy_polocy.dart';
|
import 'package:Mzansi_Innovation_Hub/mih_packages/mih_policy_tos/mih_privacy_polocy.dart';
|
||||||
import 'package:Mzansi_Innovation_Hub/mih_packages/mih_policy_tos/mih_terms_of_service.dart';
|
import 'package:Mzansi_Innovation_Hub/mih_packages/mih_policy_tos/mih_terms_of_service.dart';
|
||||||
|
import 'package:Mzansi_Innovation_Hub/mih_packages/mzansi_wallet/mih_barcode_scanner.dart';
|
||||||
import 'package:Mzansi_Innovation_Hub/mih_packages/mzansi_wallet/mzansi_wallet.dart';
|
import 'package:Mzansi_Innovation_Hub/mih_packages/mzansi_wallet/mzansi_wallet.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import '../mih_components/mih_layout/mih_print_prevew.dart';
|
import '../mih_components/mih_layout/mih_print_prevew.dart';
|
||||||
@@ -267,6 +268,22 @@ class RouteGenerator {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
return _errorRoute();
|
return _errorRoute();
|
||||||
|
//===============================================================
|
||||||
|
|
||||||
|
//Full Screen File Viewer
|
||||||
|
case '/scanner':
|
||||||
|
if (args is TextEditingController) {
|
||||||
|
return MaterialPageRoute(
|
||||||
|
settings: settings,
|
||||||
|
builder: (_) => MihBarcodeScanner(
|
||||||
|
cardNumberController: args,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return _errorRoute();
|
||||||
|
//===============================================================
|
||||||
|
|
||||||
|
//Calculator
|
||||||
case '/calculator':
|
case '/calculator':
|
||||||
return MaterialPageRoute(
|
return MaterialPageRoute(
|
||||||
settings: settings,
|
settings: settings,
|
||||||
|
|||||||
@@ -5,23 +5,23 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: _fe_analyzer_shared
|
name: _fe_analyzer_shared
|
||||||
sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834
|
sha256: "16e298750b6d0af7ce8a3ba7c18c69c3785d11b15ec83f6dcd0ad2a0009b3cab"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "72.0.0"
|
version: "76.0.0"
|
||||||
_macros:
|
_macros:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: dart
|
description: dart
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.3.2"
|
version: "0.3.3"
|
||||||
analyzer:
|
analyzer:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: analyzer
|
name: analyzer
|
||||||
sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139
|
sha256: "1f14db053a8c23e260789e9b0980fa27f2680dd640932cae5e1137cce0e46e1e"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.7.0"
|
version: "6.11.0"
|
||||||
ansicolor:
|
ansicolor:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -234,10 +234,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: collection
|
name: collection
|
||||||
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
|
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.18.0"
|
version: "1.19.0"
|
||||||
convert:
|
convert:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -617,18 +617,18 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: leak_tracker
|
name: leak_tracker
|
||||||
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
|
sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "10.0.5"
|
version: "10.0.7"
|
||||||
leak_tracker_flutter_testing:
|
leak_tracker_flutter_testing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: leak_tracker_flutter_testing
|
name: leak_tracker_flutter_testing
|
||||||
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
|
sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.5"
|
version: "3.0.8"
|
||||||
leak_tracker_testing:
|
leak_tracker_testing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -697,10 +697,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: macros
|
name: macros
|
||||||
sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536"
|
sha256: "1d9e801cd66f7ea3663c45fc708450db1fa57f988142c64289142c9b7ee80656"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.2-main.4"
|
version: "0.1.3-main.0"
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -1057,7 +1057,7 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.99"
|
version: "0.0.0"
|
||||||
source_maps:
|
source_maps:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -1086,10 +1086,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stack_trace
|
name: stack_trace
|
||||||
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
|
sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.11.1"
|
version: "1.12.0"
|
||||||
stream_channel:
|
stream_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -1110,10 +1110,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: string_scanner
|
name: string_scanner
|
||||||
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
|
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.3.0"
|
||||||
supertokens_flutter:
|
supertokens_flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -1214,10 +1214,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
|
sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.7.2"
|
version: "0.7.3"
|
||||||
timing:
|
timing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -1342,10 +1342,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vm_service
|
name: vm_service
|
||||||
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
|
sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "14.2.5"
|
version: "14.3.0"
|
||||||
watcher:
|
watcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
# In Windows, build-name is used as the major, minor, and patch parts
|
# In Windows, build-name is used as the major, minor, and patch parts
|
||||||
# of the product and file versions while build-number is used as the build suffix.
|
# of the product and file versions while build-number is used as the build suffix.
|
||||||
version: 1.0.2+11
|
version: 1.0.2+12
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=3.2.4 <4.0.0'
|
sdk: '>=3.5.3 <4.0.0'
|
||||||
|
# flutter: ">=1.17.0"
|
||||||
# Dependencies specify other packages that your package needs in order to work.
|
# Dependencies specify other packages that your package needs in order to work.
|
||||||
# To automatically upgrade your package dependencies to the latest versions
|
# To automatically upgrade your package dependencies to the latest versions
|
||||||
# consider running `flutter pub upgrade --major-versions`. Alternatively,
|
# consider running `flutter pub upgrade --major-versions`. Alternatively,
|
||||||
@@ -64,7 +64,7 @@ dependencies:
|
|||||||
mobile_scanner: ^6.0.2
|
mobile_scanner: ^6.0.2
|
||||||
flutter_launcher_icons: ^0.13.1
|
flutter_launcher_icons: ^0.13.1
|
||||||
# flutter_barcode_scanner: ^2.0.0
|
# flutter_barcode_scanner: ^2.0.0
|
||||||
barcode_widget: ^2.0.4
|
barcode_widget: ^2.0.4 #Generate Barcodes
|
||||||
url_launcher: ^6.3.1
|
url_launcher: ^6.3.1
|
||||||
fl_downloader: ^2.0.2
|
fl_downloader: ^2.0.2
|
||||||
local_auth: ^2.3.0
|
local_auth: ^2.3.0
|
||||||
|
|||||||
Reference in New Issue
Block a user