wip: mobile support

This commit is contained in:
DenserMeerkat
2024-02-29 00:19:29 +05:30
parent 993621793a
commit 54508de428
15 changed files with 544 additions and 137 deletions

View File

@ -29,10 +29,11 @@ class DropdownButtonHttpMethod extends StatelessWidget {
return DropdownMenuItem<HTTPVerb>(
value: value,
child: Padding(
padding: const EdgeInsets.only(left: 16),
padding: EdgeInsets.only(left: kIsMobile ? 4 : 16),
child: Text(
value.name.toUpperCase(),
style: kCodeStyle.copyWith(
fontSize: kIsMobile ? 13 : null,
fontWeight: FontWeight.bold,
color: getHTTPMethodColor(
value,

View File

@ -47,34 +47,37 @@ class _RequestPaneState extends State<RequestPane>
}
return Column(
children: [
Padding(
padding: kPh20v10,
child: SizedBox(
height: kHeaderHeight,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"Request",
style: Theme.of(context).textTheme.titleMedium,
),
FilledButton.tonalIcon(
onPressed: widget.onPressedCodeButton,
icon: Icon(
widget.codePaneVisible
? Icons.code_off_rounded
: Icons.code_rounded,
),
label: SizedBox(
width: 75,
child: Text(
widget.codePaneVisible ? "Hide Code" : "View Code"),
(kIsMobile
? const SizedBox.shrink()
: Padding(
padding: kPh20v10,
child: SizedBox(
height: kHeaderHeight,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"Request",
style: Theme.of(context).textTheme.titleMedium,
),
FilledButton.tonalIcon(
onPressed: widget.onPressedCodeButton,
icon: Icon(
widget.codePaneVisible
? Icons.code_off_rounded
: Icons.code_rounded,
),
label: SizedBox(
width: 75,
child: Text(widget.codePaneVisible
? "Hide Code"
: "View Code"),
),
),
],
),
),
],
),
),
),
)),
TabBar(
key: Key(widget.selectedId!),
controller: _controller,
@ -112,3 +115,12 @@ class _RequestPaneState extends State<RequestPane>
super.dispose();
}
}
class ViewCodeButton extends StatelessWidget {
const ViewCodeButton({super.key});
@override
Widget build(BuildContext context) {
return Container();
}
}