added certificate page
This commit is contained in:
@@ -1,21 +1,40 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ApiConfig {
|
||||
// Host handling:
|
||||
/// Metti true quando vuoi puntare al server live
|
||||
static const bool useLive = true;
|
||||
|
||||
/// Dominio produzione
|
||||
static const String liveHost = 'app.yogiboook.com';
|
||||
|
||||
// Host handling DEV:
|
||||
// - Web: localhost
|
||||
// - Android emulator: 10.0.2.2 (maps to host machine)
|
||||
static String get host {
|
||||
static String get _devHost {
|
||||
if (kIsWeb) return 'localhost';
|
||||
if (defaultTargetPlatform == TargetPlatform.android) return '10.0.2.2';
|
||||
return 'localhost';
|
||||
}
|
||||
|
||||
// Laravel/Vanguard API (login, password remind, social)
|
||||
static String get laravelApiBase => 'http://$host/yogiboook/public/api';
|
||||
static String get host => useLive ? liveHost : _devHost;
|
||||
|
||||
// Your custom PHP APIs under /public/userarea/api/
|
||||
static String get phpApiBase => 'http://$host/yogiboook/public/userarea/api';
|
||||
static String get scheme => useLive ? 'https' : 'http';
|
||||
|
||||
/// Laravel/Vanguard API (login, password remind, ecc)
|
||||
/// DEV: http://10.0.2.2/yogiboook/public/api
|
||||
/// LIVE: https://app.yogiboook.com/public/api
|
||||
static String get laravelApiBase {
|
||||
if (useLive) return '$scheme://$host/public/api';
|
||||
return '$scheme://$host/yogiboook/public/api';
|
||||
}
|
||||
|
||||
/// PHP custom APIs
|
||||
/// DEV: http://10.0.2.2/yogiboook/public/userarea/api
|
||||
/// LIVE: https://app.yogiboook.com/public/userarea/api
|
||||
static String get phpApiBase {
|
||||
if (useLive) return '$scheme://$host/public/userarea/api';
|
||||
return '$scheme://$host/yogiboook/public/userarea/api';
|
||||
}
|
||||
|
||||
static const String deviceName = 'FlutterApp';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user