drawer item align issue fixed on arabic.

merge-requests/120/head
Sikander Saleem 3 years ago
parent 4acd7a4325
commit 47732d67cb

@ -90,9 +90,9 @@ extension EmailValidator on String {
style: TextStyle(fontSize: 13, fontWeight: FontWeight.w600, color: color ?? MyColors.darkTextColor, letterSpacing: -0.52, decoration: isUnderLine ? TextDecoration.underline : null), style: TextStyle(fontSize: 13, fontWeight: FontWeight.w600, color: color ?? MyColors.darkTextColor, letterSpacing: -0.52, decoration: isUnderLine ? TextDecoration.underline : null),
); );
Widget toText14({Color? color, bool isUnderLine = false, bool isBold = false, FontWeight? weight, int? maxlines, bool isCenter = false}) => Text( Widget toText14({Color? color, bool isUnderLine = false, bool isBold = false, FontWeight? weight, int? maxlines, TextAlign? textAlign, bool isCenter = false}) => Text(
this, this,
textAlign: isCenter ? TextAlign.center : TextAlign.left, textAlign: isCenter ? TextAlign.center : (textAlign ?? TextAlign.left),
maxLines: maxlines, maxLines: maxlines,
style: TextStyle( style: TextStyle(
color: color ?? MyColors.darkTextColor, color: color ?? MyColors.darkTextColor,

@ -820,8 +820,8 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
sFileType = ""; sFileType = "";
deleteData(); deleteData();
favUsersList.clear(); favUsersList.clear();
searchedChats!.clear(); searchedChats?.clear();
pChatHistory!.clear(); pChatHistory?.clear();
chatHubConnection.stop(); chatHubConnection.stop();
AppState().chatDetails = null; AppState().chatDetails = null;
} }

@ -48,6 +48,9 @@ class _SuccessDialogState extends State<SuccessDialog> with TickerProviderStateM
width: size, width: size,
height: size, height: size,
child: Card( child: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(25.0),
),
child: Lottie.asset( child: Lottie.asset(
'assets/lottie/lt_success.json', 'assets/lottie/lt_success.json',
repeat: false, repeat: false,

@ -150,13 +150,9 @@ class _AppDrawerState extends State<AppDrawer> {
Widget menuItem(String icon, String title, String routeName, {Color? color, bool closeDrawer = true, VoidCallback? onPress}) { Widget menuItem(String icon, String title, String routeName, {Color? color, bool closeDrawer = true, VoidCallback? onPress}) {
return Row( return Row(
children: [ children: [
SvgPicture.asset( SvgPicture.asset(icon, height: 20, width: 20),
icon,
height: 20,
width: 20,
),
9.width, 9.width,
title.toText14(color: color).expanded title.toText14(color: color, textAlign: AppState().isArabic(context) ? TextAlign.right : null).expanded,
], ],
).paddingOnly(left: 21, top: 10, bottom: 10, right: 21).onPress(closeDrawer ).paddingOnly(left: 21, top: 10, bottom: 10, right: 21).onPress(closeDrawer
? () async { ? () async {

@ -1,60 +0,0 @@
import 'dart:ui';
import 'package:flutter/material.dart';
class DrawerItem extends StatefulWidget {
final String title;
final String subTitle;
final IconData icon;
final Color color;
final dynamic assetLink;
const DrawerItem(this.title, {required this.icon, required this.color, this.subTitle = '', this.assetLink});
@override
_DrawerItemState createState() => _DrawerItemState();
}
class _DrawerItemState extends State<DrawerItem> {
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(top: 0, bottom: 5, left: 0, right: 0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
if (widget.assetLink != null)
Container(
height: 20,
width: 20,
child: Image.asset(widget.assetLink),
),
if (widget.assetLink == null)
Icon(
widget.icon,
color: widget.color,
size: 25,
),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.45,
child: Text(widget.title,
style: TextStyle(
color: widget.color ?? Color(0xFF2E303A),
fontSize: 14,
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
letterSpacing: -0.84,
)),
),
],
),
),
],
));
}
}

@ -57,7 +57,7 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
} }
void validateTransaction() async { void validateTransaction() async {
try { // try {
Utils.showLoading(context); Utils.showLoading(context);
List<Map<String, dynamic>> values = getEitDffStructureList!.map((e) { List<Map<String, dynamic>> values = getEitDffStructureList!.map((e) {
String tempVar = e.eSERVICESDV?.pIDCOLUMNNAME ?? ""; String tempVar = e.eSERVICESDV?.pIDCOLUMNNAME ?? "";
@ -98,10 +98,10 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
Utils.showLoading(context); Utils.showLoading(context);
await LeaveBalanceApiClient().cancelHrTransaction(submitEITTransactionList.pTRANSACTIONID!); await LeaveBalanceApiClient().cancelHrTransaction(submitEITTransactionList.pTRANSACTIONID!);
Utils.hideLoading(context); Utils.hideLoading(context);
} catch (ex) { // } catch (ex) {
Utils.hideLoading(context); // Utils.hideLoading(context);
Utils.handleException(ex, context, null); // Utils.handleException(ex, context, null);
} // }
} }
String dESCFLEXCONTEXTCODE = ""; String dESCFLEXCONTEXTCODE = "";

@ -170,7 +170,6 @@ class _MarkAttendanceWidgetState extends State<MarkAttendanceWidget> {
); );
} }
} catch (ex) { } catch (ex) {
print(ex);
Utils.hideLoading(context); Utils.hideLoading(context);
Utils.handleException(ex, context, (msg) { Utils.handleException(ex, context, (msg) {
Utils.confirmDialog(context, msg); Utils.confirmDialog(context, msg);
@ -239,7 +238,6 @@ class _MarkAttendanceWidgetState extends State<MarkAttendanceWidget> {
child: SuccessDialog(widget.isFromDashboard), child: SuccessDialog(widget.isFromDashboard),
); );
} catch (ex) { } catch (ex) {
print("performWifiAttendance: " + ex.toString());
await closeWifiRequest(); await closeWifiRequest();
Utils.hideLoading(context); Utils.hideLoading(context);
Utils.handleException(ex, context, (msg) { Utils.handleException(ex, context, (msg) {

Loading…
Cancel
Save