BASE: Update Icons & Name Of The App.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import 'package:customer/themes/responsive.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import '../controllers/theme_controller.dart';
|
||||
import 'app_them_data.dart';
|
||||
|
||||
@@ -29,23 +29,46 @@ class CustomDialogBox extends StatelessWidget {
|
||||
return Obx(() {
|
||||
final isDark = themeController.isDark.value;
|
||||
|
||||
return Dialog(shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), elevation: 0, backgroundColor: Colors.transparent, child: contentBox(context, isDark));
|
||||
return Dialog(
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
|
||||
elevation: 0,
|
||||
backgroundColor: Colors.transparent,
|
||||
child: contentBox(context, isDark),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
Widget contentBox(BuildContext context, bool isDark) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(20),
|
||||
decoration: BoxDecoration(shape: BoxShape.rectangle, color: isDark ? AppThemeData.greyDark100 : AppThemeData.grey100, borderRadius: BorderRadius.circular(20)),
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.rectangle,
|
||||
color: isDark ? AppThemeData.greyDark100 : AppThemeData.grey100,
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
img ?? const SizedBox(),
|
||||
const SizedBox(height: 20),
|
||||
if (title.isNotEmpty) Text(title.tr(), style: AppThemeData.boldTextStyle(fontSize: 20, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
if (title.isNotEmpty)
|
||||
Text(
|
||||
title.tr(),
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 20,
|
||||
color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
if (descriptions.isNotEmpty)
|
||||
Text(descriptions.tr(), textAlign: TextAlign.center, style: AppThemeData.regularTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
Text(
|
||||
descriptions.tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: AppThemeData.regularTextStyle(
|
||||
fontSize: 14,
|
||||
color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Row(
|
||||
children: [
|
||||
@@ -55,9 +78,25 @@ class CustomDialogBox extends StatelessWidget {
|
||||
child: Container(
|
||||
width: Responsive.width(100, context),
|
||||
height: Responsive.height(5, context),
|
||||
decoration: BoxDecoration(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900, borderRadius: BorderRadius.circular(200)),
|
||||
decoration: BoxDecoration(
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark900
|
||||
: AppThemeData.grey900,
|
||||
borderRadius: BorderRadius.circular(200),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(negativeString.tr(), textAlign: TextAlign.center, style: AppThemeData.mediumTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark100 : AppThemeData.grey100)),
|
||||
child: Text(
|
||||
negativeString.tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
fontSize: 14,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark100
|
||||
: AppThemeData.grey100,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -69,8 +108,20 @@ class CustomDialogBox extends StatelessWidget {
|
||||
child: Container(
|
||||
width: Responsive.width(100, context),
|
||||
height: Responsive.height(5, context),
|
||||
decoration: BoxDecoration(color: AppThemeData.success300, borderRadius: BorderRadius.circular(200)),
|
||||
child: Center(child: Text('Confirm'.tr(), textAlign: TextAlign.center, style: AppThemeData.mediumTextStyle(fontSize: 14, color: AppThemeData.grey100))),
|
||||
decoration: BoxDecoration(
|
||||
color: AppThemeData.success300,
|
||||
borderRadius: BorderRadius.circular(200),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'Confirm'.tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
fontSize: 14,
|
||||
color: AppThemeData.grey100,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import '../controllers/theme_controller.dart';
|
||||
|
||||
Future<void> configEasyLoading() async {
|
||||
|
||||
@@ -2,7 +2,7 @@ import 'package:customer/controllers/theme_controller.dart';
|
||||
import 'package:customer/themes/responsive.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'app_them_data.dart';
|
||||
|
||||
class RoundedButtonBorder extends StatelessWidget {
|
||||
@@ -49,26 +49,51 @@ class RoundedButtonBorder extends StatelessWidget {
|
||||
height: Responsive.height(height ?? 6, context),
|
||||
decoration: ShapeDecoration(
|
||||
color: color ?? Colors.transparent,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(radius ?? 50), side: BorderSide(color: borderColor ?? AppThemeData.danger300)),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(radius ?? 50),
|
||||
side: BorderSide(color: borderColor ?? AppThemeData.danger300),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
if (isRight == false) Padding(padding: const EdgeInsets.only(right: 10, left: 0), child: icon),
|
||||
if (isRight == false)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 10, left: 0),
|
||||
child: icon,
|
||||
),
|
||||
isCenter == true
|
||||
? Text(title.tr(), textAlign: TextAlign.center, style: AppThemeData.semiBoldTextStyle(fontSize: fontSizes ?? 14, color: textColor ?? AppThemeData.grey800))
|
||||
? Text(
|
||||
title.tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: AppThemeData.semiBoldTextStyle(
|
||||
fontSize: fontSizes ?? 14,
|
||||
color: textColor ?? AppThemeData.grey800,
|
||||
),
|
||||
)
|
||||
: Expanded(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(right: isRight == null ? 0 : 30),
|
||||
child: Text(
|
||||
title.tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: AppThemeData.semiBoldTextStyle(fontSize: fontSizes ?? 14, color: textColor ?? (isDark ? AppThemeData.grey100 : AppThemeData.grey700)),
|
||||
style: AppThemeData.semiBoldTextStyle(
|
||||
fontSize: fontSizes ?? 14,
|
||||
color:
|
||||
textColor ??
|
||||
(isDark
|
||||
? AppThemeData.grey100
|
||||
: AppThemeData.grey700),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
if (isRight == true) Padding(padding: const EdgeInsets.only(left: 10, right: 20), child: icon),
|
||||
if (isRight == true)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 10, right: 20),
|
||||
child: icon,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:customer/themes/responsive.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'app_them_data.dart';
|
||||
|
||||
class RoundedButtonFill extends StatelessWidget {
|
||||
@@ -45,21 +45,48 @@ class RoundedButtonFill extends StatelessWidget {
|
||||
child: Container(
|
||||
width: Responsive.width(width ?? 100, context),
|
||||
height: Responsive.height(height ?? 6, context),
|
||||
decoration: ShapeDecoration(color: color, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(borderRadius ?? 50))),
|
||||
decoration: ShapeDecoration(
|
||||
color: color,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(borderRadius ?? 50),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
if (isRight == false) Padding(padding: const EdgeInsets.only(right: 10, left: 10), child: icon),
|
||||
if (isRight == false)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 10, left: 10),
|
||||
child: icon,
|
||||
),
|
||||
isCenter == true
|
||||
? Text(title.tr(), textAlign: TextAlign.center, style: AppThemeData.semiBoldTextStyle(fontSize: fontSizes ?? 16, color: textColor ?? AppThemeData.grey50))
|
||||
? Text(
|
||||
title.tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: AppThemeData.semiBoldTextStyle(
|
||||
fontSize: fontSizes ?? 16,
|
||||
color: textColor ?? AppThemeData.grey50,
|
||||
),
|
||||
)
|
||||
: Expanded(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(right: isRight == null ? 0 : 30),
|
||||
child: Text(title.tr(), textAlign: TextAlign.center, style: AppThemeData.semiBoldTextStyle(fontSize: fontSizes ?? 16, color: textColor ?? AppThemeData.grey50)),
|
||||
child: Text(
|
||||
title.tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: AppThemeData.semiBoldTextStyle(
|
||||
fontSize: fontSizes ?? 16,
|
||||
color: textColor ?? AppThemeData.grey50,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
if (isRight == true) Padding(padding: const EdgeInsets.only(left: 10, right: 10), child: icon),
|
||||
if (isRight == true)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 10, right: 10),
|
||||
child: icon,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -2,7 +2,7 @@ import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import '../controllers/theme_controller.dart';
|
||||
import 'app_them_data.dart';
|
||||
|
||||
@@ -77,20 +77,39 @@ class _TextFieldWidgetState extends State<TextFieldWidget> {
|
||||
final themeController = Get.find<ThemeController>();
|
||||
final isDark = themeController.isDark.value;
|
||||
|
||||
final borderColor = widget.borderColor ?? (_focusNode.hasFocus ? (isDark ? AppThemeData.greyDark400 : AppThemeData.grey400) : (isDark ? AppThemeData.greyDark200 : AppThemeData.grey200));
|
||||
final borderColor =
|
||||
widget.borderColor ??
|
||||
(_focusNode.hasFocus
|
||||
? (isDark ? AppThemeData.greyDark400 : AppThemeData.grey400)
|
||||
: (isDark ? AppThemeData.greyDark200 : AppThemeData.grey200));
|
||||
|
||||
final fillColor =
|
||||
widget.backgroundColor ?? (isDark ? (_focusNode.hasFocus ? AppThemeData.greyDark50 : AppThemeData.greyDark100) : (_focusNode.hasFocus ? AppThemeData.grey100 : Colors.transparent));
|
||||
widget.backgroundColor ??
|
||||
(isDark
|
||||
? (_focusNode.hasFocus
|
||||
? AppThemeData.greyDark50
|
||||
: AppThemeData.greyDark100)
|
||||
: (_focusNode.hasFocus
|
||||
? AppThemeData.grey100
|
||||
: Colors.transparent));
|
||||
|
||||
final textColor = isDark ? AppThemeData.greyDark900 : AppThemeData.grey900;
|
||||
|
||||
final hintColor = widget.hintColor ?? (isDark ? AppThemeData.grey400 : AppThemeData.greyDark400);
|
||||
final hintColor =
|
||||
widget.hintColor ??
|
||||
(isDark ? AppThemeData.grey400 : AppThemeData.greyDark400);
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (widget.title != null) ...[
|
||||
Text(widget.title!.tr(), style: AppThemeData.boldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark800 : AppThemeData.grey800)),
|
||||
Text(
|
||||
widget.title!.tr(),
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 14,
|
||||
color: isDark ? AppThemeData.greyDark800 : AppThemeData.grey800,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
],
|
||||
TextFormField(
|
||||
@@ -112,18 +131,46 @@ class _TextFieldWidgetState extends State<TextFieldWidget> {
|
||||
filled: true,
|
||||
enabled: widget.enable ?? true,
|
||||
fillColor: fillColor,
|
||||
contentPadding: EdgeInsets.symmetric(vertical: widget.title == null ? 15 : (widget.enable == false ? 13 : 8), horizontal: 10),
|
||||
contentPadding: EdgeInsets.symmetric(
|
||||
vertical:
|
||||
widget.title == null ? 15 : (widget.enable == false ? 13 : 8),
|
||||
horizontal: 10,
|
||||
),
|
||||
prefixIcon: widget.prefix,
|
||||
suffixIcon: widget.suffix,
|
||||
prefixIconConstraints: const BoxConstraints(minHeight: 20, minWidth: 20),
|
||||
suffixIconConstraints: const BoxConstraints(minHeight: 20, minWidth: 20),
|
||||
border: OutlineInputBorder(borderRadius: BorderRadius.circular(8), borderSide: BorderSide(color: borderColor)),
|
||||
enabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(8), borderSide: BorderSide(color: borderColor)),
|
||||
focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(8), borderSide: BorderSide(color: borderColor, width: 1.2)),
|
||||
errorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(8), borderSide: const BorderSide(color: Colors.red)),
|
||||
disabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(8), borderSide: BorderSide(color: borderColor)),
|
||||
prefixIconConstraints: const BoxConstraints(
|
||||
minHeight: 20,
|
||||
minWidth: 20,
|
||||
),
|
||||
suffixIconConstraints: const BoxConstraints(
|
||||
minHeight: 20,
|
||||
minWidth: 20,
|
||||
),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: BorderSide(color: borderColor),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: BorderSide(color: borderColor),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: BorderSide(color: borderColor, width: 1.2),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: const BorderSide(color: Colors.red),
|
||||
),
|
||||
disabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: BorderSide(color: borderColor),
|
||||
),
|
||||
hintText: widget.hintText.tr(),
|
||||
hintStyle: AppThemeData.regularTextStyle(fontSize: 14.sp, color: hintColor),
|
||||
hintStyle: AppThemeData.regularTextStyle(
|
||||
fontSize: 14.sp,
|
||||
color: hintColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user