You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
decky/lib/env.dart

11 lines
347 B

import 'package:flutter_dotenv/flutter_dotenv.dart';
/// API base URL (no trailing slash). Loaded from .env as API_BASE_URL.
String get apiBaseUrl {
final url = dotenv.env['API_BASE_URL']?.trim();
if (url == null || url.isEmpty) {
return 'http://localhost:3001';
}
return url.endsWith('/') ? url.substring(0, url.length - 1) : url;
}

Powered by TurnKey Linux.