diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index be0f1070..899d9734 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ # Contributing guidelines -We :heart: [Pull Requests](https://help.github.com/articles/about-pull-requests/) +We 💙 [Pull Requests](https://help.github.com/articles/about-pull-requests/) for fixing issues or adding features. Thanks for your contribution! Please read our [code of conduct](code_of_conduct.md), which is based on @@ -13,13 +13,15 @@ For small changes, especially documentation, you can simply use the "Edit" butto to update the Markdown file, and start the [pull request](https://help.github.com/articles/about-pull-requests/) process. Use the preview tab in GitHub to make sure that it is properly -formatted before committing. +formatted before committing. Please use conventional commits and follow the semantic PR format as documented +[here](https://github.com/atsign-foundation/.github/blob/trunk/atGitHub.md#semantic-prs). A pull request will cause integration tests to run automatically, so please review the results of the pipeline and correct any mistakes that are reported. If you plan to contribute often or have a larger change to make, it is best to setup an environment for contribution, which is what the rest of these guidelines -describe. +describe. The atsign-foundation GitHub organization's conventions and configurations are documented +[here](https://github.com/atsign-foundation/.github/blob/trunk/atGitHub.md). ## Development Environment Setup diff --git a/android/app/build.gradle b/android/app/build.gradle index a97f5335..7d9d82ac 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -47,7 +47,7 @@ android { applicationId "com.atsign.atsign_atmosphere_pro" multiDexEnabled true minSdkVersion 24 - targetSdkVersion 30 + targetSdkVersion 31 versionCode flutterVersionCode.toInteger() versionName flutterVersionName } diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 9ceeaa2f..f740abee 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -23,6 +23,7 @@ android:icon="@mipmap/ic_launcher"> Enable atmospherePro to save images and videos in photos after being downloaded. NSPhotoLibraryUsageDescription Enable atmospherePro to access your photos to upload the ones you choose in file transfer. + UIApplicationSupportsIndirectInputEvents + UIFileSharingEnabled UILaunchStoryboardName diff --git a/lib/desktop_screens/desktop_history/widgets/desktop_received_file_list_tile.dart b/lib/desktop_screens/desktop_history/widgets/desktop_received_file_list_tile.dart index e1d02530..0ceb6c48 100644 --- a/lib/desktop_screens/desktop_history/widgets/desktop_received_file_list_tile.dart +++ b/lib/desktop_screens/desktop_history/widgets/desktop_received_file_list_tile.dart @@ -6,6 +6,7 @@ import 'package:at_contacts_flutter/services/contact_service.dart'; import 'package:atsign_atmosphere_pro/data_models/file_transfer.dart'; import 'package:atsign_atmosphere_pro/screens/common_widgets/add_contact.dart'; import 'package:atsign_atmosphere_pro/screens/common_widgets/confirmation_dialog.dart'; +import 'package:atsign_atmosphere_pro/screens/common_widgets/confirmation_item_delete.dart'; import 'package:atsign_atmosphere_pro/screens/common_widgets/contact_initial.dart'; import 'package:atsign_atmosphere_pro/screens/common_widgets/custom_button.dart'; import 'package:atsign_atmosphere_pro/screens/common_widgets/custom_circle_avatar.dart'; @@ -695,64 +696,29 @@ class _DesktopReceivedFilesListTileState deleteReceivedItem() async { await showDialog( - context: NavService.navKey.currentContext!, - builder: (context) { - return AlertDialog( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10.toWidth), - ), - content: ConfirmationDialog(TextStrings.deleteFileConfirmationMsg, - () async { - var res = - await Provider.of(context, listen: false) - .deleteReceivedItem(widget.receivedHistory!); - - if (res) { - SnackbarService().showSnackbar( - NavService.navKey.currentContext!, - 'Removed from received items list', - bgColor: ColorConstants.successGreen); - await deleteFileWhenRecevedItemRemoved(); - } else { - SnackbarService().showSnackbar( - NavService.navKey.currentContext!, 'Failed', - bgColor: ColorConstants.redAlert); - } - })); - }); - } - - deleteFileWhenRecevedItemRemoved() async { - await showDialog( - context: NavService.navKey.currentContext!, - builder: (context) { - return AlertDialog( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10.toWidth), - ), - content: ConfirmationDialog( - TextStrings.deleteDownloadedFileMessage, () async { - await Future.forEach(widget.receivedHistory!.files!, - (FileData element) async { - String filePath = MixedConstants.RECEIVED_FILE_DIRECTORY + - Platform.pathSeparator + - (widget.receivedHistory!.sender ?? '') + - Platform.pathSeparator + - (element.name ?? ''); - - if (await CommonUtilityFunctions().isFilePresent(filePath)) { - var file = File(filePath); - if (await file.existsSync()) { - file.deleteSync(); - } - } - }); + context: NavService.navKey.currentContext!, + builder: (context) { + return AlertDialog( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.toWidth), + ), + content: ConfirmationItemDelete(TextStrings.deleteFileConfirmationMsg, + () async { + var res = await Provider.of(context, listen: false) + .deleteReceivedItem(widget.receivedHistory!); - await Provider.of( - NavService.navKey.currentContext!, - listen: false) - .deletMyFileRecord(widget.receivedHistory!.key); - })); - }); + if (res) { + SnackbarService().showSnackbar(NavService.navKey.currentContext!, + 'Removed from received items list', + bgColor: ColorConstants.successGreen); + } else { + SnackbarService().showSnackbar( + NavService.navKey.currentContext!, 'Failed', + bgColor: ColorConstants.redAlert); + } + }, widget.receivedHistory), + ); + }, + ); } } diff --git a/lib/desktop_screens/desktop_home/desktop_home.dart b/lib/desktop_screens/desktop_home/desktop_home.dart index 9e5493e5..5d27aa5a 100644 --- a/lib/desktop_screens/desktop_home/desktop_home.dart +++ b/lib/desktop_screens/desktop_home/desktop_home.dart @@ -5,14 +5,17 @@ import 'package:atsign_atmosphere_pro/screens/common_widgets/custom_onboarding.d import 'package:atsign_atmosphere_pro/services/backend_service.dart'; import 'package:at_common_flutter/services/size_config.dart'; import 'package:atsign_atmosphere_pro/services/common_utility_functions.dart'; +import 'package:atsign_atmosphere_pro/services/navigation_service.dart'; import 'package:atsign_atmosphere_pro/utils/colors.dart'; import 'package:atsign_atmosphere_pro/utils/constants.dart'; import 'package:atsign_atmosphere_pro/utils/images.dart'; import 'package:atsign_atmosphere_pro/utils/text_strings.dart'; import 'package:atsign_atmosphere_pro/utils/text_styles.dart'; +import 'package:atsign_atmosphere_pro/view_models/internet_connectivity_checker.dart'; import 'package:carousel_slider/carousel_slider.dart'; import 'package:flutter/material.dart'; import 'package:path_provider/path_provider.dart'; +import 'package:provider/provider.dart'; class DesktopHome extends StatefulWidget { const DesktopHome({Key? key}) : super(key: key); @@ -51,6 +54,12 @@ class _DesktopHomeState extends State { @override void initState() { + WidgetsBinding.instance.addPostFrameCallback((_) async { + Provider.of( + NavService.navKey.currentContext!, + listen: false) + .checkConnectivity(); + }); storeApplicationDocumentsDirectory(); super.initState(); } diff --git a/lib/screens/common_widgets/confirmation_item_delete.dart b/lib/screens/common_widgets/confirmation_item_delete.dart new file mode 100644 index 00000000..1b575edd --- /dev/null +++ b/lib/screens/common_widgets/confirmation_item_delete.dart @@ -0,0 +1,174 @@ +import 'dart:io'; + +import 'package:at_common_flutter/services/size_config.dart'; +import 'package:at_common_flutter/utils/colors.dart'; +import 'package:atsign_atmosphere_pro/data_models/file_transfer.dart'; +import 'package:atsign_atmosphere_pro/services/backend_service.dart'; +import 'package:atsign_atmosphere_pro/services/common_utility_functions.dart'; +import 'package:atsign_atmosphere_pro/services/navigation_service.dart'; +import 'package:atsign_atmosphere_pro/services/snackbar_service.dart'; +import 'package:atsign_atmosphere_pro/utils/constants.dart'; +import 'package:atsign_atmosphere_pro/utils/text_strings.dart'; +import 'package:atsign_atmosphere_pro/utils/text_styles.dart'; +import 'package:atsign_atmosphere_pro/view_models/history_provider.dart'; +import 'package:atsign_atmosphere_pro/view_models/my_files_provider.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class ConfirmationItemDelete extends StatefulWidget { + final FileTransfer? receivedHistory; + + final String title; + final Function onConfirmation; + ConfirmationItemDelete(this.title, this.onConfirmation, this.receivedHistory); + + @override + _ConfirmationItemDeleteState createState() => _ConfirmationItemDeleteState(); +} + +class _ConfirmationItemDeleteState extends State { + @override + Widget build(BuildContext context) { + return Container( + width: Platform.isAndroid || Platform.isIOS ? 300.toWidth : 250.toWidth, + height: + Platform.isAndroid || Platform.isIOS ? 300.toHeight : 220.toHeight, + padding: EdgeInsets.all(15.toFont), + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(widget.title, + style: CustomTextStyles.grey15, textAlign: TextAlign.justify), + SizedBox( + height: 20.toHeight, + ), + Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + TextButton( + style: ButtonStyle( + shape: MaterialStateProperty.all( + RoundedRectangleBorder( + borderRadius: BorderRadius.circular(18), + ), + ), + padding: MaterialStateProperty.all( + EdgeInsets.only(left: 22, right: 22)), + backgroundColor: MaterialStateProperty.all(Colors.black)), + onPressed: () async { + Navigator.of(context).pop(); + await widget.onConfirmation(); + }, + child: Text( + 'Delete only transfer history', + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 15.toFont, + fontWeight: FontWeight.normal, + color: Colors.white), + ), + ), + SizedBox( + height: 10.toHeight, + ), + TextButton( + style: ButtonStyle( + shape: MaterialStateProperty.all( + RoundedRectangleBorder( + borderRadius: BorderRadius.circular(18), + ), + ), + padding: MaterialStateProperty.all( + EdgeInsets.only(left: 10, right: 10)), + backgroundColor: MaterialStateProperty.all(Colors.black)), + onPressed: () async { + deleteTransferHistoryAndFiles(); + }, + child: Text( + 'Delete transfer history and files', + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 15.toFont, + fontWeight: FontWeight.normal, + color: Colors.white), + ), + ), + SizedBox( + height: 10.toHeight, + ), + TextButton( + style: ButtonStyle( + shape: MaterialStateProperty.all( + RoundedRectangleBorder( + borderRadius: BorderRadius.circular(18), + ), + ), + padding: MaterialStateProperty.all( + EdgeInsets.only(left: 85, right: 85)), + ), + onPressed: () { + Navigator.of(context).pop(); + }, + child: Text( + TextStrings().buttonCancel, + style: TextStyle( + fontSize: 16.toFont, + fontWeight: FontWeight.normal, + color: Colors.black, + ), + ), + ), + ], + ) + ], + ), + ), + ); + } + + Future deleteTransferHistoryAndFiles() async { + Navigator.of(context).pop(); + await widget.onConfirmation(); + if (Platform.isAndroid || Platform.isIOS) { + await Future.forEach( + widget.receivedHistory!.files!, + (FileData element) async { + String filePath = + BackendService.getInstance().downloadDirectory!.path + + Platform.pathSeparator + + element.name!; + if (await CommonUtilityFunctions().isFilePresent(filePath)) { + var file = File(filePath); + file.deleteSync(); + } + }, + ); + await Provider.of(NavService.navKey.currentContext!, + listen: false) + .deletMyFileRecord(widget.receivedHistory!.key); + } else { + await Future.forEach( + widget.receivedHistory!.files!, + (FileData element) async { + String filePath = MixedConstants.RECEIVED_FILE_DIRECTORY + + Platform.pathSeparator + + (widget.receivedHistory!.sender ?? '') + + Platform.pathSeparator + + (element.name ?? ''); + + if (await CommonUtilityFunctions().isFilePresent(filePath)) { + var file = File(filePath); + if (await file.existsSync()) { + file.deleteSync(); + } + } + }, + ); + + await Provider.of(NavService.navKey.currentContext!, + listen: false) + .deletMyFileRecord(widget.receivedHistory!.key); + } + } +} diff --git a/lib/screens/common_widgets/custom_onboarding.dart b/lib/screens/common_widgets/custom_onboarding.dart index 13d0dcdc..9952a106 100644 --- a/lib/screens/common_widgets/custom_onboarding.dart +++ b/lib/screens/common_widgets/custom_onboarding.dart @@ -13,6 +13,7 @@ import 'package:atsign_atmosphere_pro/utils/constants.dart'; import 'package:atsign_atmosphere_pro/view_models/file_download_checker.dart'; import 'package:atsign_atmosphere_pro/view_models/file_transfer_provider.dart'; import 'package:atsign_atmosphere_pro/view_models/history_provider.dart'; +import 'package:atsign_atmosphere_pro/view_models/internet_connectivity_checker.dart'; import 'package:atsign_atmosphere_pro/view_models/my_files_provider.dart'; import 'package:atsign_atmosphere_pro/view_models/switch_atsign_provider.dart'; import 'package:atsign_atmosphere_pro/view_models/trusted_sender_view_model.dart'; @@ -103,12 +104,16 @@ class CustomOnboarding { } break; case AtOnboardingResultStatus.error: + bool isInternet = Provider.of( + NavService.navKey.currentContext!, + listen: false) + .isInternetAvailable; ScaffoldMessenger.of(NavService.navKey.currentContext!).showSnackBar( SnackBar( content: Text( - (result.message ?? '').isNotEmpty - ? result.message! - : 'Error in onboarding', + isInternet + ? 'Error in onboarding' + : 'Onboarding failed, please check your network', ), backgroundColor: ColorConstants.red, ), diff --git a/lib/screens/common_widgets/website_webview.dart b/lib/screens/common_widgets/website_webview.dart index ace2617c..02bcde31 100644 --- a/lib/screens/common_widgets/website_webview.dart +++ b/lib/screens/common_widgets/website_webview.dart @@ -1,5 +1,3 @@ -import 'dart:io'; - import 'package:atsign_atmosphere_pro/services/snackbar_service.dart'; import 'package:atsign_atmosphere_pro/utils/colors.dart'; import 'package:atsign_atmosphere_pro/utils/text_strings.dart'; @@ -17,18 +15,42 @@ class WebsiteScreen extends StatefulWidget { final String? title; final String? url; - const WebsiteScreen({Key? key, this.title, this.url}) : super(key: key); + const WebsiteScreen({ + Key? key, + this.title, + this.url, + }) : super(key: key); + @override _WebsiteScreenState createState() => _WebsiteScreenState(); } class _WebsiteScreenState extends State { - late bool loading; + late bool isLoading; + late WebViewController webViewController; + final Set> gestureRecognizers = { + Factory(() => EagerGestureRecognizer()) + }; + @override void initState() { super.initState(); - if (Platform.isAndroid) WebView.platform = SurfaceAndroidWebView(); - loading = true; + + webViewController = WebViewController() + ..setJavaScriptMode(JavaScriptMode.unrestricted) + ..setBackgroundColor(Colors.white) + ..setNavigationDelegate( + NavigationDelegate( + onPageFinished: (String url) { + setState(() { + isLoading = false; + }); + }, + ), + ) + ..loadRequest(Uri.parse(widget.url ?? '')); + isLoading = true; + WidgetsBinding.instance.addPostFrameCallback((timeStamp) { checkForNetwork(); }); @@ -70,30 +92,22 @@ class _WebsiteScreenState extends State { style: CustomTextStyles.primaryBold18, ), ), - body: Stack(children: [ - WebView( - initialUrl: widget.url, - javascriptMode: JavascriptMode.unrestricted, - gestureRecognizers: { - Factory( - () => VerticalDragGestureRecognizer()..onUpdate = (_) {}, - ) - }, - onPageFinished: (test1) { - this.setState(() { - loading = false; - }); - }, - ), - loading - ? Center( - child: CircularProgressIndicator( - valueColor: AlwaysStoppedAnimation( - ColorConstants.blueText, - )), - ) - : SizedBox() - ]), + body: Stack( + children: [ + WebViewWidget( + controller: webViewController, + gestureRecognizers: gestureRecognizers, + ), + isLoading + ? Center( + child: CircularProgressIndicator( + valueColor: AlwaysStoppedAnimation( + ColorConstants.blueText, + )), + ) + : SizedBox() + ], + ), ); } } diff --git a/lib/screens/history/widgets/delete_bottomsheet.dart b/lib/screens/history/widgets/delete_bottomsheet.dart new file mode 100644 index 00000000..ad4201e2 --- /dev/null +++ b/lib/screens/history/widgets/delete_bottomsheet.dart @@ -0,0 +1,73 @@ +import 'package:atsign_atmosphere_pro/data_models/file_transfer.dart'; +import 'package:atsign_atmosphere_pro/screens/common_widgets/confirmation_dialog.dart'; +import 'package:atsign_atmosphere_pro/screens/common_widgets/confirmation_item_delete.dart'; +import 'package:atsign_atmosphere_pro/services/navigation_service.dart'; +import 'package:atsign_atmosphere_pro/utils/colors.dart'; +import 'package:atsign_atmosphere_pro/utils/text_strings.dart'; +import 'package:atsign_atmosphere_pro/utils/text_styles.dart'; +import 'package:flutter/material.dart'; +import 'package:at_common_flutter/services/size_config.dart'; + +class DeleteBottomSheet extends StatefulWidget { + final Function onConfirmation; + final String deleteMessage; + final FileTransfer? receivedHistory; + DeleteBottomSheet( + {required this.onConfirmation, + required this.deleteMessage, + required this.receivedHistory}); + @override + _DeleteBottomSheetState createState() => _DeleteBottomSheetState(); +} + +class _DeleteBottomSheetState extends State { + @override + Widget build(BuildContext context) { + return Container( + width: double.infinity, + height: 100, + padding: EdgeInsets.all(15), + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(20), topRight: Radius.circular(10)), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + InkWell( + onTap: () { + deleteSentItem(widget.deleteMessage); + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + TextStrings.delete, + style: CustomTextStyles.red20, + ), + Icon(Icons.delete, + color: ColorConstants.redAlert, size: 20.toFont) + ], + ), + ), + ], + ), + ); + } + + deleteSentItem(String message) async { + await showDialog( + context: NavService.navKey.currentContext!, + builder: (context) { + return AlertDialog( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.toWidth), + ), + content: ConfirmationItemDelete(message, () async { + widget.onConfirmation(); + }, widget.receivedHistory)); + }); + + Navigator.of(context).pop(); + } +} diff --git a/lib/screens/history/widgets/received_file_list_tile.dart b/lib/screens/history/widgets/received_file_list_tile.dart index 97a27ab2..f0b2a773 100644 --- a/lib/screens/history/widgets/received_file_list_tile.dart +++ b/lib/screens/history/widgets/received_file_list_tile.dart @@ -10,6 +10,7 @@ import 'package:atsign_atmosphere_pro/screens/common_widgets/confirmation_dialog import 'package:atsign_atmosphere_pro/screens/common_widgets/contact_initial.dart'; import 'package:atsign_atmosphere_pro/screens/common_widgets/custom_circle_avatar.dart'; import 'package:atsign_atmosphere_pro/screens/common_widgets/labelled_circular_progress.dart'; +import 'package:atsign_atmosphere_pro/screens/history/widgets/delete_bottomsheet.dart'; import 'package:atsign_atmosphere_pro/screens/history/widgets/edit_bottomsheet.dart'; import 'package:atsign_atmosphere_pro/services/backend_service.dart'; import 'package:atsign_atmosphere_pro/services/common_utility_functions.dart'; @@ -983,7 +984,7 @@ class _ReceivedFilesListTileState extends State { await showModalBottomSheet( context: NavService.navKey.currentContext!, backgroundColor: Colors.white, - builder: (context) => EditBottomSheet( + builder: (context) => DeleteBottomSheet( onConfirmation: () async { var res = await Provider.of(context, listen: false) @@ -994,7 +995,6 @@ class _ReceivedFilesListTileState extends State { NavService.navKey.currentContext!, 'Removed from received items list', bgColor: ColorConstants.successGreen); - await deleteFileWhenRecevedItemRemoved(); } else { SnackbarService().showSnackbar( NavService.navKey.currentContext!, 'Failed', @@ -1002,39 +1002,10 @@ class _ReceivedFilesListTileState extends State { } }, deleteMessage: TextStrings.deleteFileConfirmationMsg, + receivedHistory: widget.receivedHistory, )); } - deleteFileWhenRecevedItemRemoved() async { - await showDialog( - context: NavService.navKey.currentContext!, - builder: (context) { - return AlertDialog( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10.toWidth), - ), - content: ConfirmationDialog( - TextStrings.deleteDownloadedFileMessage, () async { - await Future.forEach(widget.receivedHistory!.files!, - (FileData element) async { - String filePath = - BackendService.getInstance().downloadDirectory!.path + - Platform.pathSeparator + - element.name!; - if (await CommonUtilityFunctions().isFilePresent(filePath)) { - var file = File(filePath); - file.deleteSync(); - } - }); - - await Provider.of( - NavService.navKey.currentContext!, - listen: false) - .deletMyFileRecord(widget.receivedHistory!.key); - })); - }); - } - String getSingleFileDownloadMessage( FileTransferProgress? fileTransferProgress, String fileName) { String downloadMessage = TextStrings().downloading; diff --git a/lib/services/backend_service.dart b/lib/services/backend_service.dart index c82f37f5..9c66ad17 100644 --- a/lib/services/backend_service.dart +++ b/lib/services/backend_service.dart @@ -453,9 +453,7 @@ class BackendService { late var atClientPrefernce; AtOnboardingResult result; - if ((atSign ?? '').isNotEmpty) { - _onboardingService.setAtsign = atSign; - } + _onboardingService.setAtsign = atSign; // await getAtClientPreference(); await getAtClientPreference() diff --git a/lib/services/file_transfer_service.dart b/lib/services/file_transfer_service.dart index 4aa346dd..44dd5379 100644 --- a/lib/services/file_transfer_service.dart +++ b/lib/services/file_transfer_service.dart @@ -445,7 +445,9 @@ class FileTransferService { } void encryptFileInIsolate(Map params) async { - final encryptedFile = await EncryptionService().encryptFileInChunks( + final encryptedFile = + await EncryptionService(BackendService.getInstance().currentAtSign ?? '') + .encryptFileInChunks( params['file'], params['encryptionKey'], params['fileEncryptionChunkSize'], @@ -455,7 +457,9 @@ void encryptFileInIsolate(Map params) async { } void decryptFileInIsolate(Map params) async { - final decryptedFile = await EncryptionService().decryptFileInChunks( + final decryptedFile = + await EncryptionService(BackendService.getInstance().currentAtSign ?? '') + .decryptFileInChunks( params['file'], params['encryptionKey'], params['fileEncryptionChunkSize'], diff --git a/lib/utils/constants.dart b/lib/utils/constants.dart index 9b2519fd..27ca7fd9 100644 --- a/lib/utils/constants.dart +++ b/lib/utils/constants.dart @@ -15,7 +15,7 @@ class MixedConstants { static const int ROOT_PORT = 64; - static const String TERMS_CONDITIONS = 'atsign.com/terms-conditions/'; + static const String TERMS_CONDITIONS = 'https://atsign.com/terms-conditions/'; static const String FILEBIN_URL = 'https://ck6agzxiog6kmb.atsign.com/'; // static const String PRIVACY_POLICY = 'https://atsign.com/privacy-policy/'; diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index c8822bad..b56431d4 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -8,6 +8,7 @@ import Foundation import at_file_saver import biometric_storage import desktop_window +import device_info_plus import emoji_picker_flutter import file_selector_macos import flutter_local_notifications @@ -23,6 +24,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { FileSaverPlugin.register(with: registry.registrar(forPlugin: "FileSaverPlugin")) BiometricStorageMacOSPlugin.register(with: registry.registrar(forPlugin: "BiometricStorageMacOSPlugin")) DesktopWindowPlugin.register(with: registry.registrar(forPlugin: "DesktopWindowPlugin")) + DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) EmojiPickerFlutterPlugin.register(with: registry.registrar(forPlugin: "EmojiPickerFlutterPlugin")) FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin")) FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin")) diff --git a/macos/Podfile b/macos/Podfile index dade8dfa..049abe29 100644 --- a/macos/Podfile +++ b/macos/Podfile @@ -1,4 +1,4 @@ -platform :osx, '10.11' +platform :osx, '10.14' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/macos/Podfile.lock b/macos/Podfile.lock index f4d223e8..165f795a 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -5,6 +5,8 @@ PODS: - FlutterMacOS - desktop_window (0.0.1): - FlutterMacOS + - device_info_plus (0.0.1): + - FlutterMacOS - emoji_picker_flutter (0.0.1): - FlutterMacOS - file_selector_macos (0.0.1): @@ -31,6 +33,7 @@ DEPENDENCIES: - at_file_saver (from `Flutter/ephemeral/.symlinks/plugins/at_file_saver/macos`) - biometric_storage (from `Flutter/ephemeral/.symlinks/plugins/biometric_storage/macos`) - desktop_window (from `Flutter/ephemeral/.symlinks/plugins/desktop_window/macos`) + - device_info_plus (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos`) - emoji_picker_flutter (from `Flutter/ephemeral/.symlinks/plugins/emoji_picker_flutter/macos`) - file_selector_macos (from `Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos`) - flutter_local_notifications (from `Flutter/ephemeral/.symlinks/plugins/flutter_local_notifications/macos`) @@ -50,6 +53,8 @@ EXTERNAL SOURCES: :path: Flutter/ephemeral/.symlinks/plugins/biometric_storage/macos desktop_window: :path: Flutter/ephemeral/.symlinks/plugins/desktop_window/macos + device_info_plus: + :path: Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos emoji_picker_flutter: :path: Flutter/ephemeral/.symlinks/plugins/emoji_picker_flutter/macos file_selector_macos: @@ -77,10 +82,11 @@ SPEC CHECKSUMS: at_file_saver: 1fc6ed722f17c7a20ce79cce168d1100fcad4b95 biometric_storage: 43caa6e7ef00e8e19c074216e7e1786dacda9e76 desktop_window: fb7c4f12c1129f947ac482296b6f14059d57a3c3 + device_info_plus: 5401765fde0b8d062a2f8eb65510fb17e77cf07f emoji_picker_flutter: 533634326b1c5de9a181ba14b9758e6dfe967a20 file_selector_macos: f1b08a781e66103e3ba279fd5d4024a2478b3af6 flutter_local_notifications: 3805ca215b2fb7f397d78b66db91f6a747af52e4 - FlutterMacOS: ae6af50a8ea7d6103d888583d46bd8328a7e9811 + FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 local_notifier: e9506bc66fc70311e8bc7291fb70f743c081e4ff package_info_plus_macos: f010621b07802a241d96d01876d6705f15e77c1c path_provider_macos: 3c0c3b4b0d4a76d2bf989a913c2de869c5641a19 @@ -89,6 +95,6 @@ SPEC CHECKSUMS: url_launcher_macos: 597e05b8e514239626bcf4a850fcf9ef5c856ec3 video_compress: c896234f100791b5fef7f049afa38f6d2ef7b42f -PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c +PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7 COCOAPODS: 1.11.3 diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index 00f639d3..132128e2 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 54; objects = { /* Begin PBXAggregateTarget section */ @@ -204,7 +204,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 0930; + LastUpgradeCheck = 1300; ORGANIZATIONNAME = ""; TargetAttributes = { 33CC10EC2044A3C60003C045 = { @@ -256,6 +256,7 @@ /* Begin PBXShellScriptBuildPhase section */ 3399D490228B24CF009A79C7 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -404,7 +405,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -423,18 +424,18 @@ CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 50; - DEVELOPMENT_TEAM = ""; + CURRENT_PROJECT_VERSION = 52; + DEVELOPMENT_TEAM = 5XUSS6C2DF; ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 10.11; - MARKETING_VERSION = 1.0.9; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MARKETING_VERSION = 1.0.10; PRODUCT_BUNDLE_IDENTIFIER = "com.atsign.atmosphere-pro"; - PROVISIONING_PROFILE_SPECIFIER = ""; + PROVISIONING_PROFILE_SPECIFIER = atmospherePro_Mac_distribution_profile_sachin; SWIFT_VERSION = 5.0; }; name = Profile; @@ -491,7 +492,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -539,7 +540,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -558,18 +559,18 @@ CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 50; - DEVELOPMENT_TEAM = ""; + CURRENT_PROJECT_VERSION = 52; + DEVELOPMENT_TEAM = 5XUSS6C2DF; ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 10.11; - MARKETING_VERSION = 1.0.9; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MARKETING_VERSION = 1.0.10; PRODUCT_BUNDLE_IDENTIFIER = "com.atsign.atmosphere-pro"; - PROVISIONING_PROFILE_SPECIFIER = ""; + PROVISIONING_PROFILE_SPECIFIER = atmospherePro_Mac_distribution_profile_sachin; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; }; @@ -585,7 +586,7 @@ CODE_SIGN_IDENTITY = "3rd Party Mac Developer Application"; CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 50; + CURRENT_PROJECT_VERSION = 52; DEVELOPMENT_TEAM = 5XUSS6C2DF; ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = Runner/Info.plist; @@ -593,10 +594,10 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 10.11; - MARKETING_VERSION = 1.0.9; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MARKETING_VERSION = 1.0.10; PRODUCT_BUNDLE_IDENTIFIER = "com.atsign.atmosphere-pro"; - PROVISIONING_PROFILE_SPECIFIER = Atmosphere_pro_mac_distribution_profile_sachin; + PROVISIONING_PROFILE_SPECIFIER = atmospherePro_Mac_distribution_profile_sachin; SWIFT_VERSION = 5.0; }; name = Release; diff --git a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 222f1386..5e0fdbc1 100644 --- a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ =2.18.0 <3.0.0" - flutter: ">=3.0.0" + flutter: ">=3.3.0" diff --git a/pubspec.yaml b/pubspec.yaml index fdbc6bf1..f69e4cf2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,7 +17,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # Mobile version -version: 1.0.9+50 +version: 1.0.10+52 # Desktop version macos # version: 1.0.1+19 @@ -33,7 +33,7 @@ dependencies: sdk: flutter archive: ^3.2.2 cupertino_icons: ^0.1.3 - file_picker: ^4.5.1 + file_picker: ^5.2.4 filesystem_picker: ^2.0.0-nullsafety.0 desktop_window: ^0.4.0 flutter_keychain: ^2.1.0 @@ -51,7 +51,7 @@ dependencies: share_plus: ^4.0.1 url_launcher: ^6.0.20 video_thumbnail: ^0.4.6 - webview_flutter: ^3.0.4 + webview_flutter: ^4.0.1 http: ^0.13.4 package_info_plus: ^1.4.2 fluttertoast: ^8.0.9 @@ -62,17 +62,17 @@ dependencies: video_compress: ^3.1.0 new_version: ^0.3.0 - at_commons: ^3.0.25 + at_commons: ^3.0.43 at_contact: ^3.0.7 - at_common_flutter: ^2.0.10 + at_common_flutter: ^2.0.11 - at_client_mobile: ^3.2.7 - at_onboarding_flutter: ^5.0.5 - at_backupkey_flutter: ^4.0.6 - at_contacts_flutter: ^4.0.7 - at_contacts_group_flutter: ^4.0.9 + at_client_mobile: ^3.2.9 + at_onboarding_flutter: ^6.0.3 + at_backupkey_flutter: ^4.0.9 + at_contacts_flutter: ^4.0.9 + at_contacts_group_flutter: ^4.0.11 local_notifier: ^0.1.1 - at_sync_ui_flutter: ^1.0.6 + at_sync_ui_flutter: ^1.0.8 showcaseview: ^1.1.5 biometric_storage: ^4.1.3 @@ -83,12 +83,7 @@ dev_dependencies: dependency_overrides: emoji_picker_flutter: 1.2.1 - at_client: ^3.0.41 - at_contacts_group_flutter: - git: - url: https://github.com/atsign-foundation/at_widgets.git - path: packages/at_contacts_group_flutter - ref: trunk + ffi: ^2.0.1 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec