mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-09-25 08:19:29 +00:00
chore: use tooltip instead of multi line for related questions (#7533)
This commit is contained in:
parent
e36b08cd14
commit
1fdd7c343b
@ -3,6 +3,7 @@ import 'package:appflowy/generated/locale_keys.g.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flowy_infra_ui/style_widget/button.dart';
|
||||
import 'package:flowy_infra_ui/style_widget/text.dart';
|
||||
import 'package:flowy_infra_ui/widget/flowy_tooltip.dart';
|
||||
import 'package:flowy_infra_ui/widget/spacing.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:universal_platform/universal_platform.dart';
|
||||
@ -66,25 +67,28 @@ class RelatedQuestionItem extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return FlowyButton(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
text: Flexible(
|
||||
child: FlowyText(
|
||||
question,
|
||||
lineHeight: 1.4,
|
||||
maxLines: null,
|
||||
return FlowyTooltip(
|
||||
message: question,
|
||||
child: FlowyButton(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
text: Flexible(
|
||||
child: FlowyText(
|
||||
question,
|
||||
lineHeight: 1.4,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
expandText: false,
|
||||
margin: UniversalPlatform.isMobile
|
||||
? const EdgeInsets.symmetric(horizontal: 8.0, vertical: 4.0)
|
||||
: const EdgeInsets.all(8.0),
|
||||
leftIcon: FlowySvg(
|
||||
FlowySvgs.ai_chat_outlined_s,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
size: const Size.square(16.0),
|
||||
),
|
||||
onTap: () => onQuestionSelected(question),
|
||||
),
|
||||
expandText: false,
|
||||
margin: UniversalPlatform.isMobile
|
||||
? const EdgeInsets.symmetric(horizontal: 8.0, vertical: 4.0)
|
||||
: const EdgeInsets.all(8.0),
|
||||
leftIcon: FlowySvg(
|
||||
FlowySvgs.ai_chat_outlined_s,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
size: const Size.square(16.0),
|
||||
),
|
||||
onTap: () => onQuestionSelected(question),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user