This commit is contained in:
Abhishek Raju Garad
2024-06-11 11:29:45 +05:30
parent 2a4d8922c6
commit 23cb7257f9
6 changed files with 36 additions and 24 deletions

View File

@@ -38,6 +38,14 @@ class NetworkApiServices {
data: response.data,
ResponseStatus.SUCCESS,
);
} else if (response.statusCode == 203) {
print(response.data);
return ResponseData<dynamic>("validation", ResponseStatus.PRIVATE,
data: response.data);
} else if (response.statusCode == 202) {
print(response.data);
return ResponseData<dynamic>("success", ResponseStatus.PRIVATE,
data: response.data);
} else {
try {
return ResponseData<dynamic>(
@@ -72,7 +80,7 @@ class NetworkApiServices {
SharedPreferences prefs = await SharedPreferences.getInstance();
String? token = prefs.getString('accessToken');
try {
response = await dio.post(url,
response = await dio.post(url,
data: data,
options: (token == null || token == "")
? Options(
@@ -99,9 +107,9 @@ class NetworkApiServices {
return ResponseData<dynamic>("success", ResponseStatus.SUCCESS,
data: response.data);
} else if (response.statusCode == 203) {
print(response.data);
print(response.data['message'].toString());
return ResponseData<dynamic>("validation", ResponseStatus.PRIVATE,
data: response.data);
data: response.data['message'].toString());
} else if (response.statusCode == 202) {
print(response.data);
return ResponseData<dynamic>("success", ResponseStatus.PRIVATE,

View File

@@ -186,6 +186,8 @@ class _HomeScreenState extends State<HomeScreen> {
: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceAround,
children: [
commoncontainer(
width: 250.w,
@@ -210,7 +212,7 @@ class _HomeScreenState extends State<HomeScreen> {
.nSEINDEXNifty50!.lastPrice!,
),
),
sizedBoxWidth(8.w),
sizedBoxWidth(10.w),
commoncontainer(
width: 250.w,
text: homeModel
@@ -417,7 +419,7 @@ class _HomeScreenState extends State<HomeScreen> {
child: text16W400_DADADA(
'The Beauty and Power of Video')),
// sizedBoxWidth(10.w),
const Spacer(),
SizedBox(width: 4),
InkWell(
onTap: () {
Get.toNamed(RouteName.contentbytes);
@@ -807,7 +809,7 @@ Widget commoncontainer({
),
),
child: Padding(
padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 5.w),
padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 4.w),
child: Column(
children: [
Row(
@@ -832,7 +834,7 @@ Widget commoncontainer({
),
],
),
sizedBoxHeight(8.w),
sizedBoxHeight(6.w),
text14W400(
rate.contains("-")
? "$rate ($percentageChange%)"

View File

@@ -164,6 +164,8 @@ class _ShortTradeState extends State<ShortTrade> {
SizedBox(
height: 0.57.sh,
child: TabBarView(
physics:
NeverScrollableScrollPhysics(),
children: [
ActiveCallsTab(productsController
.selectedIndex.value ==
@@ -460,8 +462,7 @@ class _ShortTradeState extends State<ShortTrade> {
),
),
);
}
}
void _unlockbottomsheet() {
Get.bottomSheet(

View File

@@ -250,7 +250,7 @@ class _LoginScreenState extends State<LoginScreen> {
if (isValid!) {
FocusManager.instance.primaryFocus
?.unfocus();
if (isValid != null && isValid) {
if (isValid != null && isValid) {
Map<String, String> myLoginData = {
"mobile_number": phonecontroller.text,
};

View File

@@ -20,7 +20,8 @@ class SendOtpBloc extends Bloc<SendOtpEvent, SendOtpState> {
if (resp.status == ResponseStatus.SUCCESS) {
emit(SendOtpState.success);
} else {
}
else {
emit(SendOtpState.failure);
}
} catch (e) {