integrated share plus package

This commit is contained in:
vishal-kaklotar-wdi
2025-11-19 13:13:16 +05:30
parent 1ca940e5cf
commit 7dbeef2f80
5 changed files with 37 additions and 11 deletions

View File

@@ -7,6 +7,7 @@ import 'package:citycards_customer/common_packages/custom_text.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:share_plus/share_plus.dart';
import '../../core/route_constants.dart';
class AttractionDetailsView extends StatelessWidget {
@@ -98,12 +99,16 @@ class AttractionDetailsView extends StatelessWidget {
right: 17.w,
child: GestureDetector(
onTap: () {
showModalBottomSheet(
context: context,
isScrollControlled: true,
backgroundColor: Colors.transparent,
builder: (context) => const ShareBottomSheet(),
Share.share(
'Check out my City Card app!',
subject: 'City Card App',
);
// showModalBottomSheet(
// context: context,
// isScrollControlled: true,
// backgroundColor: Colors.transparent,
// builder: (context) => const ShareBottomSheet(),
// );
},
child: Container(
height: 36.h,

View File

@@ -5,7 +5,6 @@ class AttractionDetailsViewModel {
// 📞 Call method
Future<void> makePhoneCall(String phoneNumber, BuildContext context) async {
final Uri url = Uri(scheme: 'tel', path: phoneNumber);
if (await canLaunchUrl(url)) {
await launchUrl(url);
} else {

View File

@@ -4,6 +4,7 @@ import 'package:citycards_customer/common_packages/custom_bullet_points.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:share_plus/share_plus.dart';
class OfferPassDetailView extends StatelessWidget {
const OfferPassDetailView({super.key});
@@ -91,12 +92,16 @@ class OfferPassDetailView extends StatelessWidget {
right: 17.w,
child: GestureDetector(
onTap: () {
showModalBottomSheet(
context: context,
isScrollControlled: true,
backgroundColor: Colors.transparent,
builder: (context) => const ShareBottomSheet(),
Share.share(
'Check out my City Card app!',
subject: 'City Card App',
);
// showModalBottomSheet(
// context: context,
// isScrollControlled: true,
// backgroundColor: Colors.transparent,
// builder: (context) => const ShareBottomSheet(),
// );
},
child: Container(
height: 36.h,