Files
repertory/web/repertory/lib/helpers.dart
Scott E. Graves 9e2ad81cff
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
updates
2025-03-05 14:43:42 -06:00

28 lines
507 B
Dart

import 'package:flutter/foundation.dart';
String formatMountName(String type, String name) {
if (type == 'remote') {
return name.replaceAll('_', ':');
}
return name;
}
String getBaseUri() {
if (kDebugMode || !kIsWeb) {
return 'http://127.0.0.1:30000';
}
return Uri.base.origin;
}
String initialCaps(String txt) {
if (txt.isEmpty) {
return txt;
}
if (txt.length == 1) {
return txt[0].toUpperCase();
}
return txt[0].toUpperCase() + txt.substring(1).toLowerCase();
}