forked from eatvio/eatvio_app
user details created
This commit is contained in:
@@ -151,7 +151,7 @@ class _AboutDietScreenState extends State<AboutDietScreen> {
|
||||
BookmarkButton(
|
||||
isFavorite: dietState.diet.isFavorite,
|
||||
onTap: () {
|
||||
if (dietState.diet.isFavorite) {
|
||||
if (dietState.diet.isFavorite) {
|
||||
dietsCubit.removeFromFavorite(widget.diet.id, widget.index);
|
||||
} else {
|
||||
dietsCubit.addToFavorite(widget.diet.id, widget.index);
|
||||
@@ -291,7 +291,9 @@ class _AboutDietScreenState extends State<AboutDietScreen> {
|
||||
actions: [
|
||||
PortalTarget(
|
||||
visible: isMoreOptionsVisible,
|
||||
portalFollower: MoreOptions(id: widget.diet.id),
|
||||
portalFollower: MoreOptions(
|
||||
path: 'diet/${widget.diet.id}',
|
||||
),
|
||||
anchor: Aligned(
|
||||
shiftToWithinBound: AxisFlag(x: true, y: true),
|
||||
follower: Alignment.topRight,
|
||||
|
||||
@@ -12,8 +12,8 @@ import 'package:go_router/go_router.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
|
||||
class MoreOptions extends StatelessWidget {
|
||||
const MoreOptions({super.key, required this.id, this.disableActions});
|
||||
final int id;
|
||||
const MoreOptions({super.key, this.disableActions, required this.path});
|
||||
final String path;
|
||||
final bool? disableActions;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -26,10 +26,12 @@ class MoreOptions extends StatelessWidget {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap:disableActions == true ? null : () {
|
||||
Clipboard.setData(ClipboardData(text: baseUrl + '/ru/diet/' + id.toString()));
|
||||
showInfoToast(s.link_was_copied);
|
||||
},
|
||||
onTap: disableActions == true
|
||||
? null
|
||||
: () {
|
||||
Clipboard.setData(ClipboardData(text: '$baseUrl/ru/$path'));
|
||||
showInfoToast(s.link_was_copied);
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
@@ -48,11 +50,13 @@ class MoreOptions extends StatelessWidget {
|
||||
child: CustomDivider(),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: disableActions == true ? null : () => Share.shareUri(
|
||||
Uri.parse(
|
||||
baseUrl + '/ru/diet/' + id.toString(),
|
||||
),
|
||||
),
|
||||
onTap: disableActions == true
|
||||
? null
|
||||
: () => Share.shareUri(
|
||||
Uri.parse(
|
||||
'$baseUrl/ru/$path',
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
@@ -71,9 +75,11 @@ class MoreOptions extends StatelessWidget {
|
||||
child: CustomDivider(),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: disableActions == true ? null : () {
|
||||
context.push('complainingScreen');
|
||||
},
|
||||
onTap: disableActions == true
|
||||
? null
|
||||
: () {
|
||||
context.push('complainingScreen');
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
|
||||
Reference in New Issue
Block a user