From eed6879fd426e79eda13bf4f050445014b27aeb7 Mon Sep 17 00:00:00 2001
From: Pratik Canopas <109139581+cp-pratik-k@users.noreply.github.com>
Date: Mon, 22 Apr 2024 15:17:11 +0530
Subject: [PATCH] Improve UI (#34)
* Improve up
* Implement share functionallity
---
.idea/libraries/Dart_Packages.xml | 88 ++++--
.idea/libraries/Flutter_Plugins.xml | 10 +-
app/assets/locales/app_en.arb | 2 +
app/ios/Podfile.lock | 8 +-
.../multi_selection_done_button.dart | 56 +++-
.../home/home_view_model_helper_mixin.dart | 8 +-
.../media_preview/components/top_bar.dart | 257 +++++++++++-------
.../media_preview/media_preview_screen.dart | 9 +-
app/lib/ui/flow/onboard/onboard_screen.dart | 57 ++--
.../flutter/generated_plugin_registrant.cc | 4 +
app/linux/flutter/generated_plugins.cmake | 1 +
.../Flutter/GeneratedPluginRegistrant.swift | 2 +
app/pubspec.lock | 88 ++++--
app/pubspec.yaml | 1 +
.../flutter/generated_plugin_registrant.cc | 6 +
app/windows/flutter/generated_plugins.cmake | 2 +
data/.flutter-plugins | 4 +-
data/.flutter-plugins-dependencies | 2 +-
data/pubspec.yaml | 2 +-
19 files changed, 432 insertions(+), 175 deletions(-)
diff --git a/.idea/libraries/Dart_Packages.xml b/.idea/libraries/Dart_Packages.xml
index 10e385a..64f2686 100644
--- a/.idea/libraries/Dart_Packages.xml
+++ b/.idea/libraries/Dart_Packages.xml
@@ -184,6 +184,13 @@
+
+
+
+
+
+
+
@@ -285,7 +292,7 @@
-
+
@@ -404,7 +411,7 @@
-
+
@@ -481,7 +488,7 @@
-
+
@@ -615,14 +622,14 @@
-
+
-
+
@@ -801,6 +808,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -839,7 +860,7 @@
-
+
@@ -983,6 +1004,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1077,14 +1126,14 @@
-
+
-
+
@@ -1145,6 +1194,7 @@
+
@@ -1159,7 +1209,7 @@
-
+
@@ -1172,7 +1222,7 @@
-
+
@@ -1183,7 +1233,7 @@
-
+
@@ -1203,8 +1253,8 @@
-
-
+
+
@@ -1230,12 +1280,14 @@
+
+
-
+
@@ -1255,6 +1307,10 @@
+
+
+
+
@@ -1268,8 +1324,8 @@
-
-
+
+
diff --git a/.idea/libraries/Flutter_Plugins.xml b/.idea/libraries/Flutter_Plugins.xml
index 36f37f9..cdc1244 100644
--- a/.idea/libraries/Flutter_Plugins.xml
+++ b/.idea/libraries/Flutter_Plugins.xml
@@ -10,25 +10,29 @@
-
-
+
+
+
+
-
+
+
+
diff --git a/app/assets/locales/app_en.arb b/app/assets/locales/app_en.arb
index c251037..3697275 100644
--- a/app/assets/locales/app_en.arb
+++ b/app/assets/locales/app_en.arb
@@ -14,6 +14,8 @@
"common_yesterday": "Yesterday",
"common_tomorrow": "Tomorrow",
+ "common_info":"Info",
+ "common_share":"Share",
"common_upload":"Upload",
"common_download":"Download",
"common_delete": "Delete",
diff --git a/app/ios/Podfile.lock b/app/ios/Podfile.lock
index c87fc7a..35d5021 100644
--- a/app/ios/Podfile.lock
+++ b/app/ios/Podfile.lock
@@ -52,6 +52,8 @@ PODS:
- Flutter
- FlutterMacOS
- PromisesObjC (2.4.0)
+ - share_plus (0.0.1):
+ - Flutter
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
@@ -72,6 +74,7 @@ DEPENDENCIES:
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- photo_manager (from `.symlinks/plugins/photo_manager/ios`)
+ - share_plus (from `.symlinks/plugins/share_plus/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- sqflite (from `.symlinks/plugins/sqflite/darwin`)
- video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/darwin`)
@@ -106,6 +109,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/permission_handler_apple/ios"
photo_manager:
:path: ".symlinks/plugins/photo_manager/ios"
+ share_plus:
+ :path: ".symlinks/plugins/share_plus/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
sqflite:
@@ -126,11 +131,12 @@ SPEC CHECKSUMS:
GoogleUtilities: d053d902a8edaa9904e1bd00c37535385b8ed152
GTMAppAuth: 99fb010047ba3973b7026e45393f51f27ab965ae
GTMSessionFetcher: 8a1b34ad97ebe6f909fb8b9b77fba99943007556
- package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
+ package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
permission_handler_apple: 036b856153a2b1f61f21030ff725f3e6fece2b78
photo_manager: 4f6810b7dfc4feb03b461ac1a70dacf91fba7604
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
+ share_plus: 8875f4f2500512ea181eef553c3e27dba5135aad
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
Toast: ec33c32b8688982cecc6348adeae667c1b9938da
diff --git a/app/lib/ui/flow/home/components/multi_selection_done_button.dart b/app/lib/ui/flow/home/components/multi_selection_done_button.dart
index e18db56..d1384af 100644
--- a/app/lib/ui/flow/home/components/multi_selection_done_button.dart
+++ b/app/lib/ui/flow/home/components/multi_selection_done_button.dart
@@ -1,3 +1,4 @@
+import 'dart:io';
import 'package:cloud_gallery/components/app_dialog.dart';
import 'package:cloud_gallery/domain/extensions/context_extensions.dart';
import 'package:cloud_gallery/ui/flow/home/home_screen_view_model.dart';
@@ -8,6 +9,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/svg.dart';
import 'package:go_router/go_router.dart';
+import 'package:share_plus/share_plus.dart';
import 'package:style/extensions/context_extensions.dart';
import '../../../../components/action_sheet.dart';
import '../../../../components/app_sheet.dart';
@@ -28,9 +30,10 @@ class MultiSelectionDoneButton extends ConsumerWidget {
.any((element) => element.sources.contains(AppMediaSource.local));
final bool showUploadToDriveButton = selectedMedias.any(
(element) => !element.sources.contains(AppMediaSource.googleDrive));
-
final bool showDownloadButton =
selectedMedias.any((element) => element.isGoogleDriveStored);
+ final bool showShareButton =
+ selectedMedias.any((element) => element.isLocalStored);
return FloatingActionButton(
elevation: 3,
@@ -43,10 +46,20 @@ class MultiSelectionDoneButton extends ConsumerWidget {
children: [
if (showUploadToDriveButton)
AppSheetAction(
- icon: SvgPicture.asset(
- Assets.images.icons.googleDrive,
- height: 24,
- width: 24,
+ icon: Stack(
+ alignment: Alignment.bottomRight,
+ children: [
+ Padding(
+ padding: const EdgeInsets.only(bottom: 0, right: 8),
+ child: Icon(CupertinoIcons.cloud_upload,
+ color: context.colorScheme.textSecondary, size: 22),
+ ),
+ SvgPicture.asset(
+ Assets.images.icons.googleDrive,
+ width: 14,
+ height: 14,
+ ),
+ ],
),
title: context.l10n.back_up_on_google_drive_text,
onPressed: () {
@@ -88,9 +101,20 @@ class MultiSelectionDoneButton extends ConsumerWidget {
),
if (showDeleteFromDriveButton)
AppSheetAction(
- icon: const Icon(
- CupertinoIcons.delete,
- size: 24,
+ icon: Stack(
+ alignment: Alignment.bottomRight,
+ children: [
+ Padding(
+ padding: const EdgeInsets.only(bottom: 2, right: 2),
+ child: Icon(CupertinoIcons.trash,
+ color: context.colorScheme.textSecondary, size: 22),
+ ),
+ SvgPicture.asset(
+ Assets.images.icons.googleDrive,
+ width: 14,
+ height: 14,
+ ),
+ ],
),
title: context.l10n.common_delete_from_google_drive,
onPressed: () {
@@ -150,6 +174,22 @@ class MultiSelectionDoneButton extends ConsumerWidget {
);
},
),
+ if (showShareButton)
+ AppSheetAction(
+ icon: Icon(
+ Platform.isIOS ? CupertinoIcons.share : Icons.share_rounded,
+ color: context.colorScheme.textSecondary,
+ size: 24,
+ ),
+ title: context.l10n.common_share,
+ onPressed: () {
+ Share.shareXFiles(selectedMedias
+ .where((element) => element.isLocalStored)
+ .map((e) => XFile(e.path))
+ .toList());
+ context.pop();
+ },
+ ),
],
),
);
diff --git a/app/lib/ui/flow/home/home_view_model_helper_mixin.dart b/app/lib/ui/flow/home/home_view_model_helper_mixin.dart
index 9665c37..5aa73c7 100644
--- a/app/lib/ui/flow/home/home_view_model_helper_mixin.dart
+++ b/app/lib/ui/flow/home/home_view_model_helper_mixin.dart
@@ -47,10 +47,10 @@ mixin HomeViewModelHelperMixin {
Map> removeGoogleDriveRefFromMediaMap(
{required Map> medias,
List? removeFromIds}) {
- return medias.map((key, value) {
- return MapEntry(key,
- value..removeGoogleDriveRefFromMedias(removeFromIds: removeFromIds));
- });
+ return sortMedias(
+ medias: medias.values.expand((element) => element).toList()
+ ..removeGoogleDriveRefFromMedias(removeFromIds: removeFromIds),
+ );
}
Map> addGoogleDriveRefInMediaMap({
diff --git a/app/lib/ui/flow/media_preview/components/top_bar.dart b/app/lib/ui/flow/media_preview/components/top_bar.dart
index c4ddf76..3f7c533 100644
--- a/app/lib/ui/flow/media_preview/components/top_bar.dart
+++ b/app/lib/ui/flow/media_preview/components/top_bar.dart
@@ -1,6 +1,7 @@
import 'dart:io';
import 'package:cloud_gallery/domain/extensions/context_extensions.dart';
import 'package:cloud_gallery/ui/navigation/app_router.dart';
+import 'package:data/models/media/media.dart';
import 'package:data/models/media/media_extension.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@@ -16,12 +17,15 @@ import '../../../../components/app_page.dart';
import '../../../../domain/assets/assets_paths.dart';
import '../../../../domain/formatter/date_formatter.dart';
import '../media_preview_view_model.dart';
+import 'package:share_plus/share_plus.dart';
class PreviewTopBar extends StatelessWidget {
final AutoDisposeStateNotifierProvider provider;
+ final void Function() onAction;
- const PreviewTopBar({super.key, required this.provider});
+ const PreviewTopBar(
+ {super.key, required this.provider, required this.onAction});
@override
Widget build(BuildContext context) {
@@ -40,130 +44,177 @@ class PreviewTopBar extends StatelessWidget {
actions: [
ActionButton(
onPressed: () {
- AppRouter.mediaMetaDataDetails(media: media).push(context);
- },
- icon: Icon(
- CupertinoIcons.info,
- color: context.colorScheme.textSecondary,
- size: 22,
- ),
- ),
- if(media.isGoogleDriveStored)
- ActionButton(
- padding: const EdgeInsets.all(4),
- onPressed: () {
- notifier.downloadMediaFromGoogleDrive(media: media);
- },
- icon: Icon(
- CupertinoIcons.cloud_download,
- color: context.colorScheme.textSecondary,
- size: 22,
- ),
- ),
- if(media.isLocalStored)
- ActionButton(
- padding: const EdgeInsets.all(4),
- onPressed: () {
- notifier.uploadMediaInGoogleDrive(media: media);
- },
- icon: Icon(
- CupertinoIcons.cloud_upload,
- color: context.colorScheme.textSecondary,
- size: 22,
- ),
- ),
- ActionButton(
- onPressed: () async {
- if (media.isCommonStored && media.driveMediaRefId != null) {
- showMenu(
+ showMenu(
context: context,
- position: RelativeRect.fromLTRB(
- double.infinity,
- kToolbarHeight + MediaQuery.of(context).padding.top,
- 0,
- 0),
+ position: RelativeRect.fromSize(
+ Rect.fromLTRB(context.mediaQuerySize.width, 50, 0, 0),
+ // Placeholder rect, will be overwritten
+ context.mediaQuerySize, // Size of the screen
+ ),
+ elevation: 1,
surfaceTintColor: context.colorScheme.surface,
color: context.colorScheme.surface,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
- items: [
+ items: [
PopupMenuItem(
- onTap: () async {
- _showDeleteFromDriveDialog(
- context: context,
- onDelete: () {
- notifier.deleteMediaFromGoogleDrive(
- media.driveMediaRefId);
- context.pop();
- });
+ onTap: () {
+ onAction();
+ AppRouter.mediaMetaDataDetails(media: media)
+ .push(context);
},
child: Row(
children: [
- SvgPicture.asset(
- Assets.images.icons.googleDrive,
- width: 20,
- height: 20,
+ Icon(
+ CupertinoIcons.info,
+ color: context.colorScheme.textSecondary,
+ size: 22,
),
const SizedBox(width: 16),
- Text(context.l10n.common_delete_from_google_drive,
+ Text(context.l10n.common_info,
style: AppTextStyles.body2.copyWith(
color: context.colorScheme.textPrimary,
)),
],
),
),
- PopupMenuItem(
- onTap: () async {
- _showDeleteFromDeviceDialog(
- context: context,
- onDelete: () {
- notifier.deleteMediaFromLocal(media.id);
- context.pop();
- });
- },
- child: Row(
- children: [
- Icon(CupertinoIcons.trash,
+ if (media.isGoogleDriveStored)
+ PopupMenuItem(
+ onTap: () {
+ notifier.downloadMediaFromGoogleDrive(media: media);
+ },
+ child: Row(
+ children: [
+ Icon(
+ CupertinoIcons.cloud_download,
color: context.colorScheme.textSecondary,
- size: 22),
- const SizedBox(width: 16),
- Text(
- context.l10n.common_delete_from_device,
- style: AppTextStyles.body2.copyWith(
- color: context.colorScheme.textPrimary,
+ size: 22,
),
- ),
- ],
+ const SizedBox(width: 16),
+ Text(
+ context.l10n.common_download,
+ style: AppTextStyles.body2.copyWith(
+ color: context.colorScheme.textPrimary,
+ ),
+ ),
+ ],
+ ),
),
- ),
- ],
- );
- } else if (media.isGoogleDriveStored &&
- media.driveMediaRefId != null) {
- _showDeleteFromDriveDialog(
- context: context,
- onDelete: () {
- notifier
- .deleteMediaFromGoogleDrive(media.driveMediaRefId);
- context.pop();
- });
- } else if (media.isLocalStored) {
- _showDeleteFromDeviceDialog(
- context: context,
- onDelete: () {
- notifier.deleteMediaFromLocal(media.id);
- context.pop();
- });
- }
+ if (media.isLocalStored)
+ PopupMenuItem(
+ onTap: () {
+ notifier.uploadMediaInGoogleDrive(media: media);
+ },
+ child: Row(
+ children: [
+ Icon(
+ CupertinoIcons.cloud_upload,
+ color: context.colorScheme.textSecondary,
+ size: 22,
+ ),
+ const SizedBox(width: 16),
+ Text(
+ context.l10n.common_upload,
+ style: AppTextStyles.body2.copyWith(
+ color: context.colorScheme.textPrimary,
+ ),
+ ),
+ ],
+ ),
+ ),
+ if (media.sources.contains(AppMediaSource.googleDrive))
+ PopupMenuItem(
+ onTap: () async {
+ _showDeleteFromDriveDialog(
+ context: context,
+ onDelete: () {
+ notifier.deleteMediaFromGoogleDrive(
+ media.driveMediaRefId);
+ context.pop();
+ });
+ },
+ child: Row(
+ children: [
+ Stack(
+ alignment: Alignment.bottomRight,
+ children: [
+ Padding(
+ padding: const EdgeInsets.only(bottom: 2, right: 2),
+ child: Icon(CupertinoIcons.trash,
+ color: context.colorScheme.textSecondary,
+ size: 22),
+ ),
+ SvgPicture.asset(
+ Assets.images.icons.googleDrive,
+ width: 14,
+ height: 14,
+ ),
+ ],
+ ),
+ const SizedBox(width: 16),
+ Text(context.l10n.common_delete_from_google_drive,
+ style: AppTextStyles.body2.copyWith(
+ color: context.colorScheme.textPrimary,
+ )),
+ ],
+ ),
+ ),
+ if (media.sources.contains(AppMediaSource.local))
+ PopupMenuItem(
+ onTap: () async {
+ _showDeleteFromDeviceDialog(
+ context: context,
+ onDelete: () {
+ notifier.deleteMediaFromLocal(media.id);
+ context.pop();
+ });
+ },
+ child: Row(
+ children: [
+ Icon(CupertinoIcons.trash,
+ color: context.colorScheme.textSecondary,
+ size: 22),
+ const SizedBox(width: 16),
+ Text(
+ (media.isLocalStored)
+ ? context.l10n.common_delete
+ : context.l10n.common_delete_from_device,
+ style: AppTextStyles.body2.copyWith(
+ color: context.colorScheme.textPrimary,
+ ),
+ ),
+ ],
+ ),
+ ),
+ if(media.isLocalStored)
+ PopupMenuItem(
+ onTap: () async {
+ await Share.shareXFiles([XFile(media.path)]);
+ },
+ child: Row(
+ children: [
+ Icon(
+ Platform.isIOS? CupertinoIcons.share: Icons.share_rounded,
+ color: context.colorScheme.textSecondary,
+ size: 22,
+ ),
+ const SizedBox(width: 16),
+ Text(
+ context.l10n.common_share,
+ style: AppTextStyles.body2.copyWith(
+ color: context.colorScheme.textPrimary,
+ ),
+ ),
+ ],
+ ),
+ ),
+ ]);
},
- icon: Padding(
- padding: const EdgeInsets.all(4.0),
- child: Icon(
- CupertinoIcons.delete,
- color: context.colorScheme.textSecondary,
- size: 22,
- ),
+ icon: Icon(
+ Icons.more_vert_rounded,
+ color: context.colorScheme.textSecondary,
+ size: 22,
),
),
if (!Platform.isIOS && !Platform.isMacOS) const SizedBox(width: 8),
diff --git a/app/lib/ui/flow/media_preview/media_preview_screen.dart b/app/lib/ui/flow/media_preview/media_preview_screen.dart
index a34973b..d122b46 100644
--- a/app/lib/ui/flow/media_preview/media_preview_screen.dart
+++ b/app/lib/ui/flow/media_preview/media_preview_screen.dart
@@ -153,7 +153,14 @@ class _MediaPreviewState extends ConsumerState {
_preview(context: context, media: state.medias[index]),
),
),
- PreviewTopBar(provider: _provider),
+ PreviewTopBar(
+ provider: _provider,
+ onAction: () {
+ if(_videoPlayerController != null && (_videoPlayerController?.value.isInitialized ?? false)){
+ _videoPlayerController?.pause();
+ }
+ },
+ ),
_videoActions(context),
_videoDurationSlider(context),
],
diff --git a/app/lib/ui/flow/onboard/onboard_screen.dart b/app/lib/ui/flow/onboard/onboard_screen.dart
index 2fdebd4..803c869 100644
--- a/app/lib/ui/flow/onboard/onboard_screen.dart
+++ b/app/lib/ui/flow/onboard/onboard_screen.dart
@@ -4,6 +4,7 @@ import 'package:cloud_gallery/ui/navigation/app_router.dart';
import 'package:data/storage/app_preferences.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
+import 'package:flutter/widgets.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:style/extensions/context_extensions.dart';
import 'package:style/text/app_text_style.dart';
@@ -16,26 +17,44 @@ class OnBoardScreen extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
return AppPage(
- body: SafeArea(
- child: Padding(
- padding: const EdgeInsets.all(16),
- child: Column(
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- _appLogo(context),
- _onBoardDescription(context),
- _getStartedButton(
- context: context,
- onGetStartedTap: () {
- ref.read(AppPreferences.isOnBoardComplete.notifier).state =
- true;
- AppRouter.home.go(context);
- },
- )
- ],
+ body: Stack(
+ children: [
+ Container(
+ decoration: BoxDecoration(
+ gradient: LinearGradient(
+ begin: Alignment.topCenter,
+ end: Alignment.bottomCenter,
+ colors: [
+ Colors.transparent,
+ context.colorScheme.primary.withOpacity(0.2),
+ Colors.transparent,
+ ],
+ ),
+ ),
),
- ),
+ SafeArea(
+ child: Padding(
+ padding: const EdgeInsets.all(16),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.spaceEvenly,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ _appLogo(context),
+ _onBoardDescription(context),
+ _getStartedButton(
+ context: context,
+ onGetStartedTap: () {
+ ref
+ .read(AppPreferences.isOnBoardComplete.notifier)
+ .state = true;
+ AppRouter.home.go(context);
+ },
+ )
+ ],
+ ),
+ ),
+ ),
+ ],
),
);
}
diff --git a/app/linux/flutter/generated_plugin_registrant.cc b/app/linux/flutter/generated_plugin_registrant.cc
index e71a16d..f6f23bf 100644
--- a/app/linux/flutter/generated_plugin_registrant.cc
+++ b/app/linux/flutter/generated_plugin_registrant.cc
@@ -6,6 +6,10 @@
#include "generated_plugin_registrant.h"
+#include
void fl_register_plugins(FlPluginRegistry* registry) {
+ g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
+ fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
+ url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
}
diff --git a/app/linux/flutter/generated_plugins.cmake b/app/linux/flutter/generated_plugins.cmake
index 2e1de87..f16b4c3 100644
--- a/app/linux/flutter/generated_plugins.cmake
+++ b/app/linux/flutter/generated_plugins.cmake
@@ -3,6 +3,7 @@
#
list(APPEND FLUTTER_PLUGIN_LIST
+ url_launcher_linux
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST
diff --git a/app/macos/Flutter/GeneratedPluginRegistrant.swift b/app/macos/Flutter/GeneratedPluginRegistrant.swift
index 0136f73..62ce5d6 100644
--- a/app/macos/Flutter/GeneratedPluginRegistrant.swift
+++ b/app/macos/Flutter/GeneratedPluginRegistrant.swift
@@ -10,6 +10,7 @@ import google_sign_in_ios
import package_info_plus
import path_provider_foundation
import photo_manager
+import share_plus
import shared_preferences_foundation
import sqflite
import video_player_avfoundation
@@ -20,6 +21,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
PhotoManagerPlugin.register(with: registry.registrar(forPlugin: "PhotoManagerPlugin"))
+ SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
FVPVideoPlayerPlugin.register(with: registry.registrar(forPlugin: "FVPVideoPlayerPlugin"))
diff --git a/app/pubspec.lock b/app/pubspec.lock
index b29b141..5488495 100644
--- a/app/pubspec.lock
+++ b/app/pubspec.lock
@@ -209,6 +209,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.1.1"
+ cross_file:
+ dependency: transitive
+ description:
+ name: cross_file
+ sha256: "55d7b444feb71301ef6b8838dbc1ae02e63dd48c8773f3810ff53bb1e2945b32"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.3.4+1"
crypto:
dependency: transitive
description:
@@ -332,10 +340,10 @@ packages:
dependency: transitive
description:
name: firebase_core_web
- sha256: c8e1d59385eee98de63c92f961d2a7062c5d9a65e7f45bdc7f1b0b205aab2492
+ sha256: c8b02226e548f35aace298e2bb2e6c24e34e8a203d614e742bb1146e5a4ad3c8
url: "https://pub.dev"
source: hosted
- version: "2.11.5"
+ version: "2.15.0"
fixnum:
dependency: transitive
description:
@@ -456,10 +464,10 @@ packages:
dependency: transitive
description:
name: google_identity_services_web
- sha256: "0c56c2c5d60d6dfaf9725f5ad4699f04749fb196ee5a70487a46ef184837ccf6"
+ sha256: "9482364c9f8b7bd36902572ebc3a7c2b5c8ee57a9c93e6eb5099c1a9ec5265d8"
url: "https://pub.dev"
source: hosted
- version: "0.3.0+2"
+ version: "0.3.1+1"
google_sign_in:
dependency: "direct main"
description:
@@ -544,10 +552,10 @@ packages:
dependency: transitive
description:
name: http
- sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba
+ sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938"
url: "https://pub.dev"
source: hosted
- version: "1.2.0"
+ version: "1.2.1"
http_multi_server:
dependency: transitive
description:
@@ -696,18 +704,18 @@ packages:
dependency: transitive
description:
name: package_info_plus
- sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79"
+ sha256: "2c582551839386fa7ddbc7770658be7c0f87f388a4bff72066478f597c34d17f"
url: "https://pub.dev"
source: hosted
- version: "5.0.1"
+ version: "7.0.0"
package_info_plus_platform_interface:
dependency: transitive
description:
name: package_info_plus_platform_interface
- sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6"
+ sha256: f49918f3433a3146047372f9d4f1f847511f2acd5cd030e1f44fe5a50036b70e
url: "https://pub.dev"
source: hosted
- version: "2.0.1"
+ version: "3.0.0"
path:
dependency: transitive
description:
@@ -908,6 +916,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.27.7"
+ share_plus:
+ dependency: "direct main"
+ description:
+ name: share_plus
+ sha256: fb5319f3aab4c5dda5ebb92dca978179ba21f8c783ee4380910ef4c1c6824f51
+ url: "https://pub.dev"
+ source: hosted
+ version: "8.0.3"
+ share_plus_platform_interface:
+ dependency: transitive
+ description:
+ name: share_plus_platform_interface
+ sha256: "251eb156a8b5fa9ce033747d73535bf53911071f8d3b6f4f0b578505ce0d4496"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.4.0"
shared_preferences:
dependency: "direct main"
description:
@@ -952,10 +976,10 @@ packages:
dependency: transitive
description:
name: shared_preferences_web
- sha256: "7b15ffb9387ea3e237bb7a66b8a23d2147663d391cafc5c8f37b2e7b4bde5d21"
+ sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a"
url: "https://pub.dev"
source: hosted
- version: "2.2.2"
+ version: "2.3.0"
shared_preferences_windows:
dependency: transitive
description:
@@ -1120,6 +1144,38 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.2"
+ url_launcher_linux:
+ dependency: transitive
+ description:
+ name: url_launcher_linux
+ sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.1.1"
+ url_launcher_platform_interface:
+ dependency: transitive
+ description:
+ name: url_launcher_platform_interface
+ sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.3.2"
+ url_launcher_web:
+ dependency: transitive
+ description:
+ name: url_launcher_web
+ sha256: "8d9e750d8c9338601e709cd0885f95825086bd8b642547f26bda435aade95d8a"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.3.1"
+ url_launcher_windows:
+ dependency: transitive
+ description:
+ name: url_launcher_windows
+ sha256: ecf9725510600aa2bb6d7ddabe16357691b6d2805f66216a97d1b881e21beff7
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.1.1"
uuid:
dependency: transitive
description:
@@ -1228,18 +1284,18 @@ packages:
dependency: transitive
description:
name: web
- sha256: "4188706108906f002b3a293509234588823c8c979dc83304e229ff400c996b05"
+ sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
url: "https://pub.dev"
source: hosted
- version: "0.4.2"
+ version: "0.5.1"
web_socket_channel:
dependency: transitive
description:
name: web_socket_channel
- sha256: "939ab60734a4f8fa95feacb55804fa278de28bdeef38e616dc08e44a84adea23"
+ sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42"
url: "https://pub.dev"
source: hosted
- version: "2.4.3"
+ version: "2.4.5"
win32:
dependency: transitive
description:
diff --git a/app/pubspec.yaml b/app/pubspec.yaml
index bacd4c1..d15a37c 100644
--- a/app/pubspec.yaml
+++ b/app/pubspec.yaml
@@ -49,6 +49,7 @@ dependencies:
collection: ^1.18.0
path_provider: ^2.1.2
dio: ^5.4.3+1
+ share_plus: ^8.0.3
# storage
shared_preferences: ^2.2.2
diff --git a/app/windows/flutter/generated_plugin_registrant.cc b/app/windows/flutter/generated_plugin_registrant.cc
index 5893c2f..df715fe 100644
--- a/app/windows/flutter/generated_plugin_registrant.cc
+++ b/app/windows/flutter/generated_plugin_registrant.cc
@@ -8,10 +8,16 @@
#include
#include
+#include
+#include
void RegisterPlugins(flutter::PluginRegistry* registry) {
FirebaseCorePluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FirebaseCorePluginCApi"));
PermissionHandlerWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
+ SharePlusWindowsPluginCApiRegisterWithRegistrar(
+ registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi"));
+ UrlLauncherWindowsRegisterWithRegistrar(
+ registry->GetRegistrarForPlugin("UrlLauncherWindows"));
}
diff --git a/app/windows/flutter/generated_plugins.cmake b/app/windows/flutter/generated_plugins.cmake
index 873f19d..2c858c6 100644
--- a/app/windows/flutter/generated_plugins.cmake
+++ b/app/windows/flutter/generated_plugins.cmake
@@ -5,6 +5,8 @@
list(APPEND FLUTTER_PLUGIN_LIST
firebase_core
permission_handler_windows
+ share_plus
+ url_launcher_windows
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST
diff --git a/data/.flutter-plugins b/data/.flutter-plugins
index 58d16bc..8e453a7 100644
--- a/data/.flutter-plugins
+++ b/data/.flutter-plugins
@@ -3,7 +3,7 @@ google_sign_in=/Users/pratikcanopas/.pub-cache/hosted/pub.dev/google_sign_in-6.2
google_sign_in_android=/Users/pratikcanopas/.pub-cache/hosted/pub.dev/google_sign_in_android-6.1.21/
google_sign_in_ios=/Users/pratikcanopas/.pub-cache/hosted/pub.dev/google_sign_in_ios-5.7.4/
google_sign_in_web=/Users/pratikcanopas/.pub-cache/hosted/pub.dev/google_sign_in_web-0.12.3+3/
-package_info_plus=/Users/pratikcanopas/.pub-cache/hosted/pub.dev/package_info_plus-5.0.1/
+package_info_plus=/Users/pratikcanopas/.pub-cache/hosted/pub.dev/package_info_plus-7.0.0/
path_provider=/Users/pratikcanopas/.pub-cache/hosted/pub.dev/path_provider-2.1.2/
path_provider_android=/Users/pratikcanopas/.pub-cache/hosted/pub.dev/path_provider_android-2.2.2/
path_provider_foundation=/Users/pratikcanopas/.pub-cache/hosted/pub.dev/path_provider_foundation-2.3.2/
@@ -14,5 +14,5 @@ shared_preferences=/Users/pratikcanopas/.pub-cache/hosted/pub.dev/shared_prefere
shared_preferences_android=/Users/pratikcanopas/.pub-cache/hosted/pub.dev/shared_preferences_android-2.2.1/
shared_preferences_foundation=/Users/pratikcanopas/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.3.5/
shared_preferences_linux=/Users/pratikcanopas/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.3.2/
-shared_preferences_web=/Users/pratikcanopas/.pub-cache/hosted/pub.dev/shared_preferences_web-2.2.2/
+shared_preferences_web=/Users/pratikcanopas/.pub-cache/hosted/pub.dev/shared_preferences_web-2.3.0/
shared_preferences_windows=/Users/pratikcanopas/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.3.2/
diff --git a/data/.flutter-plugins-dependencies b/data/.flutter-plugins-dependencies
index 04e3d87..48bcd4e 100644
--- a/data/.flutter-plugins-dependencies
+++ b/data/.flutter-plugins-dependencies
@@ -1 +1 @@
-{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"google_sign_in_ios","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/google_sign_in_ios-5.7.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/package_info_plus-5.0.1/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/path_provider_foundation-2.3.2/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"photo_manager","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/photo_manager-3.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.3.5/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"google_sign_in_android","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/google_sign_in_android-6.1.21/","native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/package_info_plus-5.0.1/","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/path_provider_android-2.2.2/","native_build":true,"dependencies":[]},{"name":"photo_manager","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/photo_manager-3.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_android","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/shared_preferences_android-2.2.1/","native_build":true,"dependencies":[]}],"macos":[{"name":"google_sign_in_ios","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/google_sign_in_ios-5.7.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/package_info_plus-5.0.1/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/path_provider_foundation-2.3.2/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"photo_manager","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/photo_manager-3.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.3.5/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"package_info_plus","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/package_info_plus-5.0.1/","native_build":false,"dependencies":[]},{"name":"path_provider_linux","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.3.2/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"package_info_plus","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/package_info_plus-5.0.1/","native_build":false,"dependencies":[]},{"name":"path_provider_windows","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/path_provider_windows-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.3.2/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"google_sign_in_web","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/google_sign_in_web-0.12.3+3/","dependencies":[]},{"name":"package_info_plus","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/package_info_plus-5.0.1/","dependencies":[]},{"name":"shared_preferences_web","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/shared_preferences_web-2.2.2/","dependencies":[]}]},"dependencyGraph":[{"name":"google_sign_in","dependencies":["google_sign_in_android","google_sign_in_ios","google_sign_in_web"]},{"name":"google_sign_in_android","dependencies":[]},{"name":"google_sign_in_ios","dependencies":[]},{"name":"google_sign_in_web","dependencies":[]},{"name":"package_info_plus","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"photo_manager","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-04-18 14:12:20.264184","version":"3.19.3"}
\ No newline at end of file
+{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"google_sign_in_ios","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/google_sign_in_ios-5.7.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/package_info_plus-7.0.0/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/path_provider_foundation-2.3.2/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"photo_manager","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/photo_manager-3.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.3.5/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"google_sign_in_android","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/google_sign_in_android-6.1.21/","native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/package_info_plus-7.0.0/","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/path_provider_android-2.2.2/","native_build":true,"dependencies":[]},{"name":"photo_manager","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/photo_manager-3.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_android","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/shared_preferences_android-2.2.1/","native_build":true,"dependencies":[]}],"macos":[{"name":"google_sign_in_ios","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/google_sign_in_ios-5.7.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/package_info_plus-7.0.0/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/path_provider_foundation-2.3.2/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"photo_manager","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/photo_manager-3.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.3.5/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"package_info_plus","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/package_info_plus-7.0.0/","native_build":false,"dependencies":[]},{"name":"path_provider_linux","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.3.2/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"package_info_plus","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/package_info_plus-7.0.0/","native_build":false,"dependencies":[]},{"name":"path_provider_windows","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/path_provider_windows-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.3.2/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"google_sign_in_web","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/google_sign_in_web-0.12.3+3/","dependencies":[]},{"name":"package_info_plus","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/package_info_plus-7.0.0/","dependencies":[]},{"name":"shared_preferences_web","path":"/Users/pratikcanopas/.pub-cache/hosted/pub.dev/shared_preferences_web-2.3.0/","dependencies":[]}]},"dependencyGraph":[{"name":"google_sign_in","dependencies":["google_sign_in_android","google_sign_in_ios","google_sign_in_web"]},{"name":"google_sign_in_android","dependencies":[]},{"name":"google_sign_in_ios","dependencies":[]},{"name":"google_sign_in_web","dependencies":[]},{"name":"package_info_plus","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"photo_manager","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-04-22 15:04:02.576376","version":"3.19.3"}
\ No newline at end of file
diff --git a/data/pubspec.yaml b/data/pubspec.yaml
index c7f0d99..373ec94 100644
--- a/data/pubspec.yaml
+++ b/data/pubspec.yaml
@@ -15,7 +15,7 @@ dependencies:
http_parser: ^4.0.2
dio: ^5.4.3+1
photo_manager: ^3.0.0-dev.5
- package_info_plus: ^5.0.1
+ package_info_plus: ^7.0.0
path_provider: ^2.1.2
# authentication