Skip to content

Commit

Permalink
Merge pull request #249 from atsign-foundation/redesign_welcome_home
Browse files Browse the repository at this point in the history
feat: welcome home screen updated according to new UI
  • Loading branch information
sachins-geekyants authored Feb 10, 2023
2 parents 3ae9484 + 7e9d892 commit 8b644cc
Show file tree
Hide file tree
Showing 25 changed files with 1,386 additions and 1,071 deletions.
Binary file added assets/images/close_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/send_file_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 2 additions & 8 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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`)
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -241,6 +235,6 @@ SPEC CHECKSUMS:
video_thumbnail: c4e2a3c539e247d4de13cd545344fd2d26ffafd1
webview_flutter_wkwebview: b7e70ef1ddded7e69c796c7390ee74180182971f

PODFILE CHECKSUM: db8a7794fb1b0bee1e3803fed876c7cf9577099b
PODFILE CHECKSUM: db1b3d34103b9bca35e1d0bca266af8024bec0bc

COCOAPODS: 1.11.3
4 changes: 3 additions & 1 deletion ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -282,6 +282,7 @@
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand All @@ -296,6 +297,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down
2 changes: 2 additions & 0 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,7 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
11 changes: 11 additions & 0 deletions lib/data_models/file_entity.dart
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
import 'package:atsign_atmosphere_pro/data_models/file_modal.dart';
import 'package:atsign_atmosphere_pro/data_models/file_transfer.dart';
import 'package:atsign_atmosphere_pro/data_models/file_transfer_object.dart';

class FileEntity {
final FileData? file;
final String? date;
final HistoryType? historyType;
final String? atSign;
final String? note;
final String transferId;
final FileTransferObject fileTransferObject;

// to manage file upload
bool isUploading;
bool isUploaded;

FileEntity({
this.file,
this.date,
this.historyType,
this.atSign,
this.note,
required this.transferId,
required this.fileTransferObject,
this.isUploading = false,
this.isUploaded = false,
});
}
25 changes: 14 additions & 11 deletions lib/data_models/file_transfer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,18 @@ class FileTransfer {
bool? isUpdate;
bool? isWidgetOpen;
String? notes;
FileTransfer({
required this.url,
this.files,
this.expiry,
this.platformFiles,
this.date,
required this.key,
this.isUpdate = false,
this.isWidgetOpen = false,
this.notes,
}) {
String? fileEncryptionKey;
FileTransfer(
{required this.url,
this.files,
this.expiry,
this.platformFiles,
this.date,
required this.key,
this.isUpdate = false,
this.isWidgetOpen = false,
this.notes,
required this.fileEncryptionKey}) {
this.expiry = expiry ?? DateTime.now().add(Duration(days: 6));
this.date = date ?? DateTime.now();

Expand All @@ -46,6 +47,7 @@ class FileTransfer {
FileData file = FileData.fromJson(jsonDecode(element));
files!.add(file);
});
fileEncryptionKey = json['fileEncryptionKey'];
notes = json['notes'];
}

Expand All @@ -63,6 +65,7 @@ class FileTransfer {
});
data['expiry'] = this.expiry!.toUtc().toString();
data['date'] = this.date!.toUtc().toString();
data['fileEncryptionKey'] = this.fileEncryptionKey;
return data;
}

Expand Down
3 changes: 2 additions & 1 deletion lib/data_models/file_transfer_object.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ class FileTransferObject {
bool? sharedStatus;
DateTime? date;
String? error;
//// [atClientException] not saved in any key, only used to display the error in frontend

/// [atClientException] not saved in any key, only used to display the error in frontend
Exception? atClientException;

FileTransferObject(this.transferId, this.fileEncryptionKey, this.fileUrl,
Expand Down
19 changes: 11 additions & 8 deletions lib/screens/common_widgets/app_bar_custom.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:at_common_flutter/services/size_config.dart';
import 'package:atsign_atmosphere_pro/utils/vectors.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
Expand Down Expand Up @@ -41,15 +42,17 @@ class AppBarCustom extends StatelessWidget implements PreferredSizeWidget {
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Text(
title ?? '',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.bold,
Expanded(
child: Text(
title ?? '',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 20.toFont,
fontWeight: FontWeight.bold,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
SizedBox(width: 12),
Text(
Expand Down
52 changes: 52 additions & 0 deletions lib/screens/common_widgets/file_card.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import 'package:at_common_flutter/services/size_config.dart';
import 'package:file_picker/file_picker.dart';
import 'package:flutter/material.dart';
import '../../utils/colors.dart';

class FileCard extends StatefulWidget {
PlatformFile fileDetail;
FileCard({Key? key, required this.fileDetail}) : super(key: key);

@override
State<FileCard> createState() => _FileCardState();
}

class _FileCardState extends State<FileCard> {
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10),
border: Border.all(
color: ColorConstants.sidebarTextUnselected.withOpacity(0.5)),
),
margin: EdgeInsets.fromLTRB(0, 5, 5, 0),
padding: EdgeInsets.fromLTRB(13, 8, 8, 13),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 100.toWidth,
child: Text(
widget.fileDetail.name,
style: TextStyle(color: Colors.black, fontSize: 12.toFont),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
Text(widget.fileDetail.size.toString(),
style: TextStyle(fontSize: 15.toFont)),
],
),
Icon(Icons.remove_red_eye, size: 15.toFont)
],
),
);
}
}
3 changes: 2 additions & 1 deletion lib/screens/common_widgets/labelled_circular_progress.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:at_common_flutter/services/size_config.dart';
import 'package:flutter/material.dart';

import '../../utils/colors.dart';
Expand All @@ -18,7 +19,7 @@ class LabelledCircularProgressIndicator extends StatelessWidget {
padding: EdgeInsets.only(left: 7),
child: Text((value! * 100).toStringAsFixed(0) + '%',
style: TextStyle(
fontSize: 10,
fontSize: 8.toFont,
fontWeight: FontWeight.bold,
color: ColorConstants.blueText,
)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import 'package:atsign_atmosphere_pro/utils/colors.dart';
import 'package:flutter/material.dart';
import 'package:at_common_flutter/services/size_config.dart';

import '../../../utils/images.dart';

class ContactListTile extends StatefulWidget {
final String? name;
final String? atSign;
Expand Down Expand Up @@ -53,7 +55,7 @@ class _ContactListTileState extends State<ContactListTile> {
});
},
title: Text(
widget.name!,
widget.atSign!,
style: TextStyle(
color: Colors.black,
fontSize: 14.toFont,
Expand All @@ -62,7 +64,7 @@ class _ContactListTileState extends State<ContactListTile> {
),
),
subtitle: Text(
widget.atSign!,
widget.name!,
style: TextStyle(
color: ColorConstants.fadedText,
fontSize: 14.toFont,
Expand All @@ -71,18 +73,19 @@ class _ContactListTileState extends State<ContactListTile> {
),
),
trailing: (widget.plainView)
? Container(
height: 0,
width: 0,
)
? SizedBox()
: (widget.isSelected)
? GestureDetector(
onTap: () {
widget.onRemove();
},
child: Icon(
Icons.close,
color: Color(0xffA8A8A8),
child: Container(
width: 40.toHeight,
height: 40.toHeight,
child: FittedBox(
fit: BoxFit.fill,
child: Image.asset(ImageConstants.closeIcon),
),
),
)
: Icon(
Expand All @@ -100,28 +103,6 @@ class _ContactListTileState extends State<ContactListTile> {
),
child: widget.image,
),
Positioned(
bottom: 0,
right: 0,
child: (widget.onlyRemoveMethod)
? Container()
: Container(
height: 15.toHeight,
width: 15.toHeight,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: (widget.isSelected)
? Colors.black
: Colors.transparent),
child: (widget.isSelected)
? Icon(
Icons.check,
color: Colors.white,
size: 10.toHeight,
)
: Container(),
),
)
],
),
),
Expand Down
Loading

0 comments on commit 8b644cc

Please sign in to comment.