From 8238323dd34610d8d535eb7937cfb502fc38682c Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Mon, 6 Nov 2023 18:25:23 +0300 Subject: [PATCH] 11/1/6 --- lib/constant/info.dart | 4461 +++++++++++++++++ .../auth/onboarding_controller.dart | 3 - lib/controller/functions/ocr_controller.dart | 322 +- .../home/captin/home_captain_controller.dart | 4 +- .../home/map_passenger_controller.dart | 5 + .../home/splash_screen_controlle.dart | 65 + lib/main.dart | 42 +- lib/splash_screen_page.dart | 66 + lib/views/auth/captin/login_captin.dart | 47 +- lib/views/home/Captin/bottom_bar.dart | 114 + lib/views/home/Captin/camer_widget.dart | 388 +- lib/views/home/Captin/home_captin.dart | 83 +- lib/views/home/Captin/passportimage.dart | 46 + lib/views/home/Captin/text_scanner.dart | 129 +- .../timer_to_passenger_from_driver.dart | 54 +- macos/Flutter/GeneratedPluginRegistrant.swift | 10 + pubspec.lock | 300 +- pubspec.yaml | 4 +- 18 files changed, 5817 insertions(+), 326 deletions(-) create mode 100644 lib/controller/home/splash_screen_controlle.dart create mode 100644 lib/splash_screen_page.dart create mode 100644 lib/views/home/Captin/bottom_bar.dart create mode 100644 lib/views/home/Captin/passportimage.dart diff --git a/lib/constant/info.dart b/lib/constant/info.dart index 0352a42..5254d29 100644 --- a/lib/constant/info.dart +++ b/lib/constant/info.dart @@ -5,4 +5,4465 @@ class AppInformation { static const String linkedInProfile = 'https://www.linkedin.com/in/hamza-ayed/'; static const String website = 'https://mobile-app.store'; + static const String email = 'hamzaayed@mobile-app.store'; + + static const String privacyPolicy = + ''' + + + + + + + + + + + + +
+
+
+
+
+
+

Terms and Conditions

+

1 TERMS OF USE

+

By downloading, browsing, accessing or using the Mobile Application; “Sefer”, Users agree to be bound by these Terms and Conditions of Use. We reserve the right to amend these terms and conditions at any time. If the User disagrees with any of these Terms and Conditions of Use, the User must immediately discontinue their access to the Mobile Application and their use of the services offered on the Mobile Application. Continued use of the Mobile Application will constitute acceptance of these Terms and Conditions of Use, as may be amended from time to time.

+

2.1. DEFINITIONS

+

In these Terms and Conditions of Use, the following capitalized terms shall have the following meanings, except where the context otherwise requires:

+

“Mobile Application” or “Sefer” refers to the smartphone software through which the company mediates services between Users and Service Providers.

+

"Account" means an account created by a User or a Service Provider on the Mobile Application as part of Registration.

+

“Service Providers” refers to the individuals or companies registered within the Company to provide products or services approved and mediated by the Company/Mobile Application and that are requested/purchased by “Users”. “Service Provider” means any one of them.

+

"Users" means users of the Mobile Application, including you and "User" means any one of them. “Users” also includes Service Providers using the Mobile Application version dedicated to the use of Service Providers.

+

"Privacy Policy" means the privacy policy set out in Clause 14 of these Terms and Conditions of Use.

+

"Redeem" means to redeem a company’s products or services on these Terms and Conditions of Use and

+

"Redemption" means the act of redeeming such products or services.

+

"Register" means to create an Account on the Mobile Application and "Registration" means the act of creating such an Account.

+

"Services" means all the services provided by Service Providers via the Mobile Application and mediated by the Company to Users, and "Service" means any one of them.

+

2.2. WHAT IS THE MOBILE APPLICATION, “Sefer”?

+

The “Sefer” Mobile Application consists in a specialize service with the purpose to schedule/match the Service Provider with the User, however without creating any employee relationship with the Service Provider, meaning that the Mobile Application should be considered only as a service mediator with the purpose of scheduling/matching between Users and Service Providers for the latter to fulfill the service requested by Users. Through the system, the Company allows, totally free of charge, the Users to sign up and request the desired available services from Service Providers in a more efficient way than the conventional existing methods. The Service Providers, by their means, can register on the Mobile Application dedicated for Service Providers through the methods indicated by the Company, pending an evaluation from the Company and the necessary documentation when signing up in accordance with guidelines set by the Transportation General Authority (TGA) to provide services through the Mobile Application. The Service Provider will pay a profit margin fee determined by the Company -in knowledge of the Service Provider- per completed service. Users can pay their ride fare using Apple Pay as an additional payment method in Saudi Arabia on iPhones

+

+

3. GENERAL ISSUES ABOUT THE MOBILE APPLICATION AND THE SERVICES

+

3.1 Applicability of terms and conditions: The use of any Services and/or the Mobile Application and the making of any Redemptions are subject to these Terms and Conditions of Use.

+

3.2 Location: The Mobile Application, the Services and any Redemptions are intended solely for use by Users who access the Mobile Application where it operates and provides its services regionally. We make no representation that the Services (or any goods or services) are available or otherwise suitable for use outside of the regions indicated by the Company. Notwithstanding the above, if the User accesses the Mobile Application, use the Services or make any Redemptions from locations outside the regions indicated by the Service Provider, the User does so on their own initiative and are responsible for the consequences and for compliance with all applicable laws.

+

3.3 Scope: The Mobile Application, the Services and any Redemptions are for Users’ non-commercial, personal use only and must not be used for business purposes unless an official written permission is granted by the Company.

+

3.4 Prevention on use: We reserve the right to prevent the User using the Mobile Application and the Service (or any part of them) and to prevent the User from making any Redemptions.

+

3.5 Equipment and Networks: The provision of the Services and the Mobile Application does not include the provision of a mobile telephone or handheld device or other necessary equipment to access the Mobile Application or the Services or make any Redemptions. To use the Mobile Application or Services or to make Redemptions, the User will require Internet connectivity and appropriate telecommunication links. The User acknowledges that the terms of agreement with their respective mobile network provider will continue to apply when using the Mobile Application. As a result, the User may be charged by the Mobile Provider for access to network connection services for the duration of the connection while accessing the Mobile Application or any such third party charges as may arise. The User accepts responsibility for any such charges that arise.

+

3.6 Permission to use Mobile Application: If the User is not the bill payer for the mobile telephone or handheld device being used to access the Mobile Application, the User will be assumed to have received permission from the bill payer for using the Mobile Application.

+

3.7 License to Use Material: By submitting any text or images (including photographs) via the Application, the User represents that they are the owner of the Material, or have proper authorization from the owner of the Material to use, reproduce and distribute it. The User hereby grants us a worldwide, royalty-free, non-exclusive license to use the Material to promote any products or services.

+

4. REDEMPTIONS

+

4.1 Need for registration: a) Users must Register to make a Redemption from the Mobile Application. b) The Service Provider agrees that by registering they will be scrutinized to be accepted by the Company who may refuse or cancel the Service Provider account at any time, whether by complaints or by internal policy.

+

4.2 Application of these Terms and Conditions of Use: By making any Redemption, the User acknowledges that the Redemption is subject to these Terms and Conditions of Use.

+

4.3 Redemption: Any attempted Redemption not consistent with these Terms and Conditions of Use may be disallowed or rendered void at our or the relevant Service Provider’s discretion.

+

4.4 Responsibility for Redemptions of perishable products of services: Each Service Provider shall be responsible to ensure that any of its products or services for Redemption that are perishable has not expired.

+

4.5 Restrictions: (a) Reproduction, sale, resale or trading of any products or services or Redeemed products is prohibited. (b) If any product or service is Redeemed for less than its face value, there is no entitlement to a credit, cash or Sample equal to the difference between the face value and the amount Redeemed. (c) Redemption of products or services is subject to availability of the relevant Service Providers’ stocks.

+

4.6 Company Not Liable: For the avoidance of doubt, the Company shall not be liable for any losses or damages suffered by Users resulting from a failure by the relevant Service Provider to fulfil any Redemptions in accordance with Clause 4.4 or for a failure by us to deliver any products or services to Users due to the unavailability of such products or services pursuant to Clause 4.5(c). Users accept that the Mobile Application acts solely as a scheduling/matching service between its Users and Service Providers, and that it is not responsible for any issues that arise, including but not limited to accidents, delays, car discomfort, and unavailability of products or services.

+

4.7 Lost/stolen services: Neither we nor any Service Provider shall be responsible for lost or stolen Samples or products that have been Redeemed.

+

+

5. LOCATION ALERTS AND NOTIFICATIONS

+

5.1 The USer agrees to receive pre-programmed notifications (“Location Alerts”) on the Mobile Application from Service Providers if the User has turned on locational services on their mobile telephone or other handheld devices (as the case may be).

+

+

6. USERS’ OBLIGATIONS

+

6.1 Service Provider terms: Users agree to (and shall) abide by the terms and conditions of the relevant Service Provider for which their Redemption relates to, as may be amended from time to time.

+

6.2 Accurate information: The User warrants that all information provided on Registration and contained as part of their Account is true, complete and accurate and that the User will promptly inform us of any changes to such information by updating the information in their Account.

+

6.3 Content on the Mobile Application and Service: It is the User’s responsibility to ensure that any products, services or information available through the Mobile Application or the Services meet their specific requirements before making any Redemption.

+

6.4 Prohibitions in relation to usage of Services or Mobile Application: Without limitation, the User undertakes not to use or permit anyone else to use the Services or Mobile Application:-

+

6.4.1 to send or receive any material which is not civil or tasteful

+

6.4.2 to send or receive any material which is threatening, grossly offensive, of an indecent, obscene or menacing character, blasphemous or defamatory of any person, in contempt of court or in breach of confidence, copyright, rights of personality, publicity or privacy or any other third party rights;

+

6.4.3 to send or receive any material for which the User has not obtained all necessary licenses and/or approvals (from us or third parties); or which constitutes or encourages conduct that would be considered a criminal offence, give rise to civil liability, or otherwise be contrary to the law of or infringe the rights of any third party in any country in the world;

+

6.4.4 to send or receive any material which is technically harmful (including computer viruses, logic bombs, Trojan horses, worms, harmful components, corrupted data or other malicious software or harmful data);

+

6.4.5 to cause annoyance, inconvenience or needless anxiety;

+

6.4.6 to intercept or attempt to intercept any communications transmitted by way of a telecommunications system;

+

6.4.7 for a purpose other than which we have designed them or intended them to be used;

+

6.4.8 for any fraudulent purpose;

+

6.4.9 other than in conformance with accepted Internet practices and practices of any connected networks;

+

6.4.10 in any way which is calculated to incite hatred against any ethnic, religious or any other minority or is otherwise calculated to adversely affect any individual, group or entity; or

+

6.4.11 in such a way as to, or commit any act that would or does, impose an unreasonable or disproportionately large load on our infrastructure.

+

6.5 Prohibitions in relation to usage of Services, Mobile Application: Without limitation, the User further undertakes not to or permit anyone else to:-

+

6.5.1 resell any products or services;

+

6.5.2 furnish false data including false names, addresses and contact details and fraudulently use credit/debit card numbers;

+

6.5.3 attempt to circumvent our security or network including to access data not intended for the User, log into a server or account the User is not expressly authorized to access, or probe the security of other networks (such as running a port scan);

+

6.5.4 execute any form of network monitoring which will intercept data not intended for the User;

+

6.5.5 enter into fraudulent interactions or transactions with us or a Service Provider (including interacting or transacting purportedly on behalf of a third party where the User has no authority to bind that third party or the User is pretending to be a third party);

+

6.5.6 extract data from or hack into the Mobile Application;

+

6.5.7 use the Services or Mobile Application in breach of these Terms and Conditions of Use;

+

6.5.8 engage in any unlawful activity in connection with the use of the Mobile Application or the Services; or

+

6.5.9 engage in any conduct which, in our exclusive reasonable opinion, restricts or inhibits any other customer from properly using or enjoying the Mobile Application or Services.

+

+

7. RULES ABOUT USE OF THE SERVICE AND THE MOBILE APPLICATION

+

7.1 We will use reasonable endeavors to correct any errors or omissions as soon as practicable after being notified of them. However, we do not guarantee that the Services or the Mobile Application will be free of faults, and we do not accept liability for any such faults, errors or omissions. In the event of any such error, fault or omission, Users should report it by contacting us at JORDAN: 962798583052 .

+

7.2 We do not warrant that Users’ use of the Services or the Mobile Application will be uninterrupted and we do not warrant that any information (or messages) transmitted via the Services or the Mobile Application will be transmitted accurately, reliably, in a timely manner or at all. Notwithstanding that we will try to allow uninterrupted access to the Services and the Mobile Application, access to the Services and the Mobile Application may be suspended, restricted or terminated at any time.

+

7.3 We do not give any warranty that the Services and the Mobile Application are free from viruses or anything else which may have a harmful effect on any technology.

+

7.4 We reserve the right to change, modify, substitute, suspend or remove without notice any information or Services on the Mobile Application from time to time. Users’ access to the Mobile Application and/or the Services may also be occasionally restricted to allow for repairs, maintenance or the introduction of new facilities or services. We will attempt to restore such access as soon as we reasonably can. For the avoidance of doubt, we reserve the right to withdraw any information or Services from the Mobile Application at any time.

+

7.5 We reserve the right to block access to and/or to edit or remove any material which in our reasonable opinion may give rise to a breach of these Terms and Conditions of Use.

+

7.6 The acceptance and denial of the service request may occur at first by the Service Provider, who can accept or deny the service when receiving a notification for a request. The User may cancel the contract for any reason which may or may not apply cancellation fees for which the conditions and amount is determined and communicated by the Company. Both recognize that “Sefer” is not liable for any delays, cancellations, failure to cancel the contract and miscommunication between the User and the Service Provider, nor for any delay or failure in the delivery of services from the Service Provider.

+

+

8. SUSPENSION AND TERMINATION

+

8.1 If the User uses (or others, with the User’s permission use) the Mobile Application, any Services in contravention of these Terms and Conditions of Use, we may suspend their use of the Services and/or Mobile Application.

+

8.2 If we suspend the Services or Mobile Application, we may refuse to restore the Services or Mobile Application for the User’s use until we receive an assurance from them, in a form we deem acceptable, that there will be no further breach of the provisions of these Terms and Conditions of Use.

+

8.3 The Company shall fully co-operate with any law enforcement authorities or court order requesting or directing the Company to disclose the identity or locate anyone in breach of these Terms and Conditions of Use.

+

8.4 Without limitation to anything else in this Clause 8, we shall be entitled immediately or at any time (in whole or in part) to: (a) suspend the Services and/or Mobile Application; (b) suspend Users’ use of the Services and/or Mobile Application; and/or (c) suspend the use of the Services and/or Mobile Application for persons we believe to be connected (in whatever manner) to the concerned User, if:

+

8.4.1 the User commits any breach of these Terms and Conditions of Use;

+

8.4.2 we suspect, on reasonable grounds, that the User has, might or will commit a breach of these Terms and Conditions of Use; or

+

8.4.3 we suspect, on reasonable grounds, that the User may have committed or will be committing any fraud against us or any person.

+

8.5 Our rights under this Clause 8 shall not prejudice any other right or remedy we may have in respect of any breach or any rights, obligations or liabilities accrued prior to termination.

+

+

9. DISCLAIMER AND EXCLUSION OF LIABILITY

+

9.1 The Mobile Application, the Services, the information on the Mobile Application and use of all related facilities are provided on an "as is, as available" basis without any warranties whether express or implied.

+

9.2 The credit balance shall remain valid for the specific period. The credit in the wallet will be expired after 6 months of inactivity.

+

9.3 To the fullest extent permitted by applicable law, we disclaim all representations and warranties relating to the Mobile Application and its contents, including in relation to any inaccuracies or omissions in the Mobile Application, warranties of merchantability, quality, fitness for a particular purpose, accuracy, availability, non-infringement or implied warranties from course of dealing or usage of trade.

+

9.4 We do not warrant that the Mobile Application will always be accessible, uninterrupted, timely, secure, error free or free from computer virus or other invasive or damaging code or that the Mobile Application will not be affected by any acts of nature or other force majeure events, including inability to obtain or shortage of necessary materials, equipment facilities, power or telecommunications, lack of telecommunications equipment or facilities and failure of information technology or telecommunications equipment or facilities.

+

9.5 While we may use reasonable efforts to include accurate and up-to-date information on the Mobile Application, we make no warranties or representations as to its accuracy, timeliness or completeness.

+

9.6 We shall not be liable for any acts or omissions of any third parties howsoever caused, and for any direct, indirect, incidental, special, consequential or punitive damages, howsoever caused, resulting from or in connection with the Mobile Application and the services offered in the mobile application, Users’ access to, use of or inability to use the mobile application or the services offered in the mobile application, reliance on or downloading from the mobile application and/or services, or any delays, inaccuracies in the information or in its transmission including but not limited to damages for loss of business or profits, use, data or other intangible, even if we have been advised of the possibility of such damages.

+

9.7 We shall not be liable in contract, tort (including negligence or breach of statutory duty) or otherwise howsoever and whatever the cause thereof, for any indirect, consequential, collateral, special or incidental loss or damage suffered or incurred by the User in connection with the Mobile Application and these Terms and Conditions of Use. For the purposes of these Terms and Conditions of Use, indirect or consequential loss or damage includes, without limitation, loss of revenue, profits, anticipated savings or business, loss of data or goodwill, loss of use or value of any equipment including software, claims of third parties, and all associated and incidental costs and expenses.

+

9.8 The above exclusions and limitations apply only to the extent permitted by law. None of the User’s statutory rights as a consumer that cannot be excluded or limited are affected.

+

9.9 Notwithstanding our efforts to ensure that our system is secure, the User acknowledges that all electronic data transfers are potentially susceptible to interception by others. We cannot, and do not, warrant that data transfers pursuant to the Mobile Application, or electronic mail transmitted to and from us, will not be monitored or read by others.

+

+

10. INDEMNITY

+

The User agrees to indemnify and keep us indemnified against any claim, action, suit or proceeding brought or threatened to be brought against us which is caused by or arising out of (a) the User’s use of the Services, (b) any other party’s use of the Services using the User’s user ID, verification PIN and/or any identifier number allocated by the Company, and/or (c) the User’s breach of any of these Terms and Conditions of Use, and to pay us damages, costs and interest in connection with such claim, action, suit or proceeding.

+

+

11. INTELLECTUAL PROPERTY RIGHTS

+

11.1 All editorial content, information, photographs, illustrations, artwork and other graphic materials, and names, logos and trade marks on the Mobile Application are protected by copyright laws and/or other laws and/or international treaties, and belong to us and/or our suppliers, as the case may be. These works, logos, graphics, sounds or images may not be copied, reproduced, retransmitted, distributed, disseminated, sold, published, broadcasted or circulated whether in whole or in part, unless expressly permitted by us and/or our suppliers, as the case may be.

+

11.2 Nothing contained on the Mobile Application should be construed as granting by implication, estoppel, or otherwise, any license or right to use any trademark displayed on the Mobile Application without our written permission. Misuse of any trademarks or any other content displayed on the Mobile Application is prohibited.

+

11.3 We will not hesitate to take legal action against any unauthorized usage of our trade marks, name or symbols to preserve and protect its rights in the matter. All rights not expressly granted herein are reserved. Other product and company names mentioned herein may also be the trademarks of their respective owners.

+

+

12. AMENDMENTS

+

12.1 We may periodically make changes to the contents of the Mobile Application, including to the descriptions and prices of goods and services advertised, at any time and without notice. We assume no liability or responsibility for any errors or omissions in the content of the Mobile Application.

+

12.2 We reserve the right to amend these Terms and Conditions of Use from time to time without notice. The revised Terms and Conditions of Use will be posted on the Mobile Application and shall take effect from the date of such posting. The User is advised to review these terms and conditions periodically as they are binding upon the User.

+

+

13. APPLICABLE LAW AND JURISDICTION

+

13.1 These Terms and Conditions of Use shall be governed by and construed in accordance with the applicable Federal laws of Kingdom of Saudi Arabia.

+

13.2 The Mobile Application can be accessed from all countries around the world where the local technology permits. As each of these places have differing laws, by accessing the Mobile Application both the User and we agree that the laws of the country where accessed, without regard to the conflicts of laws principles thereof, will apply to all matters relating to the use of the Mobile Application.

+

13.3 the User accepts and agrees that both the User and we shall submit to the exclusive jurisdiction of the courts of the country where accessed in respect of any dispute arising out of and/or in connection with these Terms and Conditions of Use.

+

+

14. PRIVACY POLICY

+

14.1 Access to the Mobile Application and use of the Services offered on the Mobile Application by the Company and/or its group of companies & partners is subject to this Privacy Policy. By accessing the Mobile Application and by continuing to use the Services offered, Users are deemed to have accepted this Privacy Policy, and in particular, they are deemed to have consented to our use and disclosure of their personal information in the manner prescribed in this Privacy Policy and for the purposes set out in Clauses 3.7 and/or 4.1.1 We reserve the right to amend this Privacy Policy from time to time. If the User disagrees with any part of this Privacy Policy, the User must immediately discontinue their access to the Mobile Application and their use of the Services.

+

14.2 As part of the normal operation of our Services, we collect, use and, in some cases, disclose information about the User to third parties. Accordingly, we have developed this Privacy Policy in order for Users to understand how we collect, use, communicate and disclose and make use of their personal information when they use the Services on the Mobile Application:-

+

(a) Before or at the time of collecting personal information, we will identify the purposes for which information is being collected.

+

(b) We will collect and use of personal information solely with the objective of fulfilling those purposes specified by us and for other compatible purposes, unless we obtain the consent of the individual concerned or as required by law.

+

(c) We will only retain personal information as long as necessary for the fulfillment of those purposes.

+

(d) We will collect personal information by lawful and fair means and, where appropriate, with the knowledge or consent of the individual concerned.

+

(e) Personal information should be relevant to the purposes for which it is to be used, and, to the extent necessary for those purposes, should be accurate, complete, and up-to-date.

+

(f) We will protect personal information by reasonable security safeguards against loss or theft, as well as unauthorized access, disclosure, copying, use or modification.

+

(g) The Company further reserves the right to use all legal means possible and to identify the Users, as well as to request, at any time, additional data and documents it considers appropriate in order to verify personal data informed by the user.

+

We are committed to conducting our business in accordance with these principles in order to ensure that the confidentiality of personal information is protected and maintained.

+

14.3 Social logins policy
Our Services offers you the ability to register and login using Facebook. Where you choose to do this, we will receive certain profile information about you from your social media provider. The profile Information may include your name and social token.
We will use the information we receive only to associate your social token with your Sefer account or for the purposes that are described in this privacy policy.

14.4 Account and data deletion
Based on the applicable laws of your country, you may have the right to request the deletion of your personal data in some circumstances. If you want to delete your account or personal data in the application, please contact us via e-mail: support@mobile-app.store. We will respond to your request within 30 days.

+

15. In-Ride Policy

+

15.1 Smoking Policy:

+

No smoking or other use of tobacco products (including, but not limited to, cigarettes, pipes, cigars, snuff, or chewing tobacco) is permitted during rides. No cigarette butts or other traces of smell, litter, or tobacco use should be present in the vehicle. image

+

15.2 COVID-19 Policy: Face masks must be always worn during rides.

+
+
+
+
+
+
+ + + + + + + + + + +
+ + + + + + +
+ +'''; } diff --git a/lib/controller/auth/onboarding_controller.dart b/lib/controller/auth/onboarding_controller.dart index c7ebd93..d1b0275 100644 --- a/lib/controller/auth/onboarding_controller.dart +++ b/lib/controller/auth/onboarding_controller.dart @@ -3,12 +3,9 @@ import 'package:get/get.dart'; import 'package:ride/constant/box_name.dart'; import 'package:ride/main.dart'; import 'package:ride/views/auth/login_page.dart'; -import 'package:ride/views/home/home_page.dart'; import '../../models/model/onboarding_model.dart'; -class OnboardingController extends GetxController {} - abstract class OnBoardingController extends GetxController { next(); onPageChanged(int index); diff --git a/lib/controller/functions/ocr_controller.dart b/lib/controller/functions/ocr_controller.dart index c24d212..51d2c31 100644 --- a/lib/controller/functions/ocr_controller.dart +++ b/lib/controller/functions/ocr_controller.dart @@ -1,7 +1,10 @@ import 'dart:convert'; import 'dart:io'; +import 'dart:ui'; -import 'package:flutter_tesseract_ocr/flutter_tesseract_ocr.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_tesseract_ocr/android_ios.dart'; import 'package:get/get.dart'; import 'package:google_mlkit_text_recognition/google_mlkit_text_recognition.dart'; import 'package:image_picker/image_picker.dart'; @@ -44,11 +47,11 @@ class TextExtractionController extends GetxController { Future pickAndExtractText() async { final pickedImage = await ImagePicker().pickImage( - source: ImageSource.gallery, - // preferredCameraDevice: CameraDevice.rear, - // maxHeight: Get.height * .7, - // maxWidth: Get.width * .9, - // imageQuality: 99, + source: ImageSource.camera, + preferredCameraDevice: CameraDevice.rear, + maxHeight: Get.height * .3, + maxWidth: Get.width * .8, + imageQuality: 99, ); if (pickedImage != null) { isloading = true; @@ -103,13 +106,142 @@ class TextMLGoogleRecognizerController extends GetxController { // The scanned text String? scannedText; + String? jsonOutput; + final List> lines = []; + Map decode = {}; + + Future scanText() async { + // Pick an image from the camera or gallery + final XFile? image = + await _imagePicker.pickImage(source: ImageSource.gallery); + + // If no image was picked, return + if (image == null) { + return; + } + + // Convert the XFile object to an InputImage object + final InputImage inputImage = InputImage.fromFile(File(image.path)); + + // Recognize the text in the image + final RecognizedText recognizedText = + await _textRecognizer.processImage(inputImage); + scannedText = recognizedText.text; + Map extractedData = {}; + // Extract the scanned text line by line + for (var i = 0; i < recognizedText.blocks.length; i++) { + final block = recognizedText.blocks[i]; + for (final line in block.lines) { + final lineText = line.text; + + if (lineText.contains('DL')) { + final dlNumber = lineText.split('DL')[1].trim(); + extractedData['dl_number'] = dlNumber; + } + if (lineText.contains('USA')) { + final usa = lineText.split('USA')[1].trim(); + extractedData['USA'] = usa; + } + if (lineText.contains('DRIVER LICENSE')) { + final driverl = lineText; + extractedData['DRIVER_LICENSE'] = driverl; + } + + if (lineText.contains('EXP')) { + final expiryDate = lineText.split('EXP')[1].trim(); + extractedData['expiry_date'] = expiryDate; + } + + if (lineText.contains('DOB')) { + final dob = lineText.split('DOB')[1].trim(); + extractedData['dob'] = dob; + } + + if (lineText.contains("LN")) { + if ((lineText.indexOf("LN") == 0)) { + final lastName = lineText.split('LN')[1].trim(); + extractedData['lastName'] = lastName; + } + } + if (lineText.contains("FN")) { + final firstName = lineText.split('FN')[1].trim(); + extractedData['firstName'] = firstName; + } + if (lineText.contains("RSTR")) { + final rstr = lineText.split('RSTR')[1].trim(); + extractedData['rstr'] = rstr; + } + if (lineText.contains("CLASS")) { + final class1 = lineText.split('CLASS')[1].trim(); + extractedData['class'] = class1; + } + if (lineText.contains("END")) { + final end = lineText.split('END')[1].trim(); + extractedData['end'] = end; + } + if (lineText.contains("DD")) { + final dd = lineText.split('DD')[1].trim(); + extractedData['dd'] = dd; + } + if (lineText.contains("EYES")) { + final eyes = lineText.split('EYES')[1].trim(); + extractedData['eyes'] = eyes; + } + if (lineText.contains("SEX")) { + final parts = lineText.split("SEX ")[1]; + extractedData['sex'] = parts[0]; + } + if (lineText.contains("HAIR")) { + final hair = lineText.split('HAIR')[1].trim(); + extractedData['hair'] = hair; + } + + if (lineText.contains('STREET') || lineText.contains(',')) { + final address = lineText; + extractedData['address'] = address; + } + + // Repeat this process for other relevant data fields + } + } + + // Convert the list of lines to a JSON string + jsonOutput = jsonEncode(extractedData); + decode = jsonDecode(jsonOutput!); + + update(); + print('jsonOutput------------------------------'); + print(scannedText); + } +} + +class PassportRecognizerController extends GetxController { + @override + void onInit() { + scanText(); + super.onInit(); + } + + // The ImagePicker instance + final ImagePicker _imagePicker = ImagePicker(); + Map extractedData = {}; + + // The GoogleMlKit TextRecognizer instance + final TextRecognizer _textRecognizer = TextRecognizer(); + + // The scanned text + String? scannedText; + String? jsonOutput; + final List> lines = []; + + Map decode = {}; // Picks an image from the camera or gallery and extracts the text Future scanText() async { // Pick an image from the camera or gallery final XFile? image = - await _imagePicker.pickImage(source: ImageSource.camera); + await _imagePicker.pickImage(source: ImageSource.gallery); // If no image was picked, return if (image == null) { @@ -127,15 +259,181 @@ class TextMLGoogleRecognizerController extends GetxController { final List> lines = []; for (var i = 0; i < recognizedText.blocks.length; i++) { lines.add({ - 'line_number': i, - 'text': recognizedText.blocks[i].text, + i.toString() + + '_' + + recognizedText.blocks[i].text.toString().split('\n')[0]: + recognizedText.blocks[i].text, }); } + // for (var i = 0; i < recognizedText.blocks.length; i++) { + // final block = recognizedText.blocks[i]; + for (final line in lines) { + final key = line.keys.first; + final value = line.values.first; + if (line.values.contains('UNITED STATES OF')) { + final title = line; + extractedData['title'] = title; + } + if (line.values.contains('PASSPORT CARD')) { + final passport = line; + extractedData['passport'] = passport; + } + if (key == "7_Surname") { + final nextItem = lines[lines.indexOf(line) + 1]; + extractedData['surname'] = nextItem.values.first; + } + if (key == "6_Nationality") { + var nationality = value.split('\n')[1]; + extractedData['nationality'] = nationality; + } + if (key.contains('CARD')) { + var passportCard = value; + extractedData['passportCard'] = passportCard; + } + if (key.contains("9_Given")) { + var givenNames = value.split('\n')[1]; + extractedData['givenNames'] = givenNames; + } + if (key.contains("13_Date of Birth")) { + final parts = value.split('\n'); + if (parts.length > 1) { + var dateOfBirth = parts[1]; + extractedData['dateOfBirth'] = dateOfBirth; + + var sex = parts[0].split(' ')[1]; + extractedData['sex'] = sex; + } + } + + // } + } // Convert the list of lines to a JSON string - final String jsonOutput = jsonEncode(lines); + jsonOutput = jsonEncode(extractedData); + decode = jsonDecode(jsonOutput!); + update(); - // Print the JSON output - print(jsonOutput); + print('jsonOutput------------------------------'); + print(decode); + // print(jsonEncode(lines)); + } +} + +class PassportDataExtractor extends GetxController { + @override + void onInit() { + extractPassportData(); + super.onInit(); + } + + final ImagePicker _imagePicker = ImagePicker(); + late final XFile? image; + final TextRecognizer _textRecognizer = TextRecognizer(); + + Future> extractPassportData() async { + image = await _imagePicker.pickImage(source: ImageSource.gallery); + update(); + if (image == null) { + throw Exception('No image picked'); + } + + final InputImage inputImage = InputImage.fromFile(File(image!.path)); + final RecognizedText recognisedText = + await _textRecognizer.processImage(inputImage); + + final Map extractedData = {}; + final List> extractedTextWithCoordinates = []; + + for (TextBlock block in recognisedText.blocks) { + for (TextLine line in block.lines) { + final String lineText = line.text; + final Rect lineBoundingBox = line.boundingBox!; + + extractedTextWithCoordinates.add({ + 'text': lineText, + 'boundingBox': { + 'left': lineBoundingBox.left, + 'top': lineBoundingBox.top, + 'width': lineBoundingBox.width, + 'height': lineBoundingBox.height, + }, + }); + + // if (lineText.contains('Passport Number')) { + // final String passportNumber = + // lineText.split('Passport Number')[1].trim(); + // extractedData['passportNumber'] = passportNumber; + // } + // if (lineText.contains('Given Names')) { + // final String givenNames = lineText.split('Given Names')[1].trim(); + // extractedData['givenNames'] = givenNames; + // } + // if (lineText.contains('Surname')) { + // final String surname = lineText.split('Surname')[1].trim(); + // extractedData['surname'] = surname; + // } + // if (lineText.contains('Nationality')) { + // final String nationality = lineText.split('Nationality')[1].trim(); + // extractedData['nationality'] = nationality; + // } + // if (lineText.contains('Date of Birth')) { + // final String dob = lineText.split('Date of Birth')[1].trim(); + // extractedData['dateOfBirth'] = dob; + // } + // Add more field extraction conditions as needed + } + } + + extractedData['extractedTextWithCoordinates'] = + extractedTextWithCoordinates; + print(jsonEncode(extractedData)); + return extractedData; + } +} + +class PassportDataController extends GetxController { + PassportDataExtractor passportDataExtractor = PassportDataExtractor(); + List> extractedTextWithCoordinates = []; + + Future extractDataAndDrawBoundingBoxes() async { + try { + Map extractedData = + await passportDataExtractor.extractPassportData(); + extractedTextWithCoordinates = + extractedData['extractedTextWithCoordinates']; + update(); // Notify GetX that the state has changed + print(extractedTextWithCoordinates); + } catch (e) { + print('Passport data extraction failed: $e'); + } + } +} + +class BoundingBoxPainter extends CustomPainter { + final List> boundingBoxes; + + BoundingBoxPainter(this.boundingBoxes); + + @override + void paint(Canvas canvas, Size size) { + final Paint paint = Paint() + ..color = Colors.red + ..style = PaintingStyle.stroke + ..strokeWidth = 2.0; + + for (Map boundingBox in boundingBoxes) { + double left = boundingBox['left']; + double top = boundingBox['top']; + double width = boundingBox['width']; + double height = boundingBox['height']; + + Rect rect = Rect.fromLTWH(left, top, width, height); + canvas.drawRect(rect, paint); + } + } + + @override + bool shouldRepaint(covariant CustomPainter oldDelegate) { + return false; } } diff --git a/lib/controller/home/captin/home_captain_controller.dart b/lib/controller/home/captin/home_captain_controller.dart index 606e05c..34c7cfc 100644 --- a/lib/controller/home/captin/home_captain_controller.dart +++ b/lib/controller/home/captin/home_captain_controller.dart @@ -16,6 +16,7 @@ class HomeCaptainController extends GetxController { Timer? activeTimer; Map data = {}; String totalMoneyToday = '0'; + String totalMoneyInSEFER = '0'; String totalDurationToday = '0'; Timer? timer; // Inject the LocationController class @@ -89,7 +90,8 @@ class HomeCaptainController extends GetxController { link: AppLink.getDriverpaymentToday, payload: {'driverID': box.read(BoxName.driverID).toString()}); data = jsonDecode(res); - totalMoneyToday = data['message'][0]['total_amount']; + totalMoneyToday = data['message'][0]['todayAmount']; + totalMoneyInSEFER = data['message'][0]['total_amount']; update(); } diff --git a/lib/controller/home/map_passenger_controller.dart b/lib/controller/home/map_passenger_controller.dart index a1b5f22..8436fde 100644 --- a/lib/controller/home/map_passenger_controller.dart +++ b/lib/controller/home/map_passenger_controller.dart @@ -199,6 +199,7 @@ class MapPassengerController extends GetxController { int seconds = remainingTimeTimerRideBegin % 60; stringRemainingTimeRideBegin = '$minutes:${seconds.toString().padLeft(2, '0')}'; + update(); } @@ -207,6 +208,10 @@ class MapPassengerController extends GetxController { update(); print('rideTimerBegin: $rideTimerBegin'); print('isRideFinished: $isRideFinished'); + await CRUD().post(link: AppLink.addPassengersWallet, payload: { + 'passenger_id': box.read(BoxName.passengerID).toString(), + 'balance': ((-1) * totalPassenger).toString() + }); Get.to(() => RateCaptainFromPassenger(), arguments: { 'driverId': driverId.toString(), 'rideId': rideId.toString(), diff --git a/lib/controller/home/splash_screen_controlle.dart b/lib/controller/home/splash_screen_controlle.dart new file mode 100644 index 0000000..d867b2b --- /dev/null +++ b/lib/controller/home/splash_screen_controlle.dart @@ -0,0 +1,65 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:ride/views/auth/login_page.dart'; + +import '../../constant/box_name.dart'; +import '../../main.dart'; +import '../../onbording_page.dart'; +import '../../views/auth/captin/login_captin.dart'; +import '../../views/home/Captin/home_captin.dart'; +import '../../views/home/map_page.dart'; + +class SplashScreenController extends GetxController + with SingleGetTickerProviderMixin { + late AnimationController animationController; + late Animation zoomInAnimation; + late Animation zoomOutAnimation; + + @override + void onInit() { + super.onInit(); + animationController = AnimationController( + vsync: this, + duration: const Duration(seconds: 7), + ); + + zoomInAnimation = Tween(begin: 1.0, end: 1.5).animate( + CurvedAnimation( + parent: animationController, + curve: Curves.easeInOut, + ), + ); + + zoomOutAnimation = Tween(begin: 1.5, end: 1.0).animate( + CurvedAnimation( + parent: animationController, + curve: Curves.easeInOut, + ), + ); + + animationController.repeat(reverse: true); + startTimer(); + } + + void startTimer() { + Timer(const Duration(seconds: 7), () { + box.read(BoxName.onBoarding) == null + ? Get.off(() => OnBoardingPage()) + : box.read(BoxName.email) != null + ? Get.off(() => const MapPage()) + : box.read(BoxName.emailDriver) == null + ? Get.off(() => LoginPage()) + : box.read(BoxName.emailDriver) != null + ? Get.off(() => const HomeCaptain()) + : Get.off(() => LoginCaptin()); + }); + } + + @override + void onClose() { + animationController.dispose(); + super.onClose(); + } +} diff --git a/lib/main.dart b/lib/main.dart index f96a794..4936804 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,6 +1,5 @@ import 'dart:io'; -import 'package:camera/camera.dart'; import 'package:firebase_core/firebase_core.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:flutter/material.dart'; @@ -9,18 +8,14 @@ import 'package:get/get.dart'; import 'package:get_storage/get_storage.dart'; import 'package:ride/constant/credential.dart'; import 'package:ride/constant/info.dart'; -import 'package:ride/views/auth/captin/login_captin.dart'; -import 'package:ride/views/auth/login_page.dart'; -import 'package:ride/views/home/Captin/home_captin.dart'; +import 'package:ride/splash_screen_page.dart'; +import 'package:flutter/services.dart'; -import 'constant/box_name.dart'; import 'controller/firebase/firbase_messge.dart'; import 'controller/local/local_controller.dart'; import 'controller/local/translations.dart'; import 'firebase_options.dart'; import 'models/db_sql.dart'; -import 'onbording_page.dart'; -import 'views/home/map_page.dart'; final box = GetStorage(); DbSql sql = DbSql.instance; @@ -55,7 +50,10 @@ void main() async { // cameras = await availableCameras(); await Future.wait(initializationTasks); } - + SystemChrome.setPreferredOrientations([ + DeviceOrientation.portraitUp, + DeviceOrientation.portraitDown, + ]); runApp(const MyApp()); } @@ -66,25 +64,17 @@ class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { - LocaleController controller = Get.put(LocaleController()); + LocaleController localController = Get.put(LocaleController()); return GetMaterialApp( - title: AppInformation.appName, - translations: MyTranslation(), - debugShowCheckedModeBanner: false, - locale: controller.language, - theme: controller.appTheme, - key: UniqueKey(), - // routes: {'/':const HomePage()}, - home: box.read(BoxName.onBoarding) == null - ? OnBoardingPage() - : box.read(BoxName.email) != null - ? const MapPage() - : box.read(BoxName.emailDriver) == null - ? LoginPage() - : box.read(BoxName.emailDriver) != null - ? const HomeCaptain() - : LoginCaptin(), - ); + title: AppInformation.appName, + translations: MyTranslation(), + debugShowCheckedModeBanner: false, + locale: localController.language, + theme: localController.appTheme, + key: UniqueKey(), + // routes: {'/':const HomePage()}, + // home: LoginCaptin()); + home: SplashScreen()); } } diff --git a/lib/splash_screen_page.dart b/lib/splash_screen_page.dart new file mode 100644 index 0000000..3b8a8f3 --- /dev/null +++ b/lib/splash_screen_page.dart @@ -0,0 +1,66 @@ +import 'package:animated_text_kit/animated_text_kit.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_stripe/flutter_stripe.dart'; +import 'package:get/get.dart'; +import 'package:ride/constant/colors.dart'; +import 'package:ride/constant/info.dart'; +import 'package:ride/constant/style.dart'; + +import 'controller/home/splash_screen_controlle.dart'; + +class SplashScreen extends StatelessWidget { + final SplashScreenController splashScreenController = + Get.put(SplashScreenController()); + + SplashScreen({super.key}); + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: + AppColor.primaryColor, // Set your desired background color + body: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + GetBuilder( + builder: (_) { + return AnimatedBuilder( + animation: splashScreenController.animationController, + builder: (BuildContext context, Widget? child) { + return Transform.scale( + scale: + splashScreenController.animationController.value < 0.5 + ? splashScreenController.zoomInAnimation.value + : splashScreenController.zoomOutAnimation.value, + child: Image.asset('assets/images/logo.png'), + ); + }, + ); + }, + ), + AnimatedTextKit(animatedTexts: [ + TypewriterAnimatedText( + 'Welcome to ${AppInformation.appName}', + textStyle: + AppStyle.headTitle.copyWith(color: AppColor.greenColor), + speed: const Duration(milliseconds: 200), + ), + ], isRepeatingAnimation: true), + const SizedBox( + height: 20, + ), + AnimatedTextKit(animatedTexts: [ + TypewriterAnimatedText( + 'Powered By ${AppInformation.companyName}', + textStyle: + AppStyle.title.copyWith(color: AppColor.secondaryColor), + speed: const Duration(milliseconds: 200), + ), + ], isRepeatingAnimation: true) + ], + ), + ), + ); + } +} diff --git a/lib/views/auth/captin/login_captin.dart b/lib/views/auth/captin/login_captin.dart index f6715e9..0728a6a 100644 --- a/lib/views/auth/captin/login_captin.dart +++ b/lib/views/auth/captin/login_captin.dart @@ -1,8 +1,12 @@ import 'package:animated_text_kit/animated_text_kit.dart'; +import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_widget_from_html/flutter_widget_from_html.dart'; import 'package:get/get.dart'; +import 'package:html/parser.dart' show parse; import 'package:ride/constant/box_name.dart'; import 'package:ride/constant/colors.dart'; +import 'package:ride/constant/info.dart'; import 'package:ride/constant/style.dart'; import 'package:ride/controller/auth/captin/login_captin_controller.dart'; import 'package:ride/main.dart'; @@ -184,6 +188,15 @@ class LoginCaptin extends StatelessWidget { displayFullTextOnTap: true, stopPauseOnTap: true, ), + IconButton( + onPressed: () { + box.remove(BoxName.agreeTerms); + }, + icon: const Icon( + Icons.delete, + color: AppColor.blueColor, + ), + ), ], ), ) @@ -216,10 +229,34 @@ class LoginCaptin extends StatelessWidget { const SizedBox( height: 30, ), - Text( - 'By selecting "I Agree" below, I have reviewed and agree to the Terms of Use and acknowledge the Privacy Notice. I am at least 18 years of age.' - .tr, - style: AppStyle.title, + RichText( + text: TextSpan( + text: + 'By selecting "I Agree" below, I have reviewed and agree to the Terms of Use and acknowledge the ', + style: AppStyle.title, + children: [ + TextSpan( + text: 'Privacy Notice', + style: const TextStyle( + decoration: TextDecoration.underline, + color: AppColor.blueColor), + recognizer: TapGestureRecognizer() + ..onTap = () { + Get.defaultDialog( + title: ''.tr, + content: const SizedBox( + height: 400, + width: 400, + child: SingleChildScrollView( + child: HtmlWidget(AppInformation.privacyPolicy), + ), + )); + }), + const TextSpan( + text: '. I am at least 18 years of age.', + ), + ], + ), ), const SizedBox( height: 100, @@ -248,7 +285,7 @@ class LoginCaptin extends StatelessWidget { ), MyElevatedButton( title: 'Submit'.tr, - onPressed: () => controller.saveAgreementTerms()) + onPressed: () => controller.saveAgreementTerms()), ], ), ) diff --git a/lib/views/home/Captin/bottom_bar.dart b/lib/views/home/Captin/bottom_bar.dart new file mode 100644 index 0000000..e2ff554 --- /dev/null +++ b/lib/views/home/Captin/bottom_bar.dart @@ -0,0 +1,114 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:ride/constant/colors.dart'; + +class BottomBarController extends GetxController { + var currentIndex = 0.obs; + + void changePage(int index) { + currentIndex.value = index; + } +} + +class HomeScreen extends StatelessWidget { + final BottomBarController controller = Get.put(BottomBarController()); + + HomeScreen({super.key}); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text('Bottom Bar Example'), + ), + body: Obx(() => IndexedStack( + index: controller.currentIndex.value, + children: const [ + HomeView(), + ProfileView(), + StatisticsView(), + WalletView(), + ], + )), + bottomNavigationBar: Obx(() => BottomNavigationBar( + backgroundColor: Colors.greenAccent, + currentIndex: controller.currentIndex.value, + onTap: controller.changePage, + items: const [ + BottomNavigationBarItem( + icon: Icon( + Icons.home, + color: AppColor.primaryColor, + ), + label: 'Home', + ), + BottomNavigationBarItem( + icon: Icon( + Icons.person, + color: AppColor.primaryColor, + ), + label: 'Profile', + ), + BottomNavigationBarItem( + icon: Icon( + Icons.bar_chart, + color: AppColor.primaryColor, + ), + label: 'Statistics', + ), + BottomNavigationBarItem( + icon: Icon( + Icons.account_balance_wallet, + color: AppColor.primaryColor, + ), + label: 'Wallet', + ), + ], + )), + ); + } +} + +class HomeView extends StatelessWidget { + const HomeView({super.key}); + + @override + Widget build(BuildContext context) { + return const Center( + child: Text('Home View'), + ); + } +} + +class ProfileView extends StatelessWidget { + const ProfileView({super.key}); + + @override + Widget build(BuildContext context) { + return const Center( + child: Text('Profile View'), + ); + } +} + +class StatisticsView extends StatelessWidget { + const StatisticsView({super.key}); + + @override + Widget build(BuildContext context) { + return const Center( + child: Text('Statistics View'), + ); + } +} + +class WalletView extends StatelessWidget { + const WalletView({super.key}); + + @override + Widget build(BuildContext context) { + return const Center( + child: Text('Wallet View'), + ); + } +} diff --git a/lib/views/home/Captin/camer_widget.dart b/lib/views/home/Captin/camer_widget.dart index 06b7ffc..60f1c6c 100644 --- a/lib/views/home/Captin/camer_widget.dart +++ b/lib/views/home/Captin/camer_widget.dart @@ -24,151 +24,261 @@ class CameraWidgetCardId extends StatelessWidget { padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 12), child: GetBuilder( - builder: (cameraClassController) => cameraClassController - .isCameraInitialized - ? Stack( - children: [ - Container( - decoration: AppStyle.boxDecoration, - height: Get.width * 3 / 4, - width: Get.width, - child: OverflowBox( - alignment: Alignment.center, - child: FittedBox( - fit: BoxFit.fitWidth, - child: SizedBox( - width: Get.width, - height: Get.width * - 3 / - 4, // Set the desired aspect ratio here - child: - // Image.asset( - // 'assets/images/cardid.jpg', - // fit: BoxFit.fill, - // ) - CameraPreview( - cameraClassController.cameraController, + builder: (cameraClassController) => + cameraClassController.isCameraInitialized + ? Stack( + children: [ + Container( + decoration: AppStyle.boxDecoration, + child: FittedBox( + fit: BoxFit.fitWidth, + child: SizedBox( + width: Get.width * .9, + height: Get.width * + .9, // Set the desired aspect ratio here + child: CameraPreview( + cameraClassController.cameraController, + ), ), ), ), - ), - ), - Positioned( - top: 72, - child: Container( - width: 230, - height: 25, - decoration: BoxDecoration( - // color: AppColor.blueColor, - border: Border.all( - color: AppColor.yellowColor, width: 2), + Positioned( + top: 72, + child: Container( + width: 230, + height: 25, + decoration: BoxDecoration( + // color: AppColor.blueColor, + border: Border.all( + color: AppColor.yellowColor, + width: 2), + ), + ), + ), + Positioned( + top: 60, + right: 5, + child: Container( + width: 230, + height: 25, + decoration: BoxDecoration( + // color: AppColor.blueColor, + border: Border.all( + color: AppColor.blueColor, width: 2), + ), + ), + ), + Positioned( + top: 156, + right: 5, + child: Container( + width: 140, + height: 20, + decoration: BoxDecoration( + // color: AppColor.blueColor, + border: Border.all( + color: AppColor.blueColor, width: 2), + ), + ), + ), + Positioned( + top: 175, + right: 5, + child: Container( + width: 140, + height: 15, + decoration: BoxDecoration( + // color: AppColor.blueColor, + border: Border.all( + color: AppColor.blueColor, width: 2), + ), + ), + ), + Positioned( + top: 191, + right: 5, + child: Container( + width: 140, + height: 15, + decoration: BoxDecoration( + // color: AppColor.blueColor, + border: Border.all( + color: AppColor.blueColor, width: 2), + ), + ), + ), + Positioned( + top: 207, + right: 5, + child: Container( + width: 140, + height: 15, + decoration: BoxDecoration( + // color: AppColor.blueColor, + border: Border.all( + color: AppColor.blueColor, width: 2), + ), + ), + ), + Positioned( + top: 225, + right: 5, + child: Container( + width: 140, + height: 15, + decoration: BoxDecoration( + // color: AppColor.blueColor, + border: Border.all( + color: AppColor.blueColor, width: 2), + ), + ), + ), + Positioned( + top: 115, + left: 25, + child: Container( + width: 120, + height: 110, + decoration: BoxDecoration( + // color: AppColor.blueColor, + border: Border.all( + color: AppColor.blueColor, width: 2), + ), + ), + ), + ], + ) + : Container( + decoration: AppStyle.boxDecoration, + height: Get.width * 3 / 4, + width: Get.width, + child: Center( + child: Text( + 'Camera not initilaized yet', + style: AppStyle.title, + ), + ), + ), + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + MyElevatedButton( + title: 'Scan ID MklGoogle'.tr, + onPressed: () => + cameraClassController.takePictureAndMLGoogleScan()), + MyElevatedButton( + title: 'Scan ID Tesseract'.tr, + onPressed: () => + cameraClassController.takePictureAndTesseractScan()), + ], + ), + MyElevatedButton( + title: 'Scan ID Api'.tr, + onPressed: () => cameraClassController.extractCardId()), + GetBuilder( + builder: (cameraClassController) => Expanded( + child: + Text(cameraClassController.scannedText.toString()))) + ], + ) + ], + isleading: true); + } +} + +class CameraWidgetPassPort extends StatelessWidget { + final CameraClassController cameraClassController = + Get.put(CameraClassController()); + + CameraWidgetPassPort({super.key}); + + @override + Widget build(BuildContext context) { + return MyScafolld( + title: 'Scan Id'.tr, + body: [ + Column( + children: [ + Padding( + padding: + const EdgeInsets.symmetric(vertical: 8, horizontal: 12), + child: GetBuilder( + builder: (cameraClassController) => + cameraClassController.isCameraInitialized + ? Stack( + children: [ + Container( + decoration: AppStyle.boxDecoration, + child: FittedBox( + fit: BoxFit.fitWidth, + child: SizedBox( + width: Get.width * .9, + height: Get.width * + .9, // Set the desired aspect ratio here + child: CameraPreview( + cameraClassController.cameraController, + ), + ), + ), + ), + Positioned( + top: 35, + left: 35, + width: Get.width * .77, + height: + 17, //left":95.0,"top":134.0,"width":2909.0,"height":175.0 + child: Container( + // width: 230, + // height: 25, + decoration: BoxDecoration( + // color: AppColor.blueColor, + border: Border.all( + color: AppColor.yellowColor, + width: 2), + ), + ), + ), + Positioned( + top: 60, + right: 25, + width: 90, + height: 25, + child: Container( + decoration: BoxDecoration( + // color: AppColor.blueColor, + border: Border.all( + color: AppColor.blueColor, width: 2), + ), + ), + ), + Positioned( + top: 110, + right: 90, + child: Container( + width: 140, + height: 20, + decoration: BoxDecoration( + // color: AppColor.blueColor, + border: Border.all( + color: AppColor.blueColor, width: 2), + ), + ), + ), + ], + ) + : Container( + decoration: AppStyle.boxDecoration, + height: Get.width * 3 / 4, + width: Get.width, + child: Center( + child: Text( + 'Camera not initilaized yet', + style: AppStyle.title, ), ), ), - Positioned( - top: 60, - right: 5, - child: Container( - width: 230, - height: 25, - decoration: BoxDecoration( - // color: AppColor.blueColor, - border: Border.all( - color: AppColor.blueColor, width: 2), - ), - ), - ), - Positioned( - top: 156, - right: 5, - child: Container( - width: 140, - height: 20, - decoration: BoxDecoration( - // color: AppColor.blueColor, - border: Border.all( - color: AppColor.blueColor, width: 2), - ), - ), - ), - Positioned( - top: 175, - right: 5, - child: Container( - width: 140, - height: 15, - decoration: BoxDecoration( - // color: AppColor.blueColor, - border: Border.all( - color: AppColor.blueColor, width: 2), - ), - ), - ), - Positioned( - top: 191, - right: 5, - child: Container( - width: 140, - height: 15, - decoration: BoxDecoration( - // color: AppColor.blueColor, - border: Border.all( - color: AppColor.blueColor, width: 2), - ), - ), - ), - Positioned( - top: 207, - right: 5, - child: Container( - width: 140, - height: 15, - decoration: BoxDecoration( - // color: AppColor.blueColor, - border: Border.all( - color: AppColor.blueColor, width: 2), - ), - ), - ), - Positioned( - top: 225, - right: 5, - child: Container( - width: 140, - height: 15, - decoration: BoxDecoration( - // color: AppColor.blueColor, - border: Border.all( - color: AppColor.blueColor, width: 2), - ), - ), - ), - Positioned( - top: 115, - left: 25, - child: Container( - width: 120, - height: 110, - decoration: BoxDecoration( - // color: AppColor.blueColor, - border: Border.all( - color: AppColor.blueColor, width: 2), - ), - ), - ), - ], - ) - : Container( - decoration: AppStyle.boxDecoration, - height: Get.width * 3 / 4, - width: Get.width, - child: Center( - child: Text( - 'Camera not initilaized yet', - style: AppStyle.title, - ), - ), - ), ), ), Row( diff --git a/lib/views/home/Captin/home_captin.dart b/lib/views/home/Captin/home_captin.dart index 5bf721f..61abffc 100644 --- a/lib/views/home/Captin/home_captin.dart +++ b/lib/views/home/Captin/home_captin.dart @@ -2,6 +2,7 @@ import 'package:camera/camera.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:ride/constant/colors.dart'; +import 'package:ride/constant/info.dart'; import 'package:ride/constant/style.dart'; import 'package:ride/constant/table_names.dart'; import 'package:ride/controller/functions/camer_controller.dart'; @@ -10,6 +11,7 @@ import 'package:ride/controller/home/captin/order_request_controller.dart'; import 'package:ride/controller/payment/payment_controller.dart'; import 'package:ride/main.dart'; import 'package:ride/views/Rate/ride_calculate_driver.dart'; +import 'package:ride/views/home/Captin/bottom_bar.dart'; import 'package:ride/views/home/Captin/camer_widget.dart'; import 'package:ride/views/home/Captin/text_scanner.dart'; import 'package:ride/views/widgets/circle_container.dart'; @@ -19,6 +21,7 @@ import 'package:flutter_font_icons/flutter_font_icons.dart'; import '../../../controller/functions/location_controller.dart'; import '../../../controller/functions/ocr_controller.dart'; import '../../../controller/home/captin/widget/connect.dart'; +import 'passportimage.dart'; class HomeCaptain extends StatelessWidget { const HomeCaptain({super.key}); @@ -109,18 +112,36 @@ class HomeCaptain extends StatelessWidget { width: Get.width * .8, height: 80, child: Center( - child: Row( - mainAxisAlignment: MainAxisAlignment.center, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, children: [ - const Icon( - Entypo.wallet, - color: AppColor.greenColor, + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Icon( + Entypo.wallet, + color: AppColor.greenColor, + ), + Text( + ' You Earn today is '.tr + + homeCaptainController.totalMoneyToday, + style: AppStyle.title, + ), + ], ), - Text( - ' You Earn today is '.tr + - homeCaptainController - .totalMoneyToday, //Todo add here number for income - style: AppStyle.title, + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Icon( + Entypo.loop, + color: AppColor.yellowColor, + ), + Text( + ' You Have in ${AppInformation.appName} '.tr + + homeCaptainController.totalMoneyInSEFER, + style: AppStyle.title, + ), + ], ), ], ))), @@ -180,20 +201,37 @@ class HomeCaptain extends StatelessWidget { // ); }, child: const Icon(MaterialIcons.message)), + // TextButton( + // onPressed: () { + // Get.to(() => TextExtractionView()); + // }, + // child: const Text( + // "Text FlutterTesseractsOcr", + // ), + // ), TextButton( onPressed: () { - Get.to(() => TextExtractionView()); + Get.to(() => PassportPage()); }, - child: const Text( - "Text FlutterTesseractsOcr", + child: Text( + 'Passport '.tr, ), ), TextButton( onPressed: () { - Get.to(() => TextRecognizerWidget()); + Get.to(() => PassportDataExtractorWidget()); + }, + child: Text( + 'Passport new'.tr, + ), + ), + + TextButton( + onPressed: () { + Get.to(() => const TextRecognizerWidget()); }, child: const Text( - "Text FlutterMLGoogle", + "Driver License ML", ), ), TextButton( @@ -208,11 +246,20 @@ class HomeCaptain extends StatelessWidget { ), TextButton( onPressed: () { - CameraClassController().extractByAPI( - 'https://img.alwakeelnews.com/Content/Upload/large/b8109dd0d33af5195938104af6835fef.jpg'); + Get.to( + () => CameraWidgetPassPort(), + ); }, child: const Text( - "Text By API", + " CameraWidgetPassPort", + ), + ), + TextButton( + onPressed: () { + Get.to(() => HomeScreen()); + }, + child: const Text( + "Home Screen", ), ), TextButton( diff --git a/lib/views/home/Captin/passportimage.dart b/lib/views/home/Captin/passportimage.dart new file mode 100644 index 0000000..72a1619 --- /dev/null +++ b/lib/views/home/Captin/passportimage.dart @@ -0,0 +1,46 @@ +import 'dart:io'; + +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import '../../../controller/functions/ocr_controller.dart'; + +class PassportDataExtractorWidget extends StatelessWidget { + final PassportDataExtractor passportDataExtractor = + Get.put(PassportDataExtractor()); + final PassportDataController controller = Get.put(PassportDataController()); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text('Passport Data Extractor'), + ), + body: Column( + children: [ + ElevatedButton( + onPressed: controller.extractDataAndDrawBoundingBoxes, + child: const Text('Extract Data'), + ), + Expanded( + child: Center( + child: Stack( + children: [ + GetBuilder( + builder: (controller) => CustomPaint( + painter: BoundingBoxPainter( + controller.extractedTextWithCoordinates), + child: GetBuilder( + builder: (controller) => + Image.file(File(passportDataExtractor.image!.path)), + ), + ), + ), + ], + ), + ), + ), + ], + ), + ); + } +} diff --git a/lib/views/home/Captin/text_scanner.dart b/lib/views/home/Captin/text_scanner.dart index 9618a34..fdfa8b8 100644 --- a/lib/views/home/Captin/text_scanner.dart +++ b/lib/views/home/Captin/text_scanner.dart @@ -1,3 +1,5 @@ +import 'dart:convert'; + import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:ride/views/widgets/mycircular.dart'; @@ -36,99 +38,50 @@ class TextExtractionView extends StatelessWidget { } class TextRecognizerWidget extends StatelessWidget { + const TextRecognizerWidget({super.key}); + @override Widget build(BuildContext context) { Get.put(TextMLGoogleRecognizerController()); return GetBuilder( builder: (controller) => Scaffold( - appBar: AppBar(), - body: Center( - child: Text(controller.scannedText ?? ''), - ), - )); + appBar: AppBar(), + body: Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('${controller.decode['DRIVER_LICENSE'].toString()}'), + Text('DL: ${controller.decode['dl_number'].toString()}'), + Text( + 'Expiry Date: ${controller.decode['expiry_date'].toString()}'), + Text('Last Name: ${controller.decode['lastName'].toString()}'), + Text( + 'First Name: ${controller.decode['firstName'].toString()}'), + Text('Address: ${controller.decode['address'].toString()}'), + Text('Date of Birth: ${controller.decode['dob'].toString()}'), + Text('RSTR: ${controller.decode['rstr'].toString()}'), + Text('Class: ${controller.decode['class'].toString()}'), + Text('End: ${controller.decode['end'].toString()}'), + Text('DD: ${controller.decode['dd'].toString()}'), + Text('Sex: ${controller.decode['sex'].toString()}'), + Text('Hair: ${controller.decode['hair'].toString()}'), + Text('Eyes: ${controller.decode['eyes'].toString()}'), + // and so on for other fields + ], + )))); } } -// class TesseractWidget extends StatelessWidget { -// final TesseractController controller = Get.put(TesseractController()); - -// @override -// Widget build(BuildContext context) { -// return Scaffold( -// appBar: AppBar( -// title: Text('Tesseract Implementation'), -// ), -// body: GetBuilder( -// builder: (controller) => Container( -// padding: const EdgeInsets.all(16), -// child: ListView( -// children: [ -// Column( -// mainAxisAlignment: MainAxisAlignment.spaceEvenly, -// children: [ -// ElevatedButton( -// child: Text('Select image'), -// onPressed: controller.extractTextFromImage, -// ), -// controller.scanning -// ? const MyCircularProgressIndicator() -// : const Icon(Icons.done), -// SizedBox(height: 16), -// Center(child: SelectableText(controller.text)), -// ], -// ), -// ], -// ), -// ), -// ), -// ); -// } -// } - -// import 'package:flutter/material.dart'; -// import 'package:get/get.dart'; -// import 'package:image_picker/image_picker.dart'; -// -// import '../../../controller/functions/document_scanner.dart'; -// -// class TextScanner extends StatelessWidget { -// // final ImagePickerController _imagePickerController = -// // Get.put(ImagePickerController()); -// -// TextScanner({super.key}); -// -// @override -// Widget build(BuildContext context) { -// return Scaffold( -// appBar: AppBar( -// title: const Text('Image Picker'), -// ), -// body: Center( -// child: Column( -// mainAxisAlignment: MainAxisAlignment.center, -// children: [ -// Obx(() { -// // final bool textScanning = -// // _imagePickerController.textScanning.value; -// // final String scannedText = -// // _imagePickerController.scannedText.value; -// -// if (textScanning) { -// return const CircularProgressIndicator(); -// } else if (scannedText.isNotEmpty) { -// return Text(scannedText); -// } else { -// return const Text('No text scanned'); -// } -// }), -// ElevatedButton( -// onPressed: () => -// _imagePickerController.getImage(ImageSource.camera), -// child: const Text('Take Picture'), -// ), -// ], -// ), -// ), -// ); -// } -// } +class PassportPage extends StatelessWidget { + PassportPage({super.key}); + PassportRecognizerController passportRecognizerController = + Get.put(PassportRecognizerController()); + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text('Driver License'), + ), + body: const Center(child: Text('data'))); + } +} diff --git a/lib/views/home/map_widget.dart/timer_to_passenger_from_driver.dart b/lib/views/home/map_widget.dart/timer_to_passenger_from_driver.dart index ef0240f..99dbaf1 100644 --- a/lib/views/home/map_widget.dart/timer_to_passenger_from_driver.dart +++ b/lib/views/home/map_widget.dart/timer_to_passenger_from_driver.dart @@ -61,33 +61,33 @@ class TimerToPassengerFromDriver extends StatelessWidget { ) ], ), - controller.remainingTimeToPassengerFromDriverAfterApplied < 60 - ? MyElevatedButton( - title: 'If you in Car Now. Press Start The Ride'.tr, - onPressed: () async { - //todo start the trip and rest all counter ,start new counter of the trip time - - await CRUD() - .post(link: AppLink.updateRides, payload: { - 'id': controller.rideId, - 'rideTimeStart': DateTime.now().toString(), - 'status': 'Applied' - }); - controller.driverArrivePassenger(); - // Send notification to driver to alert him that trip is begin - FirebaseMessagesController() - .sendNotificationToAnyWithoutData( - 'BeginTrip', - box.read(BoxName.name).toString(), - controller.driverToken.toString(), - ); - print(controller.driverToken.toString()); - // Get.defaultDialog( - // title: 'The Ride is Begin'.tr, - // backgroundColor: AppColor.greenColor, - // ); - }) - : const SizedBox() + // controller.remainingTimeToPassengerFromDriverAfterApplied < 60 + // ? MyElevatedButton( + // title: 'If you in Car Now. Press Start The Ride'.tr, + // onPressed: () async { + // //todo start the trip and rest all counter ,start new counter of the trip time + // + // await CRUD() + // .post(link: AppLink.updateRides, payload: { + // 'id': controller.rideId, + // 'rideTimeStart': DateTime.now().toString(), + // 'status': 'Applied' + // }); + // controller.driverArrivePassenger(); + // // Send notification to driver to alert him that trip is begin + // FirebaseMessagesController() + // .sendNotificationToAnyWithoutData( + // 'BeginTrip', + // box.read(BoxName.name).toString(), + // controller.driverToken.toString(), + // ); + // print(controller.driverToken.toString()); + // // Get.defaultDialog( + // // title: 'The Ride is Begin'.tr, + // // backgroundColor: AppColor.greenColor, + // // ); + // }) + // : const SizedBox() ], ), ), diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index f181187..d5c28d4 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,6 +5,7 @@ import FlutterMacOS import Foundation +import audio_session import device_info_plus import file_selector_macos import firebase_core @@ -12,12 +13,17 @@ import firebase_messaging import flutter_local_notifications import flutter_secure_storage_macos import geolocator_apple +import just_audio import location +import package_info_plus import path_provider_foundation import sqflite import url_launcher_macos +import video_player_avfoundation +import wakelock_plus func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin")) DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin")) FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) @@ -25,8 +31,12 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin")) FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin")) GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin")) + JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin")) LocationPlugin.register(with: registry.registrar(forPlugin: "LocationPlugin")) + FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) + FVPVideoPlayerPlugin.register(with: registry.registrar(forPlugin: "FVPVideoPlayerPlugin")) + WakelockPlusMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockPlusMacosPlugin")) } diff --git a/pubspec.lock b/pubspec.lock index 47384bd..59beed3 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -41,6 +41,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.11.0" + audio_session: + dependency: transitive + description: + name: audio_session + sha256: "8a2bc5e30520e18f3fb0e366793d78057fb64cd5287862c76af0c8771f2a52ad" + url: "https://pub.dev" + source: hosted + version: "0.1.16" boolean_selector: dependency: transitive description: @@ -49,6 +57,30 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.1" + cached_network_image: + dependency: transitive + description: + name: cached_network_image + sha256: f98972704692ba679db144261172a8e20feb145636c617af0eb4022132a6797f + url: "https://pub.dev" + source: hosted + version: "3.3.0" + cached_network_image_platform_interface: + dependency: transitive + description: + name: cached_network_image_platform_interface + sha256: "56aa42a7a01e3c9db8456d9f3f999931f1e05535b5a424271e9a38cabf066613" + url: "https://pub.dev" + source: hosted + version: "3.0.0" + cached_network_image_web: + dependency: transitive + description: + name: cached_network_image_web + sha256: "759b9a9f8f6ccbb66c185df805fac107f05730b1dab9c64626d1008cca532257" + url: "https://pub.dev" + source: hosted + version: "1.1.0" camera: dependency: "direct main" description: @@ -105,6 +137,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.3" + chewie: + dependency: transitive + description: + name: chewie + sha256: ccfce3350ae9fd419cd336cdf3380f77a08e45171e1e3cb3d499d204de5e7ea8 + url: "https://pub.dev" + source: hosted + version: "1.7.1" cli_util: dependency: transitive description: @@ -310,6 +350,14 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_cache_manager: + dependency: transitive + description: + name: flutter_cache_manager + sha256: "8207f27539deb83732fdda03e259349046a39a4c767269285f449ade355d54ba" + url: "https://pub.dev" + source: hosted + version: "3.3.1" flutter_font_icons: dependency: "direct main" description: @@ -446,6 +494,14 @@ packages: url: "https://pub.dev" source: hosted version: "9.5.0+1" + flutter_svg: + dependency: transitive + description: + name: flutter_svg + sha256: d39e7f95621fc84376bc0f7d504f05c3a41488c562f4a8ad410569127507402c + url: "https://pub.dev" + source: hosted + version: "2.0.9" flutter_tesseract_ocr: dependency: "direct main" description: @@ -464,6 +520,22 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_widget_from_html: + dependency: "direct main" + description: + name: flutter_widget_from_html + sha256: "6f2578397aa8efed3267cd4243b68acfc2e38c51d7381fc31a6860ea6eef4e1e" + url: "https://pub.dev" + source: hosted + version: "0.14.6" + flutter_widget_from_html_core: + dependency: transitive + description: + name: flutter_widget_from_html_core + sha256: dd585321db498911414a9b08659b8aa965f8f0375b39856429220fbcacdf59bd + url: "https://pub.dev" + source: hosted + version: "0.14.6" freezed_annotation: dependency: transitive description: @@ -472,6 +544,54 @@ packages: url: "https://pub.dev" source: hosted version: "2.4.1" + fwfh_cached_network_image: + dependency: transitive + description: + name: fwfh_cached_network_image + sha256: "952aea958a5fda7d616cc297ba4bc08427e381459e75526fa375d6d8345630d3" + url: "https://pub.dev" + source: hosted + version: "0.14.2" + fwfh_chewie: + dependency: transitive + description: + name: fwfh_chewie + sha256: b74673d1b2f8710df5addd0ceb82c148f28b9fca9fe619048eebc734d055d55b + url: "https://pub.dev" + source: hosted + version: "0.14.2" + fwfh_just_audio: + dependency: transitive + description: + name: fwfh_just_audio + sha256: "4962bc59cf8bbb0a77a55ff56a7b925612b0d8263bc2ede3636b9c86113cb493" + url: "https://pub.dev" + source: hosted + version: "0.14.2" + fwfh_svg: + dependency: transitive + description: + name: fwfh_svg + sha256: "26df142c1784c29c3675ad0d37f589fc5c2173a14fc002d2c38cde3d0f117302" + url: "https://pub.dev" + source: hosted + version: "0.8.0+4" + fwfh_url_launcher: + dependency: transitive + description: + name: fwfh_url_launcher + sha256: "2a526c9819f74b4106ba2fba4dac79f0082deecd8d2c7011cd0471cb710e3eff" + url: "https://pub.dev" + source: hosted + version: "0.9.0+4" + fwfh_webview: + dependency: transitive + description: + name: fwfh_webview + sha256: "86531afae48a5838d2dce9719dfc6d46c3179237dacf47ea2b2c068243b2e88f" + url: "https://pub.dev" + source: hosted + version: "0.14.2" geolocator: dependency: "direct main" description: @@ -604,18 +724,18 @@ packages: dependency: transitive description: name: google_mlkit_commons - sha256: "42173a8ba89f386486cc5b8249e84da4a4b861daa70498373627d985eb418689" + sha256: af63771903947d5523d9e991a939a4b8bf994f11661c9b9c8a71d7d3997115f8 url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.2.0" google_mlkit_text_recognition: dependency: "direct main" description: name: google_mlkit_text_recognition - sha256: "588021c99536fdfb173eeecc4ee1b60ea4e0bd4be9787f52363c85346ae20364" + sha256: "6dc31f02beb1cfd6818da4bf29bf4ae5f4f9e16422c1efd0b515ed0756d73b8e" url: "https://pub.dev" source: hosted - version: "0.10.0" + version: "0.5.0" google_polyline_algorithm: dependency: "direct main" description: @@ -800,6 +920,30 @@ packages: url: "https://pub.dev" source: hosted version: "4.8.1" + just_audio: + dependency: transitive + description: + name: just_audio + sha256: "5ed0cd723e17dfd8cd4b0253726221e67f6546841ea4553635cf895061fc335b" + url: "https://pub.dev" + source: hosted + version: "0.9.35" + just_audio_platform_interface: + dependency: transitive + description: + name: just_audio_platform_interface + sha256: d8409da198bbc59426cd45d4c92fca522a2ec269b576ce29459d6d6fcaeb44df + url: "https://pub.dev" + source: hosted + version: "4.2.1" + just_audio_web: + dependency: transitive + description: + name: just_audio_web + sha256: ff62f733f437b25a0ff590f0e295fa5441dcb465f1edbdb33b3dea264705bc13 + url: "https://pub.dev" + source: hosted + version: "0.4.8" lints: dependency: transitive description: @@ -832,6 +976,14 @@ packages: url: "https://pub.dev" source: hosted version: "4.2.0" + logging: + dependency: transitive + description: + name: logging + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" + source: hosted + version: "1.2.0" lottie: dependency: "direct main" description: @@ -872,6 +1024,38 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.4" + nested: + dependency: transitive + description: + name: nested + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + octo_image: + dependency: transitive + description: + name: octo_image + sha256: "45b40f99622f11901238e18d48f5f12ea36426d8eced9f4cbf58479c7aa2430d" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + package_info_plus: + dependency: transitive + description: + name: package_info_plus + sha256: "7e76fad405b3e4016cd39d08f455a4eb5199723cf594cd1b8916d47140d93017" + url: "https://pub.dev" + source: hosted + version: "4.2.0" + package_info_plus_platform_interface: + dependency: transitive + description: + name: package_info_plus_platform_interface + sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + url: "https://pub.dev" + source: hosted + version: "2.0.1" path: dependency: "direct main" description: @@ -880,6 +1064,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.8.3" + path_parsing: + dependency: transitive + description: + name: path_parsing + sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf + url: "https://pub.dev" + source: hosted + version: "1.0.1" path_provider: dependency: transitive description: @@ -960,6 +1152,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.7.3" + provider: + dependency: transitive + description: + name: provider + sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f + url: "https://pub.dev" + source: hosted + version: "6.0.5" quiver: dependency: transitive description: @@ -968,6 +1168,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.2.1" + rxdart: + dependency: transitive + description: + name: rxdart + sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb" + url: "https://pub.dev" + source: hosted + version: "0.27.7" sanitize_html: dependency: transitive description: @@ -1173,6 +1381,30 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.7" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: "0f0c746dd2d6254a0057218ff980fc7f5670fd0fcf5e4db38a490d31eed4ad43" + url: "https://pub.dev" + source: hosted + version: "1.1.9+1" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: "0edf6d630d1bfd5589114138ed8fada3234deacc37966bec033d3047c29248b7" + url: "https://pub.dev" + source: hosted + version: "1.1.9+1" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: d24333727332d9bd20990f1483af4e09abdb9b1fc7c3db940b56ab5c42790c26 + url: "https://pub.dev" + source: hosted + version: "1.1.9+1" vector_math: dependency: transitive description: @@ -1181,6 +1413,62 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + video_player: + dependency: transitive + description: + name: video_player + sha256: e16f0a83601a78d165dabc17e4dac50997604eb9e4cc76e10fa219046b70cef3 + url: "https://pub.dev" + source: hosted + version: "2.8.1" + video_player_android: + dependency: transitive + description: + name: video_player_android + sha256: "3fe89ab07fdbce786e7eb25b58532d6eaf189ceddc091cb66cba712f8d9e8e55" + url: "https://pub.dev" + source: hosted + version: "2.4.10" + video_player_avfoundation: + dependency: transitive + description: + name: video_player_avfoundation + sha256: fe73d636f82286a3739f5e644f95f09442cacdc436ebbe5436521dc915f3ecac + url: "https://pub.dev" + source: hosted + version: "2.5.1" + video_player_platform_interface: + dependency: transitive + description: + name: video_player_platform_interface + sha256: be72301bf2c0150ab35a8c34d66e5a99de525f6de1e8d27c0672b836fe48f73a + url: "https://pub.dev" + source: hosted + version: "6.2.1" + video_player_web: + dependency: transitive + description: + name: video_player_web + sha256: ab7a462b07d9ca80bed579e30fb3bce372468f1b78642e0911b10600f2c5cb5b + url: "https://pub.dev" + source: hosted + version: "2.1.2" + wakelock_plus: + dependency: transitive + description: + name: wakelock_plus + sha256: f45a6c03aa3f8322e0a9d7f4a0482721c8789cb41d555407367650b8f9c26018 + url: "https://pub.dev" + source: hosted + version: "1.1.3" + wakelock_plus_platform_interface: + dependency: transitive + description: + name: wakelock_plus_platform_interface + sha256: "40fabed5da06caff0796dc638e1f07ee395fb18801fbff3255a2372db2d80385" + url: "https://pub.dev" + source: hosted + version: "1.1.0" web: dependency: transitive description: @@ -1201,10 +1489,10 @@ packages: dependency: transitive description: name: webview_flutter_android - sha256: bca797abba472868655b5f1a6029c1132385685ee9db4713cb0e7f33076210c6 + sha256: ddc167c6676f57c8b367d19fcbee267d6dc6adf81bd6c3cb87981d30746e0a6d url: "https://pub.dev" source: hosted - version: "3.9.3" + version: "3.10.1" webview_flutter_platform_interface: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 423c709..dd679da 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -41,9 +41,11 @@ dependencies: device_info_plus: ^9.1.0 image_picker: ^1.0.4 flutter_tesseract_ocr: ^0.4.24 - google_mlkit_text_recognition: ^0.10.0 + google_mlkit_text_recognition: # ^0.10.0 flutter_stripe: ^9.5.0+1 camera: ^0.10.5+5 + flutter_widget_from_html: ^0.14.6 +