All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
28 lines
507 B
Dart
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();
|
|
}
|