Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/path_provider/path_provider_windows/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 0.0.4+1

* Add getPath to the stub, so that the analyzer won't complain about
fakes that override it.
* export 'folders.dart' rather than importing it, since it's intended to be
public.

## 0.0.4

* Move the actual implementation behind a conditional import, exporting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
// path_provider_windows is implemented using FFI; export a stub for platforms
// that don't support FFI (e.g., web) to avoid having transitive dependencies
// break web compilation.
export 'src/folders_stub.dart' if (dart.library.ffi) 'src/folders.dart';
export 'src/path_provider_windows_stub.dart'
if (dart.library.ffi) 'src/path_provider_windows_real.dart';
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

/// Stub version of the actual class.
class WindowsKnownFolder {}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ class PathProviderWindows extends PathProviderPlatform {

/// Stub; see comment on VersionInfoQuerier.
VersionInfoQuerier versionInfoQuerier;

/// Match PathProviderWindows so that the analyzer won't report invalid
/// overrides if tests provide fake PathProviderWindows implementations.
Future<String> getPath(String folderID) async => '';
}

/// Stub to satisfy the analyzer, which doesn't seem to handle conditional
Expand Down
2 changes: 1 addition & 1 deletion packages/path_provider/path_provider_windows/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: path_provider_windows
description: Windows implementation of the path_provider plugin
homepage: https://github.com/flutter/plugins/tree/master/packages/path_provider/path_provider_windows
version: 0.0.4
version: 0.0.4+1

flutter:
plugin:
Expand Down