Create popup_menu_api_type.dart

This commit is contained in:
Ashita Prasad
2025-01-12 15:45:05 +05:30
parent 641e04a840
commit 37bc6dc4fa

View File

@ -0,0 +1,26 @@
import 'package:apidash_core/apidash_core.dart';
import 'package:apidash_design_system/apidash_design_system.dart';
import 'package:flutter/material.dart';
class APITypePopupMenu extends StatelessWidget {
const APITypePopupMenu({
super.key,
required this.apiType,
this.onChanged,
});
final APIType? apiType;
final void Function(APIType?)? onChanged;
@override
Widget build(BuildContext context) {
return ADPopupMenu<APIType>(
tooltip: "Select API Type",
width: 100,
value: apiType?.label,
values: APIType.values.map((e) => (e, e.label)),
onChanged: onChanged,
isOutlined: true,
);
}
}