• fzyzcjy's avatar
    Fix `Null check operator used on a null value` on TextField with contextMenuBuilder (#128114) · eb2d9de0
    fzyzcjy authored
    Close #128113 
    
    Fun fact: This is caught by monkey testing I have written (will soon be open sourced as well) that runs on my app!
    
    Without the fix, the test fails as expected:
    
    <details>
    
    ```
    (base) ➜  flutter git:(feat/text-field-npe) /Volumes/MyExternal/ExternalRefCode/flutter/bin/flutter test test/material/text_field_test.dart --name 'changes from default'
    00:06 +0: context menu contextMenuBuilder changes from default to null                                                                
    ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
    The following _TypeError was thrown building
    _OverlayEntryWidget-[LabeledGlobalKey<_OverlayEntryWidgetState>#e3717](state:
    _OverlayEntryWidgetState#7666a):
    Null check operator used on a null value
    
    When the exception was thrown, this was the stack:
    #0      EditableTextState._createSelectionOverlay.<anonymous closure> (package:flutter/src/widgets/editable_text.dart:3331:43)
    #1      SelectionOverlay.showToolbar.<anonymous closure> (package:flutter/src/widgets/text_selection.dart:1357:36)
    #2      ContextMenuController.show.<anonymous closure> (package:flutter/src/widgets/context_menu_controller.dart:65:54)
    #3      _OverlayEntryWidgetState.build (package:flutter/src/widgets/overlay.dart:351:36)
    #4      StatefulElement.build (package:flutter/src/widgets/framework.dart:5198:27)
    #5      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5086:15)
    #6      StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
    #7      Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #8      StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
    #9      Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #10     RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:6093:32)
    #11     MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6595:17)
    #12     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #13     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #14     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
    #15     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #16     StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
    #17     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #18     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #19     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #20     ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #21     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #22     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #23     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #24     ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #25     _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:107:11)
    #26     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #27     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #28     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
    #29     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #30     StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
    #31     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #32     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #33     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #34     ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #35     _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:107:11)
    #36     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #37     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #38     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
    #39     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #40     StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
    #41     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #42     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #43     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
    #44     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #45     StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
    #46     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #47     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
    #48     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #49     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
    #50     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #51     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #52     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #53     ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #54     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #55     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #56     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
    #57     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #58     StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
    #59     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #60     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #61     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #62     ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #63     _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:107:11)
    #64     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #65     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
    #66     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #67     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #68     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
    #69     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #70     StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
    #71     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #72     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #73     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #74     ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #75     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #76     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #77     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #78     ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #79     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #80     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #81     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #82     ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #83     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #84     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #85     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #86     ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #87     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #88     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #89     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #90     StatelessElement.update (package:flutter/src/widgets/framework.dart:5162:5)
    #91     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #92     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #93     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #94     ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #95     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #96     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #97     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #98     StatelessElement.update (package:flutter/src/widgets/framework.dart:5162:5)
    #99     Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #100    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #101    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
    #102    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #103    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
    #104    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #105    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #106    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #107    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #108    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #109    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #110    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #111    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #112    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #113    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #114    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
    #115    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #116    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
    #117    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #118    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #119    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #120    StatelessElement.update (package:flutter/src/widgets/framework.dart:5162:5)
    #121    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #122    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #123    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #124    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #125    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #126    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
    #127    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #128    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #129    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #130    StatelessElement.update (package:flutter/src/widgets/framework.dart:5162:5)
    #131    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #132    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #133    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #134    StatelessElement.update (package:flutter/src/widgets/framework.dart:5162:5)
    #135    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #136    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #137    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #138    StatelessElement.update (package:flutter/src/widgets/framework.dart:5162:5)
    #139    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #140    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #141    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #142    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #143    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #144    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #145    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #146    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #147    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #148    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
    #149    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #150    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #151    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
    #152    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #153    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
    #154    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #155    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
    #156    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #157    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #158    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #159    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #160    _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:107:11)
    #161    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #162    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #163    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
    #164    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #165    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
    #166    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #167    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #168    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
    #169    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #170    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
    #171    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #172    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #173    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #174    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #175    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #176    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #177    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
    #178    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #179    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
    #180    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #181    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
    #182    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #183    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #184    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #185    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #186    _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:107:11)
    #187    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #188    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #189    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
    #190    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #191    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
    #192    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #193    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #194    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
    #195    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #196    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
    #197    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #198    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #199    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #200    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #201    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #202    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #203    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
    #204    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #205    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
    #206    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #207    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
    #208    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #209    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #210    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #211    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #212    _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:107:11)
    #213    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #214    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #215    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
    #216    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #217    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
    #218    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #219    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #220    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
    #221    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #222    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
    #223    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #224    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #225    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #226    StatelessElement.update (package:flutter/src/widgets/framework.dart:5162:5)
    #227    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #228    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
    #229    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #230    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #231    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #232    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #233    _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:107:11)
    #234    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #235    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #236    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
    #237    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #238    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
    #239    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #240    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #241    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
    #242    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #243    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
    #244    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #245    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #246    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #247    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #248    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #249    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #250    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
    #251    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #252    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
    #253    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #254    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #255    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #256    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #257    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #258    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #259    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
    #260    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #261    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
    #262    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #263    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #264    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #265    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #266    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #267    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #268    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
    #269    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #270    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
    #271    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #272    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #273    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
    #274    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #275    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
    #276    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #277    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
    #278    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #279    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #280    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #281    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #282    _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:107:11)
    #283    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #284    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #285    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
    #286    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #287    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
    #288    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #289    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #290    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #291    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #292    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #293    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #294    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #295    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #296    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #297    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #298    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
    #299    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #300    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
    #301    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #302    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #303    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #304    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #305    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #306    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #307    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
    #308    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #309    StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
    #310    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #311    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #312    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #313    ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
    #314    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #315    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
    #316    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #317    StatelessElement.update (package:flutter/src/widgets/framework.dart:5162:5)
    #318    Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
    #319    RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:1253:16)
    #320    RenderObjectToWidgetElement.update (package:flutter/src/widgets/binding.dart:1230:5)
    #321    RenderObjectToWidgetElement.performRebuild (package:flutter/src/widgets/binding.dart:1244:7)
    #322    Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
    #323    BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2780:19)
    #324    AutomatedTestWidgetsFlutterBinding.drawFrame (package:flutter_test/src/binding.dart:1396:19)
    #325    RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:358:5)
    #326    SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1297:15)
    #327    SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1227:9)
    #328    AutomatedTestWidgetsFlutterBinding.pump.<anonymous closure> (package:flutter_test/src/binding.dart:1246:9)
    #331    TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:68:41)
    #332    AutomatedTestWidgetsFlutterBinding.pump (package:flutter_test/src/binding.dart:1232:27)
    #333    WidgetTester._pumpWidget (package:flutter_test/src/widget_tester.dart:587:20)
    #334    WidgetTester.pumpWidget.<anonymous closure> (package:flutter_test/src/widget_tester.dart:572:14)
    #337    TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:68:41)
    #338    WidgetTester.pumpWidget (package:flutter_test/src/widget_tester.dart:571:27)
    #339    main.<anonymous closure>.<anonymous closure> (file:///Volumes/MyExternal/ExternalRefCode/flutter/packages/flutter/test/material/text_field_test.dart:15687:20)
    <asynchronous suspension>
    <asynchronous suspension>
    (elided 5 frames from dart:async and package:stack_trace)
    
    ════════════════════════════════════════════════════════════════════════════════════════════════════
    00:06 +0 -1: context menu contextMenuBuilder changes from default to null [E]                                                         
      Test failed. See exception logs above.
      The test description was: contextMenuBuilder changes from default to null
      
    To run this test again: /Volumes/MyExternal/ExternalRefCode/flutter/bin/cache/dart-sdk/bin/dart test /Volumes/MyExternal/ExternalRefCode/flutter/packages/flutter/test/material/text_field_test.dart -p vm --plain-name 'context menu contextMenuBuilder changes from default to null'
    00:06 +0 -1: Some tests failed.                                                                                                       
    (base) ➜  flutter git:(feat/text-field-npe) 
    
    ```
    
    </details>
    eb2d9de0
text_field_test.dart 566 KB