Revert "Fixed the responsiveness of the view code header"

This reverts commit e2d232f462a3a87a3e2d953ec9255a28fd249ef2.
This commit is contained in:
morpheus-30
2023-07-04 23:20:40 +05:30
parent 2833c871fe
commit 51f9a44f58
3 changed files with 14 additions and 30 deletions

View File

@ -40,7 +40,7 @@ class _CopyButtonState extends State<CopyButton> {
Icons.content_copy,
size: 20,
),
if (widget.showLabel) Text(MediaQuery.of(context).size.width > 1315 ? kLabelCopy : '')
if (widget.showLabel) const Text(kLabelCopy)
],
),
),
@ -156,7 +156,7 @@ class _SaveInDownloadsButtonState extends State<SaveInDownloadsButton> {
Icons.download,
size: 20,
),
if (widget.showLabel) Text(MediaQuery.of(context).size.width > 1315 ? kLabelDownload : '')
if (widget.showLabel) const Text(kLabelDownload)
],
),
),

View File

@ -140,36 +140,23 @@ class _ViewCodePaneState extends State<ViewCodePane> {
child: Column(
children: [
SizedBox(
height: kHeaderHeight*2,
height: kHeaderHeight,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Flexible(
flex: 1,
Expanded(
child: Text(
"Code",
style: Theme.of(context).textTheme.titleMedium,
),
),
Flexible(
flex: 3,
child: DropdownButtonCodegenLanguage(
codegenLanguage: widget.codegenLanguage,
onChanged: widget.onChangedCodegenLanguage,
),
DropdownButtonCodegenLanguage(
codegenLanguage: widget.codegenLanguage,
onChanged: widget.onChangedCodegenLanguage,
),
Flexible(
flex: MediaQuery.of(context).size.width>1350?2:1,
child: CopyButton(
toCopy: widget.code,
),
),
Flexible(
flex: MediaQuery.of(context).size.width>1350?2:1,
child: SaveInDownloadsButton(
content: stringToBytes(widget.code),
mimeType: "application/vnd.dart",
),
CopyButton(toCopy: widget.code),
SaveInDownloadsButton(
content: stringToBytes(widget.code),
mimeType: "application/vnd.dart",
)
],
),

View File

@ -151,12 +151,9 @@ class _DropdownButtonCodegenLanguageState
value: value,
child: Padding(
padding: kPs8,
child: SizedBox(
width: MediaQuery.of(context).size.width <1315?MediaQuery.of(context).size.width * 0.1:MediaQuery.of(context).size.width * 0.09,
child: Text(
value.label,
style: kTextStyleButton,
),
child: Text(
value.label,
style: kTextStyleButton,
),
),
);