diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 2459d853..9ceeaa2f 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -23,7 +23,7 @@ android:icon="@mipmap/ic_launcher"> CFBundleVersion 1.0 MinimumOSVersion - 9.0 + 13.0 diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 18b6777e..17eac80f 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -57,8 +57,6 @@ PODS: - Flutter - flutter_local_notifications (0.0.1): - Flutter - - flutter_qr_reader (0.0.1): - - Flutter - fluttertoast (0.0.2): - Flutter - Toast @@ -123,7 +121,6 @@ DEPENDENCIES: - flutter_image_compress (from `.symlinks/plugins/flutter_image_compress/ios`) - flutter_keychain (from `.symlinks/plugins/flutter_keychain/ios`) - flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`) - - flutter_qr_reader (from `.symlinks/plugins/flutter_qr_reader/ios`) - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`) - open_file (from `.symlinks/plugins/open_file/ios`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) @@ -175,8 +172,6 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/flutter_keychain/ios" flutter_local_notifications: :path: ".symlinks/plugins/flutter_local_notifications/ios" - flutter_qr_reader: - :path: ".symlinks/plugins/flutter_qr_reader/ios" fluttertoast: :path: ".symlinks/plugins/fluttertoast/ios" open_file: @@ -215,11 +210,10 @@ SPEC CHECKSUMS: DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179 emoji_picker_flutter: df19dac03a2b39ac667dc8d1da939ef3a9e21347 file_picker: 817ab1d8cd2da9d2da412a417162deee3500fc95 - Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a + Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 flutter_image_compress: 5a5e9aee05b6553048b8df1c3bc456d0afaac433 flutter_keychain: 01aabf894ffe8b01adfda1d9df21c210c1b4b452 flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743 - flutter_qr_reader: d930dde3b2cfe2b3d0bb7d66e5ff3e514300a5e5 fluttertoast: 16fbe6039d06a763f3533670197d01fc73459037 libwebp: 98a37e597e40bfdb4c911fc98f2c53d0b12d05fc Mantle: c5aa8794a29a022dfbbfc9799af95f477a69b62d @@ -241,6 +235,6 @@ SPEC CHECKSUMS: video_thumbnail: c4e2a3c539e247d4de13cd545344fd2d26ffafd1 webview_flutter_wkwebview: b7e70ef1ddded7e69c796c7390ee74180182971f -PODFILE CHECKSUM: db8a7794fb1b0bee1e3803fed876c7cf9577099b +PODFILE CHECKSUM: db1b3d34103b9bca35e1d0bca266af8024bec0bc COCOAPODS: 1.11.3 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index fc1e35ee..269ef122 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -415,7 +415,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_ENTITLEMENTS = "Share Extension/Share Extension.entitlements"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 48; + CURRENT_PROJECT_VERSION = 49; DEVELOPMENT_TEAM = 5XUSS6C2DF; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = "Share Extension/Info.plist"; @@ -448,7 +448,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_ENTITLEMENTS = "Share Extension/Share Extension.entitlements"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 48; + CURRENT_PROJECT_VERSION = 49; DEVELOPMENT_TEAM = 5XUSS6C2DF; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = "Share Extension/Info.plist"; @@ -478,7 +478,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_ENTITLEMENTS = "Share Extension/Share Extension.entitlements"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 48; + CURRENT_PROJECT_VERSION = 49; DEVELOPMENT_TEAM = 5XUSS6C2DF; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = "Share Extension/Info.plist"; @@ -560,7 +560,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 48; + CURRENT_PROJECT_VERSION = 49; DEVELOPMENT_TEAM = 5XUSS6C2DF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -708,7 +708,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 48; + CURRENT_PROJECT_VERSION = 49; DEVELOPMENT_TEAM = 5XUSS6C2DF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -747,7 +747,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 48; + CURRENT_PROJECT_VERSION = 49; DEVELOPMENT_TEAM = 5XUSS6C2DF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( diff --git a/lib/screens/blocked_atSing_screen/blocked_atSigns_screen.dart b/lib/screens/blocked_atSing_screen/blocked_atSigns_screen.dart new file mode 100644 index 00000000..3f552b23 --- /dev/null +++ b/lib/screens/blocked_atSing_screen/blocked_atSigns_screen.dart @@ -0,0 +1,227 @@ +import 'package:flutter/material.dart'; +import 'components/unblock_button.dart'; +import 'components/close_pill_button.dart'; +import 'components/search_field.dart'; + +class BlockedAtSignsScreen extends StatelessWidget { + const BlockedAtSignsScreen({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + final blockedData = [ + '@airplanes45', + '@bikes13', + '@cars69', + ]; + + return Container( + color: Colors.transparent, + child: Container( + height: 780.0, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: const BorderRadius.only( + topLeft: Radius.circular(20.0), + topRight: Radius.circular(20.0), + ), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.25), + blurRadius: 61, + offset: const Offset(0, -2), + ), + ], + ), + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 27, vertical: 0), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Padding( + padding: const EdgeInsets.only(top: 38), + child: Container( + height: 2.0, + width: 45, + color: Colors.black, + ), + ), + const Padding( + padding: EdgeInsets.only(top: 30), + child: ClosePillButton(), + ), + ], + ), + const Padding( + padding: EdgeInsets.only(top: 20), + child: Text( + 'Blocked atSigns', + style: TextStyle( + color: Colors.black, + fontFamily: 'Inter', + fontWeight: FontWeight.w700, + fontSize: 25, + ), + ), + ), + const SizedBox(height: 30.0), + Container( + height: 95, + width: double.infinity, + decoration: BoxDecoration( + color: const Color(0xFFF2F2F2), + borderRadius: BorderRadius.circular(8.0), + ), + child: Padding( + padding: const EdgeInsets.only(left: 14.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: const [ + Text( + 'Refresh', + style: TextStyle( + color: Color(0xFFA4A4A5), + fontFamily: 'Montserrat', + fontWeight: FontWeight.w600, + fontSize: 14, + ), + ), + SizedBox(width: 10.58), + Text( + 'Search', + style: TextStyle( + color: Color(0xFFA4A4A5), + fontFamily: 'Montserrat', + fontWeight: FontWeight.w600, + fontSize: 14, + ), + ), + ], + ), + const SizedBox(height: 5.0), + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + GestureDetector( + onTap: () { + // tap function here + }, + child: Container( + height: 48.0, + width: 48.0, + decoration: BoxDecoration( + color: Colors.white, + border: Border.all( + color: const Color(0xFF939393), + width: 1.0, + ), + borderRadius: BorderRadius.circular(10.0), + ), + child: const ImageIcon( + AssetImage("assets/images/confirm_icon.png"), + color: Color(0xFF939393), + size: 16.68, + ), + ), + ), + const SizedBox(width: 23.0), + const SearchField( + height: 48.0, + width: 265.0, + label: 'Search History by atSign') + ], + ), + ], + ), + ), + ), + const SizedBox(height: 27.0), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 4.5), + child: Container( + height: 37.0, + decoration: const BoxDecoration( + color: Color(0xFFF2F2F2), + borderRadius: BorderRadius.only( + topLeft: Radius.circular(10.0), + topRight: Radius.circular(10.0), + ), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + const SizedBox(width: 24.0), + const Text( + 'atSign', + style: TextStyle( + color: Color(0xFFA4A4A5), + fontFamily: 'Inter', + fontWeight: FontWeight.w500, + fontSize: 15, + ), + ), + const SizedBox(width: 5.67), + GestureDetector( + onTap: () { + // tap function here + }, + child: const ImageIcon( + AssetImage("assets/images/path_icon.png"), + color: Color(0xFFA4A4A5), + size: 13.33, + ), + ), + ], + ), + ), + ), + ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + itemCount: blockedData.length, + itemBuilder: (BuildContext context, int index) { + final blocked = blockedData[index]; + return Container( + height: 50.0, + padding: const EdgeInsets.only(left: 19.0, right: 48.0), + decoration: const BoxDecoration( + border: Border( + bottom: BorderSide( + width: 1.0, + color: Color(0xFFF2F2F2), + ) + ) + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + blocked, + style: const TextStyle( + color: Color(0xFF414141), + fontFamily: 'Montserrat', + fontWeight: FontWeight.w500, + fontSize: 13, + ), + ), + UnblockButton(atSign: blocked), + ], + ), + ); + }, + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/screens/blocked_atSing_screen/components/close_pill_button.dart b/lib/screens/blocked_atSing_screen/components/close_pill_button.dart new file mode 100644 index 00000000..8fa6f2c9 --- /dev/null +++ b/lib/screens/blocked_atSing_screen/components/close_pill_button.dart @@ -0,0 +1,36 @@ +import 'package:flutter/material.dart'; + +class ClosePillButton extends StatelessWidget { + const ClosePillButton({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: () { + Navigator.pop(context); + }, + child: Container( + height: 31.0, + width: 106.0, + decoration: BoxDecoration( + border: Border.all( + color: const Color(0xFF939393), + width: 1.0, + ), + borderRadius: BorderRadius.circular(20), + ), + child: const Center( + child: Text( + 'close', + style: TextStyle( + color: Color(0xFF939393), + fontFamily: 'Inter', + fontWeight: FontWeight.w600, + fontSize: 17.0, + ), + ), + ), + ), + ); + } +} diff --git a/lib/screens/blocked_atSing_screen/components/pop_up.dart b/lib/screens/blocked_atSing_screen/components/pop_up.dart new file mode 100644 index 00000000..85e33cb0 --- /dev/null +++ b/lib/screens/blocked_atSing_screen/components/pop_up.dart @@ -0,0 +1,132 @@ +import 'package:flutter/material.dart'; + +class PopUp extends StatelessWidget { + final String atSign; + final String title; + final Function tapFunction; + const PopUp({required this.atSign, required this.title, required this.tapFunction}); + + @override + Widget build(BuildContext context) { + return Dialog( + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + ), + child: Container( + color: Colors.transparent, + child: Container( + decoration: BoxDecoration( + color: Colors.white.withOpacity(0.25), + borderRadius: BorderRadius.circular(10.0), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.25), + blurRadius: 24, + offset: const Offset(0, 4), + ), + ], + ), + height: 207.0, + width: 244.0, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + // SizedBox(height: 32), + const Text( + 'Are you sure that you want to', + style: TextStyle( + color: Colors.black, + fontFamily: 'Inter', + fontWeight: FontWeight.w500, + fontSize: 10, + ), + ), + const SizedBox(height: 10.0), + Text( + title, + style: const TextStyle( + color: Colors.black, + fontFamily: 'Inter', + fontWeight: FontWeight.w700, + fontSize: 16, + ), + ), + const SizedBox(height: 11), + Text( + atSign, + style: const TextStyle( + color: Colors.black, + fontFamily: 'Inter', + fontWeight: FontWeight.w400, + fontSize: 14, + ), + ), + const SizedBox(height: 16), + GestureDetector( + onTap: () { + tapFunction(); + Navigator.of(context).pop(); + }, + child: Container( + height: 28.0, + width: 115.0, + decoration: BoxDecoration( + color: const Color(0xFFE2E2E2).withOpacity(0.2), + border: Border.all( + color: const Color(0xFF939393), + width: 1.0, + ), + borderRadius: BorderRadius.circular(10), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Text( + 'Confirm', + style: TextStyle( + color: Color(0xFF939393), + fontFamily: 'Inter', + fontWeight: FontWeight.w700, + fontSize: 12.0, + ), + ), + const SizedBox(width: 11), + CircleAvatar( + radius: 9.0, + backgroundColor: Colors.green.withOpacity(0.25), + child: const ImageIcon( + AssetImage("assets/images/confirm_icon.png"), + color: Color(0xFF939393), + size: 18.0, + ), + ), + ], + ), + ), + ), + const SizedBox(height: 18.0), + GestureDetector( + onTap: () { + Navigator.of(context).pop(); + }, + child: const Text( + 'Cancel', + style: TextStyle( + color: Color(0xFFA4A4A5), + fontFamily: 'Inter', + fontWeight: FontWeight.w500, + fontSize: 10.0, + decoration: TextDecoration.underline, + ), + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/screens/blocked_atSing_screen/components/search_field.dart b/lib/screens/blocked_atSing_screen/components/search_field.dart new file mode 100644 index 00000000..7b8fb2ef --- /dev/null +++ b/lib/screens/blocked_atSing_screen/components/search_field.dart @@ -0,0 +1,46 @@ +import 'package:flutter/material.dart'; + +class SearchField extends StatelessWidget { + final double height; + final double width; + final String label; + const SearchField( + {required this.height, required this.label, required this.width}); + + @override + Widget build(BuildContext context) { + return SizedBox( + height: height, + width: width, + child: TextField( + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + border: OutlineInputBorder( + borderSide: const BorderSide( + color: Color(0xFF939393), + width: 1.0, + ), + borderRadius: BorderRadius.circular(10.0), + ), + suffixIcon: const ImageIcon( + AssetImage( + "assets/images/search_icon.png", + ), + color: Color(0xFF939393), + size: 20.0, + ), + label: Text( + label, + style: const TextStyle( + color: Color(0xFF939393), + fontFamily: 'Inter', + fontWeight: FontWeight.w400, + fontSize: 14, + ), + ), + ), + ), + ); + } +} diff --git a/lib/screens/blocked_atSing_screen/components/unblock_button.dart b/lib/screens/blocked_atSing_screen/components/unblock_button.dart new file mode 100644 index 00000000..d9a2f837 --- /dev/null +++ b/lib/screens/blocked_atSing_screen/components/unblock_button.dart @@ -0,0 +1,58 @@ +import 'package:flutter/material.dart'; +import 'pop_up.dart'; + +class UnblockButton extends StatelessWidget { + final String atSign; + const UnblockButton({required this.atSign}); + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: () { + showDialog( + context: context, + builder: (context) => PopUp(atSign: atSign, title: 'Unblock', tapFunction: () {}), + ); + }, + child: Container( + height: 31.0, + width: 118.0, + decoration: BoxDecoration( + color: const Color(0xFFEFEFEF), + border: Border.all( + color: const Color(0xFF939393), + width: 1.0, + ), + borderRadius: BorderRadius.circular(20), + ), + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 14.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + const Text( + 'Unblock?', + style: TextStyle( + color: Color(0xFF939393), + fontFamily: 'Inter', + fontWeight: FontWeight.w600, + fontSize: 13.0, + ), + ), + CircleAvatar( + radius: 8.335, + backgroundColor: const Color(0xFFFF461F).withOpacity(0.35), + child: const ImageIcon( + AssetImage("assets/images/block_icon.png"), + color: Color(0xFFF05E3F), + size: 16.67, + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/screens/common_widgets/add_contact.dart b/lib/screens/common_widgets/add_contact.dart index 947877ca..90b59b0f 100644 --- a/lib/screens/common_widgets/add_contact.dart +++ b/lib/screens/common_widgets/add_contact.dart @@ -48,7 +48,8 @@ class _AddContactState extends State { ) ], ), - content: ConstrainedBox( + content: Container( + width: 495, constraints: BoxConstraints( maxHeight: (widget.name != null) ? 190.toHeight : 150.toHeight, ), @@ -106,15 +107,18 @@ class _AddContactState extends State { height: 10.toHeight, ), isContactAdding - ? Center( - child: CircularProgressIndicator(), + ? Container( + padding: EdgeInsets.all(32), + child: Center( + child: CircularProgressIndicator(), + ), ) : Container( alignment: Alignment.center, child: SizedBox( width: (Platform.isAndroid || Platform.isIOS) ? SizeConfig().screenWidth - : 150.toWidth, + : 150, child: CustomButton( buttonText: 'Yes', fontColor: Colors.white, @@ -144,7 +148,7 @@ class _AddContactState extends State { child: SizedBox( width: (Platform.isAndroid || Platform.isIOS) ? SizeConfig().screenWidth - : 150.toWidth, + : 150, child: CustomButton( buttonColor: Colors.white, buttonText: 'No', @@ -153,6 +157,9 @@ class _AddContactState extends State { }, )), ), + SizedBox( + height: 10.toHeight, + ), ], ), ); diff --git a/lib/screens/trusted_senders_screen/components/add_button.dart b/lib/screens/trusted_senders_screen/components/add_button.dart new file mode 100644 index 00000000..7e7a9fb8 --- /dev/null +++ b/lib/screens/trusted_senders_screen/components/add_button.dart @@ -0,0 +1,59 @@ +import 'package:flutter/material.dart'; + +class AddButton extends StatelessWidget { + const AddButton({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: () { + // function to add here + }, + child: Container( + height: 59, + width: 320, + decoration: BoxDecoration( + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.25), + blurRadius: 2, + offset: const Offset(0, 2), + ), + ], + gradient: LinearGradient( + colors: [ + const Color(0xFFF05E37), + const Color(0xFFEAA743).withOpacity(0.65), + ], + stops: const [ + 0.18, + 0.90, + ], + transform: const GradientRotation(1.16) + ), + borderRadius: BorderRadius.circular(10), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: const [ + ImageIcon( + AssetImage("assets/images/add_icon.png"), + color: Colors.white, + size: 16.0, + ), + SizedBox(width: 10), + Text( + 'Add atSign', + style: TextStyle( + color: Colors.white, + fontFamily: 'Inter', + fontWeight: FontWeight.w700, + fontSize: 15, + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/screens/trusted_senders_screen/components/close_pill_button.dart b/lib/screens/trusted_senders_screen/components/close_pill_button.dart new file mode 100644 index 00000000..8fa6f2c9 --- /dev/null +++ b/lib/screens/trusted_senders_screen/components/close_pill_button.dart @@ -0,0 +1,36 @@ +import 'package:flutter/material.dart'; + +class ClosePillButton extends StatelessWidget { + const ClosePillButton({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: () { + Navigator.pop(context); + }, + child: Container( + height: 31.0, + width: 106.0, + decoration: BoxDecoration( + border: Border.all( + color: const Color(0xFF939393), + width: 1.0, + ), + borderRadius: BorderRadius.circular(20), + ), + child: const Center( + child: Text( + 'close', + style: TextStyle( + color: Color(0xFF939393), + fontFamily: 'Inter', + fontWeight: FontWeight.w600, + fontSize: 17.0, + ), + ), + ), + ), + ); + } +} diff --git a/lib/screens/trusted_senders_screen/components/pop_up.dart b/lib/screens/trusted_senders_screen/components/pop_up.dart new file mode 100644 index 00000000..85e33cb0 --- /dev/null +++ b/lib/screens/trusted_senders_screen/components/pop_up.dart @@ -0,0 +1,132 @@ +import 'package:flutter/material.dart'; + +class PopUp extends StatelessWidget { + final String atSign; + final String title; + final Function tapFunction; + const PopUp({required this.atSign, required this.title, required this.tapFunction}); + + @override + Widget build(BuildContext context) { + return Dialog( + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + ), + child: Container( + color: Colors.transparent, + child: Container( + decoration: BoxDecoration( + color: Colors.white.withOpacity(0.25), + borderRadius: BorderRadius.circular(10.0), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.25), + blurRadius: 24, + offset: const Offset(0, 4), + ), + ], + ), + height: 207.0, + width: 244.0, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + // SizedBox(height: 32), + const Text( + 'Are you sure that you want to', + style: TextStyle( + color: Colors.black, + fontFamily: 'Inter', + fontWeight: FontWeight.w500, + fontSize: 10, + ), + ), + const SizedBox(height: 10.0), + Text( + title, + style: const TextStyle( + color: Colors.black, + fontFamily: 'Inter', + fontWeight: FontWeight.w700, + fontSize: 16, + ), + ), + const SizedBox(height: 11), + Text( + atSign, + style: const TextStyle( + color: Colors.black, + fontFamily: 'Inter', + fontWeight: FontWeight.w400, + fontSize: 14, + ), + ), + const SizedBox(height: 16), + GestureDetector( + onTap: () { + tapFunction(); + Navigator.of(context).pop(); + }, + child: Container( + height: 28.0, + width: 115.0, + decoration: BoxDecoration( + color: const Color(0xFFE2E2E2).withOpacity(0.2), + border: Border.all( + color: const Color(0xFF939393), + width: 1.0, + ), + borderRadius: BorderRadius.circular(10), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Text( + 'Confirm', + style: TextStyle( + color: Color(0xFF939393), + fontFamily: 'Inter', + fontWeight: FontWeight.w700, + fontSize: 12.0, + ), + ), + const SizedBox(width: 11), + CircleAvatar( + radius: 9.0, + backgroundColor: Colors.green.withOpacity(0.25), + child: const ImageIcon( + AssetImage("assets/images/confirm_icon.png"), + color: Color(0xFF939393), + size: 18.0, + ), + ), + ], + ), + ), + ), + const SizedBox(height: 18.0), + GestureDetector( + onTap: () { + Navigator.of(context).pop(); + }, + child: const Text( + 'Cancel', + style: TextStyle( + color: Color(0xFFA4A4A5), + fontFamily: 'Inter', + fontWeight: FontWeight.w500, + fontSize: 10.0, + decoration: TextDecoration.underline, + ), + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/screens/trusted_senders_screen/components/scroll_area.dart b/lib/screens/trusted_senders_screen/components/scroll_area.dart new file mode 100644 index 00000000..2074199a --- /dev/null +++ b/lib/screens/trusted_senders_screen/components/scroll_area.dart @@ -0,0 +1,120 @@ +import 'package:flutter/material.dart'; +import 'trusted_sender_tile.dart'; + +class ScrollArea extends StatelessWidget { + const ScrollArea({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + final sendersData = [ + { + 'A': [ + { + 'url': 'https://randomuser.me/api/portraits/men/24.jpg', + 'name': 'Aron Paul', + 'atSign': '@bikes13', + }, + ], + }, + { + 'C': [ + { + 'url': 'https://randomuser.me/api/portraits/men/27.jpg', + 'name': 'Charlie Harper', + 'atSign': '@cars69', + }, + ], + }, + { + 'R': [ + { + 'url': 'https://randomuser.me/api/portraits/women/28.jpg', + 'name': 'Rose', + 'atSign': '@chopper33', + }, + ], + }, + { + 'S': [ + { + 'url': 'https://randomuser.me/api/portraits/women/42.jpg', + 'name': 'Sarah Paul', + 'atSign': '@airplanes45', + }, + { + 'url': 'https://randomuser.me/api/portraits/men/42.jpg', + 'name': 'Bruce Bane', + 'atSign': '@trucks47', + }, + ], + }, + ]; + + return Expanded( + child: RawScrollbar( + thumbColor: const Color(0xFFE3E3E3), + radius: const Radius.circular(10.0), + minThumbLength: 273.0, + trackColor: const Color(0xFFF3F3F3), + trackBorderColor: Colors.transparent, + trackRadius: const Radius.circular(10.0), + thickness: 5.0, + thumbVisibility: true, + interactive: true, + trackVisibility: true, + child: ListView.builder( + itemCount: sendersData.length, + itemBuilder: (BuildContext context, int index) { + final alphabet = sendersData[index].keys.first; + final senders = sendersData[index][alphabet]; + return Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + alphabet, + style: const TextStyle( + color: Colors.black, + fontFamily: 'Inter', + fontWeight: FontWeight.w700, + fontSize: 20, + ), + ), + Container( + height: 1.0, + width: 326, + color: const Color(0xFFD9D9D9), + ), + ], + ), + const SizedBox(height: 12.0), + GridView.builder( + physics: const NeverScrollableScrollPhysics(), + scrollDirection: Axis.vertical, + shrinkWrap: true, + itemCount: senders!.length, + gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( + mainAxisExtent: 65.0, + mainAxisSpacing: 10.0, + crossAxisSpacing: 10.0, + crossAxisCount: 2, + ), + itemBuilder: (BuildContext context, int index) { + final sender = senders[index]; + return TrustedSenderTile( + atSign: sender['atSign']!, + name: sender['name']!, + url: sender['url']!, + ); + }, + ), + const SizedBox(height: 12.0), + ], + ); + }, + ), + ), + ); + } +} diff --git a/lib/screens/trusted_senders_screen/components/search_field.dart b/lib/screens/trusted_senders_screen/components/search_field.dart new file mode 100644 index 00000000..7b8fb2ef --- /dev/null +++ b/lib/screens/trusted_senders_screen/components/search_field.dart @@ -0,0 +1,46 @@ +import 'package:flutter/material.dart'; + +class SearchField extends StatelessWidget { + final double height; + final double width; + final String label; + const SearchField( + {required this.height, required this.label, required this.width}); + + @override + Widget build(BuildContext context) { + return SizedBox( + height: height, + width: width, + child: TextField( + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + border: OutlineInputBorder( + borderSide: const BorderSide( + color: Color(0xFF939393), + width: 1.0, + ), + borderRadius: BorderRadius.circular(10.0), + ), + suffixIcon: const ImageIcon( + AssetImage( + "assets/images/search_icon.png", + ), + color: Color(0xFF939393), + size: 20.0, + ), + label: Text( + label, + style: const TextStyle( + color: Color(0xFF939393), + fontFamily: 'Inter', + fontWeight: FontWeight.w400, + fontSize: 14, + ), + ), + ), + ), + ); + } +} diff --git a/lib/screens/trusted_senders_screen/components/trusted_sender_tile.dart b/lib/screens/trusted_senders_screen/components/trusted_sender_tile.dart new file mode 100644 index 00000000..cdfb41c9 --- /dev/null +++ b/lib/screens/trusted_senders_screen/components/trusted_sender_tile.dart @@ -0,0 +1,88 @@ +import 'package:flutter/material.dart'; +import 'pop_up.dart'; + +class TrustedSenderTile extends StatelessWidget { + final String atSign; + final String name; + final String url; + const TrustedSenderTile({required this.atSign, required this.name, required this.url}); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 9.0), + child: GestureDetector( + onTap: () { + showDialog( + context: context, + builder: (context) => PopUp(atSign: atSign, title: 'Remove', tapFunction: () {}), + ); + }, + child: Container( + constraints: const BoxConstraints(minHeight: 65), + height: 65, + width: 170, + decoration: BoxDecoration( + color: Colors.white.withOpacity(0.6), + border: Border.all( + color: const Color(0xFFF2F2F2), + width: 1.0, + ), + borderRadius: BorderRadius.circular(10), + ), + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 3.0, horizontal: 3.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Stack( + alignment: AlignmentDirectional.center, + children: [ + CircleAvatar( + backgroundImage: NetworkImage(url), + radius: 18, + ), + Positioned( + child: Container( + padding: const EdgeInsets.only(bottom: 23.5, right: 25.0), + child: const ImageIcon( + AssetImage("assets/images/verified_icon.png"), + color: Color(0xFFF07C50), + size: 20.0, + ), + ), + ), + ], + ), + const SizedBox(width: 7.0), + Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + atSign, + style: const TextStyle( + color: Colors.black, + fontFamily: 'Inter', + fontWeight: FontWeight.w600, + fontSize: 12.0), + ), + Text( + name, + style: const TextStyle( + color: Colors.black, + fontFamily: 'Inter', + fontWeight: FontWeight.w400, + fontSize: 10.0), + ), + ], + ), + ], + ), + ), + ), + ), + ); + } +} diff --git a/lib/screens/trusted_senders_screen/trusted_senders_screen.dart b/lib/screens/trusted_senders_screen/trusted_senders_screen.dart new file mode 100644 index 00000000..71982071 --- /dev/null +++ b/lib/screens/trusted_senders_screen/trusted_senders_screen.dart @@ -0,0 +1,89 @@ +import 'package:flutter/material.dart'; +import 'components/close_pill_button.dart'; +import 'components/search_field.dart'; +import 'components/scroll_area.dart'; +import 'components/add_button.dart'; + +class TrustedSendersScreen extends StatelessWidget { + const TrustedSendersScreen({ + Key? key, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return Container( + color: Colors.transparent, + child: Container( + height: 780.0, + decoration: BoxDecoration( + // color: Colors.white.withOpacity(0.8), + color: Colors.white, + borderRadius: const BorderRadius.only( + topLeft: Radius.circular(20.0), + topRight: Radius.circular(20.0), + ), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.25), + blurRadius: 61, + offset: const Offset(0, -2), + ), + ], + ), + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 27, vertical: 0), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Padding( + padding: const EdgeInsets.only(top: 38), + child: Container( + height: 2.0, + width: 45, + color: Colors.black, + ), + ), + const Padding( + padding: EdgeInsets.only(top: 30), + child: ClosePillButton(), + ), + ], + ), + const Padding( + padding: EdgeInsets.only(top: 20), + child: Text( + 'Trusted Senders', + style: TextStyle( + color: Colors.black, + fontFamily: 'Inter', + fontWeight: FontWeight.w700, + fontSize: 25, + ), + ), + ), + const Padding( + padding: EdgeInsets.only(top: 24), + child: SearchField( + height: 44.0, + width: 351.0, + label: 'Search by atSign or nickname', + ), + ), + const SizedBox(height: 25.0), + const ScrollArea(), + const SizedBox(height: 35.0), + const Center( + child: AddButton(), + ), + const SizedBox(height: 35.0), + ], + ), + ), + ), + ); + } +} \ No newline at end of file diff --git a/macos/Podfile.lock b/macos/Podfile.lock index 33194a54..f4d223e8 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -80,7 +80,7 @@ SPEC CHECKSUMS: emoji_picker_flutter: 533634326b1c5de9a181ba14b9758e6dfe967a20 file_selector_macos: f1b08a781e66103e3ba279fd5d4024a2478b3af6 flutter_local_notifications: 3805ca215b2fb7f397d78b66db91f6a747af52e4 - FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424 + FlutterMacOS: ae6af50a8ea7d6103d888583d46bd8328a7e9811 local_notifier: e9506bc66fc70311e8bc7291fb70f743c081e4ff package_info_plus_macos: f010621b07802a241d96d01876d6705f15e77c1c path_provider_macos: 3c0c3b4b0d4a76d2bf989a913c2de869c5641a19 diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index b1a52ede..8a1bfdfb 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -423,7 +423,7 @@ CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 48; + CURRENT_PROJECT_VERSION = 49; DEVELOPMENT_TEAM = ""; ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = Runner/Info.plist; @@ -558,7 +558,7 @@ CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 48; + CURRENT_PROJECT_VERSION = 49; DEVELOPMENT_TEAM = ""; ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = Runner/Info.plist; @@ -585,7 +585,7 @@ CODE_SIGN_IDENTITY = "Mac Developer"; CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 48; + CURRENT_PROJECT_VERSION = 49; DEVELOPMENT_TEAM = 5XUSS6C2DF; ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = Runner/Info.plist; diff --git a/pubspec.lock b/pubspec.lock index dfda3c2c..25fa4323 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -42,16 +42,14 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.8.2" + version: "2.9.0" at_backupkey_flutter: dependency: "direct main" description: - path: at_backupkey_flutter - ref: fix_flutter_qr_reader - resolved-ref: ce984971ea1ba653b5d23334e339311044eba90f - url: "https://github.com/atsign-foundation/at_widgets.git" - source: git - version: "4.0.5" + name: at_backupkey_flutter + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.6" at_base2e15: dependency: transitive description: @@ -116,7 +114,7 @@ packages: name: at_file_saver url: "https://pub.dartlang.org" source: hosted - version: "0.1.1" + version: "0.1.2" at_lookup: dependency: transitive description: @@ -127,12 +125,10 @@ packages: at_onboarding_flutter: dependency: "direct main" description: - path: at_onboarding_flutter - ref: fix_flutter_qr_reader - resolved-ref: ce984971ea1ba653b5d23334e339311044eba90f - url: "https://github.com/atsign-foundation/at_widgets.git" - source: git - version: "5.0.2" + name: at_onboarding_flutter + url: "https://pub.dartlang.org" + source: hosted + version: "5.0.3" at_persistence_secondary_server: dependency: transitive description: @@ -202,7 +198,7 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" charcode: dependency: transitive description: @@ -230,7 +226,7 @@ packages: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" collection: dependency: transitive description: @@ -335,7 +331,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.1" ffi: dependency: transitive description: @@ -616,21 +612,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.11" + version: "0.12.12" material_color_utilities: dependency: transitive description: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.4" + version: "0.1.5" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0" mime: dependency: transitive description: @@ -742,7 +738,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.8.2" path_provider: dependency: transitive description: @@ -1090,7 +1086,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.2" + version: "1.9.0" stack_trace: dependency: transitive description: @@ -1111,35 +1107,35 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" test: dependency: transitive description: name: test url: "https://pub.dartlang.org" source: hosted - version: "1.21.1" + version: "1.21.4" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.9" + version: "0.4.12" test_core: dependency: transitive description: name: test_core url: "https://pub.dartlang.org" source: hosted - version: "0.4.13" + version: "0.4.16" timezone: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 44342542..f1bb20eb 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.8+48 +version: 1.0.8+49 # Desktop version macos # version: 1.0.1+19 @@ -67,8 +67,8 @@ dependencies: at_common_flutter: ^2.0.10 at_client_mobile: ^3.2.5 - at_onboarding_flutter: ^5.0.2 - at_backupkey_flutter: ^4.0.5 + at_onboarding_flutter: ^5.0.3 + at_backupkey_flutter: ^4.0.6 at_contacts_flutter: ^4.0.7 at_contacts_group_flutter: ^4.0.9 local_notifier: ^0.1.1 @@ -80,23 +80,13 @@ dev_dependencies: flutter_test: sdk: flutter msix: ^3.3.1 -dependency_overrides: +dependency_overrides: biometric_storage: ^4.1.3 at_contacts_group_flutter: git: url: https://github.com/atsign-foundation/at_widgets.git path: at_contacts_group_flutter ref: trunk - at_backupkey_flutter: - git: - url: https://github.com/atsign-foundation/at_widgets.git - path: at_backupkey_flutter - ref: fix_flutter_qr_reader - at_onboarding_flutter: - git: - url: https://github.com/atsign-foundation/at_widgets.git - path: at_onboarding_flutter - ref: fix_flutter_qr_reader # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec @@ -138,6 +128,28 @@ flutter: fonts: - asset: assets/fonts/Playfair_Display/PlayfairDisplay-Bold.ttf + - family: Inter + fonts: + - asset: assets/fonts/Inter/Inter-Light.ttf + weight: 300 + - asset: assets/fonts/Inter/Inter-SemiBold.ttf + weight: 600 + - asset: assets/fonts/Inter/Inter-Medium.ttf + weight: 500 + - asset: assets/fonts/Inter/Inter-Regular.ttf + weight: 400 + - asset: assets/fonts/Inter/Inter-Bold.ttf + weight: 700 + - asset: assets/fonts/Inter/Inter-ExtraBold.ttf + weight: 800 + + - family: Montserrat + fonts: + - asset: assets/fonts/Montserrat/Montserrat-Medium.ttf + weight: 500 + - asset: assets/fonts/Montserrat/Montserrat-SemiBold.ttf + weight: 600 + # - asset: fonts/TrajanPro_Bold.ttf # weight: 700 #