android localhost ?

ENOOSOFT·2022년 7월 18일
0
...

enum TestPlatform { android, others, real }
...

class FunctionsCall {
  static get API_HOST {
    if (API_TESTER == TestPlatform.android) return 'http://10.0.2.2:5000'; //This is android's localhost
    if (API_TESTER == TestPlatform.others) return 'http://localhost:5000'; //others

    return 'http://[your-real-backend-domain-name]:5000'; //real hosting server
  }

  static Future<ApiCallResponse> call() {
...  
profile
Tiny coder

0개의 댓글