halildurmus / filepicker_windows

File and directory picker for Windows that uses common dialog controls.
BSD 3-Clause "New" or "Revised" License
69 stars 19 forks source link

DirectoryPicker crashes with 2.0.6 #22

Closed oO0oO0oO0o0o00 closed 1 year ago

oO0oO0oO0o0o00 commented 1 year ago

Using DirectoryPicker with filepicker_windows 2.0.6 causes crash few seconds after the dialog finished. No problem with 2.0.2 to 2.0.5.

It is a native crash and cannot be caught by Flutter debugger.

How to reproduce:

  1. (Optional) Create new Flutter project with VS Code's Flutter plugin
  2. run flutter pub add filepicker_windows
  3. paste the following code into main.dart:
    
    import 'package:flutter/material.dart';
    import 'package:filepicker_windows/filepicker_windows.dart';

void main() { runApp(const MainApp()); }

class MainApp extends StatelessWidget { const MainApp({super.key});

@override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( body: Center( child: TextButton( child: const Text("Ignite"), onPressed: () { final file = DirectoryPicker()..title = 'Boom!'; file.getDirectory(); }, )), ), ); } }


4. Pick a folder.
oO0oO0oO0o0o00 commented 1 year ago

In case it can be SDK version-specific:

Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.10.1, on Microsoft Windows [Version 10.0.19044.1706], locale xxxxxx) [√] Windows Version (Installed version of Windows is version 10 or higher) ... [√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.3) [√] VS Code (version 1.78.2) [√] Connected device (3 available)

oO0oO0oO0o0o00 commented 1 year ago

Correction: Also crashes with 2.0.5

songfei commented 1 year ago

same issue! Update flutter to 3.10 ,