Add button tooltips
This commit is contained in:
@@ -153,30 +153,38 @@ class ProfileActionButton extends HookConsumerWidget {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (!showAllActions) {
|
if (!showAllActions) {
|
||||||
return InkWell(
|
return Tooltip(
|
||||||
onTap: () {
|
message: t.profile.update.buttonTxt,
|
||||||
if (updateProfileMutation.state.isInProgress) {
|
child: InkWell(
|
||||||
return;
|
onTap: () {
|
||||||
}
|
if (updateProfileMutation.state.isInProgress) {
|
||||||
updateProfileMutation.setFuture(
|
return;
|
||||||
ref.read(profilesNotifierProvider.notifier).updateProfile(profile),
|
}
|
||||||
);
|
updateProfileMutation.setFuture(
|
||||||
},
|
ref
|
||||||
child: const Icon(Icons.update),
|
.read(profilesNotifierProvider.notifier)
|
||||||
|
.updateProfile(profile),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: const Icon(Icons.update),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return ProfileActionsMenu(
|
return ProfileActionsMenu(
|
||||||
profile,
|
profile,
|
||||||
(context, controller, child) {
|
(context, controller, child) {
|
||||||
return InkWell(
|
return Tooltip(
|
||||||
onTap: () {
|
message: MaterialLocalizations.of(context).showMenuTooltip,
|
||||||
if (controller.isOpen) {
|
child: InkWell(
|
||||||
controller.close();
|
onTap: () {
|
||||||
} else {
|
if (controller.isOpen) {
|
||||||
controller.open();
|
controller.close();
|
||||||
}
|
} else {
|
||||||
},
|
controller.open();
|
||||||
child: const Icon(Icons.more_vert),
|
}
|
||||||
|
},
|
||||||
|
child: const Icon(Icons.more_vert),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ class HomePage extends HookConsumerWidget {
|
|||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () => const AddProfileRoute().push(context),
|
onPressed: () => const AddProfileRoute().push(context),
|
||||||
icon: const Icon(Icons.add_circle),
|
icon: const Icon(Icons.add_circle),
|
||||||
|
tooltip: t.profile.add.buttonText,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user