forked from yaso_meth/mih-project
remove param context
This commit is contained in:
@@ -9,12 +9,10 @@ import '../mih_components/mih_pop_up_messages/mih_error_message.dart';
|
||||
import 'package:supertokens_flutter/http.dart' as http;
|
||||
|
||||
class MihBusinessDetailsServices {
|
||||
|
||||
Future<Business?> getBusinessDetails(
|
||||
String app_id,
|
||||
BuildContext context,
|
||||
) async {
|
||||
var response = await http.get(
|
||||
var response = await http.get(
|
||||
Uri.parse("${AppEnviroment.baseApiUrl}/business/app_id/$app_id"),
|
||||
headers: <String, String>{
|
||||
"Content-Type": "application/json; charset=UTF-8"
|
||||
|
||||
@@ -75,22 +75,10 @@ class MIHApiCalls {
|
||||
} else {
|
||||
bUserData = null;
|
||||
}
|
||||
// var responseBUser = await http.get(
|
||||
// Uri.parse("$baseAPI/business-user/$uid"),
|
||||
// );
|
||||
// if (responseBUser.statusCode == 200) {
|
||||
// String body = responseBUser.body;
|
||||
// var decodedData = jsonDecode(body);
|
||||
// BusinessUser business_User = BusinessUser.fromJson(decodedData);
|
||||
// bUserData = business_User;
|
||||
// } else {
|
||||
// bUserData = null;
|
||||
// }
|
||||
|
||||
// Get Businessdata
|
||||
Business? business = await MihBusinessDetailsServices().getBusinessDetails(
|
||||
uid,
|
||||
context,
|
||||
);
|
||||
if (business != null) {
|
||||
busData = business;
|
||||
|
||||
Reference in New Issue
Block a user