• Bruno Leroux's avatar
    Add 'Share' button to the selection toolbar on Android (#139479) · e070417a
    Bruno Leroux authored
    ## Description
    
    This PR adds the 'Share' button to the text selection toolbar on Android.
    
    ## Related Issue
    
    Fixes https://github.com/flutter/flutter/issues/138728
    
    ## Tests
    
    Refactor a lot of existing tests in order to:
    - make them more readable (avoid duplication by introducing helper functions, specify explictly check which buttons are expected).
    - make them more accurate (check that expected buttons are visible instead of just checking the number of buttons).
    
    For instance, previous tests contained sections such as:
    
    ```dart
    
          // Collapsed toolbar shows 3 buttons.
          expect(
            find.byType(CupertinoButton),
            isContextMenuProvidedByPlatform ? findsNothing : isTargetPlatformIOS ? findsNWidgets(6) : findsNWidgets(3)
          );
    
    ```
    
    Where the comment is obsolete, the two cases (6 widgets and 3 widgets) are not explicit (which buttons are expected?), and not accurate (will pass if the number of buttons is right but the buttons are the wrong ones).
    e070417a
Name
Last commit
Last update
..
material Loading commit data...
README.md Loading commit data...
action_sheet_test.dart Loading commit data...
activity_indicator_test.dart Loading commit data...
adaptive_text_selection_toolbar_test.dart Loading commit data...
app_test.dart Loading commit data...
bottom_tab_bar_test.dart Loading commit data...
button_test.dart Loading commit data...
checkbox_test.dart Loading commit data...
colors_test.dart Loading commit data...
context_menu_action_test.dart Loading commit data...
context_menu_test.dart Loading commit data...
date_picker_test.dart Loading commit data...
debug_test.dart Loading commit data...
desktop_text_selection_toolbar_button_test.dart Loading commit data...
desktop_text_selection_toolbar_test.dart Loading commit data...
dialog_test.dart Loading commit data...
form_row_test.dart Loading commit data...
form_section_test.dart Loading commit data...
icon_theme_data_test.dart Loading commit data...
list_section_test.dart Loading commit data...
list_tile_test.dart Loading commit data...
localizations_test.dart Loading commit data...
magnifier_test.dart Loading commit data...
nav_bar_test.dart Loading commit data...
nav_bar_transition_test.dart Loading commit data...
page_test.dart Loading commit data...
picker_test.dart Loading commit data...
radio_test.dart Loading commit data...
refresh_test.dart Loading commit data...
route_test.dart Loading commit data...
scaffold_test.dart Loading commit data...
scrollbar_paint_test.dart Loading commit data...
scrollbar_test.dart Loading commit data...
search_field_test.dart Loading commit data...
segmented_control_test.dart Loading commit data...
slider_test.dart Loading commit data...
sliding_segmented_control_test.dart Loading commit data...
spell_check_suggestions_toolbar_test.dart Loading commit data...
switch_test.dart Loading commit data...
tab_scaffold_test.dart Loading commit data...
tab_test.dart Loading commit data...
text_field_restoration_test.dart Loading commit data...
text_field_test.dart Loading commit data...
text_form_field_row_test.dart Loading commit data...
text_selection_test.dart Loading commit data...
text_selection_toolbar_button_test.dart Loading commit data...
text_selection_toolbar_test.dart Loading commit data...
text_theme_test.dart Loading commit data...
theme_test.dart Loading commit data...