final changes by client done.

development
Sikander Saleem 5 years ago
parent 47de629081
commit f94177e645

@ -158,60 +158,11 @@ class _CommonAppbarState extends State<CommonAppbar> {
right: false,
left: false,
maintainBottomViewPadding: true,
child: Column(
children: [
Container(
height: 100 + height,
padding: EdgeInsets.only(left: 0, top: height),
alignment: Alignment.centerLeft,
child: IconButton(
icon: Icon(Icons.clear, color: ColorConsts.textGrey),
onPressed: () {
if (_scaffoldKey.currentState.isDrawerOpen) {
Navigator.pop(context);
}
},
),
),
Container(
margin: EdgeInsets.only(top: 8, bottom: 16),
padding: EdgeInsets.only(left: 16, right: 16),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
commonIconButton("assets/icons/bookmark.svg", () {
Navigator.pushNamed(context, BookmarkScreen.routeName);
}),
commonIconButton("assets/icons/increase_size.svg", () {
if (fontSize >= 36) {
Utils.showToast("وصل حجم الخط إلى الحد الأقصى للحجم");
return;
}
fontSize += 2;
prefs.setInt(GlobalConsts.fontZoomSize, fontSize);
Utils.showToast("زيادة حجم الخط");
}),
commonIconButton("assets/icons/reduce_size.svg", () {
if (fontSize <= 12) {
Utils.showToast("وصل حجم الخط إلى الحد الأدنى للحجم");
return;
}
fontSize -= 2;
prefs.setInt(GlobalConsts.fontZoomSize, fontSize);
Utils.showToast("تم تقليل حجم الخط");
}),
commonIconButton("assets/icons/user_logged.svg", () {
if (AppState().isUserLogin) {
Utils.showToast("أنت بالفعل تسجيل الدخول");
return;
}
Navigator.pushNamed(context, LoginScreen.routeName);
}),
],
),
),
Expanded(
child: ListView.builder(
child: Builder(
builder: (context) {
bool isPortrait = MediaQuery.of(context).orientation == Orientation.portrait;
Widget listContents = ListView.builder(
shrinkWrap: true,
physics: BouncingScrollPhysics(),
padding: EdgeInsets.only(left: 24, right: 24),
itemCount: navigationList.length,
@ -261,8 +212,62 @@ class _CommonAppbarState extends State<CommonAppbar> {
)
],
);
});
if (isPortrait) {
listContents = Expanded(child: listContents);
}
List<Widget> list = [
Container(
height: 100 + height,
padding: EdgeInsets.only(left: 0, top: height),
alignment: Alignment.centerLeft,
child: IconButton(
icon: Icon(Icons.clear, color: ColorConsts.textGrey),
onPressed: () {
if (_scaffoldKey.currentState.isDrawerOpen) {
Navigator.pop(context);
}
},
),
),
Container(
margin: EdgeInsets.only(top: 8, bottom: 16),
padding: EdgeInsets.only(left: 16, right: 16),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
commonIconButton("assets/icons/bookmark.svg", () {
Navigator.pushNamed(context, BookmarkScreen.routeName);
}),
commonIconButton("assets/icons/increase_size.svg", () {
if (fontSize >= 36) {
Utils.showToast("وصل حجم الخط إلى الحد الأقصى للحجم");
return;
}
fontSize += 2;
prefs.setInt(GlobalConsts.fontZoomSize, fontSize);
Utils.showToast("زيادة حجم الخط");
}),
commonIconButton("assets/icons/reduce_size.svg", () {
if (fontSize <= 12) {
Utils.showToast("وصل حجم الخط إلى الحد الأدنى للحجم");
return;
}
fontSize -= 2;
prefs.setInt(GlobalConsts.fontZoomSize, fontSize);
Utils.showToast("تم تقليل حجم الخط");
}),
commonIconButton("assets/icons/user_logged.svg", () {
if (AppState().isUserLogin) {
Utils.showToast("أنت بالفعل تسجيل الدخول");
return;
}
Navigator.pushNamed(context, LoginScreen.routeName);
}),
],
),
),
listContents,
Container(
margin: EdgeInsets.only(top: 16, bottom: 12),
padding: EdgeInsets.only(left: 32, right: 32),
@ -292,7 +297,9 @@ class _CommonAppbarState extends State<CommonAppbar> {
],
),
)
],
];
return isPortrait ? Column(children: list) : ListView(children: list);
},
),
),
),

@ -57,9 +57,9 @@ class _ChangePasswordDialogState extends State<ChangePasswordDialog> {
style: TextStyle(color: Colors.white, fontSize: 22),
),
SizedBox(height: 16),
CommonTextFieldWidget(hint: "الايميل المسجل", controller: _passwordController, prefixIcon: "assets/icons/password.svg"),
CommonTextFieldWidget(hint: "كلمة المرور الجديدة", controller: _passwordController, prefixIcon: "assets/icons/password.svg"),
SizedBox(height: 8),
CommonTextFieldWidget(hint: "تأكيد كلمة المرور", controller: _confirmPasswordController, prefixIcon: "assets/icons/password.svg"),
CommonTextFieldWidget(hint: "تأكيد كلمة المرور الجديدة", controller: _confirmPasswordController, prefixIcon: "assets/icons/password.svg"),
SizedBox(height: 16),
SizedBox(
width: double.infinity,
@ -67,15 +67,15 @@ class _ChangePasswordDialogState extends State<ChangePasswordDialog> {
child: TextButton(
onPressed: () {
if (_passwordController.text.length < 1) {
Utils.showToast("كلمة المرور فارغة");
Utils.showToast("يرجى إاخال كلمة المرور");
return;
}
if (_confirmPasswordController.text.length < 1) {
Utils.showToast("تأكيد كلمة المرور فارغ");
Utils.showToast("يرجى تأكيد كلمة المرور");
return;
}
if (_passwordController.text != _confirmPasswordController.text) {
Utils.showToast("كلمة المرور خاطئة");
Utils.showToast("خطأ في تطابق كلمات المرور");
return;
}
widget.onPassword(_passwordController.text);
@ -89,7 +89,7 @@ class _ChangePasswordDialogState extends State<ChangePasswordDialog> {
borderRadius: BorderRadius.circular(6.0),
),
),
child: Text("تحديث"),
child: Text("إعادة تعيين كلمة المرور"),
),
),
],

@ -53,7 +53,7 @@ class _OTPDialogState extends State<OTPDialog> {
mainAxisSize: MainAxisSize.min,
children: [
Text(
"الرجاء ادخال الرقم المرسل إلى جوالك",
"الرجاء إدخال الرقم المرسل إلى جوالك",
textAlign: TextAlign.center,
style: TextStyle(color: Colors.white),
),
@ -91,7 +91,7 @@ class _OTPDialogState extends State<OTPDialog> {
child: TextButton(
onPressed: () {
if (otpMessage.length < 4) {
Utils.showToast("OTP غير صحيح");
Utils.showToast("الرقم الذي قمت بإدخاله غير صحيح");
return;
}
widget.onOTP(int.parse(otpMessage));

@ -76,7 +76,7 @@ class _BookmarkScreenState extends State<BookmarkScreen> {
onTap: () {
_bookMarkList.removeAt(index);
BookMarkModel.saveToPrefs(_bookMarkList);
Utils.showToast("تمت إزالة الإشارة المرجعية");
Utils.showToast("تم حذف المرجع");
setState(() {});
},
),

@ -33,7 +33,7 @@ class _ContactUsScreenState extends State<ContactUsScreen> {
Utils.showLoading(context);
try {
await TangheemUserApiClient().contactUs(_firstName, _lastName, _email, _phone, _description);
Utils.showToast("شكرا لك على مراسلتنا ، نحن نقدر كلماتك.");
Utils.showToast("تم إرسال الطلب بنجاح");
Utils.hideLoading(context);
Navigator.pop(context);
} catch (ex) {
@ -91,15 +91,15 @@ class _ContactUsScreenState extends State<ContactUsScreen> {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
CommonTextFieldWidget(hint: "الاسم الاول", controller: _firstNameController),
CommonTextFieldWidget(hint: "الاسم الأول", controller: _firstNameController),
SizedBox(height: 8),
CommonTextFieldWidget(hint: "اسم النهاية", controller: _lastNameController),
CommonTextFieldWidget(hint: "الاسم الأخير", controller: _lastNameController),
SizedBox(height: 8),
CommonTextFieldWidget(hint: "الايميل", controller: _emailController),
CommonTextFieldWidget(hint: "البريد الإلكتروني", controller: _emailController),
SizedBox(height: 8),
CommonTextFieldWidget(hint: " رقم الجوال${" (" + ("9xx") + " xxxxxxxxx)"}", controller: _mobileNumberController),
CommonTextFieldWidget(hint: " رقم الاتصال${" (" + ("9xx") + " xxxxxxxxx)"}", controller: _mobileNumberController),
SizedBox(height: 8),
CommonTextFieldWidget(hint: "اكتب لنا", controller: _descriptionController, maxLines: 4),
CommonTextFieldWidget(hint: "التفاصيل", controller: _descriptionController, maxLines: 4),
SizedBox(height: 12),
SizedBox(
width: double.infinity,
@ -107,27 +107,35 @@ class _ContactUsScreenState extends State<ContactUsScreen> {
child: TextButton(
onPressed: () {
if (_firstNameController.text.length < 1) {
Utils.showToast("الاسم الأول فارغ");
Utils.showToast("يرجى إدخال الاسم الأول");
return;
}
if (_lastNameController.text.length < 1) {
Utils.showToast("الاسم الأخير فارغ");
Utils.showToast("يرجى إدخال الاسم الأخير");
return;
}
if (_emailController.text.length < 1) {
Utils.showToast("البريد الإلكتروني فارغ");
Utils.showToast("يرجى إدخال البريد الإلكتروني");
return;
}
if (_mobileNumberController.text.length < 1) {
Utils.showToast("رقم الهاتف فارغ");
Utils.showToast("يرجى إدخال رقم الهاتف");
return;
}
if (_mobileNumberController.text.length != 12) {
Utils.showToast("صيغة الرقم غير صحيحة");
return;
}
if (_descriptionController.text.length < 1) {
Utils.showToast("يجب أن تكتب لنا كلمات قليلة");
Utils.showToast("يرجى إدخال التفاصيل");
return;
}
if (_descriptionController.text.trim().length < 1) {
Utils.showToast("يرجى إدخال التفاصيل");
return;
}
if (!_emailController.text.isValidEmail()) {
Utils.showToast("بريد إلكتروني خاطئ");
Utils.showToast("صيغة البريد الإلكتروني غير صحيحة");
return;
}
sendFeedback(_firstNameController.text, _lastNameController.text, _emailController.text, _mobileNumberController.text, _descriptionController.text);
@ -140,7 +148,7 @@ class _ContactUsScreenState extends State<ContactUsScreen> {
borderRadius: BorderRadius.circular(6.0),
),
),
child: Text("ارسل رأيك"),
child: Text("إرسال"),
),
),
],

@ -74,7 +74,7 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen> {
Utils.hideLoading(context);
}
Navigator.pop(context);
Utils.showToast("تم تغيير الرقم السري بنجاح");
Utils.showToast("تم تغيير كلمة المرور بنجاح");
Navigator.pop(context);
}
@ -115,7 +115,7 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen> {
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(height: 8),
CommonTextFieldWidget(hint: "الايميل المسجل", controller: _emailController, prefixIcon: "assets/icons/email.svg"),
CommonTextFieldWidget(hint: "البريد الإلكتروني المسجل", controller: _emailController, prefixIcon: "assets/icons/email.svg"),
SizedBox(height: 12),
SizedBox(
width: double.infinity,
@ -123,10 +123,10 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen> {
child: TextButton(
onPressed: () {
if (_emailController.text.length < 1) {
Utils.showToast("البريد الإلكتروني فارغ");
Utils.showToast("يرجى إدخال البريد الإلكتروني");
return;
} else if (!_emailController.text.isValidEmail()) {
Utils.showToast("بريد إلكتروني خاطئ");
Utils.showToast("صيغة البريد الإلكتروني خاطئة");
return;
}
forgotPassword(_emailController.text);
@ -139,7 +139,7 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen> {
borderRadius: BorderRadius.circular(6.0),
),
),
child: Text("اعادة تعيين كلمة المرور"),
child: Text("إعادة تعيين كلمة المرور"),
),
),
],

@ -86,7 +86,7 @@ class _HomeScreenState extends State<HomeScreen> {
mainAxisSize: MainAxisSize.min,
children: [
Text(
"موسوعةالأداء القرآني",
"موسوعة الأداء القرآني",
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20, color: ColorConsts.primaryBlue, height: 1),
),
SizedBox(height: 4),

@ -108,7 +108,7 @@ class _LoginScreenState extends State<LoginScreen> {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
CommonTextFieldWidget(hint: "الايميل المسجل", controller: _emailController, prefixIcon: "assets/icons/email.svg"),
CommonTextFieldWidget(hint: "البريد الإلكتروني", controller: _emailController, prefixIcon: "assets/icons/email.svg"),
SizedBox(height: 16),
CommonTextFieldWidget(hint: "كلمة المرور", controller: _passwordController, isPassword: true, prefixIcon: "assets/icons/password.svg"),
SizedBox(height: 16),
@ -118,14 +118,14 @@ class _LoginScreenState extends State<LoginScreen> {
child: TextButton(
onPressed: () {
if (_emailController.text.length < 1) {
Utils.showToast("البريد الإلكتروني فارغ");
Utils.showToast("يرجى إدخال البريد الإلكتروني");
return;
} else if (!_emailController.text.isValidEmail()) {
Utils.showToast("بريد إلكتروني خاطئ");
Utils.showToast("صيغة البريد الإلكتروني خاطئة");
return;
}
if (_passwordController.text.length < 1) {
Utils.showToast("كلمة المرور فارغة");
Utils.showToast("يرجى إدخال كلمة المرور");
return;
}
performLogin(_emailController.text, _passwordController.text);
@ -195,7 +195,7 @@ class _LoginScreenState extends State<LoginScreen> {
mainAxisSize: MainAxisSize.min,
children: [
Text(
"انشاء حساب جديد",
" حساب جديد",
style: TextStyle(fontSize: 14, color: Colors.white),
),
Icon(Icons.arrow_forward_ios, color: Colors.white, size: 12),

@ -197,16 +197,24 @@ class _QuranScreenState extends State<QuranScreen> {
_surahAya = _surahAya + "\n" + "$_currentPage";
return Container(
padding: EdgeInsets.fromLTRB(16, 24, 16, 0),
width: double.infinity,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
List<Widget> widList = [
Text(
"اقرأ القرآن الكريم",
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20, color: ColorConsts.primaryBlue, height: 1),
),
SizedBox(height: 4),
Text(
"قراءة وسماع آيات القرآن الكريم",
style: TextStyle(fontWeight: FontWeight.w600, fontSize: 16, color: ColorConsts.primaryBlue),
),
SizedBox(height: 4),
Text(
"اضغط الآية المرغوبة لمزيد من التفاصيل",
style: TextStyle(
fontSize: 12,
color: ColorConsts.primaryBlue,
),
),
SizedBox(height: 16),
Row(
children: [
@ -265,9 +273,20 @@ class _QuranScreenState extends State<QuranScreen> {
],
),
SizedBox(height: 16),
if (_surahAya.isNotEmpty)
Expanded(
child: Container(
];
Widget quranTextView = SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Padding(
padding: EdgeInsets.only(left: 4, right: 4),
child: quranText(),
),
);
if (MediaQuery.of(context).orientation == Orientation.portrait) {
quranTextView = Expanded(child: quranTextView);
}
Widget quranView = Container(
margin: EdgeInsets.only(top: 4, bottom: 4),
padding: EdgeInsets.only(top: 16, bottom: 4, right: 16, left: 16),
decoration: BoxDecoration(
@ -275,6 +294,7 @@ class _QuranScreenState extends State<QuranScreen> {
borderRadius: BorderRadius.circular(8),
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -299,15 +319,7 @@ class _QuranScreenState extends State<QuranScreen> {
}),
],
),
Expanded(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Padding(
padding: EdgeInsets.only(left: 4, right: 4),
child: quranText(),
),
),
),
quranTextView,
SizedBox(height: 4),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -334,11 +346,30 @@ class _QuranScreenState extends State<QuranScreen> {
),
],
),
);
if (MediaQuery.of(context).orientation == Orientation.portrait) {
quranView = Expanded(child: quranView);
}
List<Widget> finalViewList = <Widget>[] + widList + [if (_surahAya.isNotEmpty) quranView];
var multiModeView;
if (MediaQuery.of(context).orientation == Orientation.portrait) {
multiModeView = Padding(
padding: EdgeInsets.fromLTRB(16, 24, 16, 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: finalViewList,
),
),
],
),
);
} else {
multiModeView = ListView(
padding: EdgeInsets.fromLTRB(16, 24, 16, 0),
physics: BouncingScrollPhysics(),
children: finalViewList,
);
}
return SizedBox(width: double.infinity, child: multiModeView);
}
Widget commonIconButton(String title, String iconString, VoidCallback callback) {

@ -6,6 +6,7 @@ import 'package:tangheem/classes/colors.dart';
import 'package:tangheem/classes/utils.dart';
import 'package:tangheem/extensions/string_extensions.dart';
import 'package:tangheem/models/country_model.dart';
import 'package:tangheem/models/general_response_model.dart';
import 'package:tangheem/ui/bottom_sheets/country_selection_bottom_sheet.dart';
import 'package:tangheem/widgets/common_textfield_widget.dart';
@ -57,8 +58,13 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
void registerUser(String _firstName, String _lastName, String _email, String _password, String _countryCode, String _phone) async {
Utils.showLoading(context);
try {
await UserApiClient().registerUser(_firstName, _lastName, _email, _password, _countryCode, _phone);
Utils.showToast("تسجيل بنجاح");
GeneralResponseModel model = await UserApiClient().registerUser(_firstName, _lastName, _email, _password, _countryCode, _phone);
if(model.message == "UserRegistration Already Exists") {
Utils.showToast("البريد الإلكتروني مستخدم سابقا");
Utils.hideLoading(context);
return;
}
Utils.showToast("تم إنشاء الحساب بنجاح");
Utils.hideLoading(context);
Navigator.pop(context);
} catch (ex) {
@ -116,14 +122,14 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
CommonTextFieldWidget(hint: "الاسم الاول", controller: _firstNameController),
CommonTextFieldWidget(hint: "البريد الإلكتروني", controller: _emailController),
SizedBox(height: 8),
CommonTextFieldWidget(hint: "اسم النهاية", controller: _lastNameController),
CommonTextFieldWidget(hint: "الاسم الأول", controller: _firstNameController),
SizedBox(height: 8),
CommonTextFieldWidget(hint: "الايميل", controller: _emailController),
CommonTextFieldWidget(hint: "الاسم الأخير", controller: _lastNameController),
SizedBox(height: 8),
CommonTextFieldWidget(
hint: _selectedCountry?.countryNameAr ?? "البلد",
hint: _selectedCountry?.countryNameAr ?? "الدولة",
controller: null,
suffixWidget: Icon(Icons.keyboard_arrow_down, size: 18, color: ColorConsts.secondaryOrange),
onTap: () {
@ -169,46 +175,46 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
child: TextButton(
onPressed: () {
if (_firstNameController.text.length < 1) {
Utils.showToast("اسم المستخدم فارغ");
Utils.showToast("يرجى إدخال الاسم الأول");
return;
}
if (_lastNameController.text.length < 1) {
Utils.showToast("الاسم فارغ");
Utils.showToast("يرجى إدخال الاسم الأخير");
return;
}
if (_emailController.text.length < 1) {
Utils.showToast("البريد الإلكتروني فارغ");
Utils.showToast("يرجى إدخال البريد الإلكتروني");
return;
}
if (_selectedCountry?.countryCode == null) {
Utils.showToast("يجب عليك اختيار الدولة");
Utils.showToast("يرجى اختيار الدولة");
return;
}
if (_mobileNumberController.text.length < 1) {
Utils.showToast("رقم الهاتف فارغ");
Utils.showToast("يرجى إدخال رقم الجوال");
return;
}
if (_passwordController.text.length < 1) {
Utils.showToast("كلمة المرور فارغة");
Utils.showToast("يرجى إدخال كلمة المرور");
return;
}
if (_confirmPasswordController.text.length < 1) {
Utils.showToast("أدخل كلمة المرور نفسها للتأكيد");
Utils.showToast("يرجى تأكيد كلمة المرور");
return;
}
if (!_emailController.text.isValidEmail()) {
Utils.showToast("بريد إلكتروني خاطئ");
Utils.showToast("صيغة البريد الإلكتروني خاطئة");
return;
}
if (_passwordController.text != _confirmPasswordController.text) {
Utils.showToast("كلمات السر الخاصة بك غير صحيحة");
Utils.showToast("كلمة المرور غير متطابقة");
return;
}
if (!_isAccept) {
Utils.showToast("يجب عليك قبول البيان للمتابعة");
Utils.showToast("الرجاء الموافقة على سياسة الخصوصية");
return;
}
registerUser(

@ -47,6 +47,8 @@ class _TangheemDetailScreenState extends State<TangheemDetailScreen> {
AyatTangheemTypeMappedData _ayatTangheemTypeMappedFirstData;
DiscussionModel _discussionModel;
bool showAyaPlayer = false;
@override
void initState() {
super.initState();
@ -122,12 +124,17 @@ class _TangheemDetailScreenState extends State<TangheemDetailScreen> {
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.fromLTRB(16, 24, 16, 0),
padding: EdgeInsets.fromLTRB(16, 0, 16, 0),
width: double.infinity,
child: _ayatTangheemTypeMappedFirstData == null
? SizedBox()
: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: ListView(
physics: BouncingScrollPhysics(),
padding: EdgeInsets.only(bottom: 16, top: 16),
children: [
Text(
_ayatTangheemTypeMappedFirstData.tangheemTypeName ?? "",
@ -139,11 +146,6 @@ class _TangheemDetailScreenState extends State<TangheemDetailScreen> {
style: TextStyle(fontSize: 14, color: ColorConsts.textGrey, height: 1),
),
SizedBox(height: 8),
Expanded(
child: ListView(
physics: BouncingScrollPhysics(),
padding: EdgeInsets.only(bottom: 16),
children: [
Container(
margin: EdgeInsets.only(top: 4, bottom: 4),
padding: EdgeInsets.only(top: 8, bottom: 8, right: 4, left: 4),
@ -211,7 +213,7 @@ class _TangheemDetailScreenState extends State<TangheemDetailScreen> {
Row(
children: [
Text(
" جمله ${_ayatTangheemTypeMappedData.tangheemTypeName} $_tempTangheemIndexWord",
" جملة ${_ayatTangheemTypeMappedData.tangheemTypeName} $_tempTangheemIndexWord",
style: TextStyle(fontWeight: FontWeight.bold, color: Colors.white, backgroundColor: ColorConsts.primaryBlue),
),
Expanded(
@ -311,7 +313,38 @@ class _TangheemDetailScreenState extends State<TangheemDetailScreen> {
],
),
),
AyaPlayerWidget(surahName: _ayatTangheemTypeMappedFirstData?.surahNameAr ?? "", globalKey: _globalKey, voiceNoteList: voiceNoteList)
if (MediaQuery.of(context).orientation == Orientation.portrait)
AyaPlayerWidget(surahName: _ayatTangheemTypeMappedFirstData?.surahNameAr ?? "", globalKey: _globalKey, voiceNoteList: voiceNoteList),
if (MediaQuery.of(context).orientation == Orientation.landscape)
Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: 24,
margin: EdgeInsets.only(bottom: 8,top: 8),
// color: Colors.transparent,
child: TextButton(
onPressed: () {
setState(() {
showAyaPlayer = !showAyaPlayer;
});
},
child: Text(
showAyaPlayer ? "إخفاء التسجيلات" : "إظهار التسجيلات",
style: TextStyle(color: Colors.black87, fontSize: 12),
),
style: TextButton.styleFrom(
backgroundColor: ColorConsts.gradientOrange,
primary: ColorConsts.primaryBlue,
padding: EdgeInsets.only(top: 4, bottom: 4, right: 8, left: 8),
textStyle: TextStyle(color: Colors.white, fontSize: 12),
),
),
),
if (showAyaPlayer) AyaPlayerWidget(surahName: _ayatTangheemTypeMappedFirstData?.surahNameAr ?? "", globalKey: _globalKey, voiceNoteList: voiceNoteList),
],
)
],
),
);
@ -651,7 +684,7 @@ class _TangheemDetailScreenState extends State<TangheemDetailScreen> {
),
),
child: Text(
"أضافة تعليق",
"إضافة تعليق",
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14, color: Colors.white, height: 1.5),
),
),

@ -103,9 +103,11 @@ class _AyaPlayerWidgetState extends State<AyaPlayerWidget> {
),
padding: EdgeInsets.all(8),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Row(
children: [
if(widget.voiceNoteList.length>1)
PopupMenuButton(
padding: EdgeInsets.fromLTRB(4, 4, 0, 4),
onSelected: (int index) {

Loading…
Cancel
Save