Skip to content

Commit

Permalink
some small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
RGTechPro committed Sep 10, 2022
1 parent c4a6515 commit df7d974
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 26 deletions.
8 changes: 6 additions & 2 deletions lib/screens/documentCheckPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ class _DocumentCheckPageState extends State<DocumentCheckPage> {
'https://uidai.gov.in/images/commdoc/List_of_Acceptable_documents_July2022.pdf');
},
child: Text(
translatedStrings["clickHereForMoreInformationAboutTheDocumentNeeded."].toString(),
translatedStrings[
"clickHereForMoreInformationAboutTheDocumentNeeded"]
.toString(),
style: GoogleFonts.nunito(
textStyle: TextStyle(fontSize: 20, color: Colors.white),
),
Expand Down Expand Up @@ -224,7 +226,9 @@ class _DocumentCheckPageState extends State<DocumentCheckPage> {

else
showSnackBar(
translatedStrings["pleaseCheckAllTheDocumentsToContinue"].toString(), context);
translatedStrings["pleaseCheckAllTheDocumentsToContinue"]
.toString(),
context);
},
backgroundColor: Colors.white,
child: const Icon(
Expand Down
45 changes: 23 additions & 22 deletions lib/screens/operator_booked.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,16 @@ class _OperatorBookedState extends State<OperatorBooked> {
super.initState();

WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
int bookingId = Provider.of<BookingProvider>(context, listen: false).booking.bookingId!;
print("book id completed $bookingId");
var bdb = BookingDB();
bdb.registerForBookingCompleted(bookingId, (){
Navigator.pushReplacement(context, MaterialPageRoute(builder: (context) => FinishPage()));});
int bookingId = Provider.of<BookingProvider>(context, listen: false)
.booking
.bookingId!;
print("book id completed $bookingId");
var bdb = BookingDB();
bdb.registerForBookingCompleted(bookingId, () {
Navigator.pushReplacement(
context, MaterialPageRoute(builder: (context) => FinishPage()));
});
});

}

@override
Expand All @@ -45,10 +48,10 @@ class _OperatorBookedState extends State<OperatorBooked> {
SizeConfig().init(context);
}

void cancelCurrentBookingAndExit() async {
print("cancel");
// TODO: Implement here
}
void cancelCurrentBookingAndExit() async {
print("cancel");
// TODO: Implement here
}

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -91,7 +94,7 @@ class _OperatorBookedState extends State<OperatorBooked> {
Padding(
padding: const EdgeInsets.only(bottom: 5),
child: Text(
translatedStrings["operatorBooked"].tostring(),
translatedStrings["operatorBooked"].toString(),
style: textStyle.copyWith(fontWeight: FontWeight.bold),
),
),
Expand All @@ -116,19 +119,21 @@ class _OperatorBookedState extends State<OperatorBooked> {
child: Align(
alignment: Alignment.topLeft,
child: Text(
translatedStrings["yourOperator"].tostring(),
translatedStrings["yourOperator"].toString(),
style: oTextStyle,
),
),
),
Consumer<BookingProvider>(
builder: (context, provider, child) {
return OperatorBookedCard(
name: provider.focusOperator.name!,
phoneNo: provider.focusOperator.phoneNo!,
rating: provider.focusOperator.ratings!,
task: provider.booking.bookingType! == 0 ? 'Aadhar Updation' : 'Aadhar Enrollment',
time: provider.booking.slotTime!);
name: provider.focusOperator.name!,
phoneNo: provider.focusOperator.phoneNo!,
rating: provider.focusOperator.ratings!,
task: provider.booking.bookingType! == 0
? 'Aadhar Updation'
: 'Aadhar Enrollment',
time: provider.booking.slotTime!);
},
),
SizedBox(
Expand All @@ -146,8 +151,6 @@ class _OperatorBookedState extends State<OperatorBooked> {
);
},
),


SizedBox(
height: 55,
),
Expand All @@ -162,9 +165,7 @@ class _OperatorBookedState extends State<OperatorBooked> {
child: Text(
translatedStrings["cancel"].toString(),
style: buttonTextStyle,
)
)
),
))),
],
)),
);
Expand Down
5 changes: 3 additions & 2 deletions lib/screens/serviceSelectionPage.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:firebase_auth/firebase_auth.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:flutter/material.dart';
import 'package:mera_aadhar/language_handler.dart';
import 'package:mera_aadhar/provider/booking.dart';
import 'package:mera_aadhar/screens/documentCheckPage.dart';
import 'package:mera_aadhar/services/auth/otp_signin.dart';
Expand Down Expand Up @@ -35,7 +36,7 @@ class _ServiceSelectionPageState extends State<ServiceSelectionPage> {
colors: [Color(0xffF8774A), Color(0xffF8774A)],
begin: Alignment.topRight,
end: Alignment.bottomLeft))),
onPressed: () {
onPressed: ()async {
(bookingType == 'update')
? Provider.of<BookingProvider>(context, listen: false)
.booking
Expand Down Expand Up @@ -64,7 +65,7 @@ class _ServiceSelectionPageState extends State<ServiceSelectionPage> {
.booking
.userdata!
.type = 1;

await superTranslate(context);
Provider.of<BookingProvider>(context, listen: false)
.booking
.userdata!
Expand Down

0 comments on commit df7d974

Please sign in to comment.