first commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ApiConfig {
|
||||
// Host handling:
|
||||
// - Web: localhost
|
||||
// - Android emulator: 10.0.2.2 (maps to host machine)
|
||||
static String get host {
|
||||
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';
|
||||
|
||||
// Your custom PHP APIs under /public/userarea/api/
|
||||
static String get phpApiBase => 'http://$host/yogiboook/public/userarea/api';
|
||||
|
||||
static const String deviceName = 'FlutterApp';
|
||||
}
|
||||
Reference in New Issue
Block a user