added frontend
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import 'package:flutter/foundation.dart' show kReleaseMode;
|
||||
|
||||
abstract interface class UrlUtils {
|
||||
String getBaseUrl();
|
||||
}
|
||||
|
||||
class UrlUtilsImpl extends UrlUtils {
|
||||
@override
|
||||
String getBaseUrl() {
|
||||
if (kReleaseMode){
|
||||
return "${Uri.base.origin}/api/";
|
||||
}
|
||||
return "http://localhost:8080/api/";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user