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.
85 lines
3.6 KiB
Dart
85 lines
3.6 KiB
Dart
4 years ago
|
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);
|
||
|
|
||
|
final mediaQuery = MediaQuery.of(context);
|
||
|
PreferredSizeWidget appBarWidget = AppBarWidget("Lakum", null, true);
|
||
|
double height = mediaQuery.size.height -
|
||
|
appBarWidget.preferredSize.height -
|
||
|
mediaQuery.padding.top;
|
||
|
|
||
|
return BaseView<LacumRegistrationViewModel>(
|
||
|
onModelReady: (model) => model.getUserTermsAndConditionsForEPharmcy(),
|
||
|
builder: (_, model, wi) => AppScaffold(
|
||
|
title: "Register Lakum",
|
||
|
isShowAppBar: true,
|
||
|
isShowDecPage: false,
|
||
|
backgroundColor: Colors.white,
|
||
|
baseViewModel: model,
|
||
|
appBarWidget: appBarWidget,
|
||
|
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
|
||
|
});
|
||
|
},
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
),
|
||
|
));
|
||
|
}
|
||
|
}
|