fonts added, home screen structure change, ui changes

development-design-2.0
Sikander Saleem 3 years ago
parent 6be7eee060
commit d9bd5134c0

@ -53,23 +53,23 @@ android {
multiDexEnabled true
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
// signingConfigs {
// release {
// keyAlias keystoreProperties['keyAlias']
// keyPassword keystoreProperties['keyPassword']
// storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
// storePassword keystoreProperties['storePassword']
// }
// }
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
minifyEnabled true
shrinkResources true
signingConfig signingConfigs.release
}
// release {
// minifyEnabled true
// shrinkResources true
// signingConfig signingConfigs.release
// }
}
}

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="GPS" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<path style="fill: #38004d" class="cls-1"
d="m30,6.37V2c0-.66-.63-1.14-1.27-.96l-3.71,1.06c-5.56-2.55-12.44-.57-15.57,5.18-2.35.5-4.49,1.69-6.18,3.49-.38.4-.36,1.03.04,1.41s1.03.36,1.41-.04c6.17-6.53,17.27-2.18,17.27,6.87,0,7.45-7.88,12.25-14.48,8.95-.45-.23-.48-.14-3.52.73,0-3.56.07-3.58-.18-3.93-2.01-2.84-2.3-6.4-1.14-9.38.2-.51-.05-1.09-.57-1.29-.51-.2-1.09.05-1.29.57-1.39,3.56-1.02,7.69,1.18,10.99v4.37c0,.66.63,1.14,1.27.96l3.71-1.06c5.69,2.61,12.51.42,15.57-5.19,8.38-1.81,12.05-11.47,7.45-18.35Zm-6.49,16c2.26-7.73-3.57-15.36-11.5-15.37,3.01-4.01,8.3-5.03,12.47-2.95.45.23.48.14,3.52-.73,0,3.56-.07,3.58.18,3.93,3.71,5.24,1.54,12.8-4.67,15.11Z" />
<path style="fill: #38004d" class="cls-1"
d="m19,20h-2c-.55,0-1-.45-1-1s.45-1,1-1h2c.55,0,1,.45,1,1s-.45,1-1,1Z" />
<path style="fill: #38004d" class="cls-1"
d="m13,20h-2c-.55,0-1-.45-1-1s.45-1,1-1h2c.55,0,1,.45,1,1s-.45,1-1,1Z" />
<path style="fill: #38004d" class="cls-1"
d="m7,20h-2c-.55,0-1-.45-1-1s.45-1,1-1h2c.55,0,1,.45,1,1s-.45,1-1,1Z" />
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="Objects" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 142.43 169.7">
<path class="cls-2"
d="m21.99,157.07h109.69c.6,0,1.08.49,1.08,1.09v2.38c0,.6-.48,1.09-1.08,1.09H21.99c-6.77,0-12.31-5.58-12.31-12.4v-4.55c0,6.82,5.54,12.4,12.31,12.4Z"
style="fill: #90692a" />
<path class="cls-3"
d="m22.04,8.08h44.33c36.62,0,66.32,29.64,66.4,66.26.06,29.53.05,82.73-.23,82.73H22.04c-6.82,0-12.4-5.58-12.4-12.4V20.49c0-6.82,5.58-12.4,12.4-12.4Z"
style="fill: #b78438" />
<g>
<path class="cls-1"
d="m54.76,130.93c.8,0,1.2.4,1.2,1.2,0,.5-.1.84-.29,1.02s-.5.27-.92.27h-2.68c-.25,3.34-1.87,5.38-4.83,6.11-.99.24-2.14.37-3.46.37-2.64,0-4.66-.69-6.06-2.07-1.41-1.38-2.11-3.3-2.11-5.75v-4.01h2.55v3.5c0,3.9,1.92,5.84,5.76,5.84,2.01,0,3.45-.43,4.31-1.29s1.3-2.3,1.3-4.31v-19.31h2.55v18.44h2.68Z"
style="fill: #fff" />
<path class="cls-1"
d="m54.73,133.42c-.8,0-1.2-.4-1.2-1.2,0-.5.1-.84.29-1.02s.5-.27.92-.27h2.27c.86,0,1.43-.09,1.69-.28.5-.35.75-.99.75-1.9v-6.87h2.55v5.76c0,1.62.46,2.64,1.39,3.06.35.16.8.23,1.33.23.81,0,1.21.4,1.21,1.2,0,.5-.1.84-.29,1.02-.19.18-.47.27-.85.27-.72,0-1.36-.16-1.94-.48s-.99-.72-1.22-1.21c-.61,1.12-1.91,1.68-3.9,1.68h-2.99Zm2.39,4.88c0-.43.16-.81.47-1.12s.64-.47.97-.47c.54,0,.97.16,1.28.47.31.3.46.62.45.95,0,.55-.15.98-.46,1.29-.31.31-.63.47-.96.47s-.59-.04-.78-.12c-.19-.08-.36-.2-.51-.34-.31-.31-.47-.69-.47-1.12Zm3.9,0c0-.43.15-.81.46-1.12s.63-.47.96-.47c.55,0,.98.16,1.3.47.31.3.47.62.46.95,0,.55-.16.98-.47,1.29-.31.31-.64.47-.97.47s-.59-.04-.78-.12c-.19-.08-.35-.2-.5-.34-.31-.31-.46-.69-.46-1.12Z"
style="fill: #fff" />
<path class="cls-1"
d="m65.03,133.42h-.32c-.8,0-1.2-.39-1.2-1.17,0-.51.1-.86.29-1.04s.5-.28.92-.28h.26c.57,0,1.01-.13,1.32-.38.6-.49,1.06-1.3,1.39-2.45.62-2.14,1.57-3.72,2.87-4.75,1.01-.79,2.23-1.18,3.68-1.18s2.67.53,3.66,1.58c.99,1.05,1.48,2.42,1.48,4.11,0,.38-.02.76-.06,1.13.4,1.3,1.1,1.95,2.09,1.95.79,0,1.19.41,1.19,1.24,0,.48-.09.81-.28.99s-.49.26-.91.26c-1.24,0-2.18-.66-2.81-1.97-.89,1.58-2.43,2.36-4.63,2.36-1.8,0-3.65-.69-5.55-2.06-.66,1-1.46,1.54-2.4,1.62-.29.03-.62.04-1,.04Zm11.8-5.27c0-1.65-.57-2.72-1.68-3.24-.37-.17-.79-.25-1.25-.25-2.03,0-3.45,1.66-4.26,4.98,1.39,1.12,2.79,1.68,4.22,1.68,1.98,0,2.97-1.06,2.97-3.18Z"
style="fill: #fff" />
<path class="cls-1"
d="m97.74,130.93c.81,0,1.21.4,1.21,1.2,0,.5-.09.84-.28,1.02-.19.18-.49.27-.92.27h-16.34c-.8,0-1.2-.4-1.2-1.2,0-.5.1-.84.29-1.02.19-.18.5-.27.92-.27h12.05c0-2.41-.59-4.17-1.76-5.29s-2.71-1.67-4.63-1.67c-1.09,0-2.24.17-3.44.51v-2.38c1.29-.42,2.61-.62,3.96-.62s2.57.25,3.65.75c1.08.5,1.98,1.18,2.68,2.04,1.35,1.67,2.05,3.89,2.08,6.66h1.73Z"
style="fill: #fff" />
<path class="cls-1"
d="m97.74,133.42c-.8,0-1.2-.4-1.2-1.2,0-.5.1-.84.29-1.02.19-.18.5-.27.92-.27h4.58v-9.05h2.55v11.54h-7.13Zm2.01-16.59c0-.43.16-.81.47-1.12.3-.31.62-.47.95-.47.55,0,.98.16,1.29.47.31.3.47.62.47.95,0,.55-.16.98-.47,1.29s-.63.47-.96.47-.59-.04-.78-.12c-.19-.08-.36-.2-.5-.34-.31-.31-.47-.69-.47-1.12Zm3.9,0c0-.43.16-.81.47-1.12.3-.31.62-.47.95-.47.55,0,.98.16,1.29.47.31.3.47.62.47.95,0,.55-.16.98-.47,1.29s-.63.47-.96.47-.59-.04-.78-.12c-.19-.08-.36-.2-.5-.34-.31-.31-.47-.69-.47-1.12Z"
style="fill: #fff" />
</g>
<g>
<path class="cls-1"
d="m107.43,84.46l-15.56-7.26,15.56-7.26c1.8-.84,1.8-3.41,0-4.26l-20.12-9.39c-1.18-.54-2.57-.04-3.12,1.14s-.04,2.57,1.14,3.12l15.56,7.26-29.67,13.84-29.67-13.84,15.56-7.26c1.18-.55,1.68-1.95,1.14-3.12-.55-1.17-1.95-1.68-3.12-1.14l-20.12,9.39c-1.8.84-1.8,3.41,0,4.26l15.56,7.26-15.56,7.26c-1.8.84-1.81,3.41,0,4.26,10.78,5.02,10.28,4.89,11.02,4.89,2.51,0,3.26-3.42.99-4.48l-5.46-2.55,14.57-6.8c15.31,7.14,14.35,6.8,15.1,6.8s-.18.33,15.1-6.8l14.57,6.8-29.67,13.84-15.73-7.33c-1.18-.54-2.57-.04-3.12,1.14-.55,1.18-.04,2.57,1.14,3.12l16.72,7.8c.65.3,1.37.29,1.99,0l35.22-16.44c1.8-.84,1.8-3.41,0-4.26Z"
style="fill: #fff" />
<path class="cls-1"
d="m71.22,67.81c-.76,0,2.09,1.22-36.21-16.66-1.8-.84-1.8-3.41,0-4.26l35.22-16.44c.63-.29,1.36-.29,1.99,0l35.22,16.44c1.8.84,1.8,3.41,0,4.26-38.37,17.91-35.45,16.66-36.21,16.66Zm-29.67-18.78l29.67,13.84,29.67-13.84-29.67-13.84-29.67,13.84Z"
style="fill: #fff" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.3 KiB

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="GPS" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<path style="fill: #38004d" class="cls-1" d="m0,8C0,3.59,3.59,0,8,0,13.02,0,16.8,4.6,15.86,9.49c-.1.54-.63.89-1.17.79-.54-.1-.9-.63-.79-1.17.7-3.66-2.13-7.11-5.9-7.11-3.31,0-6,2.69-6,6,0,3.77,3.45,6.6,7.11,5.9.55-.1,1.07.25,1.17.79.1.54-.25,1.07-.79,1.17C4.59,16.8,0,13.02,0,8Z"/>
<path style="fill: #38004d" class="cls-1" d="m13.04,31.28l-2.62-9c-.15-.53.15-1.08.68-1.24.54-.16,1.09.15,1.24.68l1.83,6.28,3.91-9.38c.1-.24.29-.44.54-.54l9.38-3.91-19.53-5.7,2.7,9.25c.15.53-.15,1.08-.68,1.24-.54.16-1.09-.15-1.24-.68l-3.21-11c-.22-.75.48-1.46,1.24-1.24l24,7c.9.26.97,1.52.1,1.88l-11.62,4.84-4.84,11.62c-.36.87-1.62.8-1.88-.1Z"/>
</svg>

After

Width:  |  Height:  |  Size: 746 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="GPS" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<path style="fill: #38004d" class="cls-1"
d="m16,5c-.55,0-1-.45-1-1V1c0-.55.45-1,1-1s1,.45,1,1v3c0,.55-.45,1-1,1Z" />
<path style="fill: #38004d" class="cls-1"
d="m7.51,8.51c-.55,0-.57-.15-2.83-2.41-.39-.39-.39-1.02,0-1.41s1.02-.39,1.41,0l2.12,2.12c.63.63.17,1.71-.71,1.71Z" />
<path style="fill: #38004d" class="cls-1"
d="m4,17H1c-.55,0-1-.45-1-1s.45-1,1-1h3c.55,0,1,.45,1,1s-.45,1-1,1Z" />
<path style="fill: #38004d" class="cls-1"
d="m5.39,27.61c-.88,0-1.34-1.07-.71-1.71l2.12-2.12c.39-.39,1.02-.39,1.41,0s.39,1.02,0,1.41c-2.3,2.3-2.28,2.41-2.83,2.41Z" />
<path style="fill: #38004d" class="cls-1"
d="m26.61,27.61c-.55,0-.57-.15-2.83-2.41-.39-.39-.39-1.02,0-1.41s1.02-.39,1.41,0l2.12,2.12c.63.63.17,1.71-.71,1.71Z" />
<path style="fill: #38004d" class="cls-1"
d="m31,17h-3c-.55,0-1-.45-1-1s.45-1,1-1h3c.55,0,1,.45,1,1s-.45,1-1,1Z" />
<path style="fill: #38004d" class="cls-1"
d="m24.49,8.51c-.88,0-1.34-1.07-.71-1.71l2.12-2.12c.39-.39,1.02-.39,1.41,0s.39,1.02,0,1.41c-2.3,2.3-2.28,2.41-2.83,2.41Z" />
<path style="fill: #38004d" class="cls-1"
d="m16.99,7.05c-3.63-.39-7.1,1.41-8.86,4.58-.27.48-.09,1.09.39,1.36.48.27,1.09.09,1.36-.39,1.37-2.47,4.08-3.87,6.9-3.57,5.59.6,8.33,7.45,4.35,11.72-1.46,1.56-2.46,3.34-2.93,5.23h-1.19v-6h1c.55,0,1-.45,1-1s-.45-1-1-1h-4c-.55,0-1,.45-1,1s.45,1,1,1h1v6h-1.18c-.46-1.89-1.45-3.67-2.88-5.17-1.25-1.31-1.94-3.03-1.94-4.83,0-.55-.45-1-1-1s-1,.45-1,1c0,2.32.89,4.53,2.49,6.21,1.33,1.39,2.19,3.05,2.51,4.89v.89c0,2.21,1.79,4,4,4s4-1.79,4-4v-.92c.29-1.76,1.17-3.43,2.59-4.95,5.09-5.47,1.62-14.3-5.6-15.08Zm-.99,22.95c-1.1,0-2-.9-2-2h4c0,1.1-.9,2-2,2Z" />
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="GPS" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<path class="cls-1"
d="m31.09,26.67l-5.67-5.67c-.78-.78-2.05-.78-2.83,0l-.09.09-1.35-1.35C27.74,11.97,22.17,0,12,0,5.38,0,0,5.38,0,12,0,16.98,3,21.37,7.64,23.18c.52.2,1.09-.05,1.3-.57.2-.51-.05-1.09-.57-1.29-3.87-1.51-6.36-5.17-6.36-9.32C2,6.49,6.49,2,12,2s10,4.49,10,10-4.49,10-10,10c-.55,0-1,.45-1,1s.45,1,1,1c2.95,0,5.65-1.07,7.74-2.85l1.35,1.35-.09.09c-.78.78-.78,2.05,0,2.83l5.67,5.67c.59.59,1.37.91,2.21.91,2.76,0,4.17-3.37,2.21-5.33Zm-2.21,3.33c-.3,0-.58-.12-.79-.33l-5.67-5.67,1.59-1.59,5.67,5.67c.7.7.21,1.91-.79,1.91Z"
style="fill: #38004d" />
<circle class="cls-2" cx="12" cy="12.11" r="6" style=" fill: none;
stroke: #37134c;
stroke-miterlimit: 10;
stroke-width: 2px;" />
</svg>

After

Width:  |  Height:  |  Size: 855 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.3 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.3 KiB

@ -1,6 +1,7 @@
import 'package:firebase_analytics/firebase_analytics.dart';
import 'package:tangheem/models/authentication_user_model.dart';
import 'package:tangheem/models/content_info_model.dart';
import 'package:tangheem/models/member_model.dart';
import 'package:tangheem/models/navigation_model.dart';
import 'package:tangheem/models/surah_model.dart';
@ -64,4 +65,10 @@ class AppState {
void setAnalytics(FirebaseAnalytics _analytics) {
this._analytics = _analytics;
}
List<MemberDataModel> membersList;
List<ContentInfoDataModel> haqooqAlMosasa;
List<ContentInfoDataModel> tareefAlMosasa;
}

@ -20,4 +20,22 @@ class ColorConsts {
static const Color textHintGrey = Color(0xffcccccc);
static const Color sliderBackground = Color(0xffdfdfdf);
static const Color darkText = Color(0xff416A6C);
static const Color borderDarkText = Color(0xff03A67B);
static const Color borderDark2Text = Color(0xff2CB9B0);
static const Color borderColor = Color(0xffDDDDDD);
static const Color brownColor = Color(0xffDAE8646);
static const Color brownLightColor = Color(0xffAE8646);
static const Color greyLightColor = Color(0xffB7B7B7);
static const Color greyHintColor = Color(0xffD1D1D1);
static const Color grey9FColor = Color(0xff9F9F9F);
static const Color greyF4Color = Color(0xffF4F4F4);
static const Color greyF8Color = Color(0xffF8F8F8);
static const Color greyC4Color = Color(0xffC4C4C4);
static const Color redLightColor = Color(0xffED9696);
}

@ -0,0 +1,14 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
extension IntExtensions on int {
Widget get height => SizedBox(height: toDouble());
Widget get width => SizedBox(width: toDouble());
//Widget get divider => Divider(height: toDouble(), thickness: toDouble(), color: MyColors.lightGreyEFColor);
Widget get makeItSquare => SizedBox(width: toDouble(), height: toDouble());
}

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
extension EmailValidator on String {
extension StringExtension on String {
bool isValidEmail() {
return RegExp(r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$').hasMatch(this);
}
@ -40,4 +41,21 @@ extension EmailValidator on String {
return "December";
}
}
Widget toText(double fontSize, {Color color, bool isBold = false, int maxLines, FontStyle fontStyle, TextAlign textAlign}) {
double heightVal = (fontSize == 13) ? 16 : ((fontSize == 18) ? 22 : 14);
return Text(
this,
maxLines: maxLines,
textAlign: textAlign,
style: TextStyle(
fontSize: fontSize ?? 14,
fontStyle: fontStyle ?? FontStyle.normal,
fontWeight: isBold ? FontWeight.bold : FontWeight.w400,
color: color ?? Colors.white,
fontFamily: "Montserrat",
height: heightVal / fontSize,
),
);
}
}

@ -0,0 +1,35 @@
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
extension WidgetExtensions on Widget {
Widget onPress(VoidCallback onTap) => InkWell(onTap: onTap, child: this);
Widget get expanded => Expanded(child: this);
Widget get center => Center(child: this);
Widget circle(double _value) => ClipRRect(borderRadius: BorderRadius.circular(_value), child: this);
Widget paddingAll(double _value) => Padding(padding: EdgeInsets.all(_value), child: this);
Widget paddingOnly({double left = 0.0, double right = 0.0, double top = 0.0, double bottom = 0.0}) =>
Padding(padding: EdgeInsets.only(left: left, right: right, top: top, bottom: bottom), child: this);
Widget toExpanded({int flex = 1}) => Expanded(flex: flex, child: this);
// Widget toShimmer({bool isShow = true}) => isShow
// ? Shimmer.fromColors(
// baseColor: Color(0xffe8eff0),
// highlightColor: Colors.white,
// child: Container(
// color: Colors.white,
// child: this,
// ),
// )
// : Container(
// child: this,
// );
}

@ -5,6 +5,7 @@ import 'package:firebase_analytics/observer.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:tangheem/new_ui/common_home_parent.dart';
import 'package:tangheem/ui/screens/bookmark_screen.dart';
import 'package:tangheem/ui/screens/contact_us_screen.dart';
import 'package:tangheem/ui/screens/content_info_screen.dart';
@ -14,7 +15,7 @@ import 'package:tangheem/ui/screens/pdf_viewer_screen.dart';
import 'classes/colors.dart';
import 'ui/common_appbar.dart';
import 'ui/screens/forgot_password_screen.dart';
import 'ui/screens/home_screen.dart';
import 'new_ui/screens/home_screen.dart';
import 'ui/screens/login_screen.dart';
import 'ui/screens/quran_screen.dart';
@ -53,7 +54,7 @@ class Application extends StatelessWidget {
className = CommonAppbar(child: ForgotPasswordScreen());
break;
case HomeScreen.routeName:
className = CommonAppbar(showDrawer: true, child: HomeScreen(analytics));
className = CommonHomeParent();
break;
case ContactUsScreen.routeName:
className = CommonAppbar(child: ContactUsScreen());
@ -124,7 +125,7 @@ class Application extends StatelessWidget {
ThemeData lightTheme() {
return ThemeData(
fontFamily: 'DroidKufi',
fontFamily: 'HelveticaNeue',
brightness: Brightness.light,
backgroundColor: ColorConsts.secondaryWhite,
primarySwatch: Colors.blue,

@ -0,0 +1,690 @@
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:tangheem/api/tangheem_user_api_client.dart';
import 'package:tangheem/api/user_api_client.dart';
import 'package:tangheem/app_state/app_state.dart';
import 'package:tangheem/classes/colors.dart';
import 'package:tangheem/classes/consts.dart';
import 'package:tangheem/classes/utils.dart';
import 'package:tangheem/extensions/string_extensions.dart';
import 'package:tangheem/extensions/widget_extensions.dart';
import 'package:tangheem/models/authentication_user_model.dart';
import 'package:tangheem/models/content_info_model.dart';
import 'package:tangheem/models/navigation_model.dart';
import 'package:tangheem/models/quick_links_model.dart';
import 'package:tangheem/new_ui/screens/about_screen.dart';
import 'package:tangheem/ui/dialogs/change_password_dialog.dart';
import 'package:tangheem/ui/dialogs/general_dialog.dart';
import 'package:tangheem/ui/screens/bookmark_screen.dart';
import 'package:tangheem/ui/screens/content_info_screen.dart';
import 'package:tangheem/new_ui/screens/home_screen.dart';
import 'package:tangheem/ui/screens/login_screen.dart';
import 'package:tangheem/ui/screens/member_screen.dart';
import 'package:tangheem/ui/screens/pdf_viewer_screen.dart';
import 'package:tangheem/ui/screens/quran_screen.dart';
import 'package:tangheem/widgets/video_player_widget.dart';
import 'package:url_launcher/url_launcher.dart';
class CommonHomeParent extends StatefulWidget {
CommonHomeParent({Key key}) : super(key: key);
@override
_CommonHomeParentState createState() {
return _CommonHomeParentState();
}
}
class _CommonHomeParentState extends State<CommonHomeParent> {
int index = 0;
SharedPreferences prefs;
List<Widget> screens = [
HomeScreen(),
AboutScreen(),
QuranScreen(),
ContentInfoScreen(contentId: 2),
MemberScreen(),
PdfListScreen(),
];
@override
void initState() {
super.initState();
}
@override
void dispose() {
super.dispose();
}
void checkScreenMode() {
WidgetsBinding.instance.addPostFrameCallback((_) async {
if (MediaQuery.of(context).orientation == Orientation.portrait) {
await showDialog(
context: context,
barrierColor: ColorConsts.secondaryWhite.withOpacity(0.8),
builder: (BuildContext context) => GeneralDialog(),
);
}
showWelcomeVideoDialog();
});
}
void showWelcomeVideoDialog() async {
prefs = await SharedPreferences.getInstance();
String permLink = "-PqP0BCiTlE";
String link = prefs.getString(GlobalConsts.welcomeVideoUrl) ?? permLink;
if (permLink == link) {
await prefs.setString(GlobalConsts.welcomeVideoUrl, permLink);
bool showDialog = prefs.getBool(GlobalConsts.doNotShowWelcomeVideo) ?? false;
if (showDialog) {
return;
}
} else {
await prefs.setString(GlobalConsts.welcomeVideoUrl, permLink);
}
await prefs.setBool(GlobalConsts.doNotShowWelcomeVideo, false);
showDialog(
context: context,
barrierColor: ColorConsts.secondaryWhite.withOpacity(0.8),
builder: (BuildContext context) => VideoPlayerWidget(permLink),
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color(0xffF4F4F4),
body: SafeArea(
bottom: true,
left: false,
top: false,
right: false,
child: Stack(
children: [
screens[index],
Align(
alignment: Alignment.bottomCenter,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
height: 58,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(29.0),
color: Colors.white,
border: Border.all(color: ColorConsts.borderColor, width: 1),
),
padding: EdgeInsets.only(left: 30, right: 30),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [for (int i = 0; i < icons.length; i++) getBottomNavigationItem(i)],
),
),
Container(
height: 26,
margin: EdgeInsets.only(top: 16),
padding: EdgeInsets.only(right: 16, left: 12),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(29.0),
color: ColorConsts.brownLightColor,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Icon(Icons.play_arrow_outlined, size: 20, color: Colors.white),
"تصفح وتحميل الموسوعة".toText(13),
],
),
).onPress(() {
if (index != 5)
setState(() {
index = 5;
});
}),
],
).paddingOnly(left: 16, right: 16, bottom: 16),
),
],
),
),
);
}
List<String> icons = [
"assets/icons/new/home.svg",
"assets/icons/new/intro.svg",
"assets/icons/new/quran.svg",
"assets/icons/new/search.svg",
"assets/icons/new/search.svg",
];
List<double> sizes = [26, 26, 36, 26, 26];
Widget getBottomNavigationItem(int _index) {
return Column(
mainAxisSize: MainAxisSize.min,
children: [
SvgPicture.asset(
icons[_index],
width: sizes[_index],
height: sizes[_index],
color: index == _index ? ColorConsts.brownColor : ColorConsts.darkText,
).expanded,
if (index == _index)
Container(
height: 3,
color: ColorConsts.brownColor,
width: sizes[_index],
),
],
).onPress(() {
if (index != _index)
setState(() {
index = _index;
});
});
}
}
//
// class CommonHomeParent extends StatefulWidget {
// final bool showDrawer;
// final Widget child;
// final bool isFirst;
//
// CommonHomeParent({Key key, this.showDrawer = false, @required this.child, this.isFirst = false}) : super(key: key);
//
// @override
// _CommonHomeParentState createState() {
// return _CommonHomeParentState();
// }
// }
//
// class _CommonHomeParentState extends State<CommonHomeParent> {
// // final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>();
// // List<QuickLinksData> quickLinks = [];
// // List<NavigationDataModel> navigationList = [];
// // ContentInfoDataModel _userCopyRight;
//
// @override
// void initState() {
// super.initState();
// // getPrefs();
// // getNavigation();
// // getQuickLinks();
// // getCopyRight();
// }
//
// // void getCopyRight() async {
// // if (AppState().getCopyRightContentInfoModel == null) {
// // try {
// // ContentInfoModel _userCopyRight = await TangheemUserApiClient().getContentInfo(3);
// // this._userCopyRight = _userCopyRight.data.first;
// // AppState().setCopyRightContentInfoModel(this._userCopyRight);
// // } catch (ex) {}
// // } else {
// // _userCopyRight = AppState().getCopyRightContentInfoModel;
// // }
// // setState(() {});
// // }
// //
// // void getNavigation() async {
// // if (AppState().getNavigationModel?.data == null) {
// // try {
// // var model = await TangheemUserApiClient().getNavigation();
// // navigationList = model?.data ?? [];
// // navigationList.removeWhere((element) => element.navigationId == 9); // this is for temporary, to release app on app store as file size are about 100 mbs
// // navigationList.sort((a, b) => a.orderNo.compareTo(b.orderNo));
// // AppState().setNavigationModel(model);
// // } catch (ex) {}
// // } else {
// // navigationList = AppState().getNavigationModel.data;
// // }
// // setState(() {});
// // }
// //
// // void getQuickLinks() async {
// // if (widget.showDrawer) {
// // try {
// // quickLinks = (await TangheemUserApiClient().quickLinks())?.data ?? [];
// // quickLinks = quickLinks.where((element) => element.position == "down").toList();
// // quickLinks.sort((a, b) => a.orderNo.compareTo(b.orderNo));
// // } catch (ex) {}
// // setState(() {});
// // }
// // }
// //
// // int fontSize;
// // SharedPreferences prefs;
// //
// // void getPrefs() async {
// // prefs = await SharedPreferences.getInstance();
// // fontSize = prefs.getInt(GlobalConsts.fontZoomSize) ?? 18;
// // String userAuth = prefs.getString(GlobalConsts.userAuthData);
// // if (userAuth != null) {
// // AuthenticationUserModel authenticationUserModel = AuthenticationUserModel.fromJson(jsonDecode(userAuth));
// // AppState().setAuthenticationModel(authenticationUserModel);
// // }
// // }
//
// // void deleteUserAccount() async {
// // Utils.showLoading(context);
// // try {
// // await UserApiClient().deleteAccount(AppState().userId);
// // SharedPreferences prefs = await SharedPreferences.getInstance();
// // await prefs.remove(GlobalConsts.userAuthData);
// // AppState().setAuthenticationModel(null);
// // Utils.showToast("تم حذف الحساب");
// // Navigator.pop(context);
// // Utils.hideLoading(context);
// // } catch (ex) {
// // if (mounted) {
// // Utils.hideLoading(context);
// // Utils.handleException(ex, null);
// // }
// // }
// // }
//
// @override
// void dispose() {
// super.dispose();
// }
//
// @override
// Widget build(BuildContext context) {
//
// return Scaffold(
// key: widget.showDrawer ? _scaffoldKey : null,
// drawer: widget.showDrawer ? drawerView() : null,
// resizeToAvoidBottomInset: true,
// drawerScrimColor: Colors.black.withOpacity(.3),
// body: SafeArea(
// child: Column(
// children: [
// Container(
// color: Colors.white,
// height: 100,
// padding: EdgeInsets.only(top: 8, bottom: 8, right: 16),
// child: Row(
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// if (!widget.isFirst)
// IconButton(
// icon: Icon(widget.showDrawer ? Icons.menu : Icons.arrow_back_ios, color: ColorConsts.textGrey),
// padding: EdgeInsets.only(left: 16),
// onPressed: () {
// if (widget.showDrawer) {
// _scaffoldKey.currentState.openDrawer();
// } else {
// Navigator.pop(context);
// }
// },
// ),
// if (!widget.showDrawer)
// IconButton(
// icon: Icon(Icons.home, color: ColorConsts.textGrey),
// padding: EdgeInsets.only(left: 16),
// onPressed: () {
// Navigator.popUntil(context, ModalRoute.withName(HomeScreen.routeName));
// },
// ),
// Expanded(child: SizedBox()),
// Hero(
// tag: "logo",
// child: SvgPicture.asset(
// "assets/logos/tangheem_logo.svg",
// height: 100,
// width: 100,
// alignment: Alignment.centerRight,
// ),
// )
// ],
// ),
// ),
// Expanded(
// child: Directionality(textDirection: TextDirection.rtl, child: widget.child),
// ),
// ],
// ),
// ),
// );
// }
//
// void updatePassword(String email, String oldPassword, String password) async {
// Utils.showLoading(context);
// try {
// await UserApiClient().updatePassword(email, oldPassword, password);
// } catch (ex) {
// if (mounted) Utils.handleException(ex, null);
// Utils.hideLoading(context);
// return;
// } finally {
// Utils.hideLoading(context);
// }
// SharedPreferences prefs = await SharedPreferences.getInstance();
// await prefs.remove(GlobalConsts.userAuthData);
// AppState().setAuthenticationModel(null);
// await showDialog(
// context: context,
// barrierColor: ColorConsts.secondaryWhite.withOpacity(0.8),
// builder: (BuildContext context) => GeneralDialog(message: "تم تغيير كلمة المرور بنجاح , الرجاء إعادة تسجيل الدخول من خلال الرابط المرسل إلى بريدك الإلكتروني"),
// );
// Navigator.pop(context);
// }
//
// Widget drawerView() {
// var height = MediaQuery.of(context).padding.top;
// return Drawer(
// elevation: 0,
// child: Container(
// color: Colors.white,
// child: SafeArea(
// bottom: true,
// top: false,
// right: false,
// left: false,
// maintainBottomViewPadding: true,
// 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,
// itemBuilder: (context, index) {
// String icon = "assets/icons/${navigationList[index].mobileFontIcon}.svg";
// var subList = navigationList.where((element) => element.parentId == navigationList[index].navigationId).toList();
// return Column(
// mainAxisSize: MainAxisSize.min,
// children: [
// if (navigationList[index].parentId == 1)
// myListItem(icon, navigationList[index].navigationText, navigationList[index].orderNo == 1 ? true : false, onTap: () {
// String url = navigationList[index]?.mobileNavigationUrl ?? "";
// if (url.isEmpty || url.length < 2) {
// return;
// }
// Navigator.pushNamed(context, url, arguments: null);
// }),
// for (var subItem in subList)
// Container(
// width: double.infinity,
// child: Row(
// children: [
// Expanded(
// child: myListItem("assets/icons/${subItem.mobileFontIcon}.svg", subItem.navigationText, false, onTap: () {
// String url = subItem.mobileNavigationUrl ?? "";
// if (url.isEmpty) {
// return;
// }
// var contentId;
// if (subItem.mobileNavigationUrl == "/introduction") {
// url = ContentInfoScreen.routeName;
// contentId = 2;
// } else if (subItem.mobileNavigationUrl == "/encyclopedia") {
// url = ContentInfoScreen.routeName;
// contentId = 1;
// } else if (subItem.mobileNavigationUrl == "/tangheempdf") {
// url = PdfListScreen.routeName;
// contentId = 8;
// }
// Navigator.pushNamed(context, url, arguments: contentId);
// }),
// ),
// Container(
// height: 40,
// margin: EdgeInsets.only(right: 17, left: 10),
// child: VerticalDivider(color: ColorConsts.primaryBlack, thickness: .7, width: 1),
// ),
// ],
// ),
// )
// ],
// );
// });
// 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);
// }),
// if (AppState().isUserLogin)
// Expanded(
// child: PopupMenuButton(
// padding: EdgeInsets.fromLTRB(0, 0, 0, 0),
// onSelected: (int index) async {
// if (index == 0) {
// Navigator.pop(context);
// Future.delayed(Duration(milliseconds: 200), () {
// showDialog(
// context: context,
// barrierColor: ColorConsts.secondaryWhite.withOpacity(0.8),
// builder: (BuildContext context) => ChangePasswordDialog(
// onPassword: (oldPassword, password) => updatePassword(AppState().userEmail, oldPassword, password),
// ),
// );
// });
// } else if (index == 1) {
// SharedPreferences prefs = await SharedPreferences.getInstance();
// await prefs.remove(GlobalConsts.userAuthData);
// AppState().setAuthenticationModel(null);
// Utils.showToast("تسجيل خروج المستخدم");
// Navigator.pop(context);
// } else {
// await showDialog(
// context: context,
// barrierColor: ColorConsts.secondaryWhite.withOpacity(0.8),
// builder: (BuildContext context) => GeneralDialog(
// message: 'بحذف حسابك ، ستتم إزالة بياناتك ولن تتمكن من استرداد حسابك. \ n انقر فوق "نعم" لحذف حسابك.',
// onTap: () {
// Navigator.pop(context);
// deleteUserAccount();
// },
// showCancelButton: true,
// ),
// );
// }
// },
// icon: SvgPicture.asset("assets/icons/fa_key.svg", height: 25, width: 30, color: ColorConsts.textGrey1),
// itemBuilder: (_) => <PopupMenuItem<int>>[
// PopupMenuItem(
// value: 0,
// padding: EdgeInsets.fromLTRB(4, 0, 4, 0),
// height: 36,
// child: Center(
// child: Text(
// 'تغيير كلمة المرور',
// style: TextStyle(color: ColorConsts.primaryBlack, fontSize: 16),
// ),
// ),
// ),
// PopupMenuItem(
// value: 1,
// padding: EdgeInsets.fromLTRB(4, 0, 4, 0),
// height: 36,
// child: Center(
// child: Text(
// 'تسجيل خروج',
// style: TextStyle(color: ColorConsts.primaryBlack, fontSize: 16),
// ),
// ),
// ),
// PopupMenuItem(
// value: 2,
// padding: EdgeInsets.fromLTRB(4, 0, 4, 0),
// height: 36,
// child: Center(
// child: Text(
// 'حذف الحساب',
// style: TextStyle(color: ColorConsts.primaryBlack, fontSize: 16),
// ),
// ),
// ),
// ]),
// ),
// ],
// ),
// ),
// listContents,
// Container(
// margin: EdgeInsets.only(top: 16, bottom: 12),
// padding: EdgeInsets.only(left: 32, right: 32),
// child: Row(
// children: [
// for (QuickLinksData _quickLink in quickLinks)
// commonIconButton(ApiConsts.baseUrl + _quickLink.exposeFilePath, () {
// //for live production server
// // commonIconButton( _quickLink.exposeFilePath, () {
// _launchURL(_quickLink.imageUrl);
// }, size: 35, isAsset: false),
// ],
// ),
// ),
// Padding(
// padding: EdgeInsets.only(left: 32, right: 32, bottom: 8),
// child: Column(
// mainAxisSize: MainAxisSize.min,
// children: [
// if (_userCopyRight != null) ...[
// Row(
// crossAxisAlignment: CrossAxisAlignment.center,
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// Text(
// _userCopyRight.content,
// maxLines: 1,
// textAlign: TextAlign.right,
// style: TextStyle(fontSize: 12, color: Colors.black87),
// ),
// SizedBox(width: 8),
// Image.network(ApiConsts.baseUrl + _userCopyRight.exposeFilePath, height: 25, width: 30)
// ],
// ),
// SizedBox(height: 8),
// ],
// Row(
// crossAxisAlignment: CrossAxisAlignment.center,
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// Text(
// "Powered by Cloud Solutions",
// maxLines: 1,
// textAlign: TextAlign.right,
// style: TextStyle(fontSize: 14, color: Colors.black87),
// ),
// SizedBox(width: 8),
// SvgPicture.asset("assets/logos/cloud_logo.svg", width: 30, height: 30)
// ],
// ),
// ],
// ),
// )
// ];
// return isPortrait ? Column(children: list) : ListView(children: list);
// },
// ),
// ),
// ),
// );
// }
//
// void _launchURL(String _url) async => await canLaunch(_url) ? await launch(_url) : throw 'Could not launch $_url';
//
// Widget commonIconButton(String icon, VoidCallback onPressed, {double size, bool isAsset = true}) {
// return Expanded(
// child: IconButton(
// padding: EdgeInsets.zero,
// icon: isAsset ? SvgPicture.asset(icon, height: size ?? 25, width: size ?? 30) : Image.network(icon, height: size ?? 25, width: size ?? 30),
// onPressed: () {
// Navigator.pop(context);
// Future.delayed(Duration(milliseconds: 200), () => onPressed());
// }),
// );
// }
//
// Widget myListItem(String icon, String title, bool isSelected, {VoidCallback onTap}) {
// return InkWell(
// onTap: () {
// Navigator.pop(context);
// if (onTap != null) {
// Future.delayed(Duration(milliseconds: 200), () => onTap());
// }
// },
// child: Container(
// height: 40,
// padding: EdgeInsets.only(left: 8, right: 8),
// alignment: Alignment.centerRight,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(6),
// gradient: isSelected
// ? LinearGradient(
// stops: [0.0, 0.5],
// begin: Alignment.topCenter,
// end: Alignment.bottomCenter,
// colors: [ColorConsts.gradientPink, ColorConsts.gradientOrange],
// )
// : null,
// ),
// child: Row(
// mainAxisSize: MainAxisSize.min,
// children: [
// Text(
// title,
// style: TextStyle(fontSize: 14, color: isSelected ? Colors.white : ColorConsts.textGrey),
// ),
// SizedBox(width: 8),
// SvgPicture.asset(icon, height: 20, width: 20, color: isSelected ? Colors.white : ColorConsts.textGrey),
// ],
// ),
// ),
// );
// }
// }

@ -0,0 +1,89 @@
import 'package:flutter/material.dart';
import 'package:tangheem/api/tangheem_user_api_client.dart';
import 'package:tangheem/app_state/app_state.dart';
import 'package:tangheem/classes/colors.dart';
import 'package:tangheem/classes/utils.dart';
import 'package:tangheem/extensions/int_extensions.dart';
import 'package:tangheem/extensions/string_extensions.dart';
import 'package:tangheem/extensions/widget_extensions.dart';
import 'package:tangheem/models/content_info_model.dart';
import 'package:tangheem/widgets/new/CommonHeader.dart';
class AboutScreen extends StatefulWidget {
AboutScreen({Key key}) : super(key: key);
@override
_AboutScreenState createState() {
return _AboutScreenState();
}
}
class _AboutScreenState extends State<AboutScreen> {
List<ContentInfoDataModel> haqooqAlMosasa;
List<ContentInfoDataModel> tareefAlMosasa;
@override
void initState() {
super.initState();
haqooqAlMosasa = AppState().haqooqAlMosasa;
tareefAlMosasa = AppState().tareefAlMosasa;
getContents();
}
void getContents() async {
Utils.showLoading(context);
try {
if (haqooqAlMosasa == null && tareefAlMosasa == null) {
List<ContentInfoModel> responseList = await Future.wait([TangheemUserApiClient().getContentInfo(2), if (haqooqAlMosasa == null) TangheemUserApiClient().getContentInfo(1)]);
tareefAlMosasa = responseList[0].data ?? [];
AppState().tareefAlMosasa = tareefAlMosasa;
if (haqooqAlMosasa == null) {
haqooqAlMosasa = responseList[1].data ?? [];
AppState().haqooqAlMosasa = haqooqAlMosasa;
}
} else {
await Future.delayed(Duration(milliseconds: 500));
}
} catch (ex) {
haqooqAlMosasa = [];
tareefAlMosasa = [];
if (mounted) Utils.handleException(ex, null);
} finally {
Utils.hideLoading(context);
}
setState(() {});
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return SizedBox(
height: double.infinity,
child: SingleChildScrollView(
physics: const AlwaysScrollableScrollPhysics(),
child: Column(
children: [
CommonHeader("عن الموسوعة", "assets/icons/new/about_bg.jpg", Color(0xffAE8646)),
Column(
children: [
if ((tareefAlMosasa?.length ?? 0) > 0)
for (ContentInfoDataModel text in tareefAlMosasa) text.content.toText(13, color: ColorConsts.darkText, textAlign: TextAlign.center),
if ((haqooqAlMosasa?.length ?? 0) > 0)
Column(
children: [
"حقوق الموسوعة".toText(13, color: ColorConsts.greyLightColor),
for (ContentInfoDataModel text in haqooqAlMosasa) text.content.toText(13, color: ColorConsts.greyLightColor, textAlign: TextAlign.center)
],
).paddingOnly(top: 24)
],
).paddingOnly(top: 70, left: 35, right: 35, bottom: 125),
],
),
),
);
}
}

@ -0,0 +1,342 @@
import 'package:firebase_analytics/firebase_analytics.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/painting.dart';
import 'package:flutter/services.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:tangheem/api/tangheem_user_api_client.dart';
import 'package:tangheem/app_state/app_state.dart';
import 'package:tangheem/classes/colors.dart';
import 'package:tangheem/classes/consts.dart';
import 'package:tangheem/classes/utils.dart';
import 'package:tangheem/extensions/int_extensions.dart';
import 'package:tangheem/extensions/string_extensions.dart';
import 'package:tangheem/extensions/widget_extensions.dart';
import 'package:tangheem/models/aya_tangheem_type.dart';
import 'package:tangheem/models/content_info_model.dart';
import 'package:tangheem/models/surah_model.dart';
import 'package:tangheem/models/tangheem_type_model.dart';
import 'package:tangheem/ui/dialogs/general_dialog.dart';
import 'package:tangheem/ui/screens/tangheem_screen.dart';
import 'package:tangheem/widgets/common_dropdown_button.dart';
import 'package:tangheem/widgets/video_player_widget.dart';
class HomeScreen extends StatefulWidget {
static const String routeName = "/";
HomeScreen({Key key}) : super(key: key);
@override
_HomeScreenState createState() {
return _HomeScreenState();
}
}
class _HomeScreenState extends State<HomeScreen> {
TextEditingController _searchController = TextEditingController();
FocusNode _searchFocusNode = FocusNode();
ValueNotifier<List<String>> _tangheemListNotifier = ValueNotifier([]);
List<String> _surahList = [];
int _selectedSurah = -1;
int _selectedTangheemType = -1;
SurahModel _surahModel;
TangheemType _tangheemType;
ContentInfoModel _contentInfoModel;
@override
void initState() {
super.initState();
SystemChannels.textInput.invokeMethod('TextInput.hide');
getSurahAndTangheemTypes();
}
void getSurahAndTangheemTypes() async {
Utils.showLoading(context);
try {
_contentInfoModel = await TangheemUserApiClient().getContentInfo(4);
_surahModel = await TangheemUserApiClient().getSurahs();
AppState().setSurahModel(_surahModel);
_surahList = _surahModel.data.map((element) => element.nameAR).toList();
await getTangheemTypes();
TangheemUserApiClient().addStatistics(1);
// AppState().setAnalytics(widget.analytics);
// await widget.analytics.setAnalyticsCollectionEnabled(true);
// await widget.analytics.setCurrentScreen(screenName: "home");
setState(() {});
Utils.hideLoading(context);
} catch (ex) {
Utils.hideLoading(context);
if (mounted) Utils.handleException(ex, null);
}
// checkScreenMode();
}
void filterTangheemTypesListBySurah(int surahNo, {bool showLoading = true}) async {
if (showLoading) Utils.showLoading(context);
try {
AyaTangheemType ayaTangheemType = await TangheemUserApiClient().getAyaTangheemType(surahNo, null);
var tangheemType = _tangheemType?.data?.where((element) => element.isActive)?.toList() ?? [];
var ayaTangheem = ayaTangheemType?.data?.where((element) => element.isActive)?.toList() ?? [];
var result = tangheemType.where((tangheem) => ayaTangheem.any((element) => tangheem.tangheemTypeId == element.tangheemTypeId)).toList() ?? [];
_tangheemListNotifier.value = result?.map((element) => element.tangheemTypeName)?.toList() ?? [];
if (showLoading) Utils.hideLoading(context);
} catch (ex) {
if (showLoading) Utils.hideLoading(context);
if (mounted) Utils.handleException(ex, null);
}
}
void filterSurahListByTangheemType(String tangheemName) async {
Utils.showLoading(context);
try {
AyaTangheemType ayaTangheemType = await TangheemUserApiClient().getAyaTangheemType(null, tangheemName);
_surahList = _surahModel.data.where((surah) => ayaTangheemType.data.any((element) => surah.id == element.surahNo)).toList().map((element) => element.nameAR).toList();
setState(() {});
Utils.hideLoading(context);
} catch (ex) {
Utils.hideLoading(context);
if (mounted) Utils.handleException(ex, null);
}
}
// void checkScreenMode() {
// WidgetsBinding.instance.addPostFrameCallback((_) async {
// if (MediaQuery.of(context).orientation == Orientation.portrait) {
// await showDialog(
// context: context,
// barrierColor: ColorConsts.secondaryWhite.withOpacity(0.8),
// builder: (BuildContext context) => GeneralDialog(),
// );
// }
// showWelcomeVideoDialog();
// });
// }
//
// SharedPreferences prefs;
//
// void showWelcomeVideoDialog() async {
// prefs = await SharedPreferences.getInstance();
// String permLink = "-PqP0BCiTlE";
// String link = prefs.getString(GlobalConsts.welcomeVideoUrl) ?? permLink;
// if (permLink == link) {
// await prefs.setString(GlobalConsts.welcomeVideoUrl, permLink);
// bool showDialog = prefs.getBool(GlobalConsts.doNotShowWelcomeVideo) ?? false;
// if (showDialog) {
// return;
// }
// } else {
// await prefs.setString(GlobalConsts.welcomeVideoUrl, permLink);
// }
// await prefs.setBool(GlobalConsts.doNotShowWelcomeVideo, false);
// showDialog(
// context: context,
// barrierColor: ColorConsts.secondaryWhite.withOpacity(0.8),
// builder: (BuildContext context) => VideoPlayerWidget(permLink),
// );
// }
Future<void> getTangheemTypes() async {
try {
_tangheemType = await TangheemUserApiClient().getTangheemType();
if ((_tangheemType?.data?.length ?? 0) > 0) {
_tangheemType.data.sort((a, b) => a.orderNo.compareTo(b.orderNo));
}
_tangheemListNotifier.value = _tangheemType?.data?.where((element) => element.isActive)?.toList()?.map((element) => element.tangheemTypeName)?.toList() ?? [];
return;
// enable these lines if in future need to filter types too
if (_surahModel.data.map((element) => element.nameAR).toList().length == _surahList.length && _selectedSurah >= 0) {
setState(() {
_selectedTangheemType = -1;
});
// filterTangheemTypesListBySurah(_surahModel.data[_selectedSurah].id, showLoading: false);
} else {
if (_surahModel.data.map((element) => element.nameAR).toList().length != _surahList.length && _selectedSurah >= 0) {
setState(() {
_selectedSurah = -1;
});
}
_tangheemListNotifier.value = _tangheemType?.data?.where((element) => element.isActive)?.toList()?.map((element) => element.tangheemTypeName)?.toList() ?? [];
}
} catch (ex) {}
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return SizedBox(
width: double.infinity,
child: Stack(
children: [
Image.asset(
"assets/icons/new/home_light.jpg",
fit: BoxFit.cover,
height: double.infinity,
opacity: const AlwaysStoppedAnimation(.73),
),
SingleChildScrollView(
padding: EdgeInsets.fromLTRB(45, 138, 45, 138),
physics: BouncingScrollPhysics(),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
Image.asset("assets/icons/new/Tangeem-logo.png", width: 126, height: 76),
30.height,
"موسوعة النبر والتنغيم في الأداء القرآني للأساليب اللغوية".toText(18, color: ColorConsts.darkText, textAlign: TextAlign.center),
10.height,
"تساعدك موسوعة “تنغيم” على أداء الأساليب اللغوية القرآنية (كالاستفهام والإتمام والشرط والقسم) بما يخدم معنى الآية و قد أشرف عليها متخصصون في اللغة العربية والدراسات القرآنية"
.toText(12, color: ColorConsts.brownColor, textAlign: TextAlign.center),
SizedBox(height: 20),
ValueListenableBuilder(
valueListenable: _tangheemListNotifier,
builder: (context, value, child) {
return CommonDropDownButton(_selectedTangheemType, hintText: "اختر الأسلوب اللغوي", list: value, onSelect: (index) {
if (_selectedTangheemType != index) {
setState(() {
_selectedSurah = -1;
_selectedTangheemType = index;
});
if (_selectedSurah >= 0) {
return;
}
filterSurahListByTangheemType(_tangheemListNotifier.value[_selectedTangheemType]);
}
});
},
),
10.height,
Row(
children: [
iconButton("بحث", "assets/icons/new/search.svg", () async {
// if (_selectedTangheemType < 0) {
// Utils.showToast("الرجائ تعبئة جميع القوائم");
// return;
// }
if (_selectedSurah < 0) {
Utils.showToast("يرجى اختيار السورة");
return;
}
_searchFocusNode.unfocus();
_searchFocusNode.canRequestFocus = false;
var surah = _surahModel.data.firstWhere((surah) => surah.nameAR == _surahList[_selectedSurah], orElse: null);
Map<String, Object> data = {};
data["surahData"] = surah;
if (_selectedTangheemType >= 0) {
data["tangheemTypeName"] = _tangheemListNotifier.value[_selectedTangheemType].toString();
}
try {
// await widget.analytics.logEvent(
// name: 'tangheem_by_selection',
// parameters: <String, dynamic>{
// "tangheemTypeName": _tangheemListNotifier.value[_selectedTangheemType],
// "surahName": _surahModel.data[_selectedSurah].nameAR,
// },
// );
} catch (ex) {
print("tangheemTypeName:$ex");
}
await Navigator.pushNamed(context, TangheemScreen.routeName, arguments: data);
_searchFocusNode.canRequestFocus = true;
await getTangheemTypes();
}),
10.width,
Expanded(
child: CommonDropDownButton(_selectedSurah, hintText: "اختر السورة", list: _surahList, onSelect: (index) {
if (_selectedSurah != index) {
setState(() {
_selectedSurah = index;
});
if (_selectedTangheemType >= 0) {
return;
}
// filterTangheemTypesListBySurah(_surahModel.data[_selectedSurah].id);
}
}),
)
],
),
20.height,
SizedBox(
height: 48,
child: TextField(
controller: _searchController,
focusNode: _searchFocusNode,
style: TextStyle(color: Colors.white, fontSize: 14),
textAlign: TextAlign.end,
decoration: InputDecoration(
contentPadding: EdgeInsets.fromLTRB(2, 2, 24, 2),
alignLabelWithHint: true,
fillColor: ColorConsts.darkText.withOpacity(.65),
filled: true,
hintStyle: TextStyle(color: Colors.white, fontSize: 14),
hintText: "البحث عن آية",
prefixIconConstraints: BoxConstraints(maxHeight: 20),
prefixIcon: InkWell(
onTap: () async {
_searchFocusNode.unfocus();
if (_searchController.text.length < 1) {
Utils.showToast("الرجاء ادخال محتوى للبحث");
return;
}
_searchFocusNode.canRequestFocus = false;
var data = {"tangheemQuery": _searchController.text};
// await widget.analytics.setAnalyticsCollectionEnabled(true);
// await widget.analytics.logEvent(
// name: 'tangheem_by_search',
// parameters: <String, dynamic>{"tangheemQuery": _searchController.text},
// );
await Navigator.pushNamed(context, TangheemScreen.routeName, arguments: data);
_searchFocusNode.canRequestFocus = true;
await getTangheemTypes();
},
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
child: SvgPicture.asset("assets/icons/new/search.svg", width: 20, height: 20, color: Colors.white).paddingOnly(left: 16, right: 8),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: BorderSide(color: ColorConsts.borderDarkText, width: 0),
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: BorderSide(color: ColorConsts.borderDarkText, width: 0),
),
),
),
)
],
),
),
],
),
);
}
Widget iconButton(String title, String icon, VoidCallback callback) {
return InkWell(
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: callback,
child: Container(
height: 48,
width: 70,
decoration: BoxDecoration(
color: callback == null ? ColorConsts.textHintGrey : ColorConsts.brownLightColor.withOpacity(.65),
borderRadius: BorderRadius.circular(10),
),
padding: EdgeInsets.all(14),
child: SvgPicture.asset(icon, width: 20, height: 20, color: Colors.white),
),
);
}
}

@ -9,6 +9,7 @@ import 'package:tangheem/app_state/app_state.dart';
import 'package:tangheem/classes/colors.dart';
import 'package:tangheem/classes/consts.dart';
import 'package:tangheem/classes/utils.dart';
import 'package:tangheem/extensions/widget_extensions.dart';
import 'package:tangheem/models/authentication_user_model.dart';
import 'package:tangheem/models/content_info_model.dart';
import 'package:tangheem/models/navigation_model.dart';
@ -128,58 +129,74 @@ class _CommonAppbarState extends State<CommonAppbar> {
@override
Widget build(BuildContext context) {
return Scaffold(
key: widget.showDrawer ? _scaffoldKey : null,
drawer: widget.showDrawer ? drawerView() : null,
resizeToAvoidBottomInset: true,
drawerScrimColor: Colors.black.withOpacity(.3),
body: SafeArea(
child: Column(
children: [
Container(
color: Colors.white,
height: 100,
padding: EdgeInsets.only(top: 8, bottom: 8, right: 16),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
if (!widget.isFirst)
IconButton(
icon: Icon(widget.showDrawer ? Icons.menu : Icons.arrow_back_ios, color: ColorConsts.textGrey),
padding: EdgeInsets.only(left: 16),
onPressed: () {
if (widget.showDrawer) {
_scaffoldKey.currentState.openDrawer();
} else {
Navigator.pop(context);
}
},
),
if (!widget.showDrawer)
IconButton(
icon: Icon(Icons.home, color: ColorConsts.textGrey),
padding: EdgeInsets.only(left: 16),
onPressed: () {
Navigator.popUntil(context, ModalRoute.withName(HomeScreen.routeName));
},
),
Expanded(child: SizedBox()),
Hero(
tag: "logo",
child: SvgPicture.asset(
"assets/logos/tangheem_logo.svg",
height: 100,
width: 100,
alignment: Alignment.centerRight,
),
)
],
),
),
Expanded(
child: Directionality(textDirection: TextDirection.rtl, child: widget.child),
// key: widget.showDrawer ? _scaffoldKey : null,
// drawer: widget.showDrawer ? drawerView() : null,
// resizeToAvoidBottomInset: true,
// drawerScrimColor: Colors.black.withOpacity(.3),
body: Stack(
children: [
// Container(
// color: Colors.white,
// height: 100,
// padding: EdgeInsets.only(top: 8, bottom: 8, right: 16),
// child: Row(
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// if (!widget.isFirst)
// IconButton(
// icon: Icon(widget.showDrawer ? Icons.menu : Icons.arrow_back_ios, color: ColorConsts.textGrey),
// padding: EdgeInsets.only(left: 16),
// onPressed: () {
// if (widget.showDrawer) {
// _scaffoldKey.currentState.openDrawer();
// } else {
// Navigator.pop(context);
// }
// },
// ),
// if (!widget.showDrawer)
// IconButton(
// icon: Icon(Icons.home, color: ColorConsts.textGrey),
// padding: EdgeInsets.only(left: 16),
// onPressed: () {
// Navigator.popUntil(context, ModalRoute.withName(HomeScreen.routeName));
// },
// ),
// Expanded(child: SizedBox()),
// Hero(
// tag: "logo",
// child: SvgPicture.asset(
// "assets/logos/tangheem_logo.svg",
// height: 100,
// width: 100,
// alignment: Alignment.centerRight,
// ),
// )
// ],
// ),
// ),
Directionality(textDirection: TextDirection.rtl, child: widget.child),
ElevatedButton(
onPressed: () => Navigator.pop(context),
child: Icon(
Icons.arrow_back_ios,
color: ColorConsts.darkText,
).paddingOnly(left: 8),
style: ElevatedButton.styleFrom(
backgroundColor: Color(0xfff4f4f4),
shape: CircleBorder(), //<-- SEE HERE
padding: EdgeInsets.all(8),
),
],
),
).paddingOnly(left: 8, top: 50),
// IconButton(
// highlightColor: Colors.green,
// icon: Icon(Icons.arrow_back_ios, color: ColorConsts.textGrey),
// padding: EdgeInsets.only(left: 16),
// onPressed: () {
// Navigator.pop(context);
// },
// ),
],
),
);
}

@ -3,8 +3,11 @@ import 'package:flutter_svg/svg.dart';
import 'package:tangheem/api/tangheem_user_api_client.dart';
import 'package:tangheem/classes/colors.dart';
import 'package:tangheem/classes/utils.dart';
import 'package:tangheem/extensions/int_extensions.dart';
import 'package:tangheem/extensions/string_extensions.dart';
import 'package:tangheem/extensions/widget_extensions.dart';
import 'package:tangheem/widgets/common_textfield_widget.dart';
import 'package:tangheem/widgets/new/CommonHeader.dart';
class ContactUsScreen extends StatefulWidget {
static const String routeName = "/contact_us";
@ -50,112 +53,82 @@ class _ContactUsScreenState extends State<ContactUsScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: ColorConsts.secondaryWhite,
backgroundColor: ColorConsts.greyF4Color,
body: SingleChildScrollView(
padding: EdgeInsets.all(21.0),
physics: BouncingScrollPhysics(),
child: Container(
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(8.0), color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
Padding(
padding: EdgeInsets.only(top: 24, bottom: 24),
child: SvgPicture.asset("assets/logos/tangheem_logo.svg", width: 100, height: 100),
),
Text(
"اتصل بنا",
style: TextStyle(fontSize: 22, color: ColorConsts.primaryBlue),
),
Padding(
padding: EdgeInsets.all(8),
child: Text(
"لا تتردد في الاتصال بنا ، يسعدنا أن نسمع منك",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 14, color: ColorConsts.primaryBlue, height: 1),
),
),
Container(
margin: EdgeInsets.only(top: 16),
width: double.infinity,
padding: EdgeInsets.all(32.0),
decoration: BoxDecoration(
color: ColorConsts.primaryBlue,
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(8),
bottomRight: Radius.circular(8),
),
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
CommonTextFieldWidget(hint: "الاسم الأول", controller: _firstNameController),
SizedBox(height: 8),
CommonTextFieldWidget(hint: "الاسم الأخير", controller: _lastNameController),
SizedBox(height: 8),
CommonTextFieldWidget(hint: "البريد الإلكتروني", controller: _emailController),
SizedBox(height: 8),
CommonTextFieldWidget(hint: " رقم الاتصال${" (" + ("9xx") + " xxxxxxxxx)"}", controller: _mobileNumberController),
SizedBox(height: 8),
CommonTextFieldWidget(hint: "التفاصيل", controller: _descriptionController, maxLines: 4),
SizedBox(height: 12),
SizedBox(
width: double.infinity,
height: 50,
child: TextButton(
onPressed: () {
if (_firstNameController.text.length < 1) {
Utils.showToast("يرجى إدخال الاسم الأول");
return;
}
if (_lastNameController.text.length < 1) {
Utils.showToast("يرجى إدخال الاسم الأخير");
return;
}
if (_emailController.text.length < 1) {
Utils.showToast("يرجى إدخال البريد الإلكتروني");
return;
}
if (_mobileNumberController.text.length < 1) {
Utils.showToast("يرجى إدخال رقم الهاتف");
return;
}
if (_mobileNumberController.text.length != 12) {
Utils.showToast("صيغة الرقم غير صحيحة");
return;
}
if (_descriptionController.text.length < 1) {
Utils.showToast("يرجى إدخال التفاصيل");
return;
}
if (_descriptionController.text.trim().length < 1) {
Utils.showToast("يرجى إدخال التفاصيل");
return;
}
if (!_emailController.text.isValidEmail()) {
Utils.showToast("صيغة البريد الإلكتروني غير صحيحة");
return;
}
sendFeedback(_firstNameController.text, _lastNameController.text, _emailController.text, _mobileNumberController.text, _descriptionController.text);
},
style: TextButton.styleFrom(
primary: Colors.white,
backgroundColor: ColorConsts.secondaryPink,
textStyle: TextStyle(fontSize: 16, fontFamily: "DroidKufi"),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6.0),
),
),
child: Text("إرسال"),
child: Column(
children: [
CommonHeader("اتصل بنا", "assets/icons/new/contact_bg.jpg", Color(0xff416A6C)),
Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
"نسعد بتواصلكم بالمساهمة في تطوير المشروع وطرح المقترحات التي حقق جودته. الرجاء تعبئة البيانات لكي تصل إلينا بشكل مناسب، وسيتم التواصل معكم في أقرب وقت ممكن."
.toText(13, color: ColorConsts.darkText, textAlign: TextAlign.center),
32.height,
CommonTextFieldWidget(hint: "الاسم الأول", controller: _firstNameController, fillColor: Colors.white, isBorder: true),
8.height,
CommonTextFieldWidget(hint: "الاسم الأخير", controller: _lastNameController, fillColor: Colors.white, isBorder: true),
8.height,
CommonTextFieldWidget(hint: "البريد الإلكتروني", controller: _emailController, fillColor: Colors.white, isBorder: true, isEmail: true),
8.height,
CommonTextFieldWidget(hint: " رقم الاتصال${" (" + ("9xx") + " xxxxxxxxx)"}", controller: _mobileNumberController, fillColor: Colors.white, isBorder: true),
8.height,
CommonTextFieldWidget(hint: "التفاصيل", controller: _descriptionController, maxLines: 5, fillColor: Colors.white, isBorder: true),
22.height,
SizedBox(
width: double.infinity,
height: 50,
child: TextButton(
onPressed: () {
if (_firstNameController.text.length < 1) {
Utils.showToast("يرجى إدخال الاسم الأول");
return;
}
if (_lastNameController.text.length < 1) {
Utils.showToast("يرجى إدخال الاسم الأخير");
return;
}
if (_emailController.text.length < 1) {
Utils.showToast("يرجى إدخال البريد الإلكتروني");
return;
}
if (_mobileNumberController.text.length < 1) {
Utils.showToast("يرجى إدخال رقم الهاتف");
return;
}
if (_mobileNumberController.text.length != 12) {
Utils.showToast("صيغة الرقم غير صحيحة");
return;
}
if (_descriptionController.text.length < 1) {
Utils.showToast("يرجى إدخال التفاصيل");
return;
}
if (_descriptionController.text.trim().length < 1) {
Utils.showToast("يرجى إدخال التفاصيل");
return;
}
if (!_emailController.text.isValidEmail()) {
Utils.showToast("صيغة البريد الإلكتروني غير صحيحة");
return;
}
sendFeedback(_firstNameController.text, _lastNameController.text, _emailController.text, _mobileNumberController.text, _descriptionController.text);
},
style: TextButton.styleFrom(
backgroundColor: ColorConsts.darkText,
foregroundColor: Colors.white,
textStyle: TextStyle(fontSize: 18),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(25.0),
),
),
],
child: Text("إرسال"),
),
),
),
],
),
],
).paddingAll(35),
],
),
),
);

@ -3,7 +3,10 @@ import 'package:flutter_svg/svg.dart';
import 'package:tangheem/api/user_api_client.dart';
import 'package:tangheem/classes/colors.dart';
import 'package:tangheem/classes/utils.dart';
import 'package:tangheem/extensions/int_extensions.dart';
import 'package:tangheem/extensions/string_extensions.dart';
import 'package:tangheem/extensions/widget_extensions.dart';
import 'package:tangheem/ui/screens/contact_us_screen.dart';
import 'package:tangheem/widgets/common_textfield_widget.dart';
class ForgotPasswordScreen extends StatefulWidget {
@ -79,72 +82,69 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: ColorConsts.secondaryWhite,
backgroundColor: ColorConsts.greyF8Color,
body: SingleChildScrollView(
padding: EdgeInsets.all(21.0),
padding: EdgeInsets.only(top: 100, bottom: 24, left: 24, right: 24),
physics: BouncingScrollPhysics(),
child: Container(
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(8.0), color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
Padding(
padding: EdgeInsets.only(top: 36, bottom: 24),
child: SvgPicture.asset("assets/icons/key.svg", width: 100, height: 100),
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),
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),
],
),
Text(
"نسيت كلمة المرور؟",
style: TextStyle(fontSize: 22, color: ColorConsts.primaryBlue),
),
Container(
margin: EdgeInsets.only(top: 16),
width: double.infinity,
padding: EdgeInsets.all(32.0),
decoration: BoxDecoration(
color: ColorConsts.primaryBlue,
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(8),
bottomRight: Radius.circular(8),
),
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: Column(
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(height: 8),
CommonTextFieldWidget(hint: "البريد الإلكتروني المسجل", controller: _emailController, prefixIcon: "assets/icons/email.svg"),
SizedBox(height: 12),
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(
primary: Colors.white,
backgroundColor: ColorConsts.secondaryPink,
textStyle: TextStyle(fontSize: 16, fontFamily: "DroidKufi"),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6.0),
),
),
child: Text("إعادة تعيين كلمة المرور"),
),
),
],
),
child: Text("إعادة تعيين كلمة المرور"),
),
],
),
).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);
})
],
),
),
);

@ -3,10 +3,15 @@ import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:tangheem/api/tangheem_user_api_client.dart';
import 'package:tangheem/app_state/app_state.dart';
import 'package:tangheem/classes/colors.dart';
import 'package:tangheem/classes/utils.dart';
import 'package:tangheem/extensions/int_extensions.dart';
import 'package:tangheem/extensions/string_extensions.dart';
import 'package:tangheem/extensions/widget_extensions.dart';
import 'package:tangheem/models/member_model.dart';
import 'package:tangheem/ui/misc/no_data_ui.dart';
import 'package:tangheem/widgets/new/CommonHeader.dart';
class MemberScreen extends StatefulWidget {
static const String routeName = "/members";
@ -23,97 +28,104 @@ class _MemberScreenState extends State<MemberScreen> {
@override
void initState() {
super.initState();
membersList = AppState().membersList;
getMembers();
}
void getMembers() async {
Utils.showLoading(context);
try {
var membersData = await TangheemUserApiClient().getMembers();
membersList = membersData?.data ?? [];
membersList.sort((a, b) => a.orderNo.compareTo(b.orderNo));
} catch (ex) {
membersList = [];
if (mounted) Utils.handleException(ex, null);
} finally {
Utils.hideLoading(context);
if (membersList == null) {
Utils.showLoading(context);
try {
var membersData = await TangheemUserApiClient().getMembers();
membersList = membersData?.data ?? [];
membersList.sort((a, b) => a.orderNo.compareTo(b.orderNo));
AppState().membersList = membersList;
} catch (ex) {
membersList = [];
if (mounted) Utils.handleException(ex, null);
} finally {
Utils.hideLoading(context);
}
}
setState(() {});
}
@override
Widget build(BuildContext context) {
return membersList == null
? SizedBox()
: membersList.isEmpty
? NoDataUI()
: ListView(
physics: BouncingScrollPhysics(),
padding: EdgeInsets.all(16),
children: [
Text(
"أعضاء اللجنة الإشرافية",
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20, color: ColorConsts.primaryBlue, height: 1.5),
),
SizedBox(height: 12),
ListView.separated(
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemCount: membersList.length,
separatorBuilder: (context, index) {
return SizedBox(height: 8);
},
itemBuilder: (context, index) {
String encodedImage = membersList.elementAt(index).picture;
if (encodedImage.contains("data:image/png;base64,")) {
encodedImage = encodedImage.replaceAll("data:image/png;base64,", "");
}
if (encodedImage.contains("data:image/jpeg;base64,")) {
encodedImage = encodedImage.replaceAll("data:image/jpeg;base64,", "");
}
var temp = base64Decode(encodedImage);
return SizedBox(
height: double.infinity,
child: SingleChildScrollView(
physics: const AlwaysScrollableScrollPhysics(),
child: Column(
children: [
CommonHeader("اللجنة الإشرافية", "assets/icons/new/commette_bg.jpg", Color(0xff416A6C)),
membersList == null
? SizedBox()
: membersList.isEmpty
? NoDataUI()
: ListView.separated(
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemCount: membersList.length,
padding: EdgeInsets.only(left: 25, right: 25, top: 25, bottom: 125),
separatorBuilder: (context, index) {
return Divider(color: Color(0xffC7C7C7), height: 1, thickness: 1);
},
itemBuilder: (context, index) {
String encodedImage = membersList.elementAt(index).picture;
if (encodedImage.contains("data:image/png;base64,")) {
encodedImage = encodedImage.replaceAll("data:image/png;base64,", "");
}
if (encodedImage.contains("data:image/jpeg;base64,")) {
encodedImage = encodedImage.replaceAll("data:image/jpeg;base64,", "");
}
var temp = base64Decode(encodedImage);
return ListTile(
tileColor: Colors.white,
leading: Container(
width: 50.0,
height: 50.0,
decoration: BoxDecoration(
image: membersList.length < 1
? null
: DecorationImage(
fit: BoxFit.cover,
image: MemoryImage(temp),
),
borderRadius: BorderRadius.all(
Radius.circular(30.0),
),
),
child: membersList.length < 1
? ClipRRect(
return Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisSize: MainAxisSize.min,
children: [
(membersList[index].firstName + " " + membersList[index].lastName).toText(13, color: ColorConsts.darkText, textAlign: TextAlign.end),
membersList[index].description.trim().toText(13, color: ColorConsts.grey9FColor, textAlign: TextAlign.end),
],
).expanded,
21.width,
Container(
width: 82.0,
height: 82.0,
decoration: BoxDecoration(
image: membersList.length < 1
? null
: DecorationImage(
fit: BoxFit.cover,
image: MemoryImage(temp),
),
borderRadius: BorderRadius.all(
Radius.circular(30.0),
),
child: SvgPicture.asset(
"assets/icons/chat_user.svg",
clipBehavior: Clip.antiAlias,
Radius.circular(10.0),
),
)
: null,
),
title: Text(
membersList[index].firstName + " " + membersList[index].lastName,
style: TextStyle(fontSize: 14, color: ColorConsts.primaryBlue, fontWeight: FontWeight.w600),
),
subtitle: Text(
" ${membersList[index].description.trim()}",
style: TextStyle(fontSize: 12, color: ColorConsts.primaryBlue),
),
isThreeLine: true,
);
},
),
],
);
),
child: membersList.length < 1
? ClipRRect(
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
child: SvgPicture.asset(
"assets/icons/chat_user.svg",
clipBehavior: Clip.antiAlias,
),
)
: null,
),
],
).paddingOnly(top: 25, bottom: 25);
},
),
],
),
),
);
}
}

@ -1,11 +1,19 @@
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:syncfusion_flutter_pdfviewer/pdfviewer.dart';
import 'package:tangheem/api/tangheem_user_api_client.dart';
import 'package:tangheem/app_state/app_state.dart';
import 'package:tangheem/classes/colors.dart';
import 'package:tangheem/classes/consts.dart';
import 'package:tangheem/classes/utils.dart';
import 'package:tangheem/extensions/int_extensions.dart';
import 'package:tangheem/extensions/string_extensions.dart';
import 'package:tangheem/extensions/widget_extensions.dart';
import 'package:tangheem/models/content_info_model.dart';
import 'package:tangheem/ui/misc/no_data_ui.dart';
import 'package:tangheem/widgets/new/CommonHeader.dart';
class PdfListScreen extends StatefulWidget {
static const String routeName = "/tangheem_pdf";
@ -20,20 +28,27 @@ class PdfListScreen extends StatefulWidget {
class _PdfListScreenState extends State<PdfListScreen> {
List<ContentInfoDataModel> contentList;
List<ContentInfoDataModel> haqooqAlMosasa;
@override
void initState() {
super.initState();
haqooqAlMosasa = AppState().haqooqAlMosasa;
getPdfs();
}
void getPdfs() async {
Utils.showLoading(context);
try {
var membersData = await TangheemUserApiClient().getContentInfo(8);
contentList = membersData?.data ?? [];
List<ContentInfoModel> responseList = await Future.wait([TangheemUserApiClient().getContentInfo(8), if (haqooqAlMosasa == null) TangheemUserApiClient().getContentInfo(1)]);
contentList = responseList[0].data ?? [];
if (haqooqAlMosasa == null) {
haqooqAlMosasa = responseList[1].data ?? [];
AppState().haqooqAlMosasa = haqooqAlMosasa;
}
} catch (ex) {
contentList = [];
haqooqAlMosasa = [];
if (mounted) Utils.handleException(ex, null);
} finally {
Utils.hideLoading(context);
@ -48,72 +63,116 @@ class _PdfListScreenState extends State<PdfListScreen> {
@override
Widget build(BuildContext context) {
return contentList == null
? SizedBox()
: contentList.isEmpty
? NoDataUI()
: ListView.separated(
physics: BouncingScrollPhysics(),
padding: EdgeInsets.all(16),
itemCount: contentList.length,
separatorBuilder: (context, index) {
return SizedBox(height: 8);
},
itemBuilder: (context, index) {
return ListTile(
tileColor: Colors.white,
onTap: () {
Navigator.pushNamed(context, PdfViewerScreen.routeName, arguments: contentList[index]);
},
title: Text(
contentList[index].fileName?.trim() ?? "",
style: TextStyle(fontSize: 14, color: ColorConsts.primaryBlue),
),
subtitle: Text(
contentList[index].contentTypeNameAr?.trim() ?? "",
style: TextStyle(fontSize: 12, color: ColorConsts.primaryBlue),
),
);
},
);
return SizedBox(
height: double.infinity,
child: SingleChildScrollView(
physics: const AlwaysScrollableScrollPhysics(),
child: Column(
children: [
CommonHeader("التصفح والتحميل", "assets/icons/new/pdf_bg.jpg", Color(0xffAE8646)),
contentList == null
? SizedBox()
: contentList.isEmpty
? NoDataUI()
: ListView.separated(
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
padding: EdgeInsets.only(left: 35, right: 35, top: 35, bottom: 0),
itemCount: contentList.length,
separatorBuilder: (context, index) {
return Divider(color: Color(0xffC7C7C7), height: 1, thickness: 1).paddingOnly(top: 14, bottom: 14);
},
itemBuilder: (context, index) {
return SizedBox(
height: 50,
child: Row(
children: [
SvgPicture.asset(
"assets/icons/new/download_pdf.svg",
width: 44,
height: 50,
),
7.width,
ClipRRect(
borderRadius: BorderRadius.circular(7),
child: Container(
height: 50,
alignment: Alignment.centerRight,
decoration: BoxDecoration(
color: Colors.white,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
width: 44,
height: 50,
alignment: Alignment.center,
decoration: BoxDecoration(
color: ColorConsts.darkText,
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.zoom_out_map_rounded, color: Colors.white),
"تصفع".toText(10),
],
),
),
Directionality(
textDirection: TextDirection.rtl,
child: (contentList[index].fileName?.trim() ?? "").toText(18, color: ColorConsts.darkText).paddingOnly(left: 12, right: 12),
),
],
),
).expanded,
).onPress(() {
Navigator.pushNamed(context, PdfViewerScreen.routeName, arguments: contentList[index]);
}).expanded,
],
),
);
},
),
if ((haqooqAlMosasa?.length ?? 0) > 0)
Column(
children: [
"حقوق الموسوعة".toText(13, color: ColorConsts.greyLightColor),
for (ContentInfoDataModel text in haqooqAlMosasa) text.content.toText(13, color: ColorConsts.greyLightColor, textAlign: TextAlign.center)
],
).paddingOnly(left: 35, right: 35, top: 35),
],
),
),
);
}
}
class PdfViewerScreen extends StatefulWidget {
class PdfViewerScreen extends StatelessWidget {
static const String routeName = "/tangheem_pdf_view";
final ContentInfoDataModel pdfDetail;
PdfViewerScreen(this.pdfDetail, {Key key}) : super(key: key);
@override
_PdfViewerScreenState createState() {
return _PdfViewerScreenState();
}
}
class _PdfViewerScreenState extends State<PdfViewerScreen> {
final GlobalKey<SfPdfViewerState> _pdfViewerKey = GlobalKey();
@override
void initState() {
super.initState();
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return SfPdfViewer.network(
ApiConsts.baseUrl + widget.pdfDetail.exposeFilePath,
key: _pdfViewerKey,
canShowScrollHead: false,
enableTextSelection: false,
enableDocumentLinkAnnotation: false,
canShowPaginationDialog: false,
canShowScrollStatus: false,
return Column(
children: [
CommonHeader(pdfDetail.fileName, "assets/icons/new/pdf_bg.jpg", Color(0xffAE8646)),
SfPdfViewer.network(
ApiConsts.baseUrl + pdfDetail.exposeFilePath,
key: _pdfViewerKey,
canShowScrollHead: false,
enableTextSelection: false,
enableDocumentLinkAnnotation: false,
canShowPaginationDialog: false,
canShowScrollStatus: false,
pageSpacing: 0,
// pageLayoutMode:PdfPageLayoutMode.single
).expanded,
],
);
}
}

@ -4,11 +4,14 @@ import 'package:flutter_svg/svg.dart';
import 'package:tangheem/api/user_api_client.dart';
import 'package:tangheem/classes/colors.dart';
import 'package:tangheem/classes/utils.dart';
import 'package:tangheem/extensions/int_extensions.dart';
import 'package:tangheem/extensions/string_extensions.dart';
import 'package:tangheem/extensions/widget_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/ui/dialogs/general_dialog.dart';
import 'package:tangheem/ui/screens/contact_us_screen.dart';
import 'package:tangheem/widgets/common_textfield_widget.dart';
class RegistrationScreen extends StatefulWidget {
@ -86,166 +89,157 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: ColorConsts.secondaryWhite,
backgroundColor: ColorConsts.greyF8Color,
body: SingleChildScrollView(
padding: EdgeInsets.all(21.0),
padding: EdgeInsets.only(top: 100, bottom: 24),
physics: BouncingScrollPhysics(),
child: Container(
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(8.0), color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
Padding(
padding: EdgeInsets.only(top: 24, bottom: 24),
child: SvgPicture.asset("assets/logos/tangheem_logo.svg", width: 100, height: 100),
),
Text(
"انشاء حساب جديد",
style: TextStyle(fontSize: 22, color: ColorConsts.primaryBlue),
),
Padding(
padding: EdgeInsets.all(8),
child: Text(
"قم بتعبئة بيانات طلب انشاء الحساب و ستصلك رسالة تأكيد, ومن ثم يمكنك الدخول لحسابك الجديد",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 14, color: ColorConsts.primaryBlue, height: 1),
),
),
Container(
margin: EdgeInsets.only(top: 16),
width: double.infinity,
padding: EdgeInsets.all(32.0),
decoration: BoxDecoration(
color: ColorConsts.primaryBlue,
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(8),
bottomRight: Radius.circular(8),
child: Column(
mainAxisSize: MainAxisSize.min,
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(left: 24, right: 24, top: 24, bottom: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
Padding(
padding: EdgeInsets.only(top: 35, bottom: 24),
child: SvgPicture.asset("assets/logos/tangheem_logo.svg", width: 72, height: 72),
),
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
CommonTextFieldWidget(hint: "البريد الإلكتروني", controller: _emailController),
SizedBox(height: 8),
CommonTextFieldWidget(hint: "الاسم الأول", controller: _firstNameController),
SizedBox(height: 8),
CommonTextFieldWidget(hint: "الاسم الأخير", controller: _lastNameController),
SizedBox(height: 8),
CommonTextFieldWidget(
hint: _selectedCountry?.countryNameAr ?? "الدولة",
controller: null,
suffixWidget: Icon(Icons.keyboard_arrow_down, size: 18, color: ColorConsts.secondaryOrange),
onTap: () {
_selectCountry(context);
},
),
SizedBox(height: 8),
CommonTextFieldWidget(
hint: " رقم الجوال (اختياري)${" (" + (_selectedCountry?.countryCode ?? "+9xx") + " xxxxxxxxx)"}",
controller: _mobileNumberController,
suffixWidget: Text(_selectedCountry?.countryCode ?? "", textDirection: TextDirection.ltr),
),
SizedBox(height: 8),
CommonTextFieldWidget(hint: "تعيين كلمة المرور", controller: _passwordController),
SizedBox(height: 8),
CommonTextFieldWidget(hint: "تأكيد كلمة المرور", controller: _confirmPasswordController),
SizedBox(height: 8),
Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
InkWell(
onTap: () {
setState(() {
_isAccept = !_isAccept;
});
},
child: SvgPicture.asset(_isAccept ? "assets/icons/checkOn.svg" : "assets/icons/checkOff.svg", width: 16, height: 16),
),
SizedBox(width: 8),
Expanded(
child: Text(
"أقر بأن جميع البيانات المدخلة أعلاه صحيحة",
style: TextStyle(color: Colors.white, fontSize: 13),
"انشاء حساب جديد".toText(18, color: ColorConsts.darkText),
"قم بتعبئة بيانات طلب انشاء الحساب و ستصلك رسالة تأكيد, ومن ثم يمكنك الدخول لحسابك الجديد"
.toText(13, color: ColorConsts.grey9FColor, textAlign: TextAlign.center)
.paddingOnly(left: 24, right: 24, top: 18, bottom: 18),
Column(
mainAxisSize: MainAxisSize.min,
children: [
CommonTextFieldWidget(hint: "البريد الإلكتروني", controller: _emailController, isEmail: true),
SizedBox(height: 8),
CommonTextFieldWidget(hint: "الاسم الأول", controller: _firstNameController),
SizedBox(height: 8),
CommonTextFieldWidget(hint: "الاسم الأخير", controller: _lastNameController),
SizedBox(height: 8),
CommonTextFieldWidget(
hint: _selectedCountry?.countryNameAr ?? "الدولة",
controller: null,
suffixWidget: Icon(Icons.keyboard_arrow_down, size: 18, color: ColorConsts.secondaryOrange),
onTap: () {
_selectCountry(context);
},
),
SizedBox(height: 8),
CommonTextFieldWidget(
hint: " رقم الجوال (اختياري)${" (" + (_selectedCountry?.countryCode ?? "+9xx") + " xxxxxxxxx)"}",
controller: _mobileNumberController,
suffixWidget: Text(_selectedCountry?.countryCode ?? "", textDirection: TextDirection.ltr),
),
SizedBox(height: 8),
CommonTextFieldWidget(hint: "تعيين كلمة المرور", controller: _passwordController),
SizedBox(height: 8),
CommonTextFieldWidget(hint: "تأكيد كلمة المرور", controller: _confirmPasswordController),
Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
InkWell(
onTap: () {
setState(() {
_isAccept = !_isAccept;
});
},
child: Icon(_isAccept ? Icons.check_box_rounded : Icons.check_box_outline_blank_rounded, color: ColorConsts.borderDark2Text, size: 17),
//child: SvgPicture.asset(_isAccept ? "assets/icons/checkOn.svg" : "assets/icons/checkOff.svg", width: 16, height: 16,color: ColorConsts.borderDarkText),
),
),
],
),
SizedBox(height: 12),
SizedBox(
width: double.infinity,
height: 50,
child: TextButton(
onPressed: () {
if (_emailController.text.length < 1) {
Utils.showToast("يرجى إدخال البريد الإلكتروني");
return;
}
if (_firstNameController.text.length < 1) {
Utils.showToast("يرجى إدخال الاسم الأول");
return;
}
if (_lastNameController.text.length < 1) {
Utils.showToast("يرجى إدخال الاسم الأخير");
return;
}
if (_selectedCountry?.countryCode == null) {
Utils.showToast("يرجى اختيار الدولة");
return;
}
// if (_mobileNumberController.text.length < 1) {
// Utils.showToast("يرجى إدخال رقم الجوال");
// return;
// } else
SizedBox(width: 8),
"جميع البيانات صحيحة ضمن اتفاقية الاستخدام".toText(14, color: ColorConsts.darkText).expanded,
],
).paddingOnly(left: 30, right: 30, top: 30, bottom: 26),
],
).paddingOnly(left: 12, right: 12),
],
),
),
SizedBox(
width: double.infinity,
height: 50,
child: TextButton(
onPressed: () {
if (_emailController.text.length < 1) {
Utils.showToast("يرجى إدخال البريد الإلكتروني");
return;
}
if (_firstNameController.text.length < 1) {
Utils.showToast("يرجى إدخال الاسم الأول");
return;
}
if (_lastNameController.text.length < 1) {
Utils.showToast("يرجى إدخال الاسم الأخير");
return;
}
if (_selectedCountry?.countryCode == null) {
Utils.showToast("يرجى اختيار الدولة");
return;
}
// if (_mobileNumberController.text.length < 1) {
// Utils.showToast("يرجى إدخال رقم الجوال");
// return;
// } else
if (_mobileNumberController.text.isNotEmpty && (_mobileNumberController.text.length < 8 || _mobileNumberController.text.length > 12)) {
Utils.showToast("رقم الهاتف غير صحيح");
return;
}
if (_passwordController.text.length < 1) {
Utils.showToast("يرجى إدخال كلمة المرور");
return;
}
if (_confirmPasswordController.text.length < 1) {
Utils.showToast("يرجى تأكيد كلمة المرور");
return;
}
if (_mobileNumberController.text.isNotEmpty && (_mobileNumberController.text.length < 8 || _mobileNumberController.text.length > 12)) {
Utils.showToast("رقم الهاتف غير صحيح");
return;
}
if (_passwordController.text.length < 1) {
Utils.showToast("يرجى إدخال كلمة المرور");
return;
}
if (_confirmPasswordController.text.length < 1) {
Utils.showToast("يرجى تأكيد كلمة المرور");
return;
}
if (!_emailController.text.isValidEmail()) {
Utils.showToast("صيغة البريد الإلكتروني خاطئة");
return;
}
if (!_emailController.text.isValidEmail()) {
Utils.showToast("صيغة البريد الإلكتروني خاطئة");
return;
}
if (_passwordController.text != _confirmPasswordController.text) {
Utils.showToast("كلمة المرور غير متطابقة");
return;
}
if (_passwordController.text != _confirmPasswordController.text) {
Utils.showToast("كلمة المرور غير متطابقة");
return;
}
if (!_isAccept) {
Utils.showToast("الرجاء الموافقة على سياسة الخصوصية");
return;
}
registerUser(
_firstNameController.text, _lastNameController.text, _emailController.text, _passwordController.text, _selectedCountry?.countryCode, _mobileNumberController.text);
},
style: TextButton.styleFrom(
backgroundColor: ColorConsts.secondaryPink,
foregroundColor: Colors.white,
textStyle: TextStyle(fontSize: 16, fontFamily: "DroidKufi"),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6.0),
),
),
child: Text("انشئ حسابك"),
),
),
],
if (!_isAccept) {
Utils.showToast("الرجاء الموافقة على سياسة الخصوصية");
return;
}
registerUser(_firstNameController.text, _lastNameController.text, _emailController.text, _passwordController.text, _selectedCountry?.countryCode, _mobileNumberController.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: 35, right: 35, bottom: 35),
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);
})
],
),
),
);

@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'dart:math' as math;
import 'package:tangheem/classes/colors.dart';
class CommonDropDownButton extends StatelessWidget {
@ -24,27 +24,37 @@ class CommonDropDownButton extends StatelessWidget {
highlightColor: Colors.transparent,
onTap: onPressed,
child: Container(
height: 40,
decoration: BoxDecoration(
color: color ?? ColorConsts.primaryBlue,
borderRadius: BorderRadius.circular(6),
),
padding: EdgeInsets.fromLTRB(8, 8, 8, 8),
height: 48,
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10), border: Border.all(color: ColorConsts.brownColor, width: .5)),
padding: EdgeInsets.fromLTRB(24, 15, 24, 15),
child: DropdownButtonHideUnderline(
child: DropdownButton<int>(
isExpanded: isDropDown,
dropdownColor: ColorConsts.secondaryWhite,
icon: SvgPicture.asset(
icon ?? "assets/icons/drop_menu.svg",
width: widthHeight ?? 10,
height: widthHeight ?? 5,
color: iconColor ?? ColorConsts.secondaryOrange,
),
hint: Text(
(list.isEmpty || index < 0) ? hintText : list[index],
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 12, color: Colors.white),
iconSize: 0,
// icon:
hint: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Transform(
alignment: Alignment.center,
transform: Matrix4.rotationY(math.pi),
child: Icon(Icons.play_arrow_rounded, color: ColorConsts.brownColor, size: 14),
),
// SvgPicture.asset(
// icon ?? "assets/icons/drop_menu.svg",
// width: widthHeight ?? 10,
// height: widthHeight ?? 5,
// color: iconColor ?? ColorConsts.brownColor,
// ),
Text(
(list.isEmpty || index < 0) ? hintText : list[index],
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 14, color: ColorConsts.brownColor),
),
],
),
focusColor: Colors.white,
style: TextStyle(color: Colors.white),

@ -1,58 +1,137 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:tangheem/classes/colors.dart';
import 'package:tangheem/extensions/string_extensions.dart';
import 'package:tangheem/extensions/widget_extensions.dart';
class CommonTextFieldWidget extends StatelessWidget {
class CommonTextFieldWidget extends StatefulWidget {
final String hint;
final TextEditingController controller;
final bool isPassword;
final bool isEmail;
final String prefixIcon;
final Widget suffixWidget;
final Function onTap;
final int maxLines;
final FocusNode focusNode;
final bool validate;
final Color fillColor;
final bool isBorder;
CommonTextFieldWidget({Key key, @required this.hint, @required this.controller, this.maxLines = 1, this.focusNode, this.isPassword = false, this.prefixIcon, this.suffixWidget, this.onTap})
CommonTextFieldWidget(
{Key key,
@required this.hint,
@required this.controller,
this.maxLines = 1,
this.focusNode,
this.isPassword = false,
this.isEmail = false,
this.prefixIcon,
this.suffixWidget,
this.onTap,
this.fillColor,
this.isBorder = false,
this.validate = false})
: super(key: key);
@override
_CommonTextFieldWidgetState createState() {
return _CommonTextFieldWidgetState();
}
}
class _CommonTextFieldWidgetState extends State<CommonTextFieldWidget> {
bool _formValidate = false;
@override
void initState() {
super.initState();
if (widget.controller != null) {
widget.controller.addListener(() {
if (widget.isEmail) {
if (_formValidate != widget.controller.text.isValidEmail()) {
_formValidate = widget.controller.text.isValidEmail();
setState(() {});
}
} else if (_formValidate != widget.controller.text.isNotEmpty) {
_formValidate = widget.controller.text.isNotEmpty;
setState(() {});
}
});
}
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return SizedBox(
child: TextField(
textAlignVertical: TextAlignVertical.center,
controller: controller,
obscureText: isPassword,
textInputAction: TextInputAction.next,
style: TextStyle(color: ColorConsts.primaryBlack, fontSize: 14),
cursorColor: ColorConsts.primaryBlue,
readOnly: onTap != null,
maxLines: maxLines,
onTap: onTap,
focusNode: focusNode,
scrollPhysics: BouncingScrollPhysics(),
decoration: InputDecoration(
contentPadding: EdgeInsets.fromLTRB(4, 4, 8, 4),
alignLabelWithHint: true,
fillColor: Colors.white,
filled: true,
hintStyle: TextStyle(color: ColorConsts.textGrey2, fontSize: 14),
hintText: hint,
suffixIcon: suffixWidget == null
? null
: Padding(
padding: EdgeInsets.only(left: 8, right: 0),
child: suffixWidget,
),
suffixIconConstraints: suffixWidget == null ? null : BoxConstraints(maxHeight: 30),
prefixIconConstraints: prefixIcon == null ? prefixIcon : BoxConstraints(maxHeight: 18),
prefixIcon: prefixIcon == null
? prefixIcon
: Padding(
padding: EdgeInsets.only(left: 4, right: 0),
child: SvgPicture.asset(prefixIcon, color: ColorConsts.textGrey2),
),
border: OutlineInputBorder(borderRadius: BorderRadius.circular(6), borderSide: BorderSide.none),
),
return Container(
decoration: BoxDecoration(
color: widget.fillColor ?? Color(0xffF8F7FB),
borderRadius: BorderRadius.circular(30),
border: Border.all(color: widget.isBorder ? Color(0xddddDDdd) : Colors.transparent, width: 1),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextField(
textAlignVertical: TextAlignVertical.center,
controller: widget.controller,
obscureText: widget.isPassword,
textInputAction: TextInputAction.next,
style: TextStyle(color: ColorConsts.darkText, fontSize: 14, fontFamily: "Montserrat"),
cursorColor: ColorConsts.primaryBlue,
readOnly: widget.onTap != null,
maxLines: widget.maxLines,
onTap: widget.onTap,
focusNode: widget.focusNode,
scrollPhysics: BouncingScrollPhysics(),
decoration: InputDecoration(
contentPadding: EdgeInsets.fromLTRB(4, 16, 24, 16),
alignLabelWithHint: true,
fillColor: widget.fillColor ?? Color(0xffF8F7FB),
filled: true,
hintStyle: TextStyle(color: ColorConsts.greyHintColor, fontSize: 14, fontFamily: "Montserrat"),
hintText: widget.hint,
// suffixIcon: widget.suffixWidget == null
// ? Container(
// color: Colors.green,
// child: Stack(
// alignment: Alignment.topCenter,
// children: [
// (Icon(Icons.check_circle_outline_rounded, color: (widget.controller != null && _formValidate) ? ColorConsts.borderDark2Text : ColorConsts.redLightColor, size: 20)),
// ],
// ),
// )
// : Padding(
// padding: EdgeInsets.only(left: 24, right: 0),
// child: widget.suffixWidget,
// ),
// suffixIconConstraints: widget.suffixWidget == null ? null : BoxConstraints(maxHeight: 30),
// prefixIconConstraints: widget.prefixIcon == null ? widget.prefixIcon : BoxConstraints(maxHeight: 18),
// prefixIcon: widget.prefixIcon == null
// ? widget.prefixIcon
// : Padding(
// padding: EdgeInsets.only(left: 4, right: 0),
// child: SvgPicture.asset(widget.prefixIcon, color: ColorConsts.textGrey2),
// ),
// border: InputBorder.none,
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(30),
borderSide: BorderSide(color: Colors.transparent, width: 1),
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(30),
borderSide: BorderSide(color: Colors.transparent, width: 1),
),
),
).expanded,
(Icon(Icons.check_circle_outline_rounded, color: (widget.controller != null && _formValidate) ? ColorConsts.borderDark2Text : ColorConsts.redLightColor, size: 20))
.paddingOnly(top: 14, left: 16),
],
),
);
}

@ -0,0 +1,55 @@
import 'package:flutter/material.dart';
import 'package:tangheem/extensions/int_extensions.dart';
import 'package:tangheem/extensions/string_extensions.dart';
class CommonHeader extends StatelessWidget {
final String title;
final Color gradiantColor;
final String assetImage;
CommonHeader(this.title, this.assetImage, this.gradiantColor, {Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return AspectRatio(
aspectRatio: 469 / 313,
child: Stack(
alignment: Alignment.center,
children: [
Container(
decoration: BoxDecoration(
color: Colors.transparent,
image: DecorationImage(
fit: BoxFit.cover,
image: AssetImage(assetImage),
),
),
),
Container(
decoration: BoxDecoration(
color: Colors.white,
gradient: LinearGradient(
begin: FractionalOffset.bottomLeft,
end: FractionalOffset.topRight,
colors: [
Color(0x00FFFFFF),
gradiantColor.withOpacity(.75),
gradiantColor,
],
stops: [0.0, 0.45, 1.0],
),
),
),
Column(
mainAxisSize: MainAxisSize.min,
children: [
Image.asset('assets/icons/new/Tangeem-logo-W.png', width: 50),
26.height,
title.toText(30),
],
),
],
),
);
}
}

@ -1,833 +0,0 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.8.2"
audio_session:
dependency: transitive
description:
name: audio_session
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.10"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
chewie:
dependency: transitive
description:
name: chewie
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.5"
chewie_audio:
dependency: transitive
description:
name: chewie_audio
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.16.0"
convert:
dependency: transitive
description:
name: convert
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.2"
crypto:
dependency: transitive
description:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.2"
csslib:
dependency: transitive
description:
name: csslib
url: "https://pub.dartlang.org"
source: hosted
version: "0.17.2"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
ffi:
dependency: transitive
description:
name: ffi
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
file:
dependency: transitive
description:
name: file
url: "https://pub.dartlang.org"
source: hosted
version: "6.1.4"
firebase_analytics:
dependency: "direct main"
description:
name: firebase_analytics
url: "https://pub.dartlang.org"
source: hosted
version: "9.3.6"
firebase_analytics_platform_interface:
dependency: transitive
description:
name: firebase_analytics_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "3.3.5"
firebase_analytics_web:
dependency: transitive
description:
name: firebase_analytics_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.2+5"
firebase_core:
dependency: "direct main"
description:
name: firebase_core
url: "https://pub.dartlang.org"
source: hosted
version: "1.23.0"
firebase_core_platform_interface:
dependency: transitive
description:
name: firebase_core_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "4.5.1"
firebase_core_web:
dependency: transitive
description:
name: firebase_core_web
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.2"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_html:
dependency: "direct main"
description:
name: flutter_html
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.1"
flutter_inappwebview:
dependency: "direct overridden"
description:
path: "."
ref: HEAD
resolved-ref: "252d836d52bff32870ed1b72231e428b0009e89e"
url: "https://github.com/CodeEagle/flutter_inappwebview"
source: git
version: "5.4.3+7"
flutter_layout_grid:
dependency: transitive
description:
name: flutter_layout_grid
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.6"
flutter_math_fork:
dependency: transitive
description:
name: flutter_math_fork
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.0"
flutter_slidable:
dependency: "direct main"
description:
name: flutter_slidable
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.0"
flutter_svg:
dependency: "direct main"
description:
name: flutter_svg
url: "https://pub.dartlang.org"
source: hosted
version: "0.23.0+1"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
flutter_web_plugins:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
fluttertoast:
dependency: "direct main"
description:
name: fluttertoast
url: "https://pub.dartlang.org"
source: hosted
version: "7.1.8"
html:
dependency: transitive
description:
name: html
url: "https://pub.dartlang.org"
source: hosted
version: "0.15.0"
http:
dependency: "direct main"
description:
name: http
url: "https://pub.dartlang.org"
source: hosted
version: "0.13.5"
http_parser:
dependency: transitive
description:
name: http_parser
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.1"
image_gallery_saver:
dependency: "direct main"
description:
name: image_gallery_saver
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.1"
intl:
dependency: "direct main"
description:
name: intl
url: "https://pub.dartlang.org"
source: hosted
version: "0.17.0"
js:
dependency: transitive
description:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.4"
just_audio:
dependency: "direct main"
description:
name: just_audio
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.29"
just_audio_platform_interface:
dependency: transitive
description:
name: just_audio_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "4.2.0"
just_audio_web:
dependency: transitive
description:
name: just_audio_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.7"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.11"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.4"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
mime:
dependency: transitive
description:
name: mime
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
nested:
dependency: transitive
description:
name: nested
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
numerus:
dependency: transitive
description:
name: numerus
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.1"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
path_drawing:
dependency: transitive
description:
name: path_drawing
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.1+1"
path_parsing:
dependency: transitive
description:
name: path_parsing
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.1"
path_provider:
dependency: "direct main"
description:
name: path_provider
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.11"
path_provider_android:
dependency: transitive
description:
name: path_provider_android
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.20"
path_provider_ios:
dependency: transitive
description:
name: path_provider_ios
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.11"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.7"
path_provider_macos:
dependency: transitive
description:
name: path_provider_macos
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.6"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.4"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
permission_handler:
dependency: "direct main"
description:
name: permission_handler
url: "https://pub.dartlang.org"
source: hosted
version: "6.1.3"
permission_handler_platform_interface:
dependency: transitive
description:
name: permission_handler_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "3.7.1"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "5.0.0"
platform:
dependency: transitive
description:
name: platform
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.0"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
process:
dependency: transitive
description:
name: process
url: "https://pub.dartlang.org"
source: hosted
version: "4.2.4"
provider:
dependency: transitive
description:
name: provider
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.3"
quiver:
dependency: transitive
description:
name: quiver
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.0"
record_mp3:
dependency: "direct main"
description:
name: record_mp3
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
rxdart:
dependency: transitive
description:
name: rxdart
url: "https://pub.dartlang.org"
source: hosted
version: "0.27.5"
share:
dependency: "direct main"
description:
name: share
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.4"
shared_preferences:
dependency: "direct main"
description:
name: shared_preferences
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.15"
shared_preferences_android:
dependency: transitive
description:
name: shared_preferences_android
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.13"
shared_preferences_ios:
dependency: transitive
description:
name: shared_preferences_ios
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
shared_preferences_linux:
dependency: transitive
description:
name: shared_preferences_linux
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
shared_preferences_macos:
dependency: transitive
description:
name: shared_preferences_macos
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.4"
shared_preferences_platform_interface:
dependency: transitive
description:
name: shared_preferences_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
shared_preferences_web:
dependency: transitive
description:
name: shared_preferences_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.4"
shared_preferences_windows:
dependency: transitive
description:
name: shared_preferences_windows
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
source_span:
dependency: transitive
description:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.2"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
syncfusion_flutter_core:
dependency: transitive
description:
name: syncfusion_flutter_core
url: "https://pub.dartlang.org"
source: hosted
version: "19.4.56"
syncfusion_flutter_pdf:
dependency: transitive
description:
name: syncfusion_flutter_pdf
url: "https://pub.dartlang.org"
source: hosted
version: "19.4.56-beta"
syncfusion_flutter_pdfviewer:
dependency: "direct main"
description:
name: syncfusion_flutter_pdfviewer
url: "https://pub.dartlang.org"
source: hosted
version: "19.4.56-beta"
syncfusion_flutter_pdfviewer_macos:
dependency: transitive
description:
name: syncfusion_flutter_pdfviewer_macos
url: "https://pub.dartlang.org"
source: hosted
version: "19.4.56-beta"
syncfusion_flutter_pdfviewer_platform_interface:
dependency: transitive
description:
name: syncfusion_flutter_pdfviewer_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "19.4.56-beta"
syncfusion_flutter_pdfviewer_web:
dependency: transitive
description:
name: syncfusion_flutter_pdfviewer_web
url: "https://pub.dartlang.org"
source: hosted
version: "19.4.56-beta"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.9"
tuple:
dependency: transitive
description:
name: tuple
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
url_launcher:
dependency: "direct main"
description:
name: url_launcher
url: "https://pub.dartlang.org"
source: hosted
version: "6.1.5"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.19"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.17"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.13"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
uuid:
dependency: transitive
description:
name: uuid
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.6"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.2"
video_player:
dependency: transitive
description:
name: video_player
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.7"
video_player_android:
dependency: transitive
description:
name: video_player_android
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.9"
video_player_avfoundation:
dependency: transitive
description:
name: video_player_avfoundation
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.5"
video_player_platform_interface:
dependency: transitive
description:
name: video_player_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "5.1.4"
video_player_web:
dependency: transitive
description:
name: video_player_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.12"
wakelock:
dependency: transitive
description:
name: wakelock
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.2"
wakelock_macos:
dependency: transitive
description:
name: wakelock_macos
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.0"
wakelock_platform_interface:
dependency: transitive
description:
name: wakelock_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.0"
wakelock_web:
dependency: transitive
description:
name: wakelock_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.0"
wakelock_windows:
dependency: transitive
description:
name: wakelock_windows
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.1"
webview_flutter:
dependency: transitive
description:
name: webview_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "2.8.0"
webview_flutter_android:
dependency: transitive
description:
name: webview_flutter_android
url: "https://pub.dartlang.org"
source: hosted
version: "2.10.2"
webview_flutter_platform_interface:
dependency: transitive
description:
name: webview_flutter_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.3"
webview_flutter_wkwebview:
dependency: transitive
description:
name: webview_flutter_wkwebview
url: "https://pub.dartlang.org"
source: hosted
version: "2.9.4"
win32:
dependency: transitive
description:
name: win32
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.0"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0+2"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "5.4.1"
youtube_player_flutter:
dependency: "direct main"
description:
name: youtube_player_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "8.1.0"
sdks:
dart: ">=2.17.0 <3.0.0"
flutter: ">=3.0.0"

@ -72,6 +72,7 @@ flutter:
# To add assets to your application, add an assets section, like this:
assets:
- assets/icons/
- assets/icons/new/
- assets/logos/
- assets/files/
@ -87,6 +88,16 @@ flutter:
# list giving the asset and other descriptors for the font. For
# example:
fonts:
- family: HelveticaNeue
fonts:
- asset: assets/fonts/Helvetica-Neue-W23-for-SKY-Regular.ttf
- asset: assets/fonts/Helvetica-Neue-W23-for-SKY-Bold.ttf
weight: 700
- family: Montserrat
fonts:
- asset: assets/fonts/Montserrat-Regular.ttf
- asset: assets/fonts/Montserrat-Bold.ttf
weight: 700
- family: DroidKufi
fonts:
- asset: assets/fonts/DroidKufi-Regular.ttf

Loading…
Cancel
Save