18 lines
446 B
Dart
18 lines
446 B
Dart
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
|
|
|
// Ganti baseUrl jadi ngambil dari file .env
|
|
String? baseUrl = dotenv.env['BASE_URL_API'];
|
|
|
|
const Map<String, String> baseHeader = {
|
|
'Content-Type': 'application/json',
|
|
'Accept': 'application/json',
|
|
};
|
|
|
|
Map<String, String> headerWithToken(String? token) {
|
|
return {
|
|
'Content-Type': 'application/json',
|
|
'Accept': 'application/json',
|
|
'Authorization': 'Bearer $token',
|
|
};
|
|
}
|