• Greg Price's avatar
    Add test for RenderProxyBoxMixin; clarify doc, resolve TODO (#117664) · cd125e1f
    Greg Price authored
    * Add test for RenderProxyBoxMixin; clarify doc, resolve TODO
    
    The TODO comment suggested this mixin would no longer be needed once
    a Dart issue on inherited constructors was fixed:
      https://github.com/dart-lang/sdk/issues/31543
    That issue is now long since fixed, so I went to go carry out the TODO.
    
    But in doing so, I realized that the mixin's documentation was more
    right than the TODO comment: even with that issue fixed, there is a
    legitimate use case for this mixin, namely to reuse the implementation
    of RenderProxyBox in a class that also inherits from some other base
    class.  Moreover, searching GitHub I found an example of a library
    that makes real use of that capability.
    
    So I think the right resolution is to accept that this separation
    is useful and delete the TODO.
    
    Then, add a test with an extremely simplified sketch of that
    real-world example.  In case someone in the future attempts to
    simplify this mixin away, the test will point us at the use case
    that would be broken by such a change.
    
    Also remove the only in-tree use of the mixin, which was redundant;
    and expand the mixin's documentation to advise about that case.
    
    * Tweak formatting
    Co-authored-by: 's avatarMichael Goderbauer <goderbauer@google.com>
    
    * Cut comments
    
    ---------
    Co-authored-by: 's avatarMichael Goderbauer <goderbauer@google.com>
    cd125e1f
Name
Last commit
Last update
.github Loading commit data...
bin Loading commit data...
dev Loading commit data...
examples Loading commit data...
packages Loading commit data...
.ci.yaml Loading commit data...
.cirrus.yml Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CODEOWNERS Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
CONTRIBUTING.md Loading commit data...
LICENSE Loading commit data...
PATENT_GRANT Loading commit data...
README.md Loading commit data...
TESTOWNERS Loading commit data...
analysis_options.yaml Loading commit data...
dartdoc_options.yaml Loading commit data...
flutter_console.bat Loading commit data...