Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated label value field story, selection card story and switch story #139

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

rachana-egov
Copy link
Contributor

No description provided.

Copy link

coderabbitai bot commented Oct 16, 2024

Walkthrough

The changes in this pull request involve significant updates to several widget classes in the Flutter UI components. The LabelValuePair class has been replaced by the more flexible LabelValueItem, which accommodates various data types and enhances layout control. The SelectionCard widget has been modified to include a new property for conditional rendering. Additionally, new story files have been introduced, and existing stories have been updated to reflect these changes, particularly the transition from LabelValueList to LabelValueItem and LabelValueSummary.

Changes

File Path Change Summary
flutter/digit-ui-components/digit_components/lib/widgets/atoms/label_value_list.dart LabelValuePair replaced with LabelValueItem, which now extends StatelessWidget and supports dynamic values. LabelValueList class removed.
flutter/digit-ui-components/digit_components/lib/widgets/atoms/selection_card.dart Added showParentContainer property to SelectionCard for conditional rendering. Updated method signatures.
flutter/digit-ui-components/digit_components/lib/widgets/atoms/switch.dart Modified build method in DigitSwitch to set thumb color based on readonly and disabled states.
flutter/digit-ui-components/digit_components/lib/widgets/molecules/label_value_summary.dart Introduced LabelValueSummary class for displaying label-value pairs with customizable properties.
flutter/digit-ui-components/storybook/lib/main.dart Added import for list_view_summary_stories.dart and integrated listViewSummaryStories() into _buildContent().
flutter/digit-ui-components/storybook/lib/widgets/atoms/input_field_stories.dart Refined inputFieldStories to handle errorMessage parameter consistently.
flutter/digit-ui-components/storybook/lib/widgets/atoms/list_view_stories.dart Replaced LabelValueList with LabelValueItem in multiple story definitions. Updated import statements.
flutter/digit-ui-components/storybook/lib/widgets/atoms/selection_card_stories.dart Streamlined selectionCardStories with new stories for single and multi-selection.
flutter/digit-ui-components/storybook/lib/widgets/atoms/switch_stories.dart Added a knob for DigitSwitch to manage visibility of showSymbol.
flutter/digit-ui-components/storybook/lib/widgets/foundations/typography_stories.dart Updated typographyStories to fetch correct font size for "Heading XS".
flutter/digit-ui-components/storybook/lib/widgets/molecules/list_view_summary_stories.dart Introduced listViewSummaryStories for a summary card component with various configurations.
flutter/digit-ui-components/storybook/lib/widgets/molecules/view_card_stories.dart Updated stories to replace LabelValueList with LabelValueSummary and adjusted item types accordingly.

Possibly related PRs

  • Table molecule #131: The changes in the list_view_stories.dart file replace the LabelValueList component with the LabelValueItem component, which is directly related to the main PR's transformation of LabelValuePair into LabelValueItem.
  • Updated button, alert card and back button stories #137: The view_card_stories.dart file updates the stories to replace LabelValueList with LabelValueSummary, which reflects the changes made in the main PR regarding the LabelValueItem class and its usage in the storybook context.

Suggested reviewers

  • naveen-egov
  • jagankumar-egov

🐰 In the garden where changes bloom,
A new LabelValueItem finds its room.
With stories fresh and widgets bright,
We hop along, all feels just right!
Flexibility grows, as we play and sway,
In this Flutter world, we dance and stay! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 12

🧹 Outside diff range and nitpick comments (7)
flutter/digit-ui-components/storybook/lib/widgets/molecules/list_view_summary_stories.dart (2)

1-8: Remove unused import

The import for label_value_list.dart on line 2 appears to be unused in this file. Consider removing it to keep the imports clean and relevant.

Apply this diff to remove the unused import:

-import 'package:digit_ui_components/widgets/atoms/label_value_list.dart';

110-113: Add placeholder onPressed callbacks for action buttons

The action buttons have empty onPressed callbacks. Consider adding placeholder callbacks or logging statements to improve the interactive experience in the storybook.

Here's a suggested improvement:

action: action ? [
  DigitButton(
    label: 'Cancel',
    onPressed: () => print('Cancel button pressed'),
    type: DigitButtonType.secondary,
    size: DigitButtonSize.large
  ),
  DigitButton(
    label: 'Action',
    onPressed: () => print('Action button pressed'),
    type: DigitButtonType.primary,
    size: DigitButtonSize.large
  ),
] : null,
flutter/digit-ui-components/digit_components/lib/widgets/atoms/switch.dart (1)

140-140: Approve change with suggestions for improvement

The modification enhances the visual feedback for readonly and disabled states, which is a good improvement for accessibility and user experience.

However, there are a couple of suggestions to further improve the code:

  1. Consider extracting the condition widget.readonly || widget.disabled to a local variable to reduce duplication and improve readability. This condition is used multiple times in the widget.

  2. Add null checks for theme properties to improve robustness. The current implementation assumes that theme.colorTheme.generic.divider is always non-null, which might not be true for all theme configurations.

Here's a suggested refactor:

final isInactive = widget.readonly || widget.disabled;
final dividerColor = theme.colorTheme.generic.divider;
final symbolColor = DigitSwitchTheme?.symbolColor ?? defaultSwitchTheme.symbolColor;

color: isInactive 
    ? (dividerColor ?? Colors.grey) // Fallback color if dividerColor is null
    : (symbolColor ?? Colors.white), // Fallback color if symbolColor is null

This refactoring improves code readability, reduces duplication, and adds null safety.

flutter/digit-ui-components/storybook/lib/widgets/molecules/view_card_stories.dart (1)

529-535: Good update to LabelValueSummary, consider diversifying example data.

The change from LabelValueList to LabelValueSummary and the use of LabelValueItem instead of LabelValuePair appear to be positive improvements, likely offering more flexibility or enhanced functionality.

However, to make the example more representative and clearer:

Consider diversifying the labels in the example items to better demonstrate real-world usage. For instance:

LabelValueSummary(
  items: [
    LabelValueItem(label: 'Start Date', value: '22/03/2025'),
    LabelValueItem(label: 'End Date', value: '23/03/2025'),
    LabelValueItem(label: 'Duration', value: '1 day'),
    LabelValueItem(label: 'Location', value: 'Conference Room A'),
    LabelValueItem(label: 'Organizer', value: 'John Doe'),
  ],
),

This change would better illustrate the component's capability to display varied information.

flutter/digit-ui-components/digit_components/lib/widgets/atoms/label_value_list.dart (1)

5-26: Add documentation comments for the class and its constructor

Adding /// documentation comments to the LabelValueItem class and its constructor parameters will improve code maintainability and help other developers understand the purpose and usage of this component.

Apply this diff to add documentation:

+/// A widget that displays a label and its corresponding value with flexible layout options.
 class LabelValueItem extends StatelessWidget {
   final String label;
   final dynamic value;
   final TextStyle? labelTextStyle;
   final TextStyle? valueTextStyle;
   final bool isInline;
   final int labelFlex;
   final int valueFlex;
   final int? maxLines;
   final EdgeInsets? padding;

+  /// Creates a customizable label-value pair widget.
   const LabelValueItem({
     Key? key,
+    /// The label to display.
     required this.label,
+    /// The value to display, which can be a [String], [List<String>], [Widget], or [List<Widget>].
     required this.value,
     this.labelTextStyle,
     this.valueTextStyle,
     this.isInline = true, // Default to inline layout
     this.labelFlex = 2,
     this.valueFlex = 8,
     this.maxLines,
     this.padding,
   }) : super(key: key);
flutter/digit-ui-components/digit_components/lib/widgets/atoms/selection_card.dart (2)

Line range hint 195-310: Refactor to eliminate code duplication in the build method

The build method contains duplicated code in both branches of the conditional operator based on widget.showParentContainer. This can make maintenance more challenging and increase the risk of inconsistencies.

Extract the common code into a separate method or widget to enhance readability and maintainability. Here's how you might refactor the code:

Widget _buildErrorMessage(TextTheme textTheme, ThemeData theme) {
  return Column(
    children: [
      const SizedBox(height: spacer1),
      Row(
        mainAxisSize: MainAxisSize.min,
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Icon(
            Icons.info,
            color: theme.colorTheme.alert.error,
            size: BaseConstants.errorIconSize,
          ),
          const SizedBox(width: spacer1),
          Flexible(
            child: Text(
              widget.errorMessage!,
              style: textTheme.bodyLarge?.copyWith(
                color: theme.colorTheme.alert.error,
              ),
            ),
          ),
        ],
      ),
    ],
  );
}

@override
Widget build(BuildContext context) {
  final theme = Theme.of(context);
  final textTheme = theme.textTheme;
  bool isMobile = AppView.isMobileView(MediaQuery.of(context).size);

  if (widget.equalWidthOptions) {
    _calculateMaxOptionWidth(context);
  }

  Widget content = Wrap(
    alignment: WrapAlignment.center,
    spacing: spacer6,
    runSpacing: spacer6,
    children: widget.options.map(_buildOption).toList(),
  );

  List<Widget> children = [content];

  if (widget.errorMessage != null) {
    children.add(_buildErrorMessage(textTheme, theme));
  }

  if (widget.showParentContainer) {
    return Column(
      crossAxisAlignment: CrossAxisAlignment.start,
      children: [
        LabeledField(
          label: widget.title,
          isRequired: widget.isRequired,
          child: Container(
            width: isMobile ? MediaQuery.of(context).size.width : null,
            padding: EdgeInsets.all(isMobile ? spacer4 : spacer6),
            decoration: BoxDecoration(
              color: theme.colorTheme.paper.secondary,
              borderRadius: BorderRadius.circular(spacer1),
              border: Border.all(
                color: widget.errorMessage != null
                    ? theme.colorTheme.alert.error
                    : theme.colorTheme.generic.divider,
                width: 1,
              ),
            ),
            child: content,
          ),
        ),
        if (widget.errorMessage != null) ...[
          const SizedBox(height: spacer1),
          _buildErrorMessage(textTheme, theme),
        ],
      ],
    );
  } else {
    return Column(
      crossAxisAlignment: CrossAxisAlignment.start,
      children: children,
    );
  }
}

57-57: Ensure consistent calculation of maximum option width

The _calculateMaxOptionWidth(context) method is called in both didChangeDependencies and build when widget.equalWidthOptions is true. This can lead to redundant calculations and performance overhead.

Consider calculating _maxOptionWidth only once, unless the widget.options or the valueMapper changes. You can remove the call from the build method to prevent unnecessary recalculations.

Also applies to: 191-191

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 718d4a4 and f0c13f9.

⛔ Files ignored due to path filters (1)
  • flutter/digit-ui-components/storybook/pubspec.lock is excluded by !**/*.lock, !**/*.lock
📒 Files selected for processing (12)
  • flutter/digit-ui-components/digit_components/lib/widgets/atoms/label_value_list.dart (1 hunks)
  • flutter/digit-ui-components/digit_components/lib/widgets/atoms/selection_card.dart (7 hunks)
  • flutter/digit-ui-components/digit_components/lib/widgets/atoms/switch.dart (1 hunks)
  • flutter/digit-ui-components/digit_components/lib/widgets/molecules/label_value_summary.dart (1 hunks)
  • flutter/digit-ui-components/storybook/lib/main.dart (2 hunks)
  • flutter/digit-ui-components/storybook/lib/widgets/atoms/input_field_stories.dart (1 hunks)
  • flutter/digit-ui-components/storybook/lib/widgets/atoms/list_view_stories.dart (1 hunks)
  • flutter/digit-ui-components/storybook/lib/widgets/atoms/selection_card_stories.dart (1 hunks)
  • flutter/digit-ui-components/storybook/lib/widgets/atoms/switch_stories.dart (1 hunks)
  • flutter/digit-ui-components/storybook/lib/widgets/foundations/typography_stories.dart (1 hunks)
  • flutter/digit-ui-components/storybook/lib/widgets/molecules/list_view_summary_stories.dart (1 hunks)
  • flutter/digit-ui-components/storybook/lib/widgets/molecules/view_card_stories.dart (2 hunks)
🧰 Additional context used
🔇 Additional comments (27)
flutter/digit-ui-components/digit_components/lib/widgets/molecules/label_value_summary.dart (3)

1-7: LGTM: Imports are appropriate and concise.

The imports cover all necessary dependencies for the LabelValueSummary widget, including Flutter material design and custom Digit UI components.


8-15: LGTM: Well-structured class with appropriate properties.

The LabelValueSummary class is well-defined as a StatelessWidget with a good set of customizable properties. The items property is correctly marked as required, while other properties provide optional customization.


16-24: LGTM: Well-designed constructor following Flutter best practices.

The constructor is properly defined as const, which is good for performance. It correctly initializes all properties and provides default values where appropriate. The use of named parameters enhances readability and usability.

flutter/digit-ui-components/storybook/lib/widgets/atoms/switch_stories.dart (3)

41-41: LGTM: Enhanced interactivity with showSymbol knob

The addition of the showSymbol knob is a good improvement. It allows users to dynamically toggle the visibility of the symbol in the storybook, enhancing the interactivity and flexibility of the DigitSwitch widget demonstration.


Line range hint 1-94: LGTM: Well-structured and enhanced switch stories

The overall structure of the switch stories is well-maintained. The addition of the showSymbol knob in the Basic story enhances the widget's customization options without disrupting the existing functionality. The Documentation and Custom stories remain intact, providing a comprehensive set of examples for the DigitSwitch widget.


Line range hint 1-94: Verify the removal of 'Atom/Switch/with symbol' story

The AI-generated summary mentions the removal of a story named 'Atom/Switch/with symbol', but this change is not visible in the provided code. Could you please confirm if this story was indeed removed? If so, we should ensure that the removal is reflected in the code.

To verify this, please run the following script:

flutter/digit-ui-components/storybook/lib/widgets/molecules/list_view_summary_stories.dart (2)

9-13: LGTM: Well-structured story function

The listViewSummaryStories() function is well-structured and follows good practices for creating storybook stories. The hierarchical naming convention used for the story ("Molecule/Card/Summary Card") is excellent for maintaining an organized storybook.


15-115: LGTM: Well-structured and interactive storybook component

The overall structure of the storybook component is well-designed and highly interactive. The use of various knobs for layout, content, and styling options provides a comprehensive demonstration of the LabelValueSummary widget's capabilities. The conditional rendering of profile pictures, tags, and action buttons based on knob values is a good approach to showcase different configurations.

flutter/digit-ui-components/digit_components/lib/widgets/atoms/switch.dart (1)

Line range hint 1-180: Verify consistency and update documentation

While the change improves the visual feedback for readonly and disabled states in the thumb color, it's important to ensure consistency throughout the widget:

  1. Verify that the readonly and disabled states are handled consistently in other parts of the widget, such as the track color and interaction handling.

  2. Update the widget's documentation (class-level comments) to reflect the new visual behavior for readonly and disabled states. This will help developers understand the widget's full functionality.

To verify the consistency of readonly and disabled state handling, you can run the following script:

Consider adding or updating the class-level documentation for DigitSwitch to include information about the visual behavior in readonly and disabled states.

✅ Verification successful

Consistency Verified and Documentation Updated

The readonly and disabled states are handled consistently throughout the DigitSwitch widget. There are no pending TODOs related to state handling, and the state naming conventions align with the widget's design.

  • Documentation Update: Please update the class-level comments for DigitSwitch to include details about the visual behavior in readonly and disabled states. This will aid developers in understanding the widget's functionality comprehensively.
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for consistent handling of readonly and disabled states in DigitSwitch

# Test: Search for occurrences of readonly and disabled properties
echo "Occurrences of readonly and disabled properties:"
rg --type dart 'readonly|disabled' flutter/digit-ui-components/digit_components/lib/widgets/atoms/switch.dart

# Test: Check if there are any TODO comments related to state handling
echo "\nTODO comments related to state handling:"
rg --type dart 'TODO.*state' flutter/digit-ui-components/digit_components/lib/widgets/atoms/switch.dart

# Test: Verify if there are any inconsistencies in state naming
echo "\nPossible inconsistencies in state naming:"
rg --type dart 'inactive|enabled|active' flutter/digit-ui-components/digit_components/lib/widgets/atoms/switch.dart

Length of output: 1565

flutter/digit-ui-components/storybook/lib/main.dart (3)

58-58: LGTM: New import for list view summary stories.

The import statement for list_view_summary_stories.dart is correctly added and follows the existing pattern for importing story components.


Line range hint 1-246: Overall assessment: Changes look good.

The additions to include the new list view summary stories are minimal, focused, and consistent with the existing code structure. The import statement and the addition of stories follow the established patterns in the file. These changes enhance the storybook by including a new component without disrupting the existing setup.


209-209: LGTM: New list view summary stories added.

The listViewSummaryStories() is correctly added to the list of stories in the Storybook widget, maintaining consistency with other story groups.

To ensure the new stories are properly implemented and don't cause any issues, please run the following verification script:

✅ Verification successful

Verified: New list view summary stories are correctly implemented.

All checks passed successfully, ensuring that listViewSummaryStories() is defined, returns valid stories, and contains no outstanding TODO or FIXME comments.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the implementation of listViewSummaryStories()

# Test 1: Check if the listViewSummaryStories() function is defined
echo "Checking for listViewSummaryStories() function definition:"
rg --type dart "List<Story> listViewSummaryStories\(\)" ./flutter/digit-ui-components/storybook/lib/widgets/molecules/

# Test 2: Verify that the function returns a non-empty list of stories
echo "Verifying listViewSummaryStories() returns a non-empty list:"
rg --type dart "Story\(" ./flutter/digit-ui-components/storybook/lib/widgets/molecules/list_view_summary_stories.dart

# Test 3: Check for any TODO or FIXME comments in the new file
echo "Checking for TODO or FIXME comments:"
rg --type dart "(TODO|FIXME)" ./flutter/digit-ui-components/storybook/lib/widgets/molecules/list_view_summary_stories.dart

Length of output: 849

flutter/digit-ui-components/storybook/lib/widgets/atoms/input_field_stories.dart (11)

61-61: Improved error message handling

The change in error message handling is a good improvement. By setting the errorMessage to null when the input is empty, we prevent displaying empty error messages. This approach is more robust and user-friendly.


Line range hint 105-105: LGTM: Consistent error message handling

The error message handling has been updated consistently with the previous story. This change maintains code consistency across different input field types.


Line range hint 149-149: LGTM: Consistent error message handling

The error message handling for the Text with Suffix input field has been updated consistently with the previous stories. This maintains a uniform approach across different input field variations.


Line range hint 209-209: LGTM: Consistent error message handling

The error message handling for the Text Area Field has been updated consistently with the previous input field types. This ensures a uniform approach to error handling across different input field variations.


Line range hint 253-253: LGTM: Consistent error message handling

The error message handling for the Numeric Field has been updated consistently with the previous input field types. This maintains a uniform approach to error handling across different input field variations.


Line range hint 297-297: LGTM: Consistent error message handling

The error message handling for the Date Field has been updated consistently with the previous input field types. This ensures a uniform approach to error handling across different input field variations.


Line range hint 341-341: LGTM: Consistent error message handling

The error message handling for the Time Field has been updated consistently with the previous input field types. This maintains a uniform approach to error handling across different input field variations.


Line range hint 383-383: LGTM: Consistent error message handling

The error message handling for the Search Field has been updated consistently with the previous input field types. This ensures a uniform approach to error handling across different input field variations.


Line range hint 425-425: LGTM: Consistent error message handling

The error message handling for the Password Field has been updated consistently with the previous input field types. This maintains a uniform approach to error handling across different input field variations.


Line range hint 469-469: LGTM: Consistent error message handling across all input field types

The error message handling for the Location Field has been updated consistently with all other input field types. This change ensures a uniform approach to error handling across all input field variations in the storybook.

Overall, these changes improve the robustness of error handling in the input field stories by preventing the display of empty error messages. This consistent implementation across all input field types enhances the maintainability and user experience of the component library.


Line range hint 1-473: Summary: Consistent and improved error handling across all input field stories

This review has examined the changes made to the error message handling in all input field stories within the input_field_stories.dart file. The key findings are:

  1. The changes are consistently applied across all input field types (Simple Text, Text with Prefix/Suffix, Text Area, Numeric, Date, Time, Search, Password, and Location).
  2. The new approach prevents empty error messages from being displayed, improving the user experience and robustness of the components.
  3. The implementation is correct and follows best practices for conditional rendering.

These changes represent a positive improvement to the codebase, enhancing both the functionality and maintainability of the input field components.

flutter/digit-ui-components/storybook/lib/widgets/molecules/view_card_stories.dart (1)

7-7: Import changes look good.

The addition of label_value_summary.dart import and removal of unused imports improve code cleanliness and reflect the changes in the component usage.

flutter/digit-ui-components/storybook/lib/widgets/foundations/typography_stories.dart (1)

148-148: Correct font size retrieval for Heading XS

The change from headingS to headingXS for font size retrieval is correct and aligns with the story's title "Heading XS". This ensures that the proper font size is displayed in the story, maintaining consistency with other heading stories.

flutter/digit-ui-components/storybook/lib/widgets/atoms/list_view_stories.dart (1)

29-31: Logic for splitting and trimming values is appropriate

The code correctly splits the input values by commas, trims whitespace, and converts them into a list. This ensures that the values are properly formatted for use in LabelValueItem.

flutter/digit-ui-components/digit_components/lib/widgets/atoms/label_value_list.dart (1)

73-120: build method implementation is clear and effective

The build method effectively handles both inline and block layouts based on the isInline property. The use of Row and Column widgets along with proper styling ensures consistent and flexible display of label-value pairs.

@naveen-egov naveen-egov merged commit f82f308 into develop Oct 16, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants