text:
ScrollController attached to multiple scroll views.

I have a need, please watch the video.
https://user-images.githubusercontent.com/7686137/105274365-fd422980-5bd7-11eb-946f-ae8a7ffe5ae2.mp4
When the list is sliding, the top Widget(blue container) transparency will change according to the offset.
Tabar and TabarView(red container) will be nested in the list, and need tabController. So TickerProviderStateMixin is mixed in. When a new page is pushed, the program is abnormal.
controller.offset triggered assert(_positions.length == 1,'ScrollController attached to multiple scroll views.'); in scroll_controller.dart line 113
Code

code sample
void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MainPage(),
    );
  }
}

class MainPage extends StatefulWidget {
  @override
  _MainPageState createState() => _MainPageState();
}

class _MainPageState extends State<MainPage> with TickerProviderStateMixin {
  ScrollController _scrollController;

  @override
  void initState() {
    super.initState();
    _scrollController = ScrollController();
  }

  @override
  void dispose() {
    _scrollController.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    print('MainPage: ${_scrollController.positions}');
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Colors.black,
        title: Text('Demo'),
        actions: [
          CupertinoButton(
            child: Text('Page 1'),
            onPressed: () {
              Navigator.of(context).push(CupertinoPageRoute(builder: (context) {
                return Page1();
              }));
            },
          )
        ],
      ),
      body: NestedScrollView(
        controller: _scrollController,
        headerSliverBuilder: (context, _) {
          return [
            OpacityView(
              controller: _scrollController,
            )
          ];
        },
        body: Container(
          height: 1000,
          color: Colors.red,
        ),
      ),
    );
  }
}

class OpacityView extends AnimatedWidget {
  OpacityView({Key key, this.controller})
      : super(key: key, listenable: controller);

  final ScrollController controller;

  @override
  Widget build(BuildContext context) {
    double opacity = 1;
    print('OpacityView: ${controller.positions}');
    opacity = 1 - (controller.offset / 200).clamp(0, 1);

    return SliverToBoxAdapter(
      child: Opacity(
        opacity: opacity,
        child: Container(
          height: 200,
          color: Colors.blue,
        ),
      ),
    );
  }
}

class Page1 extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Page 1'),
        backgroundColor: Colors.black,
      ),
    );
  }
}

Output

first run
flutter: MainPage: []
flutter: OpacityView: [_NestedScrollPosition#f0583(outer, offset: 0.0, range: null..null, viewport: null)]

pushed page1
flutter: MainPage: [_NestedScrollPosition#f0583(outer, offset: 0.0, range: 0.0..200.0, viewport: 712.0)]
flutter: OpacityView: [_NestedScrollPosition#f0583(outer, offset: 0.0, range: 0.0..200.0, viewport: 712.0), _NestedScrollPosition#152a0(outer, offset: 0.0, range: 0.0..200.0, viewport: 712.0)]

Exception
The following assertion was thrown building OpacityView(animation: ScrollController#35d66(2 clients), dirty, state: _AnimatedState#364a5):
ScrollController attached to multiple scroll views.
'package:flutter/src/widgets/scroll_controller.dart':
Failed assertion: line 113 pos 12: '_positions.length == 1'

Flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.5, on macOS 11.0.1 20B29 darwin-x64, locale
    zh-Hans-CN)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
[!] Android Studio (version 4.1)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.52.1)
[✓] Connected device (1 available)

! Doctor found issues in 1 category.

logs
[  +30 ms] I/flutter ( 6595): OpacityView: [_NestedScrollPosition#dfa94(outer, offset: 0.0, range: 0.0..200.0, viewport: 679.3), _NestedScrollPosition#18d92(outer, offset: 0.0, range: 0.0..200.0, viewport: 679.3)]
[ +237 ms]
           ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
           The following assertion was thrown building OpacityView(animation: ScrollController#998ed(2
           clients), dirty, state: _AnimatedState#ee7f8):
           ScrollController attached to multiple scroll views.
           'package:flutter/src/widgets/scroll_controller.dart':
           Failed assertion: line 109 pos 12: '_positions.length == 1'

           Either the assertion indicates an error in the framework itself, or we should provide substantially
           more information in this error message to help you determine and fix the underlying cause.
           In either case, please report this assertion by filing a bug on GitHub:
             https://github.com/flutter/flutter/issues/new?template=2_bug.md

           The relevant error-causing widget was:
             OpacityView file:///Users/pedromassango/dev/Projects/flutter_example/lib/main.dart:64:13

           When the exception was thrown, this was the stack:
           #2      ScrollController.position (package:flutter/src/widgets/scroll_controller.dart:109:12)
           #3      ScrollController.offset (package:flutter/src/widgets/scroll_controller.dart:116:24)
           #4      OpacityView.build (package:flutter_example/main.dart:88:31)
           #5      _AnimatedState.build (package:flutter/src/widgets/transitions.dart:174:48)
           #6      StatefulElement.build (package:flutter/src/widgets/framework.dart:4742:27)
           #7      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4625:15)
           #8      StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4797:11)
           #9      Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #10     StatefulElement.update (package:flutter/src/widgets/framework.dart:4829:5)
           #11     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #12     RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:5633:32)
           #13     MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6235:17)
           #14     _ViewportElement.update (package:flutter/src/widgets/viewport.dart:228:11)
           #15     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #16     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6111:14)
           #17     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #18     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6111:14)
           #19     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #20     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6111:14)
           #21     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #22     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6111:14)
           #23     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #24     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #25     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4797:11)
           #26     Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #27     StatefulElement.update (package:flutter/src/widgets/framework.dart:4829:5)
           #28     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #29     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6111:14)
           #30     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #31     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #32     Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #33     ProxyElement.update (package:flutter/src/widgets/framework.dart:4973:5)
           #34     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #35     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6111:14)
           #36     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #37     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6111:14)
           #38     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #39     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6111:14)
           #40     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #41     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6111:14)
           #42     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #43     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #44     Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #45     StatelessElement.update (package:flutter/src/widgets/framework.dart:4706:5)
           #46     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #47     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #48     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4797:11)
           #49     Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #50     StatefulElement.update (package:flutter/src/widgets/framework.dart:4829:5)
           #51     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #52     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #53     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4797:11)
           #54     Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #55     StatefulElement.update (package:flutter/src/widgets/framework.dart:4829:5)
           #56     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #57     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #58     Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #59     StatelessElement.update (package:flutter/src/widgets/framework.dart:4706:5)
           #60     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #61     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #62     Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #63     StatelessElement.update (package:flutter/src/widgets/framework.dart:4706:5)
           #64     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #65     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #66     Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #67     ProxyElement.update (package:flutter/src/widgets/framework.dart:4973:5)
           #68     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #69     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #70     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4797:11)
           #71     Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #72     StatefulElement.update (package:flutter/src/widgets/framework.dart:4829:5)
           #73     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #74     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #75     Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #76     StatelessElement.update (package:flutter/src/widgets/framework.dart:4706:5)
           #77     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #78     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #79     Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #80     ProxyElement.update (package:flutter/src/widgets/framework.dart:4973:5)
           #81     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #82     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #83     Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #84     ProxyElement.update (package:flutter/src/widgets/framework.dart:4973:5)
           #85     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #86     RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:5633:32)
           #87     MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6235:17)
           #88     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #89     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #90     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4797:11)
           #91     Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #92     StatefulElement.update (package:flutter/src/widgets/framework.dart:4829:5)
           #93     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #94     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #95     Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #96     ProxyElement.update (package:flutter/src/widgets/framework.dart:4973:5)
           #97     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #98     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #99     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4797:11)
           #100    Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #101    StatefulElement.update (package:flutter/src/widgets/framework.dart:4829:5)
           #102    Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #103    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6111:14)
           #104    Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #105    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #106    Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #107    StatelessElement.update (package:flutter/src/widgets/framework.dart:4706:5)
           #108    Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #109    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6111:14)
           #110    Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #111    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #112    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4797:11)
           #113    Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #114    StatefulElement.update (package:flutter/src/widgets/framework.dart:4829:5)
           #115    Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #116    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #117    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4797:11)
           #118    Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #119    StatefulElement.update (package:flutter/src/widgets/framework.dart:4829:5)
           #120    Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #121    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #122    Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #123    ProxyElement.update (package:flutter/src/widgets/framework.dart:4973:5)
           #124    Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #125    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #126    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4797:11)
           #127    Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #128    StatefulElement.update (package:flutter/src/widgets/framework.dart:4829:5)
           #129    Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #130    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #131    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4797:11)
           #132    Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #133    BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2694:33)
           #134    WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:873:21)
           #135    RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:319:5)
           #136    SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1144:15)
           #137    SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1082:9)
           #138    SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:998:5)
           #142    _invoke (dart:ui/hooks.dart:157:10)
           #143    PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:253:5)
           #144    _drawFrame (dart:ui/hooks.dart:120:31)
           (elided 5 frames from class _AssertionError and dart:async)

           ════════════════════════════════════════════════════════════════════════════════════════════════════
[  +49 ms]
           Another exception was thrown: A RenderNestedScrollViewViewport expected a child of type RenderSliver but received a child of type RenderErrorBox.
[  +39 ms]
           Another exception was thrown: A RenderNestedScrollViewViewport expected a child of type RenderSliver but received a child of type RenderErrorBox.

flutter doctor -v

  ╔════════════════════════════════════════════════════════════════════════════╗
  ║                 Welcome to Flutter! - https://flutter.dev                  ║
  ║                                                                            ║
  ║ The Flutter tool uses Google Analytics to anonymously report feature usage ║
  ║ statistics and basic crash reports. This data is used to help improve      ║
  ║ Flutter tools over time.                                                   ║
  ║                                                                            ║
  ║ Flutter tool analytics are not sent on the very first run. To disable      ║
  ║ reporting, type 'flutter config --no-analytics'. To display the current    ║
  ║ setting, type 'flutter config'. If you opt out of analytics, an opt-out    ║
  ║ event will be sent, and then no further information will be sent by the    ║
  ║ Flutter tool.                                                              ║
  ║                                                                            ║
  ║ By downloading the Flutter SDK, you agree to the Google Terms of Service.  ║
  ║ Note: The Google Privacy Policy describes how data is handled in this      ║
  ║ service.                                                                   ║
  ║                                                                            ║
  ║ Moreover, Flutter includes the Dart SDK, which may send usage metrics and  ║
  ║ crash reports to Google.                                                   ║
  ║                                                                            ║
  ║ Read about data we send with crash reports:                                ║
  ║ https://flutter.dev/docs/reference/crash-reporting                         ║
  ║                                                                            ║
  ║ See Google's privacy policy:                                               ║
  ║ https://policies.google.com/privacy                                        ║
  ╚════════════════════════════════════════════════════════════════════════════╝

[✓] Flutter (Channel stable, 1.22.5, on Mac OS X 10.15.7 19H114 darwin-x64, locale en)
    • Flutter version 1.22.5 at /Users/pedromassango/Code/flutter_stable
    • Framework revision 7891006299 (6 weeks ago), 2020-12-10 11:54:40 -0800
    • Engine revision ae90085a84
    • Dart version 2.10.4

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/pedromassango/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.1, Build version 12A7403
    • CocoaPods version 1.9.3

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] IntelliJ IDEA Community Edition (version 2020.3.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin installed
    • Dart plugin version 203.6912

[✓] VS Code (version 1.52.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.18.1

[!] Connected device
    ! No devices available

! Doctor found issues in 2 categories.

logs
[  +30 ms] I/flutter ( 6595): OpacityView: [_NestedScrollPosition#dfa94(outer, offset: 0.0, range: 0.0..200.0, viewport: 679.3), _NestedScrollPosition#18d92(outer, offset: 0.0, range: 0.0..200.0, viewport: 679.3)]
[ +237 ms]
           ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
           The following assertion was thrown building OpacityView(animation: ScrollController#998ed(2
           clients), dirty, state: _AnimatedState#ee7f8):
           ScrollController attached to multiple scroll views.
           'package:flutter/src/widgets/scroll_controller.dart':
           Failed assertion: line 109 pos 12: '_positions.length == 1'

           Either the assertion indicates an error in the framework itself, or we should provide substantially
           more information in this error message to help you determine and fix the underlying cause.
           In either case, please report this assertion by filing a bug on GitHub:
             https://github.com/flutter/flutter/issues/new?template=2_bug.md

           The relevant error-causing widget was:
             OpacityView file:///Users/pedromassango/dev/Projects/flutter_example/lib/main.dart:64:13

           When the exception was thrown, this was the stack:
           #2      ScrollController.position (package:flutter/src/widgets/scroll_controller.dart:109:12)
           #3      ScrollController.offset (package:flutter/src/widgets/scroll_controller.dart:116:24)
           #4      OpacityView.build (package:flutter_example/main.dart:88:31)
           #5      _AnimatedState.build (package:flutter/src/widgets/transitions.dart:174:48)
           #6      StatefulElement.build (package:flutter/src/widgets/framework.dart:4742:27)
           #7      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4625:15)
           #8      StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4797:11)
           #9      Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #10     StatefulElement.update (package:flutter/src/widgets/framework.dart:4829:5)
           #11     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #12     RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:5633:32)
           #13     MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6235:17)
           #14     _ViewportElement.update (package:flutter/src/widgets/viewport.dart:228:11)
           #15     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #16     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6111:14)
           #17     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #18     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6111:14)
           #19     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #20     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6111:14)
           #21     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #22     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6111:14)
           #23     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #24     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #25     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4797:11)
           #26     Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #27     StatefulElement.update (package:flutter/src/widgets/framework.dart:4829:5)
           #28     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #29     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6111:14)
           #30     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #31     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #32     Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #33     ProxyElement.update (package:flutter/src/widgets/framework.dart:4973:5)
           #34     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #35     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6111:14)
           #36     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #37     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6111:14)
           #38     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #39     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6111:14)
           #40     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #41     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6111:14)
           #42     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #43     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #44     Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #45     StatelessElement.update (package:flutter/src/widgets/framework.dart:4706:5)
           #46     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #47     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #48     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4797:11)
           #49     Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #50     StatefulElement.update (package:flutter/src/widgets/framework.dart:4829:5)
           #51     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #52     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #53     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4797:11)
           #54     Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #55     StatefulElement.update (package:flutter/src/widgets/framework.dart:4829:5)
           #56     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #57     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #58     Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #59     StatelessElement.update (package:flutter/src/widgets/framework.dart:4706:5)
           #60     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #61     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #62     Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #63     StatelessElement.update (package:flutter/src/widgets/framework.dart:4706:5)
           #64     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #65     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #66     Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #67     ProxyElement.update (package:flutter/src/widgets/framework.dart:4973:5)
           #68     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #69     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #70     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4797:11)
           #71     Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #72     StatefulElement.update (package:flutter/src/widgets/framework.dart:4829:5)
           #73     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #74     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #75     Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #76     StatelessElement.update (package:flutter/src/widgets/framework.dart:4706:5)
           #77     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #78     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #79     Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #80     ProxyElement.update (package:flutter/src/widgets/framework.dart:4973:5)
           #81     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #82     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #83     Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #84     ProxyElement.update (package:flutter/src/widgets/framework.dart:4973:5)
           #85     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #86     RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:5633:32)
           #87     MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6235:17)
           #88     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #89     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #90     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4797:11)
           #91     Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #92     StatefulElement.update (package:flutter/src/widgets/framework.dart:4829:5)
           #93     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #94     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #95     Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #96     ProxyElement.update (package:flutter/src/widgets/framework.dart:4973:5)
           #97     Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #98     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #99     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4797:11)
           #100    Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #101    StatefulElement.update (package:flutter/src/widgets/framework.dart:4829:5)
           #102    Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #103    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6111:14)
           #104    Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #105    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #106    Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #107    StatelessElement.update (package:flutter/src/widgets/framework.dart:4706:5)
           #108    Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #109    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6111:14)
           #110    Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #111    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #112    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4797:11)
           #113    Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #114    StatefulElement.update (package:flutter/src/widgets/framework.dart:4829:5)
           #115    Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #116    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #117    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4797:11)
           #118    Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #119    StatefulElement.update (package:flutter/src/widgets/framework.dart:4829:5)
           #120    Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #121    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #122    Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #123    ProxyElement.update (package:flutter/src/widgets/framework.dart:4973:5)
           #124    Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #125    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #126    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4797:11)
           #127    Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #128    StatefulElement.update (package:flutter/src/widgets/framework.dart:4829:5)
           #129    Element.updateChild (package:flutter/src/widgets/framework.dart:3293:15)
           #130    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4650:16)
           #131    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4797:11)
           #132    Element.rebuild (package:flutter/src/widgets/framework.dart:4319:5)
           #133    BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2694:33)
           #134    WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:873:21)
           #135    RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:319:5)
           #136    SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1144:15)
           #137    SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1082:9)
           #138    SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:998:5)
           #142    _invoke (dart:ui/hooks.dart:157:10)
           #143    PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:253:5)
           #144    _drawFrame (dart:ui/hooks.dart:120:31)
           (elided 5 frames from class _AssertionError and dart:async)

           ════════════════════════════════════════════════════════════════════════════════════════════════════
[  +49 ms]
           Another exception was thrown: A RenderNestedScrollViewViewport expected a child of type RenderSliver but received a child of type RenderErrorBox.
[  +39 ms]
           Another exception was thrown: A RenderNestedScrollViewViewport expected a child of type RenderSliver but received a child of type RenderErrorBox.

flutter doctor -v

  ╔════════════════════════════════════════════════════════════════════════════╗
  ║                 Welcome to Flutter! - https://flutter.dev                  ║
  ║                                                                            ║
  ║ The Flutter tool uses Google Analytics to anonymously report feature usage ║
  ║ statistics and basic crash reports. This data is used to help improve      ║
  ║ Flutter tools over time.                                                   ║
  ║                                                                            ║
  ║ Flutter tool analytics are not sent on the very first run. To disable      ║
  ║ reporting, type 'flutter config --no-analytics'. To display the current    ║
  ║ setting, type 'flutter config'. If you opt out of analytics, an opt-out    ║
  ║ event will be sent, and then no further information will be sent by the    ║
  ║ Flutter tool.                                                              ║
  ║                                                                            ║
  ║ By downloading the Flutter SDK, you agree to the Google Terms of Service.  ║
  ║ Note: The Google Privacy Policy describes how data is handled in this      ║
  ║ service.                                                                   ║
  ║                                                                            ║
  ║ Moreover, Flutter includes the Dart SDK, which may send usage metrics and  ║
  ║ crash reports to Google.                                                   ║
  ║                                                                            ║
  ║ Read about data we send with crash reports:                                ║
  ║ https://flutter.dev/docs/reference/crash-reporting                         ║
  ║                                                                            ║
  ║ See Google's privacy policy:                                               ║
  ║ https://policies.google.com/privacy                                        ║
  ╚════════════════════════════════════════════════════════════════════════════╝

[✓] Flutter (Channel stable, 1.22.5, on Mac OS X 10.15.7 19H114 darwin-x64, locale en)
    • Flutter version 1.22.5 at /Users/pedromassango/Code/flutter_stable
    • Framework revision 7891006299 (6 weeks ago), 2020-12-10 11:54:40 -0800
    • Engine revision ae90085a84
    • Dart version 2.10.4

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/pedromassango/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.1, Build version 12A7403
    • CocoaPods version 1.9.3

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] IntelliJ IDEA Community Edition (version 2020.3.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin installed
    • Dart plugin version 203.6912

[✓] VS Code (version 1.52.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.18.1

[!] Connected device
    ! No devices available

! Doctor found issues in 2 categories.

well, there's so question been asked a loong time ago https://stackoverflow.com/questions/53824944/flutter-exception-scrollcontroller-attached-to-multiple-scroll-views
@pedromassangocode the problem here is that for some reason scroll position gets duplicated when the navigator pushes route, maybe the issue title should be changed?
@HaijunWei by the way, don't use Opacity for animations, there's speically made FadeTransition

well, there's so question been asked a loong time ago https://stackoverflow.com/questions/53824944/flutter-exception-scrollcontroller-attached-to-multiple-scroll-views
@pedromassangocode the problem here is that for some reason scroll position gets duplicated when the navigator pushes route, maybe the issue title should be changed?
@HaijunWei by the way, don't use Opacity for animations, there's speically made FadeTransition

Okay, thank you, I now use SliverPersistentHeader to solve the problem. Should i close this issue?

Okay, thank you, I now use SliverPersistentHeader to solve the problem. Should i close this issue?

Should i close this issue?

Not yet. I do think this is a valid issue.

Should i close this issue?

Not yet. I do think this is a valid issue.

+1 I think instead of being pointed to complex workarounds, the framework should by itself not run into this issue. I am getting this without any explicit ScrollController at all, merely by wrapping a bit of AnimatedSwitcher, a Scrollbar and a SingleChildScrollView. Now trying to untangle it in a fashion that will no longer produce this exception.

Cc @Piinks @xu-baolin

Will take a look, thanks for mention ：）

I have posted a PR #80573 to try to fix this.

I have the very same error with a CupertinoTabBar, just trying to switch between the pages of a PageView. (Nothing fancy, just calling controller.animateToPage() from the tabbar's itemChanged).

Hi @deakjahn
This seems to be a different issue, can you please file a new issue? Please make sure to fill the issue template!

I don't yet know, it might be the special scaffold or some interaction. I'll try to figure it out.

Did it at https://github.com/flutter/flutter/issues/82846.

authors: HaijunWei deakjahn nt4f04uNd pedromassangocode tiloc xu-baolin


text:
Why would flutter use gradle 5.6.2 instead of 6.5 like AS?

Hi,
I'm running into some problems because flutter is using an old and buggy version of Gradle. I've bunch of offline dependencies, when I try to run my app I get:
FAILURE: Build failed with an exception.
* What went wrong:
Could not open cp_init remapped class cache for 3truk786bichutpwwp37wxiyx (/home/[USER_NAME]/.gradle/caches/5.6.2/scripts-remapped/offline_elo2liyi6dyjcsoova2o93p29/3truk786bichutpwwp37wxiyx/cp_init40e7ec637808a9c747559d26950b1d9b).
> Could not open cp_init generic class cache for initialization script '/home/[USER_NAME]/.gradle/init.d/offline.gradle' (/home/[USER_NAME]/.gradle/caches/5.6.2/scripts/3truk786bichutpwwp37wxiyx/cp_init/cp_init40e7ec637808a9c747559d26950b1d9b).
   > Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org
BUILD FAILED in 5m 34s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

I'm using Flutter with VS Code BTW...

Hi @UltraBurstXD
If you're using flutter beta and up channels, the Flutter template uses Android Gradle 4.1.0 which requires Gradle 6.5+
Can you upgrade your Flutter channel and update your Gradle to 'com.android.tools.build:gradle:4.1.0' and try again?
If the problem persists, Can you please provide your flutter doctor -v and flutter run --verbose logs, and a minimal complete reproducible code sample?
Thank you

Hi @UltraBurstXD
If you're using flutter beta and up channels, the Flutter template uses Android Gradle 4.1.0 which requires Gradle 6.5+
Can you upgrade your Flutter channel and update your Gradle to 'com.android.tools.build:gradle:4.1.0' and try again?
If the problem persists, Can you please provide your flutter doctor -v and flutter run --verbose logs, and a minimal complete reproducible code sample?
Thank you

Well, I'm using flutter from stable channel, 1.22.5. I fixed that by changing the Gradle version manually changing config (I don't remember the name) file in my project's root from 5.6.2 to 6.8... By default, flutter uses 5.6.2, and I don't know why...

Well, I'm using flutter from stable channel, 1.22.5. I fixed that by changing the Gradle version manually changing config (I don't remember the name) file in my project's root from 5.6.2 to 6.8... By default, flutter uses 5.6.2, and I don't know why...

Hi @UltraBurstXD
As mentioned in https://github.com/flutter/flutter/issues/74496#issuecomment-766612742, currently beta and up channels are using Android Gradle 4.1 but stable still uses Android Gradle 3.5.
Closing, as this isn't an issue with Flutter itself. If you disagree, please write in the comments and I will reopen it.
Thank you

Hi @UltraBurstXD
As mentioned in https://github.com/flutter/flutter/issues/74496#issuecomment-766612742, currently beta and up channels are using Android Gradle 4.1 but stable still uses Android Gradle 3.5.
Closing, as this isn't an issue with Flutter itself. If you disagree, please write in the comments and I will reopen it.
Thank you

source: gharchive/issue

authors: TahaTesser UltraBurstXD

repo: flutter/flutter

license_type: permissive

license_source: github-api