Relocate Mobile API Type dropdown and Environment dropdown

This commit is contained in:
Ankit Mahato
2025-04-06 02:43:41 +05:30
parent f0ccc2f770
commit efec554d50
2 changed files with 27 additions and 28 deletions

View File

@ -18,16 +18,6 @@ class RequestTabs extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Column( return Column(
children: [ children: [
const Padding(
padding: kPh8,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
APITypeDropdown(),
EnvironmentDropdown(),
],
),
),
kVSpacer3, kVSpacer3,
const Padding( const Padding(
padding: kPh4, padding: kPh4,

View File

@ -33,26 +33,35 @@ class _RequestResponsePageState extends ConsumerState<RequestResponsePage>
useTabController(initialLength: 3, vsync: this); useTabController(initialLength: 3, vsync: this);
return DrawerSplitView( return DrawerSplitView(
scaffoldKey: kHomeScaffoldKey, scaffoldKey: kHomeScaffoldKey,
title: EditorTitle( title: Row(
title: name, children: [
onSelected: (ItemMenuOption item) { APITypeDropdown(),
if (item == ItemMenuOption.edit) { Expanded(
showRenameDialog(context, "Rename Request", name, (val) { child: EditorTitle(
ref title: name,
.read(collectionStateNotifierProvider.notifier) onSelected: (ItemMenuOption item) {
.update(name: val); if (item == ItemMenuOption.edit) {
}); showRenameDialog(context, "Rename Request", name, (val) {
} ref
if (item == ItemMenuOption.delete) { .read(collectionStateNotifierProvider.notifier)
ref.read(collectionStateNotifierProvider.notifier).remove(); .update(name: val);
} });
if (item == ItemMenuOption.duplicate) { }
ref.read(collectionStateNotifierProvider.notifier).duplicate(); if (item == ItemMenuOption.delete) {
} ref.read(collectionStateNotifierProvider.notifier).remove();
}, }
if (item == ItemMenuOption.duplicate) {
ref
.read(collectionStateNotifierProvider.notifier)
.duplicate();
}
},
),
),
],
), ),
leftDrawerContent: const CollectionPane(), leftDrawerContent: const CollectionPane(),
actions: const [kVSpacer16], actions: const [kHSpacer12],
mainContent: id == null mainContent: id == null
? const RequestEditorDefault() ? const RequestEditorDefault()
: RequestTabs( : RequestTabs(