-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/plugins
#5416Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound in release: 2.10Found to occur in 2.10Found to occur in 2.10found in release: 2.13Found to occur in 2.13Found to occur in 2.13has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: file_selectorThe file_selector pluginThe file_selector pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Description
Steps to Reproduce
- Execute
flutter runon the code sample on windows - Click the openfile button to select a file that is not in the initialDirectory
- Click any button again
Expected results:
Open a dialog whose initial directory is initialDirectory
Actual results:
Open a dialog whose initial directory is the last selected file directory
Code sample
import 'package:file_selector/file_selector.dart';
import 'package:flutter/material.dart';
import 'package:path/path.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key}) : super(key: key);
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
String initialDirectory = normalize(absolute('.'));
@override
Widget build(BuildContext context) {
return Scaffold(
body: Column(
children: [
Text('initialDirectory: $initialDirectory'),
ElevatedButton(
onPressed: () => openFile(initialDirectory: initialDirectory),
child: const Text('openFile'),
),
ElevatedButton(
onPressed: () => openFiles(initialDirectory: initialDirectory),
child: const Text('openFiles'),
),
ElevatedButton(
onPressed: () => getSavePath(initialDirectory: initialDirectory),
child: const Text('getSavePath'),
),
ElevatedButton(
onPressed: () => getDirectoryPath(initialDirectory: initialDirectory),
child: const Text('getDirectoryPath'),
),
],
),
);
}
}
Logs
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound in release: 2.10Found to occur in 2.10Found to occur in 2.10found in release: 2.13Found to occur in 2.13Found to occur in 2.13has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: file_selectorThe file_selector pluginThe file_selector pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version