Merge pull request #152 from WDI-Ideas/bugs23aug
bugs solved for create post and login page
This commit is contained in:
@@ -245,11 +245,17 @@ class NetworkApiServices {
|
||||
return ResponseData<dynamic>(
|
||||
e.response!.data['message'][0]!, ResponseStatus.FAILED,
|
||||
data: e.response!.data);
|
||||
} else if (e.response!.data['message']['name'] is List) {
|
||||
return ResponseData<dynamic>(
|
||||
e.response!.data['message']['name'][0]!, ResponseStatus.FAILED,
|
||||
data: e.response!.data);
|
||||
} else {
|
||||
}
|
||||
// else if (e.response!.data['message']
|
||||
// // ['name'] is List
|
||||
// ) {
|
||||
// return ResponseData<dynamic>(
|
||||
// // e.response!.data['message']['name'][0]!, ResponseStatus.FAILED,
|
||||
// e.response!.data['message'], ResponseStatus.FAILED,
|
||||
|
||||
// data: e.response!.data);
|
||||
// }
|
||||
else {
|
||||
return ResponseData<dynamic>(
|
||||
e.response!.data['message'], ResponseStatus.FAILED,
|
||||
data: e.response!.data);
|
||||
|
||||
@@ -65,7 +65,7 @@ class LoginAPI {
|
||||
);
|
||||
}
|
||||
} else {
|
||||
Get.toNamed(RouteName.mainscreen);
|
||||
Get.toNamed(RouteName.mainscreen,arguments: 0);
|
||||
}
|
||||
} else {
|
||||
return ResponseData<dynamic>(
|
||||
|
||||
@@ -7,6 +7,7 @@ import 'package:dio/dio.dart';
|
||||
import 'package:dotted_border/dotted_border.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart' hide MultipartFile, FormData;
|
||||
|
||||
@@ -194,6 +195,7 @@ class _PostScreenState extends State<PostScreen> {
|
||||
Map<String, dynamic> updata = {
|
||||
'manage_community_xid': communityid,
|
||||
"name": _tagController.text,
|
||||
"is_special": posttagtype,
|
||||
};
|
||||
final data = await Communitypostmethod().postCreatedTag(updata);
|
||||
if (data.status == ResponseStatus.SUCCESS) {
|
||||
@@ -231,14 +233,14 @@ class _PostScreenState extends State<PostScreen> {
|
||||
return AlertDialog(
|
||||
backgroundColor: const Color(0xFF222935).withOpacity(0.9),
|
||||
title: const Text(
|
||||
"Add Tag",
|
||||
"Add Interest",
|
||||
style: TextStyle(color: Colors.white),
|
||||
),
|
||||
content: TextField(
|
||||
style: const TextStyle(color: Colors.white),
|
||||
controller: _tagController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: "Tag",
|
||||
labelText: "Interest",
|
||||
labelStyle: TextStyle(color: AppColors.white),
|
||||
disabledBorder: UnderlineInputBorder(
|
||||
borderSide: BorderSide(color: AppColors.black),
|
||||
@@ -254,14 +256,16 @@ class _PostScreenState extends State<PostScreen> {
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: const Text("Cancel", style: TextStyle(color: AppColors.white)),
|
||||
child: const Text("Cancel",
|
||||
style: TextStyle(color: AppColors.white)),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
tagUploadata();
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: const Text("Submit", style: TextStyle(color: AppColors.white)),
|
||||
child: const Text("Submit",
|
||||
style: TextStyle(color: AppColors.white)),
|
||||
),
|
||||
],
|
||||
);
|
||||
@@ -642,26 +646,28 @@ class _PostScreenState extends State<PostScreen> {
|
||||
children: [
|
||||
buildSelectedTags(),
|
||||
sizedBoxHeight(10.h),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
_showCreateTagDialog();
|
||||
},
|
||||
child: Container(
|
||||
height: 35,
|
||||
width: 178.w,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFFFFFFF)
|
||||
.withOpacity(0.2),
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
border: Border.all(
|
||||
color: const Color(0xFFD90B2E),
|
||||
width: 1)),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 20),
|
||||
child: Center(
|
||||
child: text14w400_FCFCFC(
|
||||
'+create new interest')),
|
||||
Expanded(
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
_showCreateTagDialog();
|
||||
},
|
||||
child: Container(
|
||||
height: 35,
|
||||
// width: 185.w,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFFFFFFF)
|
||||
.withOpacity(0.2),
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
border: Border.all(
|
||||
color: const Color(0xFFD90B2E),
|
||||
width: 1)),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 10),
|
||||
child: Center(
|
||||
child: text14w400_FCFCFC(
|
||||
'+create new interest')),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -794,7 +800,8 @@ class _PostScreenState extends State<PostScreen> {
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return AlertDialog(
|
||||
insetPadding: const EdgeInsets.symmetric(vertical: 10, horizontal: 15),
|
||||
insetPadding:
|
||||
const EdgeInsets.symmetric(vertical: 10, horizontal: 15),
|
||||
contentPadding: const EdgeInsets.fromLTRB(24, 8, 24, 24),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(14.r))),
|
||||
|
||||
Reference in New Issue
Block a user