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) {
return Column(
children: [
const Padding(
padding: kPh8,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
APITypeDropdown(),
EnvironmentDropdown(),
],
),
),
kVSpacer3,
const Padding(
padding: kPh4,

View File

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