فهرست منبع

Fix alignment of the details section screen

vishnukvmd 4 سال پیش
والد
کامیت
7847c6e6c6
2فایلهای تغییر یافته به همراه31 افزوده شده و 26 حذف شده
  1. 1 2
      lib/models/file.dart
  2. 30 24
      lib/ui/settings/details_section_widget.dart

+ 1 - 2
lib/models/file.dart

@@ -59,8 +59,7 @@ class File {
         type = FileType.image;
         // PHAssetMediaSubtype.photoLive.rawValue is 8
         // This hack should go away once photos_manager support livePhotos
-        if (kDebugMode && // only enable live photo in debug builds
-            asset.subTypes != null &&
+        if (asset.subTypes != null &&
             asset.subTypes > -1 &&
             (asset.subTypes & 8) != 0) {
           type = FileType.livePhoto;

+ 30 - 24
lib/ui/settings/details_section_widget.dart

@@ -65,6 +65,7 @@ class _DetailsSectionWidgetState extends State<DetailsSectionWidget> {
       margin: EdgeInsets.fromLTRB(12, 8, 12, 8),
       child: Row(
         mainAxisAlignment: MainAxisAlignment.spaceAround,
+        crossAxisAlignment: CrossAxisAlignment.center,
         children: [
           GestureDetector(
             onTap: () {
@@ -106,33 +107,38 @@ class _DetailsSectionWidgetState extends State<DetailsSectionWidget> {
               initialAngleInDegree: 270,
             ),
           ),
-          Column(
-            mainAxisAlignment: MainAxisAlignment.start,
-            crossAxisAlignment: CrossAxisAlignment.start,
-            children: [
-              Text(
-                _userDetails.email,
-                style: TextStyle(
-                  // color: Theme.of(context).buttonColor,
-                  fontSize: 16,
+          Padding(padding: EdgeInsets.all(4)),
+          Expanded(
+            child: Column(
+              mainAxisAlignment: MainAxisAlignment.center,
+              crossAxisAlignment: CrossAxisAlignment.start,
+              children: [
+                Text(
+                  _userDetails.email,
+                  style: TextStyle(
+                    fontSize: 16,
+                  ),
+                  overflow: TextOverflow.ellipsis,
                 ),
-              ),
-              Padding(padding: EdgeInsets.all(8)),
-              Text(
-                _userDetails.fileCount.toString() + " memories preserved",
-                style: TextStyle(
-                  color: Colors.white.withOpacity(0.6),
+                Padding(padding: EdgeInsets.all(6)),
+                Text(
+                  _userDetails.fileCount.toString() + " memories preserved",
+                  style: TextStyle(
+                    color: Colors.white.withOpacity(0.6),
+                    fontSize: 14,
+                  ),
                 ),
-              ),
-              Padding(padding: EdgeInsets.all(4)),
-              Text(
-                _userDetails.sharedCollectionsCount.toString() +
-                    " albums shared",
-                style: TextStyle(
-                  color: Colors.white.withOpacity(0.6),
+                Padding(padding: EdgeInsets.all(3)),
+                Text(
+                  _userDetails.sharedCollectionsCount.toString() +
+                      " albums shared",
+                  style: TextStyle(
+                    color: Colors.white.withOpacity(0.6),
+                    fontSize: 14,
+                  ),
                 ),
-              ),
-            ],
+              ],
+            ),
           ),
         ],
       ),