-
Notifications
You must be signed in to change notification settings - Fork 3
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
Conversation
WalkthroughThe 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
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this 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 thewidgetWidth
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
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 ofSectionTitle
is clean and follows Flutter's best practices for creating reusable UI components. The dynamic text color adaptation usingcontext.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 ofMatchOfficialSelectionView
is robust, especially the use ofcontext.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 ofImageAvatar
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 ofOnTapScale
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 forassets.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 theBallSelectionView
.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 theOfficialsCellView
.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 theAddMatchOfficialsScreen
.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 theSelectAdminAndCaptainDialog
.style/lib/text/app_text_field.dart (1)
Line range hint
33-64
: Enhancements toAppTextField
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 fromimage_avatar.dart
touser_detail_cell.dart
to use the newUserDetailCell
component.
14-14
: ReplacedTextField
withAppTextField
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 useUserDetailCell
, 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 foric_calendar.svg
. Ensures that the calendar icon is available for use in UI components.
42-44
: Added asset path foric_close.svg
. This is used for close buttons across the application.
45-47
: Added asset path foric_commentator.svg
. Supports new features related to displaying commentator information.
52-56
: Added asset paths foric_minus.svg
andic_plus.svg
. These are used for increment and decrement buttons in UI components.
58-62
: Added asset path foric_referee.svg
andic_scorer.svg
. These icons are crucial for the match officials management feature.
70-74
: Added asset path foric_search.svg
andic_time.svg
. These icons are used in search bars and time selection components.
76-78
: Added asset path foric_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 forcached_network_image
andteam_model.dart
, and defined theTeamSelectionView
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 includeSvgPicture
for rendering SVG assets andaction_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 useUserDetailCell
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 theOverDetailView
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 theinputDecorationTheme
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 inpower_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
, andthirdPowerPlay
are reset based on thepowerPlay
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.dartLength 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 theoverCount
does not exceed 999 when incrementing and does not drop below 1 when decrementing.
- The
overCount
is incremented only ifisAdd
is true andoverCount
is less than 999.- The
overCount
is decremented only ifisAdd
is false andoverCount
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.dartLength 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.dartLength 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 doneLength of output: 90502
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), |
There was a problem hiding this comment.
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.
Can you please use Material icon instead of assets like plus,minus,close. Also AddMatch screen Why two time initialized notifier ? |
khelo/lib/ui/flow/matches/add_match/components/team_selection_view.dart
Outdated
Show resolved
Hide resolved
khelo/lib/ui/flow/matches/add_match/components/pitch_selection_view.dart
Outdated
Show resolved
Hide resolved
khelo/lib/ui/flow/matches/add_match/components/pitch_selection_view.dart
Outdated
Show resolved
Hide resolved
# Conflicts: # khelo/lib/gen/assets.gen.dart
There was a problem hiding this 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
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 ofAdaptiveOutlinedTile
looks clean and follows good Flutter practices.khelo/lib/ui/flow/matches/add_match/add_match_screen.dart (4)
115-119
: The structure of theStack
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
fromflutter_svg
is used.ActionBottomSheet
fromaction_bottom_sheet
is used.BallSelectionView
,MatchOfficialSelectionView
,OverDetailView
,PitchSelectionView
,SectionTitle
, andTeamSelectionView
from their respective imports are used.ActionButton
,BottomStickyOverlay
,PrimaryButton
,AppTextField
, andAdaptiveOutlinedTile
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.dartLength 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.dartLength of output: 1124
316-329
: The_stickyButton
widget correctly uses theBottomStickyOverlay
for fixed positioning. Ensure that thePrimaryButton
'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 theonPressed
callback.
- The
PrimaryButton
class is defined instyle/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.dartLength of output: 5499
183-216
: The layout of the main content in_body
is well-structured. However, ensure that all widgets likeTeamSelectionView
,OverDetailView
, etc., are optimized for performance, especially in list views.Verification successful
The constructors of the identified widgets (
TeamSelectionView
,OverDetailView
,BallSelectionView
,PitchSelectionView
, andMatchOfficialSelectionView
) all include the use ofsuper.key
, which is a good practice for performance optimization in Flutter. Additionally, the use ofCachedNetworkImage
inteam_selection_view.dart
indicates some level of performance consideration.
TeamSelectionView
: Usessuper.key
andCachedNetworkImage
.PitchSelectionView
: Usessuper.key
.OverDetailView
: Usessuper.key
.MatchOfficialSelectionView
: Usessuper.key
.BallSelectionView
: Usessuper.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 10Length of output: 5463
There was a problem hiding this 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
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 aBuilder
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
: TheshowCheckMark
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.
return actionButton( | ||
context, |
There was a problem hiding this comment.
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.
return actionButton( | |
context, | |
return actionButton( | |
context, | |
_handleError(context, saveBtnError); |
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), | ||
) | ||
]), | ||
), |
There was a problem hiding this comment.
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.
)), | ||
), | ||
], | ||
); | ||
} | ||
|
||
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), | ||
), | ||
), | ||
], |
There was a problem hiding this comment.
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.
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); | |
}), | |
), | |
], | |
), | |
), | |
], |
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), |
There was a problem hiding this comment.
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.
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), |
Changes:
Redesign below screens:
Visual Evidence:
Summary by CodeRabbit
New Features
Bug Fixes
Style
Refactor