forked from eatvio/eatvio_app
97 lines
3.3 KiB
Dart
97 lines
3.3 KiB
Dart
import 'package:eatvio_app/core/const.dart';
|
|
import 'package:eatvio_app/core/utils/toasts.dart';
|
|
import 'package:eatvio_app/core/widgets/custom_divider.dart';
|
|
import 'package:eatvio_app/features/diets/presentation/widgets/main_background_bouble.dart';
|
|
import 'package:eatvio_app/generated/l10n.dart';
|
|
import 'package:eatvio_app/theme/theme_helper.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/services.dart';
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
import 'package:share_plus/share_plus.dart';
|
|
|
|
class MoreOptions extends StatelessWidget {
|
|
const MoreOptions({super.key, required this.id});
|
|
final int id;
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final s = S.of(context);
|
|
return MainBackgroundBouble(
|
|
enableShadow: true,
|
|
child: Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 14),
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
GestureDetector(
|
|
onTap: () {
|
|
Clipboard.setData(ClipboardData(text: baseUrl + '/ru/diet/' + id.toString()));
|
|
showInfoToast(s.link_was_copied);
|
|
},
|
|
child: Row(
|
|
children: [
|
|
Text(
|
|
s.copy_link,
|
|
style: TextStyle(
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.w500,
|
|
color: appTheme.blueGray800,
|
|
),
|
|
),
|
|
Spacer(),
|
|
SvgPicture.asset('assets/icons/copy2.svg', width: 16, height: 20),
|
|
],
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.symmetric(vertical: 12.0),
|
|
child: CustomDivider(),
|
|
),
|
|
GestureDetector(
|
|
onTap: () => Share.shareUri(
|
|
Uri.parse(
|
|
baseUrl + '/ru/diet/' + id.toString(),
|
|
),
|
|
),
|
|
child: Row(
|
|
children: [
|
|
Text(
|
|
s.share,
|
|
style: TextStyle(
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.w500,
|
|
color: appTheme.blueGray800,
|
|
),
|
|
),
|
|
Spacer(),
|
|
SvgPicture.asset('assets/icons/share2.svg', width: 16, height: 20),
|
|
],
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.symmetric(vertical: 12.0),
|
|
child: CustomDivider(),
|
|
),
|
|
GestureDetector(
|
|
onTap: () {},
|
|
child: Row(
|
|
children: [
|
|
Text(
|
|
s.complain,
|
|
style: TextStyle(
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.w500,
|
|
color: appTheme.blueGray800,
|
|
),
|
|
),
|
|
Spacer(),
|
|
SvgPicture.asset('assets/icons/complain.svg', width: 16, height: 20),
|
|
],
|
|
),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
width: 272);
|
|
}
|
|
}
|