18 lines
553 B
Dart
18 lines
553 B
Dart
|
|
import 'package:dio/dio.dart';
|
||
|
|
import 'package:flutter/foundation.dart';
|
||
|
|
|
||
|
|
import '../../main.dart';
|
||
|
|
import 'firebase_config_repository.dart';
|
||
|
|
|
||
|
|
mixin Api {
|
||
|
|
String get path =>
|
||
|
|
kReleaseMode || (globalSharedPreferences?.getBool('env') ?? true)
|
||
|
|
//prod
|
||
|
|
? 'https://89.19.210.178:8080' //FirebaseRepository.appConfig.path
|
||
|
|
: androidDeviceInfo!.isPhysicalDevice
|
||
|
|
//device to localhost
|
||
|
|
? 'https://192.168.31.158:8080'
|
||
|
|
: //emulator to localhost
|
||
|
|
'https://10.0.2.2:8080';
|
||
|
|
}
|