Skip to content

Commit

Permalink
fix: updated dependecies, fixed warning , added documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Sardar1208 committed Feb 6, 2024
1 parent 4eaffcd commit 1609556
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>9.0</string>
<string>11.0</string>
</dict>
</plist>
106 changes: 68 additions & 38 deletions packages/at_invitation_flutter/example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
PODS:
- at_backupkey_flutter (0.0.1):
- Flutter
- at_file_saver (0.0.1):
- Flutter
- at_invitation_flutter (0.0.1):
- Flutter
- at_onboarding_flutter (0.0.1):
- Flutter
- biometric_storage (0.0.1):
- Flutter
- DKImagePickerController/Core (4.3.2):
- device_info_plus (0.0.1):
- Flutter
- DKImagePickerController/Core (4.3.4):
- DKImagePickerController/ImageDataManager
- DKImagePickerController/Resource
- DKImagePickerController/ImageDataManager (4.3.2)
- DKImagePickerController/PhotoGallery (4.3.2):
- DKImagePickerController/ImageDataManager (4.3.4)
- DKImagePickerController/PhotoGallery (4.3.4):
- DKImagePickerController/Core
- DKPhotoGallery
- DKImagePickerController/Resource (4.3.2)
- DKImagePickerController/Resource (4.3.4)
- DKPhotoGallery (0.0.17):
- DKPhotoGallery/Core (= 0.0.17)
- DKPhotoGallery/Model (= 0.0.17)
Expand All @@ -41,23 +45,31 @@ PODS:
- file_picker (0.0.1):
- DKImagePickerController/PhotoGallery
- Flutter
- file_saver (0.0.1):
- file_selector_ios (0.0.1):
- Flutter
- Flutter (1.0.0)
- flutter_keychain (0.0.1):
- Flutter
- flutter_qr_reader (0.0.1):
- MTBBarcodeScanner (5.0.11)
- package_info_plus (0.4.5):
- Flutter
- path_provider_ios (0.0.1):
- path_provider_foundation (0.0.1):
- Flutter
- "permission_handler (5.1.0+2)":
- FlutterMacOS
- permission_handler_apple (9.1.1):
- Flutter
- SDWebImage (5.11.1):
- SDWebImage/Core (= 5.11.1)
- SDWebImage/Core (5.11.1)
- qr_code_scanner (0.2.0):
- Flutter
- MTBBarcodeScanner
- SDWebImage (5.18.10):
- SDWebImage/Core (= 5.18.10)
- SDWebImage/Core (5.18.10)
- share_plus (0.0.1):
- Flutter
- SwiftyGif (5.4.0)
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
- SwiftyGif (5.4.4)
- uni_links (0.0.1):
- Flutter
- url_launcher_ios (0.0.1):
Expand All @@ -67,17 +79,21 @@ PODS:

DEPENDENCIES:
- at_backupkey_flutter (from `.symlinks/plugins/at_backupkey_flutter/ios`)
- at_file_saver (from `.symlinks/plugins/at_file_saver/ios`)
- at_invitation_flutter (from `.symlinks/plugins/at_invitation_flutter/ios`)
- at_onboarding_flutter (from `.symlinks/plugins/at_onboarding_flutter/ios`)
- biometric_storage (from `.symlinks/plugins/biometric_storage/ios`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- file_picker (from `.symlinks/plugins/file_picker/ios`)
- file_saver (from `.symlinks/plugins/file_saver/ios`)
- file_selector_ios (from `.symlinks/plugins/file_selector_ios/ios`)
- Flutter (from `Flutter`)
- flutter_keychain (from `.symlinks/plugins/flutter_keychain/ios`)
- flutter_qr_reader (from `.symlinks/plugins/flutter_qr_reader/ios`)
- path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
- permission_handler (from `.symlinks/plugins/permission_handler/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- qr_code_scanner (from `.symlinks/plugins/qr_code_scanner/ios`)
- share_plus (from `.symlinks/plugins/share_plus/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- uni_links (from `.symlinks/plugins/uni_links/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)
Expand All @@ -86,34 +102,43 @@ SPEC REPOS:
trunk:
- DKImagePickerController
- DKPhotoGallery
- MTBBarcodeScanner
- SDWebImage
- SwiftyGif

EXTERNAL SOURCES:
at_backupkey_flutter:
:path: ".symlinks/plugins/at_backupkey_flutter/ios"
at_file_saver:
:path: ".symlinks/plugins/at_file_saver/ios"
at_invitation_flutter:
:path: ".symlinks/plugins/at_invitation_flutter/ios"
at_onboarding_flutter:
:path: ".symlinks/plugins/at_onboarding_flutter/ios"
biometric_storage:
:path: ".symlinks/plugins/biometric_storage/ios"
device_info_plus:
:path: ".symlinks/plugins/device_info_plus/ios"
file_picker:
:path: ".symlinks/plugins/file_picker/ios"
file_saver:
:path: ".symlinks/plugins/file_saver/ios"
file_selector_ios:
:path: ".symlinks/plugins/file_selector_ios/ios"
Flutter:
:path: Flutter
flutter_keychain:
:path: ".symlinks/plugins/flutter_keychain/ios"
flutter_qr_reader:
:path: ".symlinks/plugins/flutter_qr_reader/ios"
path_provider_ios:
:path: ".symlinks/plugins/path_provider_ios/ios"
permission_handler:
:path: ".symlinks/plugins/permission_handler/ios"
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
permission_handler_apple:
:path: ".symlinks/plugins/permission_handler_apple/ios"
qr_code_scanner:
:path: ".symlinks/plugins/qr_code_scanner/ios"
share_plus:
:path: ".symlinks/plugins/share_plus/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
uni_links:
:path: ".symlinks/plugins/uni_links/ios"
url_launcher_ios:
Expand All @@ -123,25 +148,30 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
at_backupkey_flutter: 2fc3d01138175e41bce8b574387a47544c53e01b
at_file_saver: c0e052c72d8c0296318bd70f2ae7f510887014ce
at_invitation_flutter: 96015bc9cd2c14148bfea6e6b73151120d701234
at_onboarding_flutter: e8219b6d0bfb236d3837ec3528871aebdcc56e8d
biometric_storage: 1400f1382af3a4cc2bf05340e13c3d8de873ceb9
DKImagePickerController: b5eb7f7a388e4643264105d648d01f727110fc3d
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
file_picker: 3e6c3790de664ccf9b882732d9db5eaf6b8d4eb1
file_saver: 503e386464dbe118f630e17b4c2e1190fa0cf808
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
file_picker: 15fd9539e4eb735dc54bae8c0534a7a9511a03de
file_selector_ios: 8c25d700d625e1dcdd6599f2d927072f2254647b
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_keychain: 01aabf894ffe8b01adfda1d9df21c210c1b4b452
flutter_qr_reader: d930dde3b2cfe2b3d0bb7d66e5ff3e514300a5e5
path_provider_ios: 7d7ce634493af4477d156294792024ec3485acd5
permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0
SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d
share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68
SwiftyGif: 5d4af95df24caf1c570dbbcb32a3b8a0763bc6d7
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6
qr_code_scanner: bb67d64904c3b9658ada8c402e8b4d406d5d796e
SDWebImage: fc8f2d48bbfd72ef39d70e981bd24a3f3be53fec
share_plus: c3fef564749587fc939ef86ffb283ceac0baf9f5
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f
uni_links: d97da20c7701486ba192624d99bffaaffcfc298a
url_launcher_ios: 02f1989d4e14e998335b02b67a7590fa34f971af
webview_flutter_wkwebview: 005fbd90c888a42c5690919a1527ecc6649e1162
url_launcher_ios: bf5ce03e0e2088bad9cc378ea97fa0ed5b49673b
webview_flutter_wkwebview: 2e2d318f21a5e036e2c3f26171342e95908bd60a

PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3

COCOAPODS: 1.10.1
COCOAPODS: 1.12.1
8 changes: 8 additions & 0 deletions packages/at_invitation_flutter/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ dependencies:
uni_links: ^0.5.1
url_launcher: ^6.1.14


dependency_overrides:
at_onboarding_flutter:
git:
url: https://github.com/atsign-foundation/at_widgets.git
path: packages/at_onboarding_flutter
ref: fix/onboarding_deps_and_pub_points

dev_dependencies:
# The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practices. The lint set provided by the package is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ class InvitationService {
bool hasMonitorStarted = false;

GlobalKey<NavigatorState> get navigatorKey => navkey ?? GlobalKey();

/// initialize the invitation service
void initInvitationService(
GlobalKey<NavigatorState>? navkeyFromApp,
String? webPageFromApp,
Expand Down Expand Up @@ -92,7 +94,7 @@ class InvitationService {
// build and fetch self key
AtKey atKey = AtKey()..metadata = Metadata();
atKey.key = '$invitationKey.${receivedInformation.identifier ?? ''}';
atKey.metadata?.ttr = -1;
atKey.metadata.ttr = -1;
var result = await AtClientManager.getInstance().atClient.get(atKey);
MessageShareModel sentInformation =
MessageShareModel.fromJson(jsonDecode(result.value));
Expand All @@ -113,6 +115,7 @@ class InvitationService {
}
}

/// share message and inviate the atsign provided
Future<void> shareAndinvite(BuildContext context, String jsonData) async {
// create a key and save the json data
var keyID = const Uuid().v4();
Expand All @@ -124,7 +127,7 @@ class InvitationService {

AtKey atKey = AtKey()..metadata = Metadata();
atKey.key = '$invitationKey.$keyID';
atKey.metadata?.ttr = -1;
atKey.metadata.ttr = -1;
var result = await AtClientManager.getInstance()
.atClient
.put(atKey, jsonEncode(messageContent))
Expand All @@ -146,6 +149,7 @@ class InvitationService {
}
}

/// show the OTP dialog and fetch the invite data
Future<void> fetchInviteData(
BuildContext context, String data, String atsign) async {
String otp = await showDialog(
Expand All @@ -155,7 +159,7 @@ class InvitationService {
AtKey atKey = AtKey()..metadata = Metadata();
atKey.key = '$invitationAckKey.$data';
atKey.sharedWith = atsign;
atKey.metadata?.ttr = -1;
atKey.metadata.ttr = -1;
MessageShareModel messageContent = MessageShareModel(
passcode: otp, identifier: data, message: 'invite acknowledgement');
await AtClientManager.getInstance()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'package:flutter/material.dart';
import 'package:at_invitation_flutter/services/invitation_service.dart';


/// Initialize the invitation service
void initializeInvitationService(
{@required GlobalKey<NavigatorState>? navkey,
@required String? webPage,
Expand All @@ -10,10 +12,12 @@ void initializeInvitationService(
.initInvitationService(navkey, webPage, rootDomain, rootPort);
}

/// call shareAndInvite method from the invitaion service
void shareAndInvite(BuildContext context, String jsonData) {
InvitationService().shareAndinvite(context, jsonData);
}

/// call fetchInviteData method from the invitaion service
fetchInviteData(BuildContext context, String data, String atsign) {
InvitationService().fetchInviteData(context, data, atsign);
}
2 changes: 1 addition & 1 deletion packages/at_invitation_flutter/lib/widgets/otp_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class _OTPDialogState extends State<OTPDialog> {
@override
Widget build(BuildContext context) {
SizeConfig().init(context);
var deviceTextFactor = MediaQuery.of(context).textScaleFactor;
var deviceTextFactor = MediaQuery.of(context).textScaler.scale(20) / 20;
return SizedBox(
height: 100.toHeight * deviceTextFactor,
width: 100.toWidth,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class _ShareDialogState extends State<ShareDialog> {
@override
Widget build(BuildContext context) {
SizeConfig().init(context);
var deviceTextFactor = MediaQuery.of(context).textScaleFactor;
var deviceTextFactor = MediaQuery.of(context).textScaler.scale(20) / 20;
return SizedBox(
height: 100.toHeight * deviceTextFactor,
width: 100.toWidth,
Expand Down
12 changes: 6 additions & 6 deletions packages/at_invitation_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: at_invitation_flutter
description: A Flutter package to invite contacts into apps that use atProtocol.
version: 2.0.2
homepage: https://docs.atsign.com/
repository: https://github.com/atsign-foundation/at_widgets/tree/trunk/at_invitation_flutter
repository: https://github.com/atsign-foundation/at_widgets/tree/trunk/packages/at_invitation_flutter
issue_tracker: https://github.com/atsign-foundation/at_widgets/issues
documentation: https://atsign.dev/docs/functional_architecture/libraries/#at_invitation_flutter
documentation: https://docs.atsign.com/

environment:
sdk: ">=2.15.1 <4.0.0"
Expand All @@ -13,15 +13,15 @@ environment:
dependencies:
at_client_mobile: ^3.2.12
at_common_flutter: ^2.0.12
at_commons: ^3.0.55
at_commons: ^4.0.1
at_lookup: ^3.0.40
at_utils: ^3.0.15
at_utils: ^3.0.16
flutter:
sdk: flutter
pin_code_fields: ^8.0.1

url_launcher: ^6.1.14
uuid: ^3.0.4
url_launcher: ^6.2.4
uuid: ^3.0.7

dev_dependencies:
flutter_lints: ^2.0.3
Expand Down

0 comments on commit 1609556

Please sign in to comment.