fix: show remove link and copy link entry when there is not linkd text

This commit is contained in:
Lucas.Xu 2022-08-22 18:19:21 +08:00
parent 1cd9a77e00
commit 6517adece7

View File

@ -40,10 +40,7 @@ class _LinkMenuState extends State<LinkMenu> {
@override
Widget build(BuildContext context) {
return SizedBox(
width: 350,
height: 200,
child: Container(
return Container(
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
@ -57,7 +54,6 @@ class _LinkMenuState extends State<LinkMenu> {
),
child: SizedBox(
width: 350,
height: 200,
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Column(
@ -67,6 +63,7 @@ class _LinkMenuState extends State<LinkMenu> {
const SizedBox(height: 16.0),
_buildInput(),
const SizedBox(height: 16.0),
if (widget.linkText != null) ...[
_buildIconButton(
iconName: 'link',
text: 'Copy link',
@ -77,11 +74,11 @@ class _LinkMenuState extends State<LinkMenu> {
text: 'Remove link',
onPressed: widget.onRemoveLink,
),
]
],
),
),
),
),
);
}