Skip to content
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

ReorderableListView breaks position of PopupMenuButton #47013

Closed
Ahmadre opened this issue Dec 13, 2019 · 16 comments
Closed

ReorderableListView breaks position of PopupMenuButton #47013

Ahmadre opened this issue Dec 13, 2019 · 16 comments
Labels
f: material design flutter/packages/flutter/material repository. f: scrolling Viewports, list views, slivers, etc. found in release: 1.19 Found to occur in 1.19 found in release: 1.22 Found to occur in 1.22 framework flutter/packages/flutter repository. See also f: labels. has reproducible steps The issue has been confirmed reproducible and is ready to work on

Comments

@Ahmadre
Copy link

Ahmadre commented Dec 13, 2019

Steps to Reproduce

ReorderableListView

ReorderableListView Kopie

  1. Create a ReorderableListView with simple ListView and trailing IconButtons (as shown in the gif).
  2. Add PopupMenuButton to IconButton
  3. Tap on the IconButton

Target Platform: Android / iOS / Web
Target OS version/browser: macOS Catalina / Chrome
Devices: iOS Simulator (iPhone 11 Pro Max) / Android 10 (Pixel 3 XL)

Logs

Logs
     [  +23 ms] executing: [/Users/rebar/Documents/flutter/] git -c log.showSignature=false log
-n 1 --pretty=format:%H
[  +38 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] e58dc16d7bec7199190f1408667e24e38328cc3b
[        ] executing: [/Users/rebar/Documents/flutter/] git describe --match v*.*.*
--first-parent --long --tags
[  +19 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[        ] v1.13.0-59-ge58dc16d7
[  +10 ms] executing: [/Users/rebar/Documents/flutter/] git rev-parse --abbrev-ref
--symbolic @{u}
[   +6 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/master
[        ] executing: [/Users/rebar/Documents/flutter/] git ls-remote --get-url origin
[   +5 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +53 ms] executing: [/Users/rebar/Documents/flutter/] git rev-parse --abbrev-ref HEAD
[   +5 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] master
[   +5 ms] executing: sw_vers -productName
[  +15 ms] Exit code 0 from: sw_vers -productName
[        ] Mac OS X
[        ] executing: sw_vers -productVersion
[  +16 ms] Exit code 0 from: sw_vers -productVersion
[        ] 10.15.1
[        ] executing: sw_vers -buildVersion
[  +17 ms] Exit code 0 from: sw_vers -buildVersion
[        ] 19B88
[  +31 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping
update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping
update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +4 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping
update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping
update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping
update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping
update.
[  +30 ms] executing: /Users/rebar/Library/Android/sdk/platform-tools/adb devices -l
[  +10 ms] Exit code 0 from: /Users/rebar/Library/Android/sdk/platform-tools/adb devices -l
[        ] List of devices attached
[  +20 ms] executing:
/Users/rebar/Documents/flutter/bin/cache/artifacts/libimobiledevice/idevice_id -h
[  +61 ms] executing: /usr/bin/xcode-select --print-path
[   +6 ms] Exit code 0 from: /usr/bin/xcode-select --print-path
[        ] /Applications/Xcode.app/Contents/Developer
[   +1 ms] executing: /usr/bin/xcodebuild -version
[ +139 ms] Exit code 0 from: /usr/bin/xcodebuild -version
[   +2 ms] Xcode 11.2.1
           Build version 11B500
[   +3 ms] /usr/bin/xcrun simctl list --json devices
[ +138 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping
update.
[   +1 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping
update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping
update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping
update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping
update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping
update.
[ +304 ms] Generating
/Users/rebar/Documents/telexiom/LUITS_App/LUITS_Web/luitsapp/android/app/src/main/java/io/f
lutter/plugins/GeneratedPluginRegistrant.java
⣽[  +41 ms] executing:
[/Users/rebar/Documents/telexiom/LUITS_App/LUITS_Web/luitsapp/ios/Runner.xcodeproj/]
/usr/bin/xcodebuild -project
/Users/rebar/Documents/telexiom/LUITS_App/LUITS_Web/luitsapp/ios/Runner.xcodeproj -target
Runner -showBuildSettings
[        ] executing:
[/Users/rebar/Documents/telexiom/LUITS_App/LUITS_Web/luitsapp/ios/Runner.xcodeproj/]
/usr/bin/xcodebuild -project
/Users/rebar/Documents/telexiom/LUITS_App/LUITS_Web/luitsapp/ios/Runner.xcodeproj -target
Runner -showBuildSettings
[   +7 ms] Unexpected failure to get the build settings: ProcessException: No such file or
directory
             Command: /usr/bin/xcodebuild -project
             /Users/rebar/Documents/telexiom/LUITS_App/LUITS_Web/luitsapp/ios/Runner.xcodep
             roj -target Runner -showBuildSettings.
[  +58 ms] Launching lib/main.dart on Chrome in debug mode...
[        ] Building application for the web...
[+9481 ms] Starting daemon...
[ +234 ms] Initializing inputs
[  +13 ms] Reading cached asset graph...
[ +412 ms] Reading cached asset graph
completed, took 409ms

[ +362 ms] Checking for updates since last
build...
[+1135 ms] Checking for updates since last
build completed, took 1.1s

[  +13 ms] Initializing inputs
[   +3 ms] Reading cached asset graph...
[        ] Reading cached asset graph
completed, took 409ms
[        ] Checking for updates since last
build...
[        ] Checking for updates since last
build completed, took 1.1s
[+1422 ms] About to build [web]...
[   +5 ms] Running build...
[ +231 ms] Running build completed, took
113ms

[   +1 ms] Caching finalized dependency
graph...
[  +18 ms] Caching finalized dependency
graph completed, took 157ms

[   +5 ms] Succeeded after 279ms with 0
outputs (0 actions)

[  +11 ms] Building application for the
web... (completed in 13,3s)
[        ] Attempting to connect to browser
instance..
[+3163 ms] Debug service listening on
ws://127.0.0.1:49553/6IkQLjUWMAc=

[ +350 ms]       Failed to load asset at
path:
packages/build_web_compilers/src/dev_compil
er/dart_sdk.js.

                          Status code: 404

                          Headers:
                          {
                      "date": "Mon, 09 Dec
                      2019 00:51:50 GMT",
                      "content-length":
                      "9",
                      "x-frame-options":
                      "SAMEORIGIN",
                      "content-type":
                      "text/plain;
                      charset=utf-8",
                      "x-xss-protection":
                      "1; mode=block",
                      "x-content-type-optio
                      ns": "nosniff",
                      "server": "dart:io
                      with Shelf",
                      "via": "1.1
                      shelf_proxy"
                    }

                          Content:
                          Not Found}

[  +37 ms] Attempting to connect to browser
instance.. (completed in 3,5s)
[   +1 ms] Warning: Flutter's support for
web
           development is not stable yet
and hasn't
[        ] been thoroughly tested in
production
           environments.
[        ] For more information see
           https://flutter.dev/web
[   +1 ms] 🔥  To hot restart changes while
running,
           press "r". To hot restart (and
refresh the
           browser), press "R".
[   +2 ms] For a more detailed help
message, press
           "h". To quit, press "q".
[  +11 ms] Debug service listening on

ws://127.0.0.1:49553/6IkQLjUWMAc=
[+7721 ms] ══╡ EXCEPTION CAUGHT BY GESTURE
LIBRARY

╞══════════════════════════════════════════
                    ═════════════════
[  +10 ms] The following assertion was
thrown while
           routing a pointer event:
[   +1 ms] Assertion failed:

org-dartlang-app:///packages/flutter/src/ge

stures/mouse_tracking.dart:388:14
[   +1 ms] (targetState == null) ==
(targetEvent is
           PointerAddedEvent)
[   +1 ms] is not true
[   +1 ms] Either the assertion indicates
an error in
           the framework itself, or we
should provide
           substantially
[   +1 ms] more information in this error
message to
           help you determine and fix the
underlying
           cause.
[   +1 ms] In either case, please report
this
           assertion by filing a bug on
GitHub:
[   +1 ms]
https://github.com/flutter/flutter/issues/n
           ew?template=BUG.md
[        ] When the exception was thrown,
this was the
           stack:
[        ]
package:dart-sdk/lib/_internal/js_dev_runti

me/private/ddc_runtime/errors.dart 196:49
           throw_
[   +1 ms]
package:dart-sdk/lib/_internal/js_dev_runti

me/private/ddc_runtime/errors.dart 26:3
           assertFailed
[        ]
package:flutter/src/gestures/mouse_tracking
           .dart 388:51
           [_updateDevices]
[        ]
package:flutter/src/gestures/mouse_tracking
           .dart 292:5
           [_handleEvent]
[        ]
package:flutter/src/gestures/pointer_router
           .dart 76:12
           [_dispatch]
[        ]
package:flutter/src/gestures/pointer_router
           .dart 117:9
           <fn>
[        ]
package:dart-sdk/lib/_internal/js_dev_runti
           me/private/linked_hash_map.dart
23:13
           forEach
[        ]
package:flutter/src/gestures/pointer_router
           .dart 115:17
           [_dispatchEventToRoutes]
[        ]
package:flutter/src/gestures/pointer_router
           .dart 107:5
           route
[        ]
package:flutter/src/gestures/binding.dart
           180:23
           dispatchEvent
[        ]
package:flutter/src/gestures/binding.dart
           156:7
           [_handlePointerEvent]
[        ]
package:flutter/src/gestures/binding.dart
           102:7
           [_flushPointerEventQueue]
[   +1 ms]
package:flutter/src/gestures/binding.dart
           86:32
           [_handlePointerDataPacket]
[   +1 ms]
package:build_web_compilers/lib/_engine/eng
           ine/pointer_binding.dart 83:15
           [_onPointerData]
[        ]
package:build_web_compilers/lib/_engine/eng
           ine/pointer_binding.dart 322:7
           <fn>
[        ]
package:build_web_compilers/lib/_engine/eng
           ine/pointer_binding.dart 183:16
           <fn>
[        ] Event:
[        ]
PointerHoverEvent#3c525(position:
           Offset(436.5, 335.2), delta:
Offset(-13.4,
           -80.7), timeStamp:
[        ] 0:00:10.566750, pointer: 0,
kind: mouse,
           device: 1, down: false,
pressure: 0.0,
           pressureMin: 0.0)
[   +1 ms]
═══════════════════════════════════════════

═══════════════════════════════════════════
           ══════════════
[   +1 ms] Another exception was thrown:
Assertion
           failed:

org-dartlang-app:///packages/flutter/src/ge

stures/mouse_tracking.dart:388:14
[+1307 ms] Another exception was thrown:
Assertion
                    failed:

org-dartlang-app:///packages/flutter/src/ge

stures/mouse_tracking.dart:388:14
[   +1 ms] Another exception was thrown:
Assertion
           failed:

org-dartlang-app:///packages/flutter/src/ge

stures/mouse_tracking.dart:388:14

Analyze

Analyze
Analyzing luitsapp...                                                   

   info • This function has a return type of
          'String', but doesn't end with a
          return statement •
          lib/Screens/CredentialScreens/logi
          n.dart:231:38 • missing_return
   info • This function has a return type of
          'String', but doesn't end with a
          return statement •
          lib/Screens/CredentialScreens/logi
          n.dart:246:36 • missing_return
   info • Unused import:
          'package:custom_navigator/custom_n
          avigation.dart' •
          lib/Screens/Dashboard/dashboard.da
          rt:1:8 • unused_import
   info • Unused import:
          './Components/Sop.dart' •
          lib/Screens/Dashboard/dashboard.da
          rt:7:8 • unused_import
   info • The value of the field
          '_videosController' isn't used •
          lib/Screens/Profile/Profile.dart:1
          1:18 • unused_field
   info • Unused import:
          'package:luitsapp/utils/isBrowser/
          is_browser_js.dart' •
          lib/Screens/SideMenu/SideMenu.dart
          :6:8 • unused_import
   info • Unused import:
          'package:luitsapp/utils/isBrowser/
          is_browser.dart' •
          lib/Screens/Tour/Pages/getStarted.
          dart:7:8 • unused_import
   info • Unused import:
          'package:luitsapp/services/hive/cr
          edentialsManager.dart' •
          lib/Screens/index.dart:7:8 •
          unused_import
   info • Unused import:
          'package:luitsapp/services/hive/ob
          jects/user.dart' •
          lib/Screens/index.dart:8:8 •
          unused_import
   info • Unused import:
          'package:luitsapp/Screens/Dashboar
          d/dashboard.dart' •
          lib/Screens/splashScreen.dart:2:8
          • unused_import
   info • Unused import:
          'package:luitsapp/utils/isBrowser/
          is_browser.dart' •
          lib/services/hive/credentialsManag
          er.dart:3:8 • unused_import

11 issues found. (ran in 2.8s)

Doctor

Doctor
[✓] Flutter (Channel master, v1.13.1-pre.59, on Mac OS X 10.15.1 19B88, locale de-DE)
    • Flutter version 1.13.1-pre.59 at /Users/rebar/Documents/flutter
    • Framework revision e58dc16d7b (2 days ago), 2019-12-06 18:21:52 -0800
    • Engine revision e7b69ced2e
    • Dart version 2.7.0 (build 2.7.0-dev.2.1 a9c77229c2)

 
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/rebar/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.2.1, Build version 11B500
    • CocoaPods version 1.8.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 41.1.2
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

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

[✓] Connected device (3 available)
    • iPhone 11 Pro • CD2AB253-750B-4EA9-BF36-C132AF6165DE • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-13-2 (simulator)
    • Chrome        • chrome                               • web-javascript • Google Chrome
      78.0.3904.108
    • Web Server    • web-server                           • web-javascript • Flutter Tools

• No issues found!
@iapicca iapicca added a: annoyance Repeatedly frustrating issues with non-experimental functionality f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels. labels Dec 16, 2019
@Ahmadre
Copy link
Author

Ahmadre commented Dec 18, 2019

didn't know that there's a annoyance label 😂👍

Gesendet von meinem Pixel 2 XL mit FastHub

@goderbauer
Copy link
Member

Could be related to #31683.

@yemel
Copy link

yemel commented Dec 30, 2019

I have the same issue. This issue may be related: #26360

A workaround is to set initialValue, offset and to wrap the component with a Theme that overrides the highlightColor.

Theme(
    data: Theme.of(context).copyWith(highlightColor: Colors.white),
    child: PopupMenuButton<int>(
      initialValue: 1,
      offset: Offset(0,100),
      itemBuilder: (context) => [
          PopupMenuItem(value: 1, child: Text("Item 1"))
    ]));

@Ahmadre
Copy link
Author

Ahmadre commented Jan 15, 2020

Thannks @yemel ❤️ .

I solved it with:

Theme(
        data: Theme.of(context).copyWith(highlightColor: Colors.transparent),
        child: PopupMenuButton(
           initialValue: 0,
          offset: Offset(0, 50),
...

@kjmj
Copy link

kjmj commented Feb 25, 2020

I am also having this issue, and for some reason, that workaround isn't working for me.

@Ahmadre
Copy link
Author

Ahmadre commented Mar 5, 2020

@kjmj I encountered, that these workarounds depend on how much items you want to display in your PopUp. You have to play around with 50,...100...150... in y-Offset.

@filiph filiph removed the a: annoyance Repeatedly frustrating issues with non-experimental functionality label Mar 26, 2020
@filiph
Copy link
Contributor

filiph commented Mar 26, 2020

Hi, I'm removing the a: annoyance tag for now. Not that I think this issue isn't annoying. I just try to reserve that tag only for the most widespread, frequently seen issues (see definition). As this issue accrues thumbs-ups, I will revisit.

@VladyslavBondarenko
Copy link

Very nice reproducible code sample is here #25084

@VladyslavBondarenko VladyslavBondarenko added found in release: 1.19 Found to occur in 1.19 has reproducible steps The issue has been confirmed reproducible and is ready to work on labels May 13, 2020
@WouterVandenputte
Copy link

I have the same problem now, seems that it has not been fixed still

@Ahmadre
Copy link
Author

Ahmadre commented Sep 10, 2020

Can some of the Flutter team help us here? @iapicca

@iapicca
Copy link
Contributor

iapicca commented Sep 10, 2020

I summon @TahaTesser
testing the repo code from #25084
with the latest master, the issue still occurs

screenshot

image

doctor
[✓] Flutter (Channel master, 1.22.0-10.0.pre.121, on Linux, locale en_US.UTF-8)
    • Flutter version 1.22.0-10.0.pre.121 at /home/francesco/development/flutter_master
    • Framework revision 6c1a29e54c (15 hours ago), 2020-09-09 20:05:05 -0400
    • Engine revision 564367b297
    • Dart version 2.10.0 (build 2.10.0-107.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /usr/lib/Android
    • Platform android-29, build-tools 29.0.2
    • ANDROID_HOME = /usr/lib/Android
    • ANDROID_SDK_ROOT = /usr/lib/Android
    • Java binary at: /usr/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_265-8u265-b01-0ubuntu2~18.04-b01)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
    • cmake version 3.10.2
    • ninja version 1.8.2
    • pkg-config version 0.29.1

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).

[✓] Connected device (3 available)
    • Linux (desktop)  • linux      • linux-x64      • Linux
    • Web Server (web) • web-server • web-javascript • Flutter Tools
    • Chrome (web)     • chrome     • web-javascript • Google Chrome 85.0.4183.102

! Doctor found issues in 1 category.

consider de-duping with
#26360
#31683

@TahaTesser
Copy link
Member

code sample
  import 'package:flutter/material.dart';

  void main() => runApp(MyApp());

  const title = "PopupMenuButton test";

  class MyItem {
    MyItem(this.icon, this.title);

    final IconData icon;
    final String title;
  }

  class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
        title: title,
        theme: ThemeData(
          primarySwatch: Colors.pink,
        ),
        home: MyHomePage(),
      );
    }
  }

  class MyHomePage extends StatefulWidget {
    @override
    _MyHomePageState createState() => _MyHomePageState();
  }

  class _MyHomePageState extends State<MyHomePage> {
    List<MyItem> _sampleItems;
    bool _reorderable;

    @override
    void initState() {
      super.initState();
      _reorderable = true;

      _sampleItems = [
        MyItem(Icons.ac_unit, "Item 1"),
        MyItem(Icons.access_alarm, "Item 2"),
        MyItem(Icons.accessibility, "Item 3"),
        MyItem(Icons.accessible, "Item 4"),
      ];
    }

    Widget _buildOptions(MyItem item) {
      return PopupMenuButton(
        itemBuilder: (BuildContext context) {
          return [
            new PopupMenuItem(child: new Text("edit"), value: "edit"),
            new PopupMenuItem(child: new Text("delete"), value: "delete"),
          ];
        },
        onSelected: (selected) async {
          await showDialog(
              context: context,
              builder: (BuildContext context) {
                return SimpleDialog(
                  title: Text(selected),
                  contentPadding: EdgeInsets.all(25.0),
                  children: <Widget>[
                    Text("Item [${item.title}], Operation [$selected].")
                  ],
                );
              });
        },
      );
    }

    Widget _buildListTile(BuildContext context, MyItem item) {
      return ListTile(
        key: Key(item.title),
        leading: Icon(item.icon),
        title: Text(item.title),
        trailing: _buildOptions(item),
      );
    }

    Widget _buildReorderableListView(BuildContext context) {
      return ReorderableListView(
        children: _sampleItems
            .map((MyItem item) => _buildListTile(context, item))
            .toList(),
        onReorder: (oldIndex, newIndex) {
          setState(() {
            if (newIndex > _sampleItems.length) newIndex = _sampleItems.length;
            if (oldIndex < newIndex) newIndex--;

            MyItem item = _sampleItems[oldIndex];
            _sampleItems.remove(item);
            _sampleItems.insert(newIndex, item);
          });
        },
      );
    }

    Widget _buildListView(BuildContext context) {
      return ListView(
        children: _sampleItems
            .map((MyItem item) => _buildListTile(context, item))
            .toList(),
      );
    }

    Widget _buildSwitch(BuildContext context) {
      return Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: <Widget>[
          Text(_reorderable ? "Using ReorderableListView" : "Using ListView"),
          Switch.adaptive(
              value: _reorderable,
              onChanged: (bool value) => setState(() => _reorderable = value)),
        ],
      );
    }

    Widget _buildBody(BuildContext context) {
      return Container(
        padding: EdgeInsets.all(10.0),
        child: Column(
          children: <Widget>[
            _buildSwitch(context),
            Expanded(
                child: _reorderable
                    ? _buildReorderableListView(context)
                    : _buildListView(context)),
          ],
        ),
      );
    }

    @override
    Widget build(BuildContext context) {
      return Scaffold(
        appBar: AppBar(title: Text(title)),
        body: _buildBody(context),
      );
    }
  }
flutter doctor -v
[✓] Flutter (Channel master, 1.22.0-10.0.pre.137, on Mac OS X 10.15.6 19G2021,
    locale en-GB)
    • Flutter version 1.22.0-10.0.pre.137 at
      /Users/tahatesser/Code/flutter_master
    • Framework revision 37e2013774 (4 hours ago), 2020-09-11 04:05:02 -0400
    • Engine revision bdaac368f8
    • Dart version 2.10.0 (build 2.10.0-115.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/tahatesser/Code/sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_HOME = /Users/tahatesser/Code/sdk
    • 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-6222593)
    • All Android licenses accepted.

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

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 49.0.2
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)

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

 
[✓] Connected device (3 available)            
    • macOS (desktop)  • macos      • darwin-x64     • Mac OS X 10.15.6 19G2021
    • Web Server (web) • web-server • web-javascript • Flutter Tools
    • Chrome (web)     • chrome     • web-javascript • Google Chrome 85.0.4183.102

• No issues found!

@TahaTesser TahaTesser added f: material design flutter/packages/flutter/material repository. found in release: 1.22 Found to occur in 1.22 labels Sep 11, 2020
@tvolkert
Copy link
Contributor

/cc @HansMuller

@HansMuller
Copy link
Contributor

CC @darrenaustin
We're working on a plan to improve and fix the many problems with ReorderableListView now, #63709 (comment). We hope to have a plan published soon.

@Ahmadre
Copy link
Author

Ahmadre commented Sep 15, 2020

CC @darrenaustin
We're working on a plan to improve and fix the many problems with ReorderableListView now, #63709 (comment). We hope to have a plan published soon.

Thank you sooo much @HansMuller

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
f: material design flutter/packages/flutter/material repository. f: scrolling Viewports, list views, slivers, etc. found in release: 1.19 Found to occur in 1.19 found in release: 1.22 Found to occur in 1.22 framework flutter/packages/flutter repository. See also f: labels. has reproducible steps The issue has been confirmed reproducible and is ready to work on
Projects
None yet
Development

No branches or pull requests