diff --git a/lib/widgets/popup_menu_api_type.dart b/lib/widgets/popup_menu_api_type.dart new file mode 100644 index 00000000..22996e17 --- /dev/null +++ b/lib/widgets/popup_menu_api_type.dart @@ -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( + tooltip: "Select API Type", + width: 100, + value: apiType?.label, + values: APIType.values.map((e) => (e, e.label)), + onChanged: onChanged, + isOutlined: true, + ); + } +}