You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
diplomatic-quarter/lib/pages/pharmacies/screens/lakum-terms-conditions-page...

78 lines
3.4 KiB
Dart

import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-registration-viewModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:provider/provider.dart';
class LakumTermsConditions extends StatelessWidget {
final String firstName, lastName, mobileNo, identificationNo;
final int languageId;
LakumTermsConditions(this.identificationNo, this.firstName, this.lastName,
this.mobileNo, this.languageId);
@override
Widget build(BuildContext context) {
ProjectViewModel projectProvider = Provider.of(context);
return BaseView<LacumRegistrationViewModel>(
onModelReady: (model) => model.getUserTermsAndConditionsForEPharmcy(),
builder: (_, model, wi) => AppScaffold(
appBarTitle: "${TranslationBase.of(context).register} ${TranslationBase.of(context).lakum}",
isShowAppBar: true,
isShowDecPage: false,
backgroundColor: Colors.white,
baseViewModel: model,
body: Container(
margin: EdgeInsets.all(8),
width: double.infinity,
child: Stack(
children: [
SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (model.listUserAgreement != null &&
model.listUserAgreement.userAgreementLAKUM !=
null)
Html(
data: projectProvider.isArabic
? model.listUserAgreement.userAgreementLAKUMn
: model.listUserAgreement.userAgreementLAKUM,
),
],
),
),
Align(
alignment: Alignment.bottomCenter,
child: Container(
height: 50,
margin: EdgeInsets.all(8),
child: BorderedButton(
TranslationBase.of(context).acceptLbl,
backgroundColor: Color(0xff60686b),
textColor: Colors.white,
fontSize: 16,
hPadding: 8,
vPadding: 12,
handler: () {
model.createNewLakumAccount("$firstName $lastName", mobileNo, identificationNo, languageId).then((status) => {
if (status == 200) {Navigator.pop(context, "")}
// back to previous page
});
},
),
),
),
],
),
),
));
}
}