|
|
|
|
@ -236,9 +236,6 @@ class Helpers {
|
|
|
|
|
return parsedString;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static InputDecoration textFieldSelectorDecoration(
|
|
|
|
|
String hintText, String selectedText, bool isDropDown,
|
|
|
|
|
{Icon suffixIcon, Color dropDownColor}) {
|
|
|
|
|
@ -334,30 +331,46 @@ class Helpers {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static getBoxTabsBoxDecoration(
|
|
|
|
|
{
|
|
|
|
|
bool isFirst = false,
|
|
|
|
|
{bool isFirst = false,
|
|
|
|
|
bool isMiddle = false,
|
|
|
|
|
bool isLast = false,
|
|
|
|
|
bool isActive = false,
|
|
|
|
|
double radius = 6.0
|
|
|
|
|
}) {
|
|
|
|
|
return BoxDecoration(
|
|
|
|
|
double radius = 6.0}) {
|
|
|
|
|
return BoxDecoration(
|
|
|
|
|
color: isActive ? AppGlobal.appRedColor : Color(0xFFEAEAEA),
|
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
|
topRight: Radius.circular(isActive?isFirst || isMiddle?radius:0:0),
|
|
|
|
|
bottomRight: Radius.circular(isActive?isFirst || isMiddle?radius:0:0),
|
|
|
|
|
topLeft: Radius.circular(isActive?isLast|| isMiddle?radius:0:0),
|
|
|
|
|
bottomLeft: Radius.circular(isActive?isLast || isMiddle?radius:0:0)
|
|
|
|
|
),
|
|
|
|
|
topRight: Radius.circular(isActive
|
|
|
|
|
? isFirst || isMiddle
|
|
|
|
|
? radius
|
|
|
|
|
: 0
|
|
|
|
|
: 0),
|
|
|
|
|
topLeft: Radius.circular(isActive
|
|
|
|
|
? isLast || isMiddle
|
|
|
|
|
? radius
|
|
|
|
|
: 0
|
|
|
|
|
: 0),
|
|
|
|
|
bottomRight: Radius.circular(isActive
|
|
|
|
|
? isFirst || isMiddle
|
|
|
|
|
? radius
|
|
|
|
|
: 0
|
|
|
|
|
: 0),
|
|
|
|
|
bottomLeft: Radius.circular(isActive
|
|
|
|
|
? isLast || isMiddle
|
|
|
|
|
? radius
|
|
|
|
|
: 0
|
|
|
|
|
: 0)),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static getBgTabColor(){
|
|
|
|
|
static getBgTabColor() {
|
|
|
|
|
return Color(0xFFEAEAEA);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static getTabText({String title, bool isActive = false,}){
|
|
|
|
|
static getTabText({
|
|
|
|
|
String title,
|
|
|
|
|
bool isActive = false,
|
|
|
|
|
}) {
|
|
|
|
|
return AppText(
|
|
|
|
|
title,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
|
|
|
|
@ -365,16 +378,14 @@ class Helpers {
|
|
|
|
|
letterSpacing: -0.48,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static getTabHeight(BuildContext context){
|
|
|
|
|
static getTabHeight(BuildContext context) {
|
|
|
|
|
final screenSize = MediaQuery.of(context).size;
|
|
|
|
|
return screenSize.height * 0.07;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static getTabCounter({bool isActive: false,int counter}){
|
|
|
|
|
static getTabCounter({bool isActive: false, int counter}) {
|
|
|
|
|
return Container(
|
|
|
|
|
margin: EdgeInsets.all(4),
|
|
|
|
|
width: 15,
|
|
|
|
|
@ -396,8 +407,6 @@ class Helpers {
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static String convertToTitleCase(String text) {
|
|
|
|
|
if (text == null) {
|
|
|
|
|
return null;
|
|
|
|
|
@ -424,7 +433,4 @@ class Helpers {
|
|
|
|
|
// Join/Merge all words back to one String
|
|
|
|
|
return capitalizedWords.join(' ');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|