Commit ed221f4f by Ramesh Babu Puvvadi

added horizontal scrolling

parent 7bc02900
...@@ -5,12 +5,11 @@ import 'package:http/http.dart' as http; ...@@ -5,12 +5,11 @@ import 'package:http/http.dart' as http;
//8008202992 //8008202992
class RemoteData { class RemoteData {
String LoginUrl = 'http://vaman.plutokm.com/login'; final String loginUrl = 'http://vaman.plutokm.com/login';
String Type = "Content-Type"; final String type = "Content-Type";
String App_json = "application/json"; final String appjson = "application/json";
Future<String> getLoginRequest( Future<String> getLoginRequest(String loginid, String pass, String token) async {
String loginid, String pass, String token) async {
Map<String, dynamic> body = { Map<String, dynamic> body = {
'login_id': loginid, 'login_id': loginid,
'password': pass, 'password': pass,
...@@ -27,8 +26,8 @@ class RemoteData { ...@@ -27,8 +26,8 @@ class RemoteData {
} }
var client = http.Client(); var client = http.Client();
var res = await client.post(Uri.parse(LoginUrl), var res = await client.post(Uri.parse(loginUrl),
headers: {Type: App_json}, body: json.encode(body)); headers: {type: appjson}, body: json.encode(body));
if (res.statusCode == 200) { if (res.statusCode == 200) {
return res.body; return res.body;
} else { } else {
...@@ -39,7 +38,7 @@ class RemoteData { ...@@ -39,7 +38,7 @@ class RemoteData {
Future<String?> uploadimage(File imagepath) async { Future<String?> uploadimage(File imagepath) async {
try { try {
final request = http.MultipartRequest( final request = http.MultipartRequest(
'POST', Uri.parse('http://192.168.65.123:5155/vasthram_mobile')); 'POST', Uri.parse('http://vaman.plutokm.com/vasthram_mobile'));
request.files request.files
.add(await http.MultipartFile.fromPath('image', imagepath.path)); .add(await http.MultipartFile.fromPath('image', imagepath.path));
var response = await request.send(); var response = await request.send();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment