Skip to content

Commit

Permalink
fix: Added a close button to the tooltip in Onboarding
Browse files Browse the repository at this point in the history
  • Loading branch information
sm-sayedi committed Sep 3, 2023
1 parent 0a64d60 commit ca1494f
Showing 1 changed file with 35 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,30 +149,44 @@ class _KnowledgePanelPageTemplateState
);

List<Widget> _buildHintPopup() {
final Widget hintPopup = InkWell(
final Widget hintPopup = Card(
key: const Key('toolTipPopUp'),
child: Card(
margin: const EdgeInsets.symmetric(horizontal: 30),
color: Theme.of(context).hintColor.withOpacity(0.9),
shape: const TooltipShapeBorder(arrowArc: 0.5),
child: Container(
margin: const EdgeInsetsDirectional.only(
start: VERY_LARGE_SPACE,
top: 10,
end: VERY_LARGE_SPACE,
bottom: 10,
),
child: Text(
appLocalizations.hint_knowledge_panel_message,
style: TextStyle(color: Theme.of(context).cardColor),
),
margin: const EdgeInsets.symmetric(horizontal: 30),
color: Theme.of(context).hintColor.withOpacity(0.9),
shape: const TooltipShapeBorder(arrowArc: 0.5),
child: Container(
margin: const EdgeInsetsDirectional.only(
start: VERY_LARGE_SPACE,
top: 10,
end: 10,
bottom: 10,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Expanded(
child: Text(
appLocalizations.hint_knowledge_panel_message,
style: TextStyle(color: Theme.of(context).cardColor),
),
),
const SizedBox(width: VERY_LARGE_SPACE),
InkWell(
onTap: () {
setState(() {
_isHintDismissed = true;
});
},
splashColor: Theme.of(context).splashColor,
child: const Icon(
Icons.close,
color: WHITE_COLOR,
// size: LARGE_SPACE,
),
),
],
),
),
onTap: () {
setState(() {
_isHintDismissed = true;
});
},
);
final List<Widget> hitPopup = <Widget>[];
if (!_isHintDismissed &&
Expand Down

0 comments on commit ca1494f

Please sign in to comment.