term and condition text change & phone number validation added on registration screen.

development
Sikander Saleem 3 years ago
parent 40037e0c7e
commit c795faed99

@ -167,7 +167,7 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
SizedBox(width: 8),
Expanded(
child: Text(
"أقر بأني إطلعت على شروط الاستخدام و سياسية الخصوصية و أوافق عليها",
"أقر بأن جميع البيانات المدخلة أعلاه صحيحة",
style: TextStyle(color: Colors.white, fontSize: 13),
),
),
@ -179,6 +179,10 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
height: 50,
child: TextButton(
onPressed: () {
if (_emailController.text.length < 1) {
Utils.showToast("يرجى إدخال البريد الإلكتروني");
return;
}
if (_firstNameController.text.length < 1) {
Utils.showToast("يرجى إدخال الاسم الأول");
return;
@ -187,10 +191,6 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
Utils.showToast("يرجى إدخال الاسم الأخير");
return;
}
if (_emailController.text.length < 1) {
Utils.showToast("يرجى إدخال البريد الإلكتروني");
return;
}
if (_selectedCountry?.countryCode == null) {
Utils.showToast("يرجى اختيار الدولة");
return;
@ -198,6 +198,9 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
if (_mobileNumberController.text.length < 1) {
Utils.showToast("يرجى إدخال رقم الجوال");
return;
} else if (_mobileNumberController.text.length < 8 || _mobileNumberController.text.length > 12) {
Utils.showToast("رقم الهاتف غير صحيح");
return;
}
if (_passwordController.text.length < 1) {
Utils.showToast("يرجى إدخال كلمة المرور");
@ -226,8 +229,8 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
_firstNameController.text, _lastNameController.text, _emailController.text, _passwordController.text, _selectedCountry?.countryCode, _mobileNumberController.text);
},
style: TextButton.styleFrom(
primary: Colors.white,
backgroundColor: ColorConsts.secondaryPink,
foregroundColor: Colors.white,
textStyle: TextStyle(fontSize: 16, fontFamily: "DroidKufi"),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6.0),

@ -524,7 +524,7 @@ class _TangheemDetailScreenState extends State<TangheemDetailScreen> {
),
style: TextButton.styleFrom(
backgroundColor: ColorConsts.gradientOrange,
primary: ColorConsts.primaryBlue,
foregroundColor: ColorConsts.primaryBlue,
padding: EdgeInsets.only(top: 4, bottom: 4, right: 8, left: 8),
textStyle: TextStyle(color: Colors.white, fontSize: 12),
),
@ -843,7 +843,7 @@ class _TangheemDetailScreenState extends State<TangheemDetailScreen> {
borderRadius: BorderRadius.circular(30),
onTap: () async {
if (!AppState().isUserLogin) {
Widget cancelButton = FlatButton(
Widget cancelButton = TextButton(style: TextButton.styleFrom(backgroundColor: ColorConsts.sliderBackground,foregroundColor: ColorConsts.primaryBlack),
child: Text("أرغب بالتسجيل"),
onPressed: () async {
Navigator.pop(context);
@ -853,22 +853,21 @@ class _TangheemDetailScreenState extends State<TangheemDetailScreen> {
}
},
);
Widget continueButton = FlatButton(
Widget continueButton = TextButton(style: TextButton.styleFrom(backgroundColor: ColorConsts.sliderBackground,foregroundColor: ColorConsts.primaryBlack),
child: Text("استمرار كضيف"),
onPressed: () {
Navigator.pop(context);
return;
},
);
AlertDialog alert = AlertDialog(
content: Text("هذه الخاصية متاحه فقط للأعضاء المسجلين"),
actionsAlignment:MainAxisAlignment.spaceEvenly,
actions: [
cancelButton,
continueButton,
],
);
showDialog(
context: context,
builder: (BuildContext context) {

Loading…
Cancel
Save