Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[path_provider] Migrate path_provider_linux to null safety. #3483

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 4 additions & 0 deletions packages/path_provider/path_provider_linux/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.2.0-nullsafety.0

* Migrate to null safety.

## 0.1.1+3

* Update Flutter SDK constraint.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ dependencies:
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.3

dependency_overrides:
path_provider_linux:
path: ../
# Disable overrides until path_provider is migrated to null safety.
# dependency_overrides:
# path_provider_linux:
# path: ../

dev_dependencies:
flutter_test:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ class PathProviderLinux extends PathProviderPlatform {
}

@override
Future<String> getApplicationDocumentsPath() {
return Future.value(xdg.getUserDirectory('DOCUMENTS').path);
Future<String?> getApplicationDocumentsPath() async {
return xdg.getUserDirectory('DOCUMENTS')?.path;
}

@override
Future<String> getDownloadsPath() {
return Future.value(xdg.getUserDirectory('DOWNLOAD').path);
Future<String?> getDownloadsPath() async {
return xdg.getUserDirectory('DOWNLOAD')?.path;
}
}
10 changes: 5 additions & 5 deletions packages/path_provider/path_provider_linux/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: path_provider_linux
description: linux implementation of the path_provider plugin
version: 0.1.1+3
version: 0.2.0-nullsafety.0
homepage: https://github.com/flutter/plugins/tree/master/packages/path_provider/path_provider_linux

flutter:
Expand All @@ -11,17 +11,17 @@ flutter:
pluginClass: none

environment:
sdk: ">=2.1.0 <3.0.0"
sdk: ">=2.12.0-0 <3.0.0"
flutter: ">=1.10.0"

dependencies:
path: ^1.6.4
xdg_directories: ^0.1.0
path_provider_platform_interface: ^1.0.1
xdg_directories: ^0.2.0-nullsafety.0
path_provider_platform_interface: ^2.0.0-nullsafety
flutter:
sdk: flutter

dev_dependencies:
flutter_test:
sdk: flutter
pedantic: ^1.8.0
pedantic: ^1.10.0-nullsafety.3