ui improvements.

development-design-2.0
Sikander Saleem 3 years ago
parent e3741d5907
commit 9c1b4ce616

@ -0,0 +1,42 @@
<svg id="Group_16" data-name="Group 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="127.589" height="130.523" viewBox="0 0 127.589 130.523">
<defs>
<clipPath id="clip-path">
<rect id="Rectangle_11" data-name="Rectangle 11" width="127.589" height="130.523" fill="none"/>
</clipPath>
<clipPath id="clip-path-2">
<rect id="Rectangle_10" data-name="Rectangle 10" width="127.589" height="130.524" fill="none"/>
</clipPath>
<clipPath id="clip-path-3">
<rect id="Rectangle_9" data-name="Rectangle 9" width="22.616" height="24.579" fill="none"/>
</clipPath>
</defs>
<g id="Group_15" data-name="Group 15" clip-path="url(#clip-path)">
<rect id="Rectangle_7" data-name="Rectangle 7" width="16.797" height="22.619" transform="translate(56.794 58.101)" fill="#ededed"/>
<rect id="Rectangle_8" data-name="Rectangle 8" width="8.328" height="22.619" transform="translate(65.262 58.101)" fill="#d1d3d4"/>
<g id="Group_14" data-name="Group 14" transform="translate(0 -0.001)">
<g id="Group_13" data-name="Group 13" clip-path="url(#clip-path-2)">
<path id="Path_38" data-name="Path 38" d="M45.248,24.374l.216-2.68c-1.235-14.777-14.3-14.181-14.3-14.181C16.332,9.046,16.734,21.694,16.734,21.694l.213,2.652s.587,7.355.566,7.358l.021,0,.584,7.249a6.721,6.721,0,0,0,3.6,5.472L28.667,49h4.605l7.209-4.575a6.728,6.728,0,0,0,3.6-5.472l.621-7.729Z" transform="translate(34.165 15.335)" fill="#ededed"/>
<path id="Path_39" data-name="Path 39" d="M37.372,24.374l.216-2.68c-1.235-14.777-14.3-14.181-14.3-14.181-.7.073-1.329.192-1.962.31,3.939.812,10.394,3.7,11.246,13.871l-.216,2.68-.548,6.847-.621,7.729a6.728,6.728,0,0,1-3.6,5.472l-7,4.444.2.131H25.4l7.209-4.575a6.728,6.728,0,0,0,3.6-5.472l.621-7.729s.739-7.063.548-6.847" transform="translate(42.041 15.335)" fill="#d1d3d4"/>
<path id="Path_40" data-name="Path 40" d="M49.918,23.757l18.859,6.513a3.165,3.165,0,0,1,2.132,3l-.058,15.063H11.761l.058-15.106a3.168,3.168,0,0,1,2.1-2.969L32.92,23.647l8.414,7.589Z" transform="translate(24.014 48.284)" fill="#ededed"/>
<g id="Group_12" data-name="Group 12" transform="translate(72.306 72.04)" opacity="0.3">
<g id="Group_11" data-name="Group 11">
<g id="Group_10" data-name="Group 10" clip-path="url(#clip-path-3)">
<path id="Path_41" data-name="Path 41" d="M44.257,30.195,25.4,23.682,23.77,25.1l14.759,5.1A3.172,3.172,0,0,1,40.661,33.2L40.6,48.263h5.728L46.386,33.2a3.165,3.165,0,0,0-2.129-3.005" transform="translate(-23.772 -23.684)" fill="#414042"/>
</g>
</g>
</g>
<path id="Path_42" data-name="Path 42" d="M35.715,19.891V31.316l-8.681,7.221-8.316-7.221V19.891" transform="translate(38.217 40.614)" fill="none" stroke="#4c5159" stroke-miterlimit="10" stroke-width="1"/>
<line id="Line_4" data-name="Line 4" x2="73.01" transform="translate(28.746 96.953)" fill="none" stroke="#4c5159" stroke-miterlimit="10" stroke-width="1"/>
<path id="Path_43" data-name="Path 43" d="M33.86,120.29q-2.715-1.474-5.259-3.194t-4.906-3.668q-2.354-1.948-4.523-4.113t-4.113-4.526q-1.953-2.364-3.671-4.909T8.2,94.626c-.983-1.807-1.883-3.665-2.686-5.573S3.989,85.193,3.368,83.2s-1.147-4.036-1.576-6.111a64.561,64.561,0,0,1,0-25.691q.643-3.112,1.576-6.108T5.51,39.432c.8-1.907,1.7-3.766,2.686-5.573S10.243,30.3,11.387,28.6s2.37-3.331,3.671-4.906,2.671-3.084,4.113-4.526,2.954-2.814,4.523-4.113,3.212-2.525,4.906-3.671S32.05,9.175,33.86,8.2s3.665-1.88,5.573-2.686,3.86-1.521,5.855-2.141a62.766,62.766,0,0,1,6.1-1.573,64.343,64.343,0,0,1,25.691,0q3.112.639,6.111,1.573T89.05,5.51Q91.911,6.719,94.623,8.2t5.253,3.191q2.546,1.72,4.906,3.671c1.576,1.3,3.09,2.671,4.529,4.113" transform="translate(1.021 1.022)" fill="none" stroke="#4c5159" stroke-miterlimit="10" stroke-width="1"/>
<path id="Path_44" data-name="Path 44" d="M21.332,43.038q-3.112-.639-6.108-1.57" transform="translate(31.085 84.671)" fill="none" stroke="#4c5159" stroke-miterlimit="10" stroke-width="1"/>
<path id="Path_45" data-name="Path 45" d="M27.973,42.3a64.063,64.063,0,0,1-6.519.329" transform="translate(43.805 86.372)" fill="none" stroke="#4c5159" stroke-miterlimit="10" stroke-width="1"/>
<path id="Path_46" data-name="Path 46" d="M33.542,40.763q-2.861,1.209-5.855,2.144" transform="translate(56.53 83.232)" fill="none" stroke="#4c5159" stroke-miterlimit="10" stroke-width="1"/>
<path id="Path_47" data-name="Path 47" d="M38.077,37.625q-2.364,1.948-4.906,3.668" transform="translate(67.729 76.825)" fill="none" stroke="#4c5159" stroke-miterlimit="10" stroke-width="1"/>
<path id="Path_48" data-name="Path 48" d="M41.293,33.171q-1.72,2.541-3.668,4.906" transform="translate(76.823 67.73)" fill="none" stroke="#4c5159" stroke-miterlimit="10" stroke-width="1"/>
<path id="Path_49" data-name="Path 49" d="M42.906,27.686q-.931,2.993-2.144,5.855" transform="translate(83.229 56.531)" fill="none" stroke="#4c5159" stroke-miterlimit="10" stroke-width="1"/>
<path id="Path_50" data-name="Path 50" d="M44.234,3.9V14.878H33.554" transform="translate(68.511 7.97)" fill="none" stroke="#4c5159" stroke-miterlimit="10" stroke-width="1"/>
<path id="Path_51" data-name="Path 51" d="M45.248,24.374l.216-2.68c-1.235-14.777-14.3-14.181-14.3-14.181C16.332,9.046,16.734,21.694,16.734,21.694l.213,2.652s.587,7.355.566,7.358l.021,0,.584,7.249a6.721,6.721,0,0,0,3.6,5.472L28.667,49h4.605l7.209-4.575a6.728,6.728,0,0,0,3.6-5.472l.621-7.729Z" transform="translate(34.165 15.335)" fill="none" stroke="#4c5159" stroke-miterlimit="10" stroke-width="1"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.5 KiB

@ -0,0 +1,20 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="89.954" height="134.736" viewBox="0 0 89.954 134.736">
<defs>
<clipPath id="clip-path">
<rect id="Rectangle_6" data-name="Rectangle 6" width="89.954" height="134.736" fill="none"/>
</clipPath>
</defs>
<g id="Group_9" data-name="Group 9" transform="translate(0 0)">
<g id="Group_8" data-name="Group 8" transform="translate(0 0)" clip-path="url(#clip-path)">
<path id="Path_35" data-name="Path 35" d="M65.452,53.952H52.627V28.606A16.785,16.785,0,0,0,35.86,11.843c-9.245,0-19.672,7.522-19.672,16.763V53.952H4.7V28.606C4.7,12.292,19.543.587,35.86.587S65.452,14.7,65.452,28.606Z" transform="translate(10.055 1.256)" fill="#ededed"/>
<path id="Rectangle_3" data-name="Rectangle 3" d="M.187,0H86.628a.188.188,0,0,1,.188.188V81.036a.188.188,0,0,1-.188.188H.187A.187.187,0,0,1,0,81.037V.187A.187.187,0,0,1,.187,0Z" transform="translate(1.568 51.943)" fill="none" stroke="#4c5159" stroke-miterlimit="10" stroke-width="1"/>
<path id="Path_36" data-name="Path 36" d="M4.77,50.874V30.509a30.01,30.01,0,0,1,60.02,0V50.874" transform="translate(10.198 1.07)" fill="none" stroke="#4c5159" stroke-miterlimit="10" stroke-width="1"/>
<rect id="Rectangle_4" data-name="Rectangle 4" width="60.021" height="30.705" transform="translate(14.968 79.865)" fill="#ededed"/>
<path id="Path_37" data-name="Path 37" d="M8.363,38.79V22.94a18.734,18.734,0,1,1,37.468,0V38.79" transform="translate(17.88 8.993)" fill="none" stroke="#4c5159" stroke-miterlimit="10" stroke-width="1"/>
<rect id="Rectangle_5" data-name="Rectangle 5" width="60.749" height="25.364" transform="translate(14.758 79.369)" fill="none" stroke="#4c5159" stroke-miterlimit="10" stroke-width="1"/>
<line id="Line_1" data-name="Line 1" x2="4.465" transform="translate(27.284 92.556)" fill="none" stroke="#4c5159" stroke-miterlimit="10" stroke-width="1"/>
<line id="Line_2" data-name="Line 2" x2="4.465" transform="translate(42.745 92.556)" fill="none" stroke="#4c5159" stroke-miterlimit="10" stroke-width="1"/>
<line id="Line_3" data-name="Line 3" x2="4.465" transform="translate(58.206 92.556)" fill="none" stroke="#4c5159" stroke-miterlimit="10" stroke-width="1"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

@ -47,7 +47,7 @@ APIException _throwAPIException(Response response) {
APIError apiError;
if (response.body != null && response.body.isNotEmpty) {
var jsonError = jsonDecode(response.body);
apiError = APIError(409, jsonError['statusMessage']);
apiError = APIError(409, jsonError['statusMessage'] ?? jsonError['message']);
}
return APIException(APIException.BAD_REQUEST, error: apiError);
case 500:

@ -42,7 +42,7 @@ extension StringExtension on String {
}
}
Widget toText(double fontSize, {Color color, bool isBold = false, int maxLines, FontStyle fontStyle, TextAlign textAlign, double height}) {
Widget toText(double fontSize, {Color color, bool isBold = false, int maxLines, FontStyle fontStyle, TextAlign textAlign, double height, bool fontFamily = true}) {
double heightVal = height ?? ((fontSize == 13) ? 16 : ((fontSize == 18 || fontSize == 30) ? 22 : 14));
return Text(
this,
@ -53,7 +53,7 @@ extension StringExtension on String {
fontStyle: fontStyle ?? FontStyle.normal,
fontWeight: isBold ? FontWeight.bold : FontWeight.w400,
color: color ?? Colors.white,
fontFamily: "Montserrat",
fontFamily: fontFamily ? "Montserrat" : null,
height: heightVal / fontSize,
),
);

@ -3,6 +3,8 @@ import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:tangheem/classes/colors.dart';
import 'package:tangheem/classes/utils.dart';
import 'package:tangheem/extensions/string_extensions.dart';
import 'package:tangheem/extensions/widget_extensions.dart';
import 'package:tangheem/widgets/common_textfield_widget.dart';
class DiscussionInputDialog extends StatefulWidget {
@ -37,10 +39,12 @@ class _DiscussionInputDialogState extends State<DiscussionInputDialog> {
@override
Widget build(BuildContext context) {
bool isPortrait = MediaQuery.of(context).orientation == Orientation.portrait;
return Dialog(
insetPadding: EdgeInsets.symmetric(horizontal: 60.0, vertical: 24.0),
insetPadding: EdgeInsets.symmetric(horizontal: 60.0, vertical: 0.0),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
borderRadius: BorderRadius.circular(24),
),
elevation: 0,
backgroundColor: Colors.transparent,
@ -49,45 +53,34 @@ class _DiscussionInputDialogState extends State<DiscussionInputDialog> {
child: Container(
width: double.infinity,
decoration: BoxDecoration(
color: ColorConsts.brownB1CColor,
borderRadius: BorderRadius.circular(16),
color: Colors.white,
borderRadius: BorderRadius.circular(24),
),
padding: EdgeInsets.symmetric(vertical: 16, horizontal: 16),
padding: EdgeInsets.symmetric(vertical: 24, horizontal: 24),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(
"اضاف تعليق",
textAlign: TextAlign.center,
style: TextStyle(fontWeight: FontWeight.bold, color: Colors.white, fontSize: 16),
),
SizedBox(height: 12),
CommonTextFieldWidget(hint: "فحوى التعليق", controller: _commentController, maxLines: 5, focusNode: _focusNode, fillColor: ColorConsts.brownLightECColor, isBorder: true),
"اضاف تعليق".toText(18, isBold: true, color: ColorConsts.dark2Text, fontFamily: false),
SizedBox(height: 12),
SizedBox(
width: double.infinity,
height: 40,
child: TextButton(
onPressed: () {
if (_commentController.text.length < 1) {
Utils.showToast("يجب أن تكتب كلمات قليلة");
return;
}
_focusNode.unfocus();
widget.onCommentPress(_commentController.text);
},
style: TextButton.styleFrom(
foregroundColor: Colors.white,
padding: EdgeInsets.all(2),
backgroundColor: ColorConsts.brownColor,
textStyle: TextStyle(fontSize: 14, fontFamily: "DroidKufi"),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20.0),
),
),
child: Text("أضف تعليقك"),
),
),
CommonTextFieldWidget(hint: "فحوى التعليق", controller: _commentController, maxLines: isPortrait ? 5 : 3, focusNode: _focusNode, fillColor: Colors.transparent, isBorder: true),
SizedBox(height: 16),
Container(
height: 40,
padding: EdgeInsets.only(left: 16, right: 16),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30),
color: ColorConsts.darkText,
),
child: "أضف تعليقك".toText(14, fontFamily: false))
.onPress(() {
if (_commentController.text.length < 1) {
Utils.showToast("يجب أن تكتب كلمات قليلة");
return;
}
_focusNode.unfocus();
widget.onCommentPress(_commentController.text);
})
],
),
),

@ -84,9 +84,9 @@ class _BookmarkScreenState extends State<BookmarkScreen> {
Widget _dataListView = (_bookMarkList?.isEmpty ?? true)
? NoDataUI().paddingOnly(top: isPortrait ? 215 : 0)
: ListView.separated(
physics: isPortrait ? NeverScrollableScrollPhysics() : null,
physics: isPortrait ? NeverScrollableScrollPhysics() : BouncingScrollPhysics(),
shrinkWrap: isPortrait,
padding: EdgeInsets.all(24),
padding: EdgeInsets.symmetric(horizontal: 24, vertical: isPortrait ? 24 : 48),
itemCount: _bookMarkList.length,
separatorBuilder: (context, index) => 12.height,
itemBuilder: (context, index) {

@ -143,7 +143,7 @@ class _ContactUsScreenState extends State<ContactUsScreen> {
Expanded(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
padding: EdgeInsets.all(36),
padding: EdgeInsets.all(48),
child: _inputDataList,
),
flex: 6)

@ -81,92 +81,135 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen> {
@override
Widget build(BuildContext context) {
bool isPortrait = MediaQuery.of(context).orientation == Orientation.portrait;
Widget _button = SizedBox(
width: double.infinity,
height: 50,
child: TextButton(
onPressed: () {
if (_emailController.text.length < 1) {
Utils.showToast("يرجى إدخال البريد الإلكتروني");
return;
} else if (!_emailController.text.isValidEmail()) {
Utils.showToast("صيغة البريد الإلكتروني خاطئة");
return;
}
forgotPassword(_emailController.text);
},
style: TextButton.styleFrom(
backgroundColor: ColorConsts.darkText,
foregroundColor: Colors.white,
textStyle: TextStyle(fontSize: 18),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(25.0),
),
),
child: Text("إعادة تعيين كلمة المرور"),
),
).paddingOnly(left: isPortrait ? 11 : 0, right: isPortrait ? 11 : 0, bottom: 28);
Widget _contactUs = Column(
mainAxisSize: MainAxisSize.min,
children: [
SvgPicture.asset("assets/icons/new/contact_us.svg", width: 26, height: 24, color: ColorConsts.greyC4Color),
8.height,
"اتصل بنا".toText(14, color: ColorConsts.greyC4Color),
],
).onPress(() {
Navigator.pushNamed(context, ContactUsScreen.routeName);
});
return Scaffold(
backgroundColor: ColorConsts.greyF8Color,
body: SingleChildScrollView(
padding: EdgeInsets.only(top: 100, bottom: 24, left: 24, right: 24),
physics: BouncingScrollPhysics(),
child: Column(
children: [
Image.asset("assets/icons/new/Tangeem-logo.png", width: 116, height: 62),
30.height,
Container(
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.0), color: Colors.white),
margin: EdgeInsets.only(top: 6, bottom: 20),
padding: EdgeInsets.only(top: 50, bottom: 20, left: 11, right: 11),
body: isPortrait
? SingleChildScrollView(
padding: EdgeInsets.only(top: 100, bottom: 24, left: 24, right: 24),
physics: BouncingScrollPhysics(),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
SvgPicture.asset("assets/icons/key.svg", width: 100, height: 72),
25.height,
"استعادة كلمة المرور".toText(18, color: ColorConsts.darkText),
18.height,
"يمكنك إعادة تعيين كلمة المرور عبر حساب بريدك الإلكتروني".toText(13, color: ColorConsts.grey9FColor, textAlign: TextAlign.center).paddingOnly(left: 77, right: 77),
25.height,
CommonTextFieldWidget(hint: "البريد الإلكتروني المسجل", controller: _emailController, isEmail: true),
Image.asset("assets/icons/new/Tangeem-logo.png", width: 116, height: 62),
30.height,
Container(
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.0), color: Colors.white),
margin: EdgeInsets.only(top: 6, bottom: 20),
padding: EdgeInsets.only(top: 50, bottom: 20, left: 11, right: 11),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
SvgPicture.asset("assets/icons/reset.svg", width: 100, height: 72),
25.height,
"استعادة كلمة المرور".toText(18, color: ColorConsts.darkText),
18.height,
"يمكنك إعادة تعيين كلمة المرور عبر حساب بريدك الإلكتروني".toText(13, color: ColorConsts.grey9FColor, textAlign: TextAlign.center).paddingOnly(left: 77, right: 77),
25.height,
CommonTextFieldWidget(hint: "البريد الإلكتروني المسجل", controller: _emailController, isEmail: true),
],
),
),
_button,
_contactUs,
],
),
),
SizedBox(
width: double.infinity,
height: 50,
child: TextButton(
onPressed: () {
if (_emailController.text.length < 1) {
Utils.showToast("يرجى إدخال البريد الإلكتروني");
return;
} else if (!_emailController.text.isValidEmail()) {
Utils.showToast("صيغة البريد الإلكتروني خاطئة");
return;
}
forgotPassword(_emailController.text);
},
style: TextButton.styleFrom(
backgroundColor: ColorConsts.darkText,
foregroundColor: Colors.white,
textStyle: TextStyle(fontSize: 18),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(25.0),
),
),
child: Text("إعادة تعيين كلمة المرور"),
)
: SizedBox(
height: MediaQuery.of(context).size.height,
child: Row(
children: [
Expanded(flex: 1, child: Image.asset("assets/icons/new/Tangeem-logo.png", width: 136, height: 82).paddingOnly(right: 40)),
Expanded(
flex: 2,
child: Container(
width: MediaQuery.of(context).size.width,
// height: MediaQuery.of(context).size.height,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.0), color: Colors.white),
margin: EdgeInsets.all(24),
padding: EdgeInsets.only(left: 24, right: 0),
child: Row(
children: [
Expanded(
flex: 2,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
SvgPicture.asset("assets/icons/reset.svg", width: 120, height: 92),
25.height,
"استعادة كلمة المرور".toText(18, color: ColorConsts.darkText, fontFamily: false),
],
),
),
Expanded(
flex: 3,
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
padding: EdgeInsets.only(
top: 50,
bottom: 50,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
"يمكنك إعادة تعيين كلمة المرور عبر حساب بريدك الإلكتروني".toText(18, color: ColorConsts.grey9FColor, textAlign: TextAlign.center),
24.height,
CommonTextFieldWidget(hint: "البريد الإلكتروني المسجل", controller: _emailController, isEmail: true),
12.height,
_button,
_contactUs
],
),
),
),
],
),
),
)
],
),
).paddingOnly(left: 11, right: 11, bottom: 28),
Column(
mainAxisSize: MainAxisSize.min,
children: [
SvgPicture.asset("assets/icons/new/contact_us.svg", width: 26, height: 24, color: ColorConsts.greyC4Color),
8.height,
"اتصل بنا".toText(14, color: ColorConsts.greyC4Color),
],
).onPress(() {
Navigator.pushNamed(context, ContactUsScreen.routeName);
})
],
),
),
),
);
}
// void getOTP(String email) {
// showDialog(
// context: context,
// barrierColor: ColorConsts.secondaryWhite.withOpacity(0.8),
// builder: (BuildContext context) => OTPDialog(
// onOTP: (otp) => verifyOTP(email, otp),
// ),
// );
// }
//
// void changePassword(String email, int otp) {
// showDialog(
// context: context,
// barrierColor: ColorConsts.secondaryWhite.withOpacity(0.8),
// builder: (BuildContext context) => ChangePasswordDialog(
// onPassword: (password) => updatePassword(email, otp, password),
// ),
// );
// }
}

@ -61,7 +61,7 @@ class _MemberScreenState extends State<MemberScreen> {
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemCount: membersList.length,
padding: EdgeInsets.only(left: 25, right: 25, top: 25, bottom: isPortrait ? 125 : 25),
padding: EdgeInsets.only(left: 25, right: 25, top: isPortrait ? 25 : 50, bottom: isPortrait ? 125 : 25),
separatorBuilder: (context, index) {
return Divider(color: Color(0xffC7C7C7), height: 1, thickness: 1);
},
@ -128,7 +128,7 @@ class _MemberScreenState extends State<MemberScreen> {
)
: Row(
children: [
Expanded(child: SingleChildScrollView(physics: const AlwaysScrollableScrollPhysics(), child: _dataListView), flex: 6),
Expanded(child: SingleChildScrollView(physics: const BouncingScrollPhysics(), child: _dataListView), flex: 6),
Expanded(child: _header, flex: 4),
],
),

@ -207,7 +207,7 @@ class _QuranScreenState extends State<QuranScreen> {
_surahAya = _surahAya + "\n" + "$_currentPage";
// _surahAya = _surahAya + "\n" + "$_currentPage";
List<Widget> widList = [
List<Widget> filterList = [
"اقرأ القرآن الكريم".toText(30),
8.height,
"اختر السورة والآيات التي تريد قراءتها".toText(14),
@ -224,7 +224,7 @@ class _QuranScreenState extends State<QuranScreen> {
_toAyaList = [];
filterData();
}
}).paddingOnly(left: 41, right: 41),
}).paddingOnly(left: isPortrait ? 41 : 21, right: 41),
10.height,
Row(
children: [
@ -257,7 +257,7 @@ class _QuranScreenState extends State<QuranScreen> {
}),
),
],
).paddingOnly(left: 41, right: 41),
).paddingOnly(left: isPortrait ? 41 : 21, right: 41),
10.height,
commonIconButton(() {
if (_selectedSurah < 0) {
@ -274,7 +274,7 @@ class _QuranScreenState extends State<QuranScreen> {
return;
}
}
}).paddingOnly(left: 41, right: 41),
}).paddingOnly(left: isPortrait ? 41 : 21, right: 41),
];
Widget quranTextView = SingleChildScrollView(
@ -289,7 +289,7 @@ class _QuranScreenState extends State<QuranScreen> {
// }
Widget quranView = Container(
margin: EdgeInsets.only(top: 28, bottom: 14),
margin: EdgeInsets.only(top: isPortrait ? 28 : 14, bottom: 14),
padding: EdgeInsets.only(top: 16, bottom: 12, right: 16, left: 16),
decoration: BoxDecoration(
color: ColorConsts.brownLightECColor,
@ -310,7 +310,8 @@ class _QuranScreenState extends State<QuranScreen> {
: (value) {
_currentPage = _surahModel?.data?.singleWhere((element) => element.nameAR == value)?.startPageNo ?? _currentPage;
_clearFilterAndRefreshData();
}),
},
isPortrait),
nextOptionButton(
Icons.arrow_forward_ios_rounded,
_currentSurahIndex <= 0 ? "" : Utils.getNotNullValue(_surahList, _currentSurahIndex - 1) ?? "",
@ -319,17 +320,18 @@ class _QuranScreenState extends State<QuranScreen> {
: (value) {
_currentPage = _surahModel?.data?.elementAt(_surahList.indexOf(value))?.startPageNo ?? _currentPage;
_clearFilterAndRefreshData();
}),
},
isPortrait),
],
),
quranText(),
isPortrait ? quranText() : SingleChildScrollView(child: quranText()).expanded,
Row(
children: [
Column(
mainAxisSize: MainAxisSize.min,
children: [
SvgPicture.asset("assets/icons/new/dimension.svg", width: 12, color: ColorConsts.brownLightColor),
"ت".toText(12, color: ColorConsts.brownLightColor),
SvgPicture.asset("assets/icons/new/dimension.svg", width: isPortrait ? 12 : 16, color: ColorConsts.brownLightColor),
"ت".toText(isPortrait ? 12 : 16, color: ColorConsts.brownLightColor),
],
).onPress(() {
if (fontSize <= 12) {
@ -344,8 +346,8 @@ class _QuranScreenState extends State<QuranScreen> {
Column(
mainAxisSize: MainAxisSize.min,
children: [
SvgPicture.asset("assets/icons/new/dimension.svg", width: 16, color: ColorConsts.brownLightColor),
"ت".toText(16, color: ColorConsts.brownLightColor),
SvgPicture.asset("assets/icons/new/dimension.svg", width: isPortrait ? 16 : 18, color: ColorConsts.brownLightColor),
"ت".toText(isPortrait ? 16 : 18, color: ColorConsts.brownLightColor),
],
).onPress(() {
if (fontSize >= 36) {
@ -366,37 +368,38 @@ class _QuranScreenState extends State<QuranScreen> {
// if (MediaQuery.of(context).orientation == Orientation.portrait) {
// quranView = Expanded(child: quranView);
// }
List<Widget> finalViewList = <Widget>[] +
widList +
[
if (_surahAya.isNotEmpty && _surahAya.length > 2) ...[
quranView,
if (_selectedFromAya == -1 && _selectedToAya == -1)
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
previousOptionButton(
Icons.arrow_back_ios_rounded,
"الصفحة التالية",
_currentPage == 604
? null
: (value) {
_currentPage = _currentPage + 1;
_clearFilterAndRefreshData();
}),
nextOptionButton(
Icons.arrow_forward_ios_rounded,
"الصفحة السابقة",
_currentPage <= 1
? null
: (value) {
_currentPage = _currentPage - 1;
_clearFilterAndRefreshData();
}),
],
),
]
];
List<Widget> resultListView = [
if (_surahAya.isNotEmpty && _surahAya.length > 2) ...[
isPortrait ? quranView : quranView.expanded,
if (_selectedFromAya == -1 && _selectedToAya == -1)
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
previousOptionButton(
Icons.arrow_back_ios_rounded,
"الصفحة التالية",
_currentPage == 604
? null
: (value) {
_currentPage = _currentPage + 1;
_clearFilterAndRefreshData();
},
isPortrait),
nextOptionButton(
Icons.arrow_forward_ios_rounded,
"الصفحة السابقة",
_currentPage <= 1
? null
: (value) {
_currentPage = _currentPage - 1;
_clearFilterAndRefreshData();
},
isPortrait),
],
).paddingOnly(right: isPortrait ? 0 : 32),
]
];
List<Widget> finalViewList = <Widget>[] + filterList + resultListView;
var multiModeView;
// if (MediaQuery.of(context).orientation != Orientation.portrait) {
// multiModeView = Padding(
@ -423,19 +426,31 @@ class _QuranScreenState extends State<QuranScreen> {
return SizedBox(
width: double.infinity,
child: Stack(
alignment: isPortrait ? AlignmentDirectional.topStart : Alignment.centerRight,
children: [
SizedBox(
width: double.infinity,
height: isPortrait ? null : double.infinity,
child: AspectRatio(
aspectRatio: 375 / 345,
child: Image.asset(
"assets/icons/new/quran_bg.jpg",
fit: BoxFit.cover,
alignment: Alignment(-0.7, 0.5),
alignment: Alignment(isPortrait ? -0.3 : -0.75, 0.5),
),
),
),
multiModeView
isPortrait
? multiModeView
: Row(
children: [
Expanded(
child: Column(children: resultListView),
flex: 7,
),
Expanded(child: Column(mainAxisAlignment: MainAxisAlignment.center, children: filterList), flex: 5),
55.width,
],
).paddingAll(24),
],
),
);
@ -467,7 +482,7 @@ class _QuranScreenState extends State<QuranScreen> {
);
}
Widget nextOptionButton(IconData icon, String text, Function(String) onPressed) {
Widget nextOptionButton(IconData icon, String text, Function(String) onPressed, bool isPortrait) {
return InkWell(
onTap: () => onPressed(text),
child: onPressed == null
@ -476,8 +491,8 @@ class _QuranScreenState extends State<QuranScreen> {
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
text.toText(10, color: ColorConsts.greyA7Color),
Icon(icon, color: ColorConsts.greyA7Color, size: 10),
text.toText(isPortrait ? 10 : 14, color: ColorConsts.greyA7Color),
Icon(icon, color: ColorConsts.greyA7Color, size: isPortrait ? 10 : 14),
],
),
);
@ -517,7 +532,7 @@ class _QuranScreenState extends State<QuranScreen> {
);
}
Widget previousOptionButton(IconData icon, String text, Function(String) onPressed) {
Widget previousOptionButton(IconData icon, String text, Function(String) onPressed, bool isPortrait) {
return InkWell(
onTap: () => onPressed(text),
child: onPressed == null
@ -526,8 +541,8 @@ class _QuranScreenState extends State<QuranScreen> {
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
Icon(icon, color: ColorConsts.greyA7Color, size: 10),
text.toText(10, color: ColorConsts.greyA7Color),
Icon(icon, color: ColorConsts.greyA7Color, size: isPortrait ? 10 : 14),
text.toText(isPortrait ? 10 : 14, color: ColorConsts.greyA7Color),
],
),
);
@ -591,6 +606,92 @@ class _QuranScreenState extends State<QuranScreen> {
}
void showAyaOptions(AyaModelData ayaModelData) {
showDialog(
context: context,
barrierColor: ColorConsts.primaryBlack.withOpacity(0.5),
builder: (cxt) {
return Dialog(
insetPadding: EdgeInsets.symmetric(horizontal: 60.0, vertical: 24.0),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20),
),
elevation: 0,
backgroundColor: Colors.transparent,
child: Container(
margin: EdgeInsets.all(16),
width: MediaQuery.of(context).size.width * .3,
padding: EdgeInsets.symmetric(vertical: 24, horizontal: 24),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
"اختر".toText(18, isBold: true, color: ColorConsts.darkText, fontFamily: false),
18.height,
InkWell(
onTap: () async {
Navigator.pop(context);
List<AyatTangheemTypeMappedData> list = [];
list = await getTangheemBySurahId(ayaModelData.surahID, ayaModelData.numberInSurah);
if (list.isEmpty) {
Utils.showToast("لا توجد أساليب تنغيم في هذه الآية");
return;
}
List<String> tempList = list.map((element) => element.tangheemTypeName).toList().toSet().toList();
if (tempList.length > 1) {
_selectTangheemType(tempList, list);
return;
}
var name = list.firstWhere((element) => element.tangheemTypeName == tempList.first, orElse: null);
TangheemDetailParams tangheem = TangheemDetailParams(selectedTangheemTypeId: name?.ayaTangheemTypeId ?? "", ayatTangheemTypeMappedDataList: list);
Navigator.pushNamed(this.context, TangheemDetailScreen.routeName, arguments: tangheem);
},
child: Container(
width: double.infinity,
alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 12, horizontal: 12),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
border: Border.all(color: ColorConsts.brownLightColor, width: 1),
),
child: "تفاصيل الأساليب".toText(16, color: ColorConsts.darkText, fontFamily: false),
),
),
SizedBox(height: 8),
InkWell(
onTap: () {
Navigator.pop(context);
var temp = _bookMark.firstWhere((element) => element.ayahID == _selectedAyaForBookmark.ayahID, orElse: () => null);
if (temp != null) {
Utils.showToast("هذه الآية مضافة سابقا");
return;
}
_bookMark.add(_selectedAyaForBookmark);
BookMarkModel.saveToPrefs(_bookMark);
Utils.showToast("تم إضافة الآية كمرجع");
},
child: Container(
//width: double.infinity,
padding: EdgeInsets.symmetric(vertical: 12, horizontal: 12),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
border: Border.all(color: ColorConsts.brownLightColor, width: 1),
),
child: "إضافة الآية كمرجع".toText(16, color: ColorConsts.darkText, fontFamily: false),
),
),
],
),
),
);
});
return;
showModalBottomSheet(
context: context,
backgroundColor: Colors.transparent,

@ -95,7 +95,7 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
children: [
Padding(
padding: EdgeInsets.only(top: 35, bottom: 24),
child: SvgPicture.asset("assets/logos/tangheem_logo.svg", width: 72, height: 72),
child: SvgPicture.asset("assets/icons/regsiter_user.svg", width: 72, height: 72),
),
"انشاء حساب جديد".toText(18, color: ColorConsts.darkText),
],
@ -268,6 +268,7 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
Expanded(
child: SingleChildScrollView(
padding: EdgeInsets.all(24),
physics: const BouncingScrollPhysics(),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [

@ -476,6 +476,7 @@ class _TangheemDetailScreenState extends State<TangheemDetailScreen> {
Expanded(child: _header, flex: 4),
Expanded(
child: ListView(
physics: BouncingScrollPhysics(),
children: [
_dataListView,
_ayaPlayer,
@ -708,31 +709,49 @@ class _TangheemDetailScreenState extends State<TangheemDetailScreen> {
borderRadius: BorderRadius.circular(30),
onTap: () async {
if (!AppState().isUserLogin) {
Widget cancelButton = TextButton(
style: TextButton.styleFrom(backgroundColor: ColorConsts.sliderBackground, foregroundColor: ColorConsts.primaryBlack),
child: Text("أرغب بالتسجيل"),
onPressed: () async {
Navigator.pop(context);
await Navigator.pushNamed(context, LoginScreen.routeName);
if (!AppState().isUserLogin) {
return;
}
},
);
Widget continueButton = TextButton(
style: TextButton.styleFrom(backgroundColor: ColorConsts.sliderBackground, foregroundColor: ColorConsts.primaryBlack),
child: Text("استمرار كضيف"),
onPressed: () {
Navigator.pop(context);
Widget cancelButton = Container(
height: 40,
padding: EdgeInsets.only(left: 16, right: 16),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30),
color: ColorConsts.darkText,
),
child: "أرغب بالتسجيل".toText(14, fontFamily: false))
.onPress(() async {
Navigator.pop(context);
await Navigator.pushNamed(context, LoginScreen.routeName);
if (!AppState().isUserLogin) {
return;
},
);
}
});
Widget continueButton = Container(
height: 40,
padding: EdgeInsets.only(left: 16, right: 16),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30),
color: ColorConsts.darkText,
),
child: "استمرار كضيف".toText(14, fontFamily: false))
.onPress(() {
Navigator.pop(context);
return;
});
AlertDialog alert = AlertDialog(
content: Text("هذه الخاصية متاحه فقط للأعضاء المسجلين"),
content: "هذه الخاصية متاحه فقط للأعضاء المسجلين".toText(18, color: ColorConsts.darkText, isBold: true, fontFamily: false),
actionsAlignment: MainAxisAlignment.spaceEvenly,
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(24.0))),
actions: [
cancelButton,
continueButton,
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
cancelButton,
continueButton,
],
),
],
);
showDialog(

Loading…
Cancel
Save