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

Redesign add match screen #22

Merged
merged 5 commits into from
May 28, 2024
Merged

Redesign add match screen #22

merged 5 commits into from
May 28, 2024

Conversation

cp-sidhdhi-p
Copy link
Collaborator

@cp-sidhdhi-p cp-sidhdhi-p commented May 24, 2024

Changes:

Redesign below screens:

  • power play over screen
  • add official screen
  • search user bottom sheet
  • select squad screen
  • select captain sheet
  • add match screen

Visual Evidence:

lightModeAddMatch
darkModeAddMatchScreen

Summary by CodeRabbit

  • New Features

    • Enhanced match addition process with refined text labels and clearer placeholders.
    • Updated icons for match officials and various ball types.
  • Bug Fixes

    • Improved error messages for invalid input fields in match creation.
  • Style

    • Adjusted text styles and button behaviors for better usability and consistency.
    • Updated grid cell appearance for a more polished look.
  • Refactor

    • Streamlined imports for better code organization and maintainability.

Copy link

coderabbitai bot commented May 24, 2024

Walkthrough

The recent updates focus on refining text labels, enhancing UI components, and improving the overall user experience in a sports application. Changes include shortening team names, revising titles for clarity, updating placeholders, and refining wording for consistency. Additionally, assets and imports were updated, and styling tweaks were applied to various screens to enhance functionality and appearance.

Changes

Files/Paths Change Summary
khelo/assets/locales/app_en.arb Adjusted text labels for adding a match, including shortening team names, revising titles, and updating placeholders.
khelo/lib/gen/assets.gen.dart Added new asset declarations for icons and images.
khelo/lib/ui/flow/matches/add_match/add_match_screen.dart Added imports for various components and styling utilities to support the add match screen.
khelo/lib/ui/flow/matches/add_match/match_officials/add_match_officials_screen.dart Updated imports to include hooks_riverpod and components for officials' cell view.
khelo/lib/ui/flow/matches/add_match/power_play/power_play_screen.dart Modified text styles, button behaviors, and grid cell appearances to enhance the PowerPlayScreen widget.

In fields of green, where matches play,
Teams A and B now lead the way.
With labels clear and screens refined,
The game of sports, so well-defined.
Buttons bright and styles anew,
For every player, a clearer view. 🏏


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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.

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 as 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 full the 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 help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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: 2

Outside diff range and nitpick comments (2)
khelo/lib/ui/flow/matches/add_match/power_play/power_play_screen.dart (1)

35-35: Adjust the widgetWidth to maintain consistency with the design specifications.

Consider verifying if the change from 50 to 48 aligns with the design specifications. This could impact the UI layout and should be consistent across similar UI elements.

khelo/lib/ui/flow/matches/add_match/add_match_screen.dart (1)

Line range hint 133-166: Review the logic for enabling the schedule match button based on error states.

The logic for enabling the schedule match button should be revisited. It seems that the button is enabled even when there are errors, which could lead to user confusion or data integrity issues.

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 9386195 and 46825e1.
Files ignored due to path filters (22)
  • khelo/assets/images/ic_calendar.svg is excluded by !**/*.svg
  • khelo/assets/images/ic_close.svg is excluded by !**/*.svg
  • khelo/assets/images/ic_commentator.svg is excluded by !**/*.svg
  • khelo/assets/images/ic_leather_ball.png is excluded by !**/*.png
  • khelo/assets/images/ic_micro_phone.png is excluded by !**/*.png
  • khelo/assets/images/ic_minus.svg is excluded by !**/*.svg
  • khelo/assets/images/ic_other_ball.png is excluded by !**/*.png
  • khelo/assets/images/ic_other_official.png is excluded by !**/*.png
  • khelo/assets/images/ic_plus.svg is excluded by !**/*.svg
  • khelo/assets/images/ic_referee.svg is excluded by !**/*.svg
  • khelo/assets/images/ic_scorer.png is excluded by !**/*.png
  • khelo/assets/images/ic_scorer.svg is excluded by !**/*.svg
  • khelo/assets/images/ic_search.svg is excluded by !**/*.svg
  • khelo/assets/images/ic_streamer.png is excluded by !**/*.png
  • khelo/assets/images/ic_tennis_ball.png is excluded by !**/*.png
  • khelo/assets/images/ic_time.svg is excluded by !**/*.svg
  • khelo/assets/images/ic_umpire.png is excluded by !**/*.png
  • khelo/assets/images/ic_umpire.svg is excluded by !**/*.svg
  • khelo/assets/images/leather_ball.svg is excluded by !**/*.svg
  • khelo/assets/images/other_ball.svg is excluded by !**/*.svg
  • khelo/assets/images/tennis_ball.svg is excluded by !**/*.svg
  • style/assets/images/ic_arrow_down.svg is excluded by !**/*.svg
Files selected for processing (25)
  • khelo/assets/locales/app_en.arb (2 hunks)
  • khelo/lib/components/user_detail_cell.dart (1 hunks)
  • khelo/lib/domain/formatter/date_formatter.dart (1 hunks)
  • khelo/lib/gen/assets.gen.dart (2 hunks)
  • khelo/lib/ui/flow/matches/add_match/add_match_screen.dart (6 hunks)
  • khelo/lib/ui/flow/matches/add_match/add_match_view_model.dart (2 hunks)
  • khelo/lib/ui/flow/matches/add_match/components/ball_selection_view.dart (1 hunks)
  • khelo/lib/ui/flow/matches/add_match/components/match_official_selection_view.dart (1 hunks)
  • khelo/lib/ui/flow/matches/add_match/components/over_detail_view.dart (1 hunks)
  • khelo/lib/ui/flow/matches/add_match/components/pitch_selection_view.dart (1 hunks)
  • khelo/lib/ui/flow/matches/add_match/components/section_title.dart (1 hunks)
  • khelo/lib/ui/flow/matches/add_match/components/team_selection_view.dart (1 hunks)
  • khelo/lib/ui/flow/matches/add_match/match_officials/add_match_officials_screen.dart (5 hunks)
  • khelo/lib/ui/flow/matches/add_match/match_officials/add_match_officials_view_model.dart (3 hunks)
  • khelo/lib/ui/flow/matches/add_match/match_officials/components/officials_cell_view.dart (1 hunks)
  • khelo/lib/ui/flow/matches/add_match/match_officials/search_user/search_user_screen.dart (4 hunks)
  • khelo/lib/ui/flow/matches/add_match/power_play/power_play_screen.dart (5 hunks)
  • khelo/lib/ui/flow/matches/add_match/select_squad/components/select_admin_and_captain_dialog.dart (4 hunks)
  • khelo/lib/ui/flow/matches/add_match/select_squad/select_squad_screen.dart (8 hunks)
  • khelo/lib/ui/flow/settings/edit_profile/edit_profile_screen.dart (1 hunks)
  • style/lib/button/action_button.dart (1 hunks)
  • style/lib/text/app_text_field.dart (5 hunks)
  • style/lib/theme/colors.dart (2 hunks)
  • style/lib/widgets/drop_down_selection_button.dart (1 hunks)
  • style/pubspec.yaml (2 hunks)
Files skipped from review due to trivial changes (3)
  • khelo/assets/locales/app_en.arb
  • style/lib/button/action_button.dart
  • style/pubspec.yaml
Additional comments not posted (44)
khelo/lib/domain/formatter/date_formatter.dart (1)

17-17: Updated date format to a more standard 'day before month' format. This change should help in maintaining consistency across various locales where this format is preferred.

khelo/lib/ui/flow/matches/add_match/components/section_title.dart (1)

1-38: The implementation of SectionTitle is clean and follows Flutter's best practices for creating reusable UI components. The dynamic text color adaptation using context.colorScheme.textPrimary is a good touch for theme consistency.

khelo/lib/ui/flow/matches/add_match/components/match_official_selection_view.dart (1)

10-53: The implementation of MatchOfficialSelectionView is robust, especially the use of context.mounted to check if the widget is still in the tree before updating its state. This prevents potential exceptions related to state updates on disposed widgets.

khelo/lib/components/user_detail_cell.dart (1)

11-71: UserDetailCell is well-designed with good use of optional parameters and null safety. The use of ImageAvatar for user images and conditional rendering based on the presence of user details like phone number are well-implemented.

khelo/lib/ui/flow/matches/add_match/components/pitch_selection_view.dart (1)

12-78: PitchSelectionView is effectively implemented with a clean and modular approach. The use of OnTapScale for interactive elements and context extensions for theming are particularly noteworthy, enhancing both the functionality and aesthetics of the component.

style/lib/widgets/drop_down_selection_button.dart (1)

7-88: DropDownSelectionButton is a versatile and well-implemented component, offering good customization options and handling optional parameters effectively. The conditional rendering and use of SVG assets for icons are implemented correctly, enhancing the UI's adaptability and aesthetics.

khelo/lib/ui/flow/matches/add_match/match_officials/add_match_officials_view_model.dart (2)

7-7: Import statement for assets.gen.dart added to utilize new asset paths.


102-102: Updated asset paths for match officials to use new images.

Also applies to: 104-104, 106-106, 108-108

khelo/lib/ui/flow/matches/add_match/components/ball_selection_view.dart (1)

1-11: Import statements added to support new functionalities in the BallSelectionView.

khelo/lib/ui/flow/matches/add_match/match_officials/components/officials_cell_view.dart (1)

1-11: Import statements added to support new functionalities in the OfficialsCellView.

khelo/lib/ui/flow/matches/add_match/match_officials/add_match_officials_screen.dart (1)

4-11: Import statements added to support new functionalities in the AddMatchOfficialsScreen.

khelo/lib/ui/flow/matches/add_match/select_squad/components/select_admin_and_captain_dialog.dart (1)

5-10: Import statements added to support new functionalities in the SelectAdminAndCaptainDialog.

style/lib/text/app_text_field.dart (1)

Line range hint 33-64: Enhancements to AppTextField including new properties and adjustments to existing ones to improve functionality and customization.

Also applies to: 123-123, 151-151

khelo/lib/ui/flow/matches/add_match/match_officials/search_user/search_user_screen.dart (7)

7-7: Updated import from image_avatar.dart to user_detail_cell.dart to use the new UserDetailCell component.


14-14: Replaced TextField with AppTextField for consistent styling across the app.


39-39: Adjusted padding to enhance UI consistency and user experience.


67-78: Enhanced empty state UI by centering the text and adjusting the style to match the disabled text color scheme.


89-96: Refactored user detail display to use UserDetailCell, improving modularity and consistency in user interface components.


107-129: Refined search text field UI by adjusting padding, hint text styling, and adding a prefix icon for better visual guidance.


134-156: Added an action button to each user detail cell, allowing for dynamic interaction based on the user's phone availability.

khelo/lib/gen/assets.gen.dart (8)

29-31: Added asset path for ic_calendar.svg. Ensures that the calendar icon is available for use in UI components.


42-44: Added asset path for ic_close.svg. This is used for close buttons across the application.


45-47: Added asset path for ic_commentator.svg. Supports new features related to displaying commentator information.


52-56: Added asset paths for ic_minus.svg and ic_plus.svg. These are used for increment and decrement buttons in UI components.


58-62: Added asset path for ic_referee.svg and ic_scorer.svg. These icons are crucial for the match officials management feature.


70-74: Added asset path for ic_search.svg and ic_time.svg. These icons are used in search bars and time selection components.


76-78: Added asset path for ic_umpire.svg. This icon is used in the match officials selection feature.


85-93: Added asset paths for different types of balls (leather_ball.svg, other_ball.svg, tennis_ball.svg). These are used in the ball selection component.

khelo/lib/ui/flow/matches/add_match/components/team_selection_view.dart (3)

1-20: Introduced imports for cached_network_image and team_model.dart, and defined the TeamSelectionView class with necessary properties for team and squad selection.


51-140: Enhanced team selection UI by adding interactive elements such as team selection cells and validation for squad configuration. This improves user interaction and ensures that teams are selected properly.


143-173: Added a button to select squads, which is enabled based on the validity of the squad. This allows dynamic interaction based on the team configuration.

khelo/lib/ui/flow/matches/add_match/select_squad/select_squad_screen.dart (5)

6-17: Updated imports to include SvgPicture for rendering SVG assets and action_button.dart for using custom action buttons in the UI.


Line range hint 58-76: Added an action button to finalize the squad selection. This button is conditionally enabled and uses an SVG asset for its icon, enhancing the visual feedback to the user.


Line range hint 108-158: Refactored the squad and team member listing to use UserDetailCell for consistent user detail display across the application. This change improves the modularity and reusability of the UI components.


Line range hint 170-203: Enhanced the display of section titles and subtitles in the squad selection screen, improving the clarity and visual hierarchy of the UI.


219-232: Added dynamic trailing buttons for adding or removing squad members, utilizing SVG assets for icons. This provides clear visual cues for user interactions.

khelo/lib/ui/flow/matches/add_match/components/over_detail_view.dart (3)

1-21: Introduced necessary imports and defined the OverDetailView class with properties for managing over details.


23-78: Enhanced the UI for over details, including stepper views for number of overs and overs per bowler, and a detailed view for managing power play overs. This provides a comprehensive interface for configuring match details.


81-216: Added detailed cell views and stepper action buttons for interactive configuration of match overs. This improves the usability and functionality of the match setup process.

style/lib/theme/colors.dart (1)

48-63: Updated the inputDecorationTheme for both light and dark themes to include a custom error border style. This enhances the visual feedback for error states in input fields across the application.

Also applies to: 91-106

khelo/lib/ui/flow/matches/add_match/power_play/power_play_screen.dart (1)

146-146: Ensure the reset functionality aligns with user expectations.

Please verify that the reset button's functionality correctly clears the selected overs without affecting other settings.

Also applies to: 180-184

Verification successful

The onResetButtonTap method in power_play_view_model.dart correctly clears the selected overs for the specified power play type without affecting other settings. Here is the relevant implementation:

void onResetButtonTap(PowerPlayType powerPlay) {
  if (powerPlay == PowerPlayType.one) {
    state = state.copyWith(firstPowerPlay: []);
  } else if (powerPlay == PowerPlayType.two) {
    state = state.copyWith(secondPowerPlay: []);
  } else if (powerPlay == PowerPlayType.three) {
    state = state.copyWith(thirdPowerPlay: []);
  }
}

This method ensures that only the selected power play type's overs are reset, leaving other settings intact.

  • firstPowerPlay, secondPowerPlay, and thirdPowerPlay are reset based on the powerPlay type.
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the reset functionality for power play settings.

# Test: Check if the reset button correctly clears the selected overs.
rg --type python $'onResetButtonTap'

Length of output: 66



Script:

#!/bin/bash
# Description: Verify the reset functionality for power play settings.

# Test: Check if the reset button correctly clears the selected overs.
rg --type dart 'onResetButtonTap'

Length of output: 289



Script:

#!/bin/bash
# Description: Extract the implementation of the onResetButtonTap method.

# Extract the implementation of the onResetButtonTap method in Dart.
ast-grep --lang dart --pattern 'void onResetButtonTap(PowerPlayType powerPlay) { $$$ }'

Length of output: 89



Script:

#!/bin/bash
# Description: Extract the implementation of the onResetButtonTap method.

# Search for the onResetButtonTap method in the power_play_view_model.dart file and extract its implementation.
rg --type dart --context 10 'void onResetButtonTap' khelo/lib/ui/flow/matches/add_match/power_play/power_play_view_model.dart

Length of output: 810

khelo/lib/ui/flow/matches/add_match/add_match_view_model.dart (1)

250-270: Validate the logic for incrementing and decrementing over counts.

Ensure that the logic correctly handles edge cases, such as not allowing the count to exceed a maximum value or drop below a minimum value.

Verification successful

The logic for incrementing and decrementing over counts in add_match_view_model.dart appears to be correctly implemented. The code ensures that the overCount does not exceed 999 when incrementing and does not drop below 1 when decrementing.

  • The overCount is incremented only if isAdd is true and overCount is less than 999.
  • The overCount is decremented only if isAdd is false and overCount is greater than 1.

These conditions ensure that the overCount remains within the valid range.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the logic for incrementing and decrementing over counts.

# Test: Check if the over count does not exceed the maximum or drop below the minimum expected values.
rg --type python $'overCount'

Length of output: 59



Script:

#!/bin/bash
# Description: Verify the logic for incrementing and decrementing over counts.

# Test: Check if the over count does not exceed the maximum or drop below the minimum expected values.
rg --type dart 'overCount'

Length of output: 8109

khelo/lib/ui/flow/settings/edit_profile/edit_profile_screen.dart (1)

170-171: Ensure the transparency of border colors is intentional.

Confirm that the use of transparent borders is consistent and intentional across the application, especially in contexts where user focus is important.

Verification successful

The use of transparent border colors is consistent across multiple instances in the codebase, indicating that it is likely intentional.

  • khelo/lib/ui/flow/matches/add_match/match_officials/search_user/search_user_screen.dart: focusColor: Colors.transparent, unFocusColor: Colors.transparent
  • khelo/lib/ui/flow/settings/edit_profile/edit_profile_screen.dart: focusColor: Colors.transparent, unFocusColor: Colors.transparent

This pattern suggests that the transparency of border colors is a deliberate design choice.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the intention behind setting border colors to transparent.

# Test: Check if other similar input fields also use transparent borders.
rg --type python $'BorderColor'

Length of output: 61



Script:

#!/bin/bash
# Description: Verify the intention behind setting border colors to transparent.

# Test: Check if other similar input fields also use transparent borders.
rg --type dart $'BorderColor'

Length of output: 551



Script:

#!/bin/bash
# Description: Extract lines where BorderColor is used to verify if transparent colors are consistently applied.

# Extract lines from the identified files
rg --type dart --line-number 'BorderColor' style/lib/text/app_text_field.dart khelo/lib/ui/flow/settings/edit_profile/edit_profile_screen.dart khelo/lib/ui/flow/matches/add_match/add_match_screen.dart khelo/lib/ui/flow/matches/add_match/match_officials/search_user/search_user_screen.dart

Length of output: 834



Script:

#!/bin/bash
# Description: Extract lines around the instantiation of BorderColor to verify if transparent colors are consistently applied.

# Extract lines around the instantiation of BorderColor
rg --type dart --context 5 'BorderColor' style/lib/text/app_text_field.dart khelo/lib/ui/flow/settings/edit_profile/edit_profile_screen.dart khelo/lib/ui/flow/matches/add_match/add_match_screen.dart khelo/lib/ui/flow/matches/add_match/match_officials/search_user/search_user_screen.dart

Length of output: 5299

khelo/lib/ui/flow/matches/add_match/add_match_screen.dart (1)

4-33: Ensure all new imports are utilized effectively within the file.

Check if all imports are necessary and used within the file, and remove any that are not needed to optimize the codebase.

Verification successful

All newly imported modules in add_match_screen.dart are utilized effectively within the file.

  • The script verified the usage of each imported module by searching for their occurrences in the file.
  • Each import statement was found to be used within the file, confirming their necessity.
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that all newly imported modules are used effectively.

# Test: Check for unused imports and potential redundancies.
rg --type python $'import'

Length of output: 56



Script:

#!/bin/bash
# Description: Verify that all newly imported modules in add_match_screen.dart are used effectively.

# Step 1: Identify all import statements in the file.
imports=$(rg --no-filename --only-matching '^import .+;$' khelo/lib/ui/flow/matches/add_match/add_match_screen.dart)

# Step 2: Check if each imported module is used within the file.
for import in $imports; do
  # Extract the module name from the import statement.
  module=$(echo $import | sed -E "s/^import '([^']+)';$/\1/")
  # Search for the module usage in the file.
  rg --no-heading --line-number "$module" khelo/lib/ui/flow/matches/add_match/add_match_screen.dart
done

Length of output: 90502

Comment on lines 187 to 223
TeamSelectionView(notifier: notifier, state: state),
const SizedBox(
height: 24,
),
const Divider(),
_capsuleOptionList(context, notifier, state, false),
SectionTitle(
title: context.l10n.add_match_match_type_title,
trailing: _matchTypeButton(
context,
state,
notifier.onMatchTypeSelection,
)),
const SizedBox(
height: 24,
),
_overDetail(context, notifier, state),
OverDetailView(notifier: notifier, state: state),
const SizedBox(
height: 24,
),
_powerPlayButton(context, notifier, state),
const SizedBox(
height: 24,
height: 16,
),
_inputField(
context: context,
controller: state.cityController,
hintText: context.l10n.add_match_city_title,
controller: state.groundController,
hintText: context.l10n.add_match_ground_title,
onChange: () => notifier.onTextChange(),
),
const SizedBox(
height: 24,
height: 16,
),
_inputField(
context: context,
controller: state.groundController,
hintText: context.l10n.add_match_ground_title,
controller: state.cityController,
hintText: context.l10n.add_match_city_title,
onChange: () => notifier.onTextChange(),
),
_matchDateTime(context, notifier, state),
_ballTypeList(context, notifier, state),
_capsuleOptionList(context, notifier, state, true),
_matchOfficialsList(context, notifier, state),
_matchScheduleView(context, notifier, state),
BallSelectionView(notifier: notifier, state: state),
PitchSelectionView(notifier: notifier, state: state),
MatchOfficialSelectionView(notifier: notifier, state: state),
Copy link

Choose a reason for hiding this comment

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

Optimize the layout and structure of the match details input fields.

Consider restructuring the layout to improve readability and user interaction. Group related fields and ensure that the UI is intuitive for the user.

@canopas canopas deleted a comment from coderabbitai bot May 24, 2024
@cp-mayank
Copy link
Collaborator

Can you please use Material icon instead of assets like plus,minus,close.

Also AddMatch screen Why two time initialized notifier ?

@cp-mayank
Copy link
Collaborator

cp-mayank commented May 27, 2024

Can you reduce top space

extra_space

top_padding

@cp-mayank
Copy link
Collaborator

I think we need to ball box same size according to figma.

ball_type

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: 2

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 46825e1 and 596f773.
Files selected for processing (13)
  • khelo/lib/components/user_detail_cell.dart (1 hunks)
  • khelo/lib/gen/assets.gen.dart (1 hunks)
  • khelo/lib/ui/flow/matches/add_match/add_match_screen.dart (8 hunks)
  • khelo/lib/ui/flow/matches/add_match/components/ball_selection_view.dart (1 hunks)
  • khelo/lib/ui/flow/matches/add_match/components/over_detail_view.dart (1 hunks)
  • khelo/lib/ui/flow/matches/add_match/components/pitch_selection_view.dart (1 hunks)
  • khelo/lib/ui/flow/matches/add_match/components/team_selection_view.dart (1 hunks)
  • khelo/lib/ui/flow/matches/add_match/match_officials/components/officials_cell_view.dart (1 hunks)
  • khelo/lib/ui/flow/matches/add_match/power_play/power_play_screen.dart (5 hunks)
  • khelo/lib/ui/flow/matches/add_match/select_squad/components/select_admin_and_captain_dialog.dart (4 hunks)
  • khelo/lib/ui/flow/matches/add_match/select_squad/select_squad_screen.dart (8 hunks)
  • khelo/lib/ui/flow/settings/edit_profile/edit_profile_screen.dart (7 hunks)
  • style/lib/widgets/adaptive_outlined_tile.dart (1 hunks)
Files skipped from review as they are similar to previous changes (11)
  • khelo/lib/components/user_detail_cell.dart
  • khelo/lib/gen/assets.gen.dart
  • khelo/lib/ui/flow/matches/add_match/components/ball_selection_view.dart
  • khelo/lib/ui/flow/matches/add_match/components/over_detail_view.dart
  • khelo/lib/ui/flow/matches/add_match/components/pitch_selection_view.dart
  • khelo/lib/ui/flow/matches/add_match/components/team_selection_view.dart
  • khelo/lib/ui/flow/matches/add_match/match_officials/components/officials_cell_view.dart
  • khelo/lib/ui/flow/matches/add_match/power_play/power_play_screen.dart
  • khelo/lib/ui/flow/matches/add_match/select_squad/components/select_admin_and_captain_dialog.dart
  • khelo/lib/ui/flow/matches/add_match/select_squad/select_squad_screen.dart
  • khelo/lib/ui/flow/settings/edit_profile/edit_profile_screen.dart
Additional comments not posted (5)
style/lib/widgets/adaptive_outlined_tile.dart (1)

7-88: The implementation of AdaptiveOutlinedTile looks clean and follows good Flutter practices.

khelo/lib/ui/flow/matches/add_match/add_match_screen.dart (4)

115-119: The structure of the Stack widget is appropriate for overlaying elements, ensuring that the sticky button remains accessible. Good use of layout widgets.


4-33: Ensure that all new imports are necessary and used within the file to avoid unnecessary dependencies.

Verification successful

All newly imported packages are used within the file.

  • SvgPicture from flutter_svg is used.
  • ActionBottomSheet from action_bottom_sheet is used.
  • BallSelectionView, MatchOfficialSelectionView, OverDetailView, PitchSelectionView, SectionTitle, and TeamSelectionView from their respective imports are used.
  • ActionButton, BottomStickyOverlay, PrimaryButton, AppTextField, and AdaptiveOutlinedTile from their respective imports are used.
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that all newly imported packages are used in the file.

# Test: Search for the usage of each new import. Expect: At least one occurrence of each import.
rg --type dart 'flutter_svg|action_bottom_sheet|ball_selection_view|match_official_selection_view|over_detail_view|pitch_selection_view|section_title|team_selection_view|action_button|bottom_sticky_overlay|primary_button|app_text_field|adaptive_outlined_tile' khelo/lib/ui/flow/matches/add_match/add_match_screen.dart

Length of output: 1212



Script:

#!/bin/bash
# Description: Verify that all newly imported packages are used in the file.

# Test: Search for the usage of each new import. Expect: At least one occurrence of each import.
rg --type dart 'SvgPicture|ActionBottomSheet|BallSelectionView|MatchOfficialSelectionView|OverDetailView|PitchSelectionView|SectionTitle|TeamSelectionView|ActionButton|BottomStickyOverlay|PrimaryButton|AppTextField|AdaptiveOutlinedTile' khelo/lib/ui/flow/matches/add_match/add_match_screen.dart

Length of output: 1124


316-329: The _stickyButton widget correctly uses the BottomStickyOverlay for fixed positioning. Ensure that the PrimaryButton's state management is robust, especially in error scenarios.

Verification successful

The PrimaryButton component does not include internal error handling mechanisms. It relies on the caller to manage any error scenarios through the onPressed callback.

  • The PrimaryButton class is defined in style/lib/button/primary_button.dart.
  • Error handling should be implemented by the caller of the onPressed callback.
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the error handling in the `PrimaryButton` component.

# Test: Search for error handling logic in the `PrimaryButton` implementation. Expect: Comprehensive error handling.
rg --type dart 'PrimaryButton' style/lib/button/

Length of output: 191



Script:

#!/bin/bash
# Extract the full implementation of the PrimaryButton class to inspect error handling.
ast-grep --lang dart --pattern $'class PrimaryButton extends StatelessWidget {
  $$$
}' style/lib/button/primary_button.dart

Length of output: 5499


183-216: The layout of the main content in _body is well-structured. However, ensure that all widgets like TeamSelectionView, OverDetailView, etc., are optimized for performance, especially in list views.

Verification successful

The constructors of the identified widgets (TeamSelectionView, OverDetailView, BallSelectionView, PitchSelectionView, and MatchOfficialSelectionView) all include the use of super.key, which is a good practice for performance optimization in Flutter. Additionally, the use of CachedNetworkImage in team_selection_view.dart indicates some level of performance consideration.

  • TeamSelectionView: Uses super.key and CachedNetworkImage.
  • PitchSelectionView: Uses super.key.
  • OverDetailView: Uses super.key.
  • MatchOfficialSelectionView: Uses super.key.
  • BallSelectionView: Uses super.key.

These findings suggest that the widgets are optimized for performance with the use of keys and caching where applicable.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Check for performance optimizations in custom widgets used in the list.

# Test: Search for performance hints in widget implementations. Expect: Proper use of keys, memoization, etc.
rg --type dart 'TeamSelectionView|OverDetailView|BallSelectionView|PitchSelectionView|MatchOfficialSelectionView' khelo/lib/ui/flow/matches/add_match/components/

Length of output: 1303



Script:

#!/bin/bash
# Description: Check for performance optimizations in custom widgets used in the list.

# Test: Search for the use of keys in the widget constructors.
rg --type dart 'const TeamSelectionView|const OverDetailView|const BallSelectionView|const PitchSelectionView|const MatchOfficialSelectionView' khelo/lib/ui/flow/matches/add_match/components/ | rg 'Key'

# Test: Search for memoization techniques or other performance-related practices.
rg --type dart 'memoization|cache|optimize|performance' khelo/lib/ui/flow/matches/add_match/components/

Length of output: 445



Script:

#!/bin/bash
# Description: Extract constructors of the identified widgets for manual inspection.

# Extract constructors of the identified widgets.
rg --type dart 'class TeamSelectionView|class OverDetailView|class BallSelectionView|class PitchSelectionView|class MatchOfficialSelectionView' khelo/lib/ui/flow/matches/add_match/components/ -A 10

Length of output: 5463

@canopas canopas deleted a comment from coderabbitai bot May 27, 2024
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: 4

Outside diff range and nitpick comments (2)
khelo/lib/ui/flow/matches/add_match/add_match_screen.dart (2)

294-312: The _inputField widget is well-implemented with appropriate styling and input formatters. Consider adding comments to explain the purpose of each parameter for better readability.


Line range hint 376-438: The date and time selection methods are implemented correctly. Consider adding error handling for cases where the date or time picker is dismissed without selection.

- if (selectedDate != null) {
+ if (selectedDate != null && selectedTime != null) {
Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 596f773 and f969368.
Files selected for processing (5)
  • khelo/assets/locales/app_en.arb (2 hunks)
  • khelo/lib/gen/assets.gen.dart (1 hunks)
  • khelo/lib/ui/flow/matches/add_match/add_match_screen.dart (8 hunks)
  • khelo/lib/ui/flow/matches/add_match/match_officials/add_match_officials_screen.dart (5 hunks)
  • khelo/lib/ui/flow/matches/add_match/power_play/power_play_screen.dart (6 hunks)
Files skipped from review as they are similar to previous changes (4)
  • khelo/assets/locales/app_en.arb
  • khelo/lib/gen/assets.gen.dart
  • khelo/lib/ui/flow/matches/add_match/match_officials/add_match_officials_screen.dart
  • khelo/lib/ui/flow/matches/add_match/power_play/power_play_screen.dart
Additional comments not posted (5)
khelo/lib/ui/flow/matches/add_match/add_match_screen.dart (5)

4-33: Imports are well-organized and relevant to the functionality of the screen.


115-122: Ensure that the body of the screen is wrapped in a Builder to optimize the build process by limiting the scope of rebuilds.


152-164: The _deleteMatchButton method uses an SVG asset for the delete icon, which aligns with the suggestion to use Material icons. However, ensure that the asset is optimized for performance.


225-239: The showCheckMark method efficiently handles the conditional rendering of SVG assets. Ensure that the assets are cached for better performance.


322-330: The _stickyButton method correctly implements a primary button with conditional behavior based on the error state. Ensure that the error handling is consistent across the application.

Comment on lines +131 to +132
return actionButton(
context,
Copy link

Choose a reason for hiding this comment

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

The implementation of _scheduleMatchButton correctly handles the conditional display of error messages. However, consider abstracting repeated logic such as error handling into a separate method to enhance maintainability.

- showErrorSnackBar(
-   context: context,
-   error: saveBtnError.getString(context),
- );
+ _handleError(context, saveBtnError);

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
return actionButton(
context,
return actionButton(
context,
_handleError(context, saveBtnError);

Comment on lines +242 to +281
notifier.onSquadSelect(type, squad);
}
},
child: Text(
context.l10n.add_match_select_squad_title,
style: AppTextStyle.button.copyWith(
color: isValidSquad
? context.colorScheme.primary
: context.colorScheme.alert),
));
}

Widget _sectionTitle(BuildContext context, String title) {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(
height: 24,
),
Text(
title,
style: AppTextStyle.header1
.copyWith(color: context.colorScheme.textSecondary),
),
const SizedBox(
height: 16,
),
],
),
);
}

Widget _matchDateTime(
BuildContext context,
AddMatchViewNotifier notifier,
AddMatchViewState state,
) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_sectionTitle(context, context.l10n.add_match_match_schedule_title),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: OnTapScale(
onTap: () => _selectDateTime(context, notifier, state),
child: Text.rich(TextSpan(children: [
WidgetSpan(
child: Padding(
padding: const EdgeInsets.only(right: 8.0),
child: Icon(Icons.calendar_today,
color: context.colorScheme.textPrimary),
),
),
TextSpan(
text: state.matchTime
.format(context, DateFormatType.dateAndTime),
style: AppTextStyle.subtitle1.copyWith(
color: context.colorScheme.textSecondary, fontSize: 22)),
])),
),
onTap: () {
showActionBottomSheet(
context: context,
items: MatchType.values
.map((type) => BottomSheetAction(
title: type.getString(context),
child: showCheckMark(
context,
showCheck: state.matchType == type,
),
onTap: () {
context.pop();
onTap(type);
},
))
.toList());
},
child: Container(
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 16),
decoration: BoxDecoration(
color: context.colorScheme.primary,
borderRadius: BorderRadius.circular(30),
),
],
child: Row(children: [
Text(state.matchType.getString(context),
style: AppTextStyle.body2
.copyWith(color: context.colorScheme.onPrimary)),
const SizedBox(width: 8),
SvgPicture.asset(
Assets.images.icArrowDown,
height: 18,
width: 18,
colorFilter: ColorFilter.mode(
context.colorScheme.onPrimary, BlendMode.srcATop),
)
]),
),
Copy link

Choose a reason for hiding this comment

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

The _matchTypeButton method provides a good user experience by allowing selection from a bottom sheet. However, ensure that the onTap method is debounced to prevent multiple rapid taps.

+ import 'package:flutter/foundation.dart';

- onTap: () {
+ onTap: debounce(() {

Committable suggestion was skipped due low confidence.

Comment on lines +335 to +372
)),
),
],
);
}

Widget _matchOfficialsCell({
required BuildContext context,
required AddMatchViewNotifier notifier,
required AddMatchViewState state,
required String title,
required String image,
}) {
return OnTapScale(
onTap: () async {
final officials =
await AppRoute.addMatchOfficials(officials: state.officials)
.push<List<Officials>>(context);
if (officials != null && context.mounted) {
notifier.setOfficials(officials);
}
},
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: Container(
height: 110,
width: 110,
alignment: Alignment.center,
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
border: Border.all(
color: context.colorScheme.containerNormalOnSurface),
shape: BoxShape.circle,
color: context.colorScheme.containerLowOnSurface,
SectionTitle(title: context.l10n.add_match_match_schedule_title),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Row(
children: [
Expanded(
child: AdaptiveOutlinedTile(
title: state.matchTime.format(context, DateFormatType.date),
headerImage: Assets.images.icCalendar,
headerText: context.l10n.add_match_date_title,
placeholder: context.l10n.add_match_date_title,
onTap: () {
_selectDate(context, notifier, state);
}),
),
child: Image.asset(
image,
fit: BoxFit.cover,
color: context.colorScheme.textDisabled,
const SizedBox(width: 16),
Expanded(
child: AdaptiveOutlinedTile(
title: state.matchTime.format(context, DateFormatType.time),
headerImage: Assets.images.icTime,
headerText: context.l10n.add_match_time_title,
placeholder: context.l10n.add_match_time_title,
onTap: () {
_selectTime(context, notifier, state);
}),
),
),
),
const SizedBox(
height: 8,
],
),
Text(
title,
textAlign: TextAlign.center,
style: AppTextStyle.subtitle1
.copyWith(color: context.colorScheme.textSecondary),
)
],
),
);
}

Widget _stickyButton(
BuildContext context,
AddMatchViewNotifier notifier,
AddMatchViewState state,
) {
return BottomStickyOverlay(
child: PrimaryButton(
context.l10n.add_match_start_match_title,
progress: state.isAddMatchInProgress,
onPressed: () => state.startBtnError != null
? showErrorSnackBar(
context: context,
error: state.startBtnError!.getString(context))
: notifier.addMatch(startMatch: true),
),
),
],
Copy link

Choose a reason for hiding this comment

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

The _matchScheduleView method is well-structured. Consider using a more flexible layout to accommodate different screen sizes.

- const EdgeInsets.symmetric(horizontal: 16.0),
+ EdgeInsets.symmetric(horizontal: context.size.width * 0.05),

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
Widget _matchScheduleView(
BuildContext context,
AddMatchViewNotifier notifier,
AddMatchViewState state,
) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_sectionTitle(context, context.l10n.add_match_match_officials_title),
SizedBox(
height: 120,
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(
children: [
const SizedBox(
width: 16,
),
_matchOfficialsCell(
context: context,
notifier: notifier,
state: state,
title: context.l10n.add_match_officials_umpires_title,
image: "assets/images/ic_umpire.png",
),
_matchOfficialsCell(
context: context,
notifier: notifier,
state: state,
title: context.l10n.add_match_officials_scorers_title,
image: "assets/images/ic_scorer.png",
),
_matchOfficialsCell(
context: context,
notifier: notifier,
state: state,
title:
context.l10n.add_match_officials_live_streamers_title,
image: "assets/images/ic_streamer.png",
),
_matchOfficialsCell(
context: context,
notifier: notifier,
state: state,
title: context.l10n.add_match_officials_others_title,
image: "assets/images/ic_other_official.png",
),
const SizedBox(
width: 16,
),
],
)),
),
],
);
}
Widget _matchOfficialsCell({
required BuildContext context,
required AddMatchViewNotifier notifier,
required AddMatchViewState state,
required String title,
required String image,
}) {
return OnTapScale(
onTap: () async {
final officials =
await AppRoute.addMatchOfficials(officials: state.officials)
.push<List<Officials>>(context);
if (officials != null && context.mounted) {
notifier.setOfficials(officials);
}
},
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: Container(
height: 110,
width: 110,
alignment: Alignment.center,
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
border: Border.all(
color: context.colorScheme.containerNormalOnSurface),
shape: BoxShape.circle,
color: context.colorScheme.containerLowOnSurface,
SectionTitle(title: context.l10n.add_match_match_schedule_title),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Row(
children: [
Expanded(
child: AdaptiveOutlinedTile(
title: state.matchTime.format(context, DateFormatType.date),
headerImage: Assets.images.icCalendar,
headerText: context.l10n.add_match_date_title,
placeholder: context.l10n.add_match_date_title,
onTap: () {
_selectDate(context, notifier, state);
}),
),
child: Image.asset(
image,
fit: BoxFit.cover,
color: context.colorScheme.textDisabled,
const SizedBox(width: 16),
Expanded(
child: AdaptiveOutlinedTile(
title: state.matchTime.format(context, DateFormatType.time),
headerImage: Assets.images.icTime,
headerText: context.l10n.add_match_time_title,
placeholder: context.l10n.add_match_time_title,
onTap: () {
_selectTime(context, notifier, state);
}),
),
),
),
const SizedBox(
height: 8,
],
),
Text(
title,
textAlign: TextAlign.center,
style: AppTextStyle.subtitle1
.copyWith(color: context.colorScheme.textSecondary),
)
],
),
);
}
Widget _stickyButton(
BuildContext context,
AddMatchViewNotifier notifier,
AddMatchViewState state,
) {
return BottomStickyOverlay(
child: PrimaryButton(
context.l10n.add_match_start_match_title,
progress: state.isAddMatchInProgress,
onPressed: () => state.startBtnError != null
? showErrorSnackBar(
context: context,
error: state.startBtnError!.getString(context))
: notifier.addMatch(startMatch: true),
),
),
],
Widget _matchScheduleView(
BuildContext context,
AddMatchViewNotifier notifier,
AddMatchViewState state,
) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SectionTitle(title: context.l10n.add_match_match_schedule_title),
Padding(
padding: EdgeInsets.symmetric(horizontal: context.size.width * 0.05),
child: Row(
children: [
Expanded(
child: AdaptiveOutlinedTile(
title: state.matchTime.format(context, DateFormatType.date),
headerImage: Assets.images.icCalendar,
headerText: context.l10n.add_match_date_title,
placeholder: context.l10n.add_match_date_title,
onTap: () {
_selectDate(context, notifier, state);
}),
),
const SizedBox(width: 16),
Expanded(
child: AdaptiveOutlinedTile(
title: state.matchTime.format(context, DateFormatType.time),
headerImage: Assets.images.icTime,
headerText: context.l10n.add_match_time_title,
placeholder: context.l10n.add_match_time_title,
onTap: () {
_selectTime(context, notifier, state);
}),
),
],
),
),
],

Comment on lines +183 to +220
padding: context.mediaQueryPadding +
BottomStickyOverlay.padding +
const EdgeInsets.symmetric(vertical: 24),
children: [
_selectTeam(context, notifier, state),
TeamSelectionView(notifier: notifier, state: state),
const SizedBox(
height: 24,
),
const Divider(),
_capsuleOptionList(context, notifier, state, false),
SectionTitle(
title: context.l10n.add_match_match_type_title,
trailing: _matchTypeButton(
context,
state,
notifier.onMatchTypeSelection,
)),
OverDetailView(notifier: notifier, state: state),
const SizedBox(
height: 24,
),
_overDetail(context, notifier, state),
const SizedBox(
height: 24,
),
_powerPlayButton(context, notifier, state),
const SizedBox(
height: 24,
height: 16,
),
_inputField(
context: context,
controller: state.cityController,
hintText: context.l10n.add_match_city_title,
controller: state.groundController,
hintText: context.l10n.add_match_ground_title,
onChange: () => notifier.onTextChange(),
),
const SizedBox(
height: 24,
height: 16,
),
_inputField(
context: context,
controller: state.groundController,
hintText: context.l10n.add_match_ground_title,
controller: state.cityController,
hintText: context.l10n.add_match_city_title,
onChange: () => notifier.onTextChange(),
),
_matchDateTime(context, notifier, state),
_ballTypeList(context, notifier, state),
_capsuleOptionList(context, notifier, state, true),
_matchOfficialsList(context, notifier, state),
const SizedBox(
height: 24,
),
_matchScheduleView(context, notifier, state),
BallSelectionView(notifier: notifier, state: state),
PitchSelectionView(notifier: notifier, state: state),
MatchOfficialSelectionView(notifier: notifier, state: state),
Copy link

Choose a reason for hiding this comment

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

The layout of the match details is well-structured, but consider reducing the vertical spacing to address the comment about excessive top space.

- const EdgeInsets.symmetric(vertical: 24),
+ const EdgeInsets.symmetric(vertical: 16),

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
padding: context.mediaQueryPadding +
BottomStickyOverlay.padding +
const EdgeInsets.symmetric(vertical: 24),
children: [
_selectTeam(context, notifier, state),
TeamSelectionView(notifier: notifier, state: state),
const SizedBox(
height: 24,
),
const Divider(),
_capsuleOptionList(context, notifier, state, false),
SectionTitle(
title: context.l10n.add_match_match_type_title,
trailing: _matchTypeButton(
context,
state,
notifier.onMatchTypeSelection,
)),
OverDetailView(notifier: notifier, state: state),
const SizedBox(
height: 24,
),
_overDetail(context, notifier, state),
const SizedBox(
height: 24,
),
_powerPlayButton(context, notifier, state),
const SizedBox(
height: 24,
height: 16,
),
_inputField(
context: context,
controller: state.cityController,
hintText: context.l10n.add_match_city_title,
controller: state.groundController,
hintText: context.l10n.add_match_ground_title,
onChange: () => notifier.onTextChange(),
),
const SizedBox(
height: 24,
height: 16,
),
_inputField(
context: context,
controller: state.groundController,
hintText: context.l10n.add_match_ground_title,
controller: state.cityController,
hintText: context.l10n.add_match_city_title,
onChange: () => notifier.onTextChange(),
),
_matchDateTime(context, notifier, state),
_ballTypeList(context, notifier, state),
_capsuleOptionList(context, notifier, state, true),
_matchOfficialsList(context, notifier, state),
const SizedBox(
height: 24,
),
_matchScheduleView(context, notifier, state),
BallSelectionView(notifier: notifier, state: state),
PitchSelectionView(notifier: notifier, state: state),
MatchOfficialSelectionView(notifier: notifier, state: state),
padding: context.mediaQueryPadding +
BottomStickyOverlay.padding +
const EdgeInsets.symmetric(vertical: 16),
children: [
TeamSelectionView(notifier: notifier, state: state),
const SizedBox(
height: 24,
),
SectionTitle(
title: context.l10n.add_match_match_type_title,
trailing: _matchTypeButton(
context,
state,
notifier.onMatchTypeSelection,
)),
OverDetailView(notifier: notifier, state: state),
const SizedBox(
height: 16,
),
_inputField(
context: context,
controller: state.groundController,
hintText: context.l10n.add_match_ground_title,
onChange: () => notifier.onTextChange(),
),
const SizedBox(
height: 16,
),
_inputField(
context: context,
controller: state.cityController,
hintText: context.l10n.add_match_city_title,
onChange: () => notifier.onTextChange(),
),
_matchScheduleView(context, notifier, state),
BallSelectionView(notifier: notifier, state: state),
PitchSelectionView(notifier: notifier, state: state),
MatchOfficialSelectionView(notifier: notifier, state: state),

@cp-sidhdhi-p cp-sidhdhi-p merged commit 5545e2e into main May 28, 2024
1 check passed
@cp-sidhdhi-p cp-sidhdhi-p deleted the sidhdhi/redesign-add-match branch May 28, 2024 04:37
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