Ver código fonte

Added some comments

ashilkn 2 anos atrás
pai
commit
415fabeeb6

+ 8 - 5
lib/ui/components/action_sheet_widget.dart

@@ -99,14 +99,15 @@ class ContentContainerWidget extends StatelessWidget {
     final textTheme = getEnteTextTheme(context);
     return Column(
       mainAxisSize: MainAxisSize.min,
-      //set cross axis to center when icon should be shown in place of body
+      //todo: set cross axis to center when icon should be shown in place of body
       crossAxisAlignment: CrossAxisAlignment.stretch,
       children: [
         title == null
             ? const SizedBox.shrink()
             : Text(
                 title!,
-                style: textTheme.h3Bold.copyWith(color: textBaseDark),
+                style: textTheme.h3Bold
+                    .copyWith(color: textBaseDark), //constant color
               ),
         title == null || body == null
             ? const SizedBox.shrink()
@@ -115,7 +116,8 @@ class ContentContainerWidget extends StatelessWidget {
             ? const SizedBox.shrink()
             : Text(
                 body!,
-                style: textTheme.body.copyWith(color: textMutedDark),
+                style: textTheme.body
+                    .copyWith(color: textMutedDark), //constant color
               )
       ],
     );
@@ -131,8 +133,9 @@ class ActionButtons extends StatelessWidget {
     final actionButtonsWithSeparators = actionButtons;
     return Column(
       children:
-          //Separator is 8pts in figma. -2pts here as the action buttons are 2pts
-          //extra in height in code compared to figma because of the border of buttons
+          //Separator height is 8pts in figma. -2pts here as the action
+          //buttons are 2pts extra in height in code compared to figma because
+          //of the border(1pt top + 1pt bottom) of action buttons.
           addSeparators(actionButtonsWithSeparators, const SizedBox(height: 6)),
     );
   }

+ 3 - 1
lib/ui/components/large_button_widget.dart

@@ -72,7 +72,7 @@ class LargeButtonWidget extends StatelessWidget {
         ),
         child: Padding(
           padding: const EdgeInsets.symmetric(vertical: 14, horizontal: 16),
-          //show loading or row depending on state of button
+          //todo: show loading or row depending on state of button
           child: _hasTrailingIcon()
               ? Row(
                   mainAxisAlignment: MainAxisAlignment.spaceBetween,
@@ -212,6 +212,7 @@ class LargeButtonWidget extends StatelessWidget {
     return null;
   }
 
+  //Returning null to fallback to default color
   Color? _disabledIconColor(EnteColorScheme colorScheme) {
     if (buttonType == ButtonType.primary ||
         buttonType == ButtonType.secondary) {
@@ -254,6 +255,7 @@ class LargeButtonWidget extends StatelessWidget {
     return null;
   }
 
+  //Returning null to fallback to default color
   TextStyle? _disabledLabelStyle(
     EnteTextTheme textTheme,
     EnteColorScheme colorScheme,