Skip to content

Commit

Permalink
Merge pull request #883 from atsign-foundation/865-publish-new-versio…
Browse files Browse the repository at this point in the history
…ns-of-the-at_widget-packages

chore: Updated at_contacts_flutter to 4.0.15
  • Loading branch information
CurtlyCritchlow authored Aug 7, 2024
2 parents b2f4f29 + 0b09cdc commit 4d68494
Show file tree
Hide file tree
Showing 11 changed files with 91 additions and 92 deletions.
40 changes: 39 additions & 1 deletion packages/at_contacts_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,117 +1,155 @@
## 4.0.15

- **FIX**: Dangling_library_doc_comment moved
- **CHORE**: Bumped up dependency versions
- **CHORE**: Kotlin version updated

## 4.0.14

- **CHORE**: Bumped up dependency versions
- **CHORE**: Major version increase of at_commons from ^3.0.55 to ^4.0.1

## 4.0.13

- **FIX**: Fixed methods for fetching profile picture

## 4.0.12

- **CHORE**: Bumped all dependency versions

## 4.0.11

- **CHORE**: Updated dependency and improved pub score

## 4.0.10

- **FIX**: fetching contacts made faster

## 4.0.9

- **CHORE**: Updated text constants
- **FIX**: resolved issue while fetching atSign's name and image

## 4.0.8

- **CHORE**: Updated dependencies and android gradle versions

## 4.0.7

- **FIX**: Image and texts bug fixes
- **CHORE**: Package description updated

## 4.0.6

- **FEAT**: Updated text
- **FIX**: Corrected single selection bug

## 4.0.5

- **FIX**: Lint Fixes according to flutter 3.0

## 4.0.4

- **FIX**: Added missing fontWeight
- **FEAT**: Optimised adding and removing contacts

## 4.0.3

- **FIX**: Fixed bug to get lastname and image
- **FEAT**: Added list display controls

## 4.0.2

- **CHORE**: Updated package dependencies
- **FEAT**: Improved error handling

## 4.0.1

- **CHORE**: Updated package dependencies
- **CHORE**: Updated documentation

## 4.0.0

- **FEAT**: Exposed contact services
- **CHORE**: Updated return type of contact services
- **DOCS**: Added documentation for contact service functions

## 3.1.3

- **DOCS**: Added Package documentation.
- **CHORE**: Added a new example.
- **DOCS**: Added example documentation.

## 3.1.2

- **FIX**: Fixed at_client dependency issue
- **CHORE**: Updated at_contact dependency

## 3.1.1

- **CHORE**: Updated package dependencies

## 3.1.0

- **FEAT**: Added platform support for macos, windows and linux

## 3.0.2

- **FIX**: Bug fixes
- **DOCS**: Updated documentation

## 3.0.1

- **CHORE**: Updated dependencies and bug fixes

## 3.0.0

- **CHORE**: package updated with rsdk changes

## 2.0.3

- **CHORE**: Updated public persona keys

## 2.0.2

- **CHORE**: Updated repository link and description
- **CHORE**: Updated dependencies

## 2.0.1

- **CHORE**: Updated dependencies

## 2.0.0

- **CHORE**: Null safe version
- **CHORE**: Updated dependencies

## 1.0.2

- **FIX**: Fix to prevent adding self to contact list
- **FEAT**: Added function to get contact details from cached data

## 1.0.1

- **CHORE**: The referenced packages are updated
- **CHORE**: Improved avatar placeholder

## 1.0.0

- **CHORE**: Updated example app

## 0.0.4

- **CHORE**: The referenced packages are updated

## 0.0.3

- **CHORE**: The referenced packages from client sdk updated

## 0.0.2

- **CHORE**: The referenced packages from client sdk updated

## 0.0.1
- The initial release consists of two screens - contacts and blocked contacts.

- The initial release consists of two screens - contacts and blocked contacts.
2 changes: 1 addition & 1 deletion packages/at_contacts_flutter/example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.7.10'
ext.kotlin_version = '1.8.20'
repositories {
google()
mavenCentral()
Expand Down
4 changes: 2 additions & 2 deletions packages/at_contacts_flutter/example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ SPEC CHECKSUMS:
at_file_saver: c0e052c72d8c0296318bd70f2ae7f510887014ce
at_onboarding_flutter: e8219b6d0bfb236d3837ec3528871aebdcc56e8d
biometric_storage: 1400f1382af3a4cc2bf05340e13c3d8de873ceb9
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
device_info_plus: 97af1d7e84681a90d0693e63169a5d50e0839a0d
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
file_picker: 15fd9539e4eb735dc54bae8c0534a7a9511a03de
Expand All @@ -160,7 +160,7 @@ SPEC CHECKSUMS:
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
qr_code_scanner: bb67d64904c3b9658ada8c402e8b4d406d5d796e
SDWebImage: fd7e1a22f00303e058058278639bf6196ee431fe
share_plus: c3fef564749587fc939ef86ffb283ceac0baf9f5
share_plus: 8875f4f2500512ea181eef553c3e27dba5135aad
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
Expand Down
2 changes: 1 addition & 1 deletion packages/at_contacts_flutter/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ dev_dependencies:
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^2.0.3
flutter_lints: ^4.0.0
flutter_test:
sdk: flutter

Expand Down
33 changes: 8 additions & 25 deletions packages/at_contacts_flutter/lib/widgets/add_contacts_dialog.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
/// A popup to ask the [AtSign] which is to be added
import 'package:at_common_flutter/at_common_flutter.dart';

import 'package:at_contacts_flutter/services/contact_service.dart';
// ignore: library_prefixes
import 'package:at_contacts_flutter/utils/text_strings.dart' as contactStrings;

import 'package:at_contacts_flutter/services/contact_service.dart';
import 'package:at_contacts_flutter/utils/text_styles.dart'
// ignore: library_prefixes
as contactTextStyles;
Expand Down Expand Up @@ -53,10 +49,8 @@ class _AddContactDialogState extends State<AddContactDialog> {
width: 100.toWidth,
child: SingleChildScrollView(
child: AlertDialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.toWidth)),
titlePadding: EdgeInsets.only(
top: 20.toHeight, left: 25.toWidth, right: 25.toWidth),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10.toWidth)),
titlePadding: EdgeInsets.only(top: 20.toHeight, left: 25.toWidth, right: 25.toWidth),
title: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expand All @@ -71,9 +65,7 @@ class _AddContactDialogState extends State<AddContactDialog> {
),
content: ConstrainedBox(
constraints: BoxConstraints(
maxHeight: (contactService.getAtSignError == '')
? 325.toHeight
: 370.toHeight * deviceTextFactor),
maxHeight: (contactService.getAtSignError == '') ? 325.toHeight : 370.toHeight * deviceTextFactor),
child: Column(
children: [
SizedBox(
Expand Down Expand Up @@ -146,8 +138,7 @@ class _AddContactDialogState extends State<AddContactDialog> {
? const CircularProgressIndicator()
: CustomButton(
height: 50.toHeight * deviceTextFactor,
buttonText:
contactStrings.TextStrings().addtoContact,
buttonText: contactStrings.TextStrings().addtoContact,
onPressed: () async {
setState(() {
isLoading = true;
Expand All @@ -160,21 +151,13 @@ class _AddContactDialogState extends State<AddContactDialog> {
setState(() {
isLoading = false;
});
if (contactService.checkAtSign != null &&
contactService.checkAtSign! &&
response) {
if (contactService.checkAtSign != null && contactService.checkAtSign! && response) {
if (!context.mounted) return;
Navigator.pop(context);
}
},
buttonColor:
Theme.of(context).brightness == Brightness.light
? Colors.black
: Colors.white,
fontColor:
Theme.of(context).brightness == Brightness.light
? Colors.white
: Colors.black,
buttonColor: Theme.of(context).brightness == Brightness.light ? Colors.black : Colors.white,
fontColor: Theme.of(context).brightness == Brightness.light ? Colors.white : Colors.black,
)
],
),
Expand Down
16 changes: 6 additions & 10 deletions packages/at_contacts_flutter/lib/widgets/blocked_user_card.dart
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
/// A list tile to display the blocked contact
/// takes in a [AtContact] blocked user
/// and displays it's name, atsign, profile picture and option to unblock the user
import 'dart:typed_data';

import 'package:at_common_flutter/services/size_config.dart';
import 'package:at_contact/at_contact.dart';
import 'package:at_contacts_flutter/utils/text_strings.dart';
import 'package:at_contacts_flutter/utils/text_styles.dart';
import 'package:at_contacts_flutter/widgets/contacts_initials.dart';
import 'package:at_contacts_flutter/widgets/custom_circle_avatar.dart';

import 'package:at_common_flutter/services/size_config.dart';
import 'package:at_utils/at_logger.dart';
import 'package:flutter/material.dart';

/// A list tile to display the blocked contact
/// takes in a [AtContact] blocked user
/// and displays it's name, atsign, profile picture and option to unblock the user
class BlockedUserCard extends StatefulWidget {
final AtContact? blockeduser;
final Function? unblockAtsign;

const BlockedUserCard({Key? key, this.blockeduser, this.unblockAtsign})
: super(key: key);
const BlockedUserCard({Key? key, this.blockeduser, this.unblockAtsign}) : super(key: key);
@override
_BlockedUserCardState createState() => _BlockedUserCardState();
}
Expand All @@ -35,8 +32,7 @@ class _BlockedUserCardState extends State<BlockedUserCard> {
@override
Widget build(BuildContext context) {
Widget contactImage;
if (widget.blockeduser!.tags != null &&
widget.blockeduser!.tags!['image'] != null) {
if (widget.blockeduser!.tags != null && widget.blockeduser!.tags!['image'] != null) {
Uint8List? image;
try {
List<int> intList = widget.blockeduser!.tags!['image'].cast<int>();
Expand Down
29 changes: 10 additions & 19 deletions packages/at_contacts_flutter/lib/widgets/bottom_sheet.dart
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
/// A bottom sheet widget to diaplay the number of contacts selected from
/// contact list and what to do of that list on press of [Done]
/// takes in @param [onPressed] which defines what to be executed on press of [Done]
/// @param [selectedList] is a [ValueChanged] function which return the selected contacts
/// to be used outside of package.
import 'package:at_contact/at_contact.dart';

import 'package:at_common_flutter/services/size_config.dart';
import 'package:at_common_flutter/widgets/custom_button.dart';
import 'package:at_contact/at_contact.dart';
import 'package:at_contacts_flutter/services/contact_service.dart';
import 'package:at_contacts_flutter/utils/text_styles.dart';
import 'package:flutter/material.dart';

import 'package:at_common_flutter/services/size_config.dart';

/// A bottom sheet widget to diaplay the number of contacts selected from
/// contact list and what to do of that list on press of [Done]
/// takes in @param [onPressed] which defines what to be executed on press of [Done]
/// @param [selectedList] is a [ValueChanged] function which return the selected contacts
/// to be used outside of package.
class CustomBottomSheet extends StatelessWidget {
final Function? onPressed;
final ValueChanged<List<AtContact?>?>? selectedList;
const CustomBottomSheet({Key? key, this.onPressed, this.selectedList})
: super(key: key);
const CustomBottomSheet({Key? key, this.onPressed, this.selectedList}) : super(key: key);
@override
Widget build(BuildContext context) {
var contactServive = ContactService();
Expand Down Expand Up @@ -52,13 +48,8 @@ class CustomBottomSheet extends StatelessWidget {
buttonText: 'Done',
width: 120.toWidth,
height: 40.toHeight,
buttonColor:
Theme.of(context).brightness == Brightness.light
? Colors.black
: Colors.white,
fontColor: Theme.of(context).brightness == Brightness.light
? Colors.white
: Colors.black,
buttonColor: Theme.of(context).brightness == Brightness.light ? Colors.black : Colors.white,
fontColor: Theme.of(context).brightness == Brightness.light ? Colors.white : Colors.black,
onPressed: () {
onPressed!();
selectedList!(snapshot.data);
Expand Down
17 changes: 7 additions & 10 deletions packages/at_contacts_flutter/lib/widgets/custom_circle_avatar.dart
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
/// A customized circular avatar to display the profile picture with a small border
/// takes in @param [image] for the [asset image]
/// @param [size] to define the size of the avatar
/// @param [nonAsset] if the image is coming over the network
/// @param [byteImage] to display the image from the netwok
import 'dart:typed_data';
import 'package:flutter/material.dart';

import 'package:at_common_flutter/services/size_config.dart';
import 'package:flutter/material.dart';

/// A customized circular avatar to display the profile picture with a small border
/// takes in @param [image] for the [asset image]
/// @param [size] to define the size of the avatar
/// @param [nonAsset] if the image is coming over the network
/// @param [byteImage] to display the image from the network
class CustomCircleAvatar extends StatelessWidget {
/// Asset image path
final String? image;
Expand Down Expand Up @@ -40,9 +39,7 @@ class CustomCircleAvatar extends StatelessWidget {
child: CircleAvatar(
radius: (size - 5).toFont,
backgroundColor: Colors.transparent,
backgroundImage: nonAsset
? Image.memory(byteImage!).image
: AssetImage(image!, package: 'at_contacts_flutter'),
backgroundImage: nonAsset ? Image.memory(byteImage!).image : AssetImage(image!, package: 'at_contacts_flutter'),
),
);
}
Expand Down
Loading

0 comments on commit 4d68494

Please sign in to comment.