mirror of
https://github.com/foss42/apidash.git
synced 2025-05-21 08:16:29 +08:00
cleanup
This commit is contained in:
@ -4,7 +4,7 @@ import 'package:apidash/models/models.dart';
|
||||
|
||||
String getEnvironmentTitle(String? name) {
|
||||
if (name == null || name.trim() == "") {
|
||||
return "untitled";
|
||||
return kUntitled;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
@ -3,12 +3,12 @@ import '../consts.dart';
|
||||
|
||||
String getRequestTitleFromUrl(String? url) {
|
||||
if (url == null || url.trim() == "") {
|
||||
return "untitled";
|
||||
return kUntitled;
|
||||
}
|
||||
if (url.contains("://")) {
|
||||
String rem = url.split("://")[1];
|
||||
if (rem.trim() == "") {
|
||||
return "untitled";
|
||||
return kUntitled;
|
||||
}
|
||||
return rem;
|
||||
}
|
||||
|
@ -1,24 +0,0 @@
|
||||
import 'package:apidash_core/apidash_core.dart';
|
||||
import 'package:apidash_design_system/apidash_design_system.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class DropdownButtonAPIType extends StatelessWidget {
|
||||
const DropdownButtonAPIType({
|
||||
super.key,
|
||||
this.apiType,
|
||||
this.onChanged,
|
||||
});
|
||||
|
||||
final APIType? apiType;
|
||||
final void Function(APIType?)? onChanged;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ADDropdownButton<APIType>(
|
||||
value: apiType,
|
||||
values: APIType.values.map((e) => (e, e.label)),
|
||||
onChanged: onChanged,
|
||||
isDense: true,
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user