conflict resolve

This commit is contained in:
priyanka
2024-03-21 00:17:38 -07:00
21 changed files with 1222 additions and 96 deletions

View File

@@ -3,6 +3,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:traderscircuit/Utils/text.dart';
class CommonAppbar extends StatelessWidget implements PreferredSizeWidget {
@override
@@ -10,16 +11,22 @@ class CommonAppbar extends StatelessWidget implements PreferredSizeWidget {
const CommonAppbar(
{Key? key,
required this.titleTxt,
this.suffixIcon,
this.showLeading = true,
this.customBack,
this.backPageName = '',
this.customActionWidget,
this.onCustomActionPressed,
this.height = 105})
: super(key: key);
final String titleTxt;
final String? suffixIcon;
final bool? showLeading;
final bool? customBack;
final String? backPageName;
final Widget? customActionWidget;
final VoidCallback? onCustomActionPressed;
final double height;
@override
Widget build(BuildContext context) {
@@ -50,27 +57,55 @@ class CommonAppbar extends StatelessWidget implements PreferredSizeWidget {
centerTitle: false,
titlePadding: EdgeInsets.all(0),
title: Padding(
padding: EdgeInsets.only(left: 16.w),
padding: EdgeInsets.only(left: 16.w, right: 16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.end,
children: [
Text(
titleTxt,
style: TextStyle(
color: Colors.white,
fontSize: 24.sp,
fontWeight: FontWeight.w500,
fontFamily: 'manrope'),
maxLines: 2,
softWrap: true,
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
titleTxt,
style: TextStyle(
color: Colors.white,
fontSize: 24.sp,
fontWeight: FontWeight.w500,
fontFamily: 'manrope'),
maxLines: 2,
softWrap: true,
),
],
),
// newTextfield(
// FontWeight.w400, 0)
],
),
),
),
actions: [
// if (calendarWidget == true)
// InkWell(
// onTap: onCustomActionPressed,
// child: Padding(
// padding: EdgeInsets.only(right: 14.w),
// child: Icon(
// Icons.calendar_month_outlined,
// color: Color(0xFF3192D8),
// size: 28,
// ),
// ),
// ),
if (customActionWidget != null)
InkWell(
onTap: onCustomActionPressed,
child: Padding(
padding: EdgeInsets.only(right: 14.w),
child: customActionWidget,
),
),
],
),
);
}

View File

@@ -0,0 +1,172 @@
// ignore_for_file: prefer_const_constructors
import 'dart:ui';
import 'package:dropdown_button2/dropdown_button2.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_svg/flutter_svg.dart';
class CommonDropdownBtn extends StatefulWidget {
const CommonDropdownBtn({
required this.hint,
required this.items,
this.isEnabled = true,
this.islocation = false,
this.textcolor = false,
this.onItemSelected,
bool showAddButton = false,
super.key,
});
final String hint;
final List<String>? items;
final void Function(String)? onItemSelected;
final bool isEnabled;
final bool islocation;
final bool textcolor;
@override
State<CommonDropdownBtn> createState() => _CommonDropdownBtnState();
}
class _CommonDropdownBtnState extends State<CommonDropdownBtn> {
final kInnerDecoration = BoxDecoration(
color: Colors.white,
border: Border.all(color: Colors.white),
borderRadius: BorderRadius.circular(32),
);
late String label;
final List<String> items = [
'Item1',
'Item2',
'Item3',
'Item4',
'Item5',
'Item6',
'Item7',
'Item8',
];
String? selectedValue;
@override
Widget build(BuildContext context) {
return DropdownButtonHideUnderline(
child: Row(
children: [
widget.islocation
? Padding(
padding: EdgeInsets.only(left: 4.w),
child: SvgPicture.asset("assets/svg/location.svg"),
)
: SizedBox(),
Expanded(
child: DropdownButton2(
isExpanded: true,
hint: Row(
children: [
// SizedBox(
// width: 4,
// ),
// widget.islocation
// ? SvgPicture.asset("assets/svg/location.svg")
// : SizedBox(),
// widget.islocation ? sizedBoxWidth(4.w) : SizedBox(),
Expanded(
child: Text(
widget.hint,
style: TextStyle(
fontSize: 12.sp,
//fontWeight: FontWeight.bold,
color: Colors.white,
fontWeight: FontWeight.w500),
overflow: TextOverflow.ellipsis,
),
),
],
),
items: widget.items!
.map((item) => DropdownMenuItem<String>(
value: item,
child: Text(
item,
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
fontFamily: 'manrope',
fontWeight: FontWeight.w500,
),
overflow: TextOverflow.ellipsis,
),
))
.toList(),
value: selectedValue,
onChanged: (value) {
setState(() {
selectedValue = value as String;
});
},
buttonStyleData: ButtonStyleData(
height: 50.h,
width: double.infinity,
padding: EdgeInsets.only(left: 12.w, right: 4.w),
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xFFffffff).withOpacity(0.1),
Color(0xFFFFFFFF).withOpacity(0.05),
],
stops: [
0.1,
1,
]),
borderRadius: BorderRadius.circular(10),
border: Border.all(
color: Color(0xffFEF3F8),
),
color: Color(0xFFFFFFFF).withOpacity(0.05),
),
elevation: 0,
),
iconStyleData: IconStyleData(
icon: Icon(
Icons.keyboard_arrow_down,
),
iconSize: 23.sp,
iconEnabledColor: Color(0xFF9A0000),
iconDisabledColor: Color(0xFF9A0000),
),
dropdownStyleData: DropdownStyleData(
maxHeight: 200,
width: 350,
padding: null,
// padding: EdgeInsets.symmetric(horizontal: 16.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
border: Border.all(
color: Color(0xffCCCCCC),
),
color: Color(0xFF9A0000).withOpacity(0.9),
),
elevation: 0,
// offset: const Offset(-20, 0),
scrollbarTheme: ScrollbarThemeData(
radius: const Radius.circular(40),
thickness: MaterialStateProperty.all<double>(6),
thumbVisibility: MaterialStateProperty.all<bool>(true),
),
),
menuItemStyleData: const MenuItemStyleData(
height: 40,
padding: EdgeInsets.only(left: 14, right: 14),
),
),
),
],
),
);
}
}

View File

@@ -18,6 +18,8 @@ class CustomTextFormField extends StatefulWidget {
this.texttype,
this.inputFormatters,
this.onInput,
this.onTap,
this.suffixIcon,
}) : super(key: key);
final dynamic validator;
@@ -34,6 +36,8 @@ class CustomTextFormField extends StatefulWidget {
final TextInputType? texttype;
final dynamic inputFormatters;
final Function(String)? onInput;
final VoidCallback? onTap;
final Widget? suffixIcon;
@override
State<CustomTextFormField> createState() => _CustomTextFormFieldState();
@@ -80,6 +84,7 @@ class _CustomTextFormFieldState extends State<CustomTextFormField> {
cursorColor: Colors.red,
initialValue: widget.value,
readOnly: widget.readonly,
onTap: widget.onTap,
enabled: widget.enabled,
enableInteractiveSelection: false,
maxLines: widget.maxlines,
@@ -117,7 +122,9 @@ class _CustomTextFormFieldState extends State<CustomTextFormField> {
],
),
)
: null,
: widget.suffixIcon == null
? null
: widget.suffixIcon!,
border: InputBorder.none,
contentPadding: EdgeInsets.symmetric(horizontal: 10),
),

View File

@@ -231,23 +231,34 @@ Widget text14W300(String text) {
);
}
<<<<<<< HEAD
Widget text14W400(String text) {
return Text(
=======
Widget text14W400(String text) { return Text(
>>>>>>> 9a3ee57750db74808606d8117676461f7d75fd06
text,
style: TextStyle(
fontSize: 14.sp,
color: Colors.white,
<<<<<<< HEAD
=======
>>>>>>> 9a3ee57750db74808606d8117676461f7d75fd06
fontWeight: FontWeight.w400,
fontFamily: 'manrope'),
);
}
Widget text14W500(String text) {
return Text(
text,
style: TextStyle(
fontSize: 14.sp,
color: Colors.white,
fontWeight: FontWeight.w500,
fontFamily: 'manrope'),
);
@@ -259,11 +270,13 @@ Widget text16W400_DADADA(String text) {
style: TextStyle(
fontSize: 16.sp,
color: Color(0xFFDADADA),
fontWeight: FontWeight.w400,
fontFamily: 'manrope'),
);
}
Widget text14W400_979797(String text) {
return Text(
text,
@@ -307,3 +320,4 @@ Widget text14W500_black(String text) {
fontFamily: 'manrope'),
);
}