28 lines
861 B
Dart
28 lines
861 B
Dart
import 'dart:convert';
|
|
import 'dart:developer';
|
|
import 'dart:io';
|
|
|
|
import 'package:http/http.dart' as http;
|
|
import 'package:unit2/model/passo/bldg_loc.dart';
|
|
|
|
class LocationLandrefServices {
|
|
static final LocationLandrefServices _instance = LocationLandrefServices();
|
|
static LocationLandrefServices get instance => _instance;
|
|
|
|
Future<http.Response?> bldgLocPutInfo(BldgLoc data, id) async {
|
|
http.Response? response;
|
|
try {
|
|
response = await http.put(Uri.parse(
|
|
// ignore: unnecessary_brace_in_string_interps
|
|
"http://192.168.10.218:8000/api/rptass_app/bldgappr_location/?bldgappr_details_id=${id}"),
|
|
headers: {
|
|
HttpHeaders.contentTypeHeader: "application/json",
|
|
},
|
|
body: jsonEncode(data.toJson()));
|
|
} catch (e) {
|
|
log(e.toString());
|
|
}
|
|
return response;
|
|
}
|
|
}
|