This commit is contained in:
Ashita Prasad
2025-01-12 15:45:36 +05:30
parent 418f3991f6
commit 114b211437
3 changed files with 3 additions and 27 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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,
);
}
}