feat: show active local model in Flutter UI

This commit is contained in:
Hamza Ayed
2026-09-30 08:02:53 +03:00
parent 874c7152d1
commit 1295e4aea3
4 changed files with 24 additions and 2 deletions
@@ -22,6 +22,13 @@ class ApiRepository {
void setBaseUrl(String value) =>
_baseUrl = value.replaceFirst(RegExp(r'/+$'), '');
Future<String> getModelName() async {
final response = await http.get(Uri.parse('$_baseUrl/health'));
_checkStatus(response);
final data = jsonDecode(response.body) as Map<String, dynamic>;
return data['model'] as String? ?? 'نموذج غير معروف';
}
Future<String> _userId() async {
final cached = _cachedUserId;
if (cached != null) return cached;