miguelpruivo / flutter_file_picker

File picker plugin for Flutter, compatible with mobile (iOS & Android), Web, Desktop (Mac, Linux, Windows) platforms with Flutter Go support.
MIT License
1.35k stars 675 forks source link

Version 8.0.6 will bounce when clicked multiple times. #1558

Closed wahkim closed 3 months ago

wahkim commented 4 months ago

file_picker 8.0.6 on iOS 17 and above will bounce when the display is clicked multiple times。

flutter doctor [✓] Flutter (Channel stable, 3.22.2, on macOS 13.6.1 22G313 darwin-x64, locale zh-Hans-CN) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc1) [✓] Xcode - develop for iOS and macOS (Xcode 15.0.1) [✓] Chrome - develop for the web [✓] Android Studio (version 2021.3) [✓] VS Code (version 1.91.0) [✓] VS Code (version 1.91.0)

code: class _MyHomePageState extends State { int _counter = 0;

void _incrementCounter() { setState(() { // This call to setState tells the Flutter framework that something has // changed in this State, which causes it to rerun the build method below // so that the display can reflect the updated values. If we changed // _counter without calling setState(), then the build method would not be // called again, and so nothing would appear to happen. _counter++; }); }

@override Widget build(BuildContext context) { // This method is rerun every time setState is called, for instance as done // by the _incrementCounter method above. // // The Flutter framework has been optimized to make rerunning build methods // fast, so that you can just rebuild anything that needs updating rather // than having to individually change instances of widgets. return Scaffold( appBar: AppBar( // TRY THIS: Try changing the color here to a specific color (to // Colors.amber, perhaps?) and trigger a hot reload to see the AppBar // change color while the other colors stay the same. backgroundColor: Theme.of(context).colorScheme.inversePrimary, // Here we take the value from the MyHomePage object that was created by // the App.build method, and use it to set our appbar title. title: Text(widget.title), ), body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ GestureDetector( onTap: () async { FilePickerResult? result = await FilePicker.platform.pickFiles(allowMultiple: true); }, child: const Text( 'file picker 1', ), ), SizedBox(height: 40), GestureDetector( onTap: () async { await FilePicker.platform.clearTemporaryFiles(); FilePickerResult? result = await FilePicker.platform.pickFiles(allowMultiple: true); }, child: const Text( 'file picker 2', ), ), ], ), ), floatingActionButton: FloatingActionButton( onPressed: _incrementCounter, tooltip: 'Increment', child: const Icon(Icons.add), ), // This trailing comma makes auto-formatting nicer for build methods. ); } }

https://github.com/user-attachments/assets/b493d084-508d-49bc-8cce-575ed390f04a

github-actions[bot] commented 3 months ago

This issue is stale because it has been open for 7 days with no activity.

github-actions[bot] commented 3 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.