12345678910111213141516171819202122 |
- import 'package:dio/dio.dart';
- import 'package:flutter/foundation.dart';
- import 'api.dart';
- class MyApi {
- MyApi._();
- static String productUrl = 'http://121.36.17.6:49099';
- static String testUrl = 'http://121.36.17.6:19090';
- static Api get({Dio? dio, String? baseUrl}) {
- if (kReleaseMode) {
- baseUrl ??= productUrl;
- } else {
- baseUrl ??= testUrl;
- }
- return Api(dio: dio, baseUrl: baseUrl);
- }
- }
|