mirror of
https://github.com/foss42/apidash.git
synced 2025-06-01 14:58:28 +08:00
wip: mobile support
This commit is contained in:
@ -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,
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user