Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e93c97b
java 17
AbdeMohlbi Sep 27, 2025
cb2949f
Update version in pubspec.yaml
AbdeMohlbi Sep 27, 2025
4992716
Merge branch 'main' into file_selector_java_17
AbdeMohlbi Sep 28, 2025
2fe5d80
Use "minor" version
reidbaker Sep 29, 2025
567651c
Changelog cant start with +0
reidbaker Sep 29, 2025
d07891f
Update pubspec.yaml to set min flutter to 3.35.0
reidbaker Sep 29, 2025
e3c986d
add new min constraints to CHANGELOG
AbdeMohlbi Sep 29, 2025
13b5663
Update pubspec.yaml
AbdeMohlbi Sep 29, 2025
b3d14d3
Update CHANGELOG.md to respect the new constraints
AbdeMohlbi Sep 29, 2025
5caba7c
Formatter
reidbaker Sep 29, 2025
fb7d61d
Regenerate file then format them
reidbaker Sep 29, 2025
8b82009
Update pubspec.yaml
reidbaker Sep 29, 2025
bd9fa38
Undo pidgon change
reidbaker Sep 29, 2025
032bc19
Update packages/file_selector/file_selector/pubspec.yaml
reidbaker Sep 29, 2025
d23429e
Merge branch 'main' into file_selector_java_17
AbdeMohlbi Sep 29, 2025
12c07f7
Update CHANGELOG.md
AbdeMohlbi Sep 29, 2025
6a48c2b
Update pubspec.yaml
AbdeMohlbi Sep 29, 2025
2df264f
Update pubspec.yaml
AbdeMohlbi Sep 29, 2025
98fbf30
format
reidbaker Sep 29, 2025
6ed7020
Update file_selector_api.g.dart
AbdeMohlbi Sep 29, 2025
d6040e4
Update GeneratedFileSelectorApi.java
AbdeMohlbi Sep 29, 2025
70fcd54
Merge branch 'main' into file_selector_java_17
AbdeMohlbi Sep 29, 2025
4bee17a
use carat syntax when defining dart versions
reidbaker Sep 29, 2025
9476147
Merge branch 'main' into file_selector_java_17
AbdeMohlbi Sep 29, 2025
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
5 changes: 5 additions & 0 deletions packages/file_selector/file_selector/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.0.5

* Updates Java compatibility version to 17.
* Updates minimum supported SDK version to Flutter 3.35/Dart 3.9.

## 1.0.4

* Updates the example app and README examples to work on iOS.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ android {
ndkVersion = flutter.ndkVersion

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = '11'
jvmTarget = '17'
}

sourceSets {
Expand Down
6 changes: 3 additions & 3 deletions packages/file_selector/file_selector/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ description: Flutter plugin for opening and saving files, or selecting
directories, using native file selection UI.
repository: https://github.com/flutter/packages/tree/main/packages/file_selector/file_selector
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+file_selector%22
version: 1.0.4
version: 1.0.5

environment:
sdk: ^3.7.0
flutter: ">=3.29.0"
sdk: ">=3.9.0 <4.0.0"
flutter: ">=3.35.0"

flutter:
plugin:
Expand Down
5 changes: 5 additions & 0 deletions packages/file_selector/file_selector_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.5.2

* Updates Java compatibility version to 17.
* Updates minimum supported SDK version to Flutter 3.35/Dart 3.9.

## 0.5.1+16

* Bumps com.android.tools.build:gradle to 8.12.1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ android {
compileSdk = flutter.compileSdkVersion

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

defaultConfig {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2013 The Flutter Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Autogenerated from Pigeon (v22.6.2), do not edit directly.
// Autogenerated from Pigeon (v26.0.1), do not edit directly.
// See also: https://pub.dev/packages/pigeon

package dev.flutter.packages.file_selector_android;
Expand All @@ -22,7 +22,10 @@
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;

/** Generated class from Pigeon. */
Expand All @@ -38,7 +41,8 @@ public static class FlutterError extends RuntimeException {
/** The error details. Must be a datatype supported by the api codec. */
public final Object details;

public FlutterError(@NonNull String code, @Nullable String message, @Nullable Object details) {
public FlutterError(@NonNull String code, @Nullable String message, @Nullable Object details)
{
super(message);
this.code = code;
this.details = details;
Expand All @@ -57,7 +61,7 @@ protected static ArrayList<Object> wrapError(@NonNull Throwable exception) {
errorList.add(exception.toString());
errorList.add(exception.getClass().getSimpleName());
errorList.add(
"Cause: " + exception.getCause() + ", Stacktrace: " + Log.getStackTraceString(exception));
"Cause: " + exception.getCause() + ", Stacktrace: " + Log.getStackTraceString(exception));
}
return errorList;
}
Expand Down Expand Up @@ -112,15 +116,10 @@ public void setMessage(@NonNull String setterArg) {

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
if (this == o) { return true; }
if (o == null || getClass() != o.getClass()) { return false; }
FileSelectorNativeException that = (FileSelectorNativeException) o;
return fileSelectorExceptionCode.equals(that.fileSelectorExceptionCode)
&& message.equals(that.message);
return fileSelectorExceptionCode.equals(that.fileSelectorExceptionCode) && message.equals(that.message);
}

@Override
Expand All @@ -133,8 +132,7 @@ public static final class Builder {
private @Nullable FileSelectorExceptionCode fileSelectorExceptionCode;

@CanIgnoreReturnValue
public @NonNull Builder setFileSelectorExceptionCode(
@NonNull FileSelectorExceptionCode setterArg) {
public @NonNull Builder setFileSelectorExceptionCode(@NonNull FileSelectorExceptionCode setterArg) {
this.fileSelectorExceptionCode = setterArg;
return this;
}
Expand Down Expand Up @@ -163,12 +161,10 @@ ArrayList<Object> toList() {
return toListResult;
}

static @NonNull FileSelectorNativeException fromList(
@NonNull ArrayList<Object> pigeonVar_list) {
static @NonNull FileSelectorNativeException fromList(@NonNull ArrayList<Object> pigeonVar_list) {
FileSelectorNativeException pigeonResult = new FileSelectorNativeException();
Object fileSelectorExceptionCode = pigeonVar_list.get(0);
pigeonResult.setFileSelectorExceptionCode(
(FileSelectorExceptionCode) fileSelectorExceptionCode);
pigeonResult.setFileSelectorExceptionCode((FileSelectorExceptionCode) fileSelectorExceptionCode);
Object message = pigeonVar_list.get(1);
pigeonResult.setMessage((String) message);
return pigeonResult;
Expand Down Expand Up @@ -251,19 +247,10 @@ public void setFileSelectorNativeException(@Nullable FileSelectorNativeException

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
if (this == o) { return true; }
if (o == null || getClass() != o.getClass()) { return false; }
FileResponse that = (FileResponse) o;
return path.equals(that.path)
&& Objects.equals(mimeType, that.mimeType)
&& Objects.equals(name, that.name)
&& size.equals(that.size)
&& Arrays.equals(bytes, that.bytes)
&& Objects.equals(fileSelectorNativeException, that.fileSelectorNativeException);
return path.equals(that.path) && Objects.equals(mimeType, that.mimeType) && Objects.equals(name, that.name) && size.equals(that.size) && Arrays.equals(bytes, that.bytes) && Objects.equals(fileSelectorNativeException, that.fileSelectorNativeException);
}

@Override
Expand Down Expand Up @@ -318,8 +305,7 @@ public static final class Builder {
private @Nullable FileSelectorNativeException fileSelectorNativeException;

@CanIgnoreReturnValue
public @NonNull Builder setFileSelectorNativeException(
@Nullable FileSelectorNativeException setterArg) {
public @NonNull Builder setFileSelectorNativeException(@Nullable FileSelectorNativeException setterArg) {
this.fileSelectorNativeException = setterArg;
return this;
}
Expand Down Expand Up @@ -361,8 +347,7 @@ ArrayList<Object> toList() {
Object bytes = pigeonVar_list.get(4);
pigeonResult.setBytes((byte[]) bytes);
Object fileSelectorNativeException = pigeonVar_list.get(5);
pigeonResult.setFileSelectorNativeException(
(FileSelectorNativeException) fileSelectorNativeException);
pigeonResult.setFileSelectorNativeException((FileSelectorNativeException) fileSelectorNativeException);
return pigeonResult;
}
}
Expand Down Expand Up @@ -400,12 +385,8 @@ public void setExtensions(@NonNull List<String> setterArg) {

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
if (this == o) { return true; }
if (o == null || getClass() != o.getClass()) { return false; }
FileTypes that = (FileTypes) o;
return mimeTypes.equals(that.mimeTypes) && extensions.equals(that.extensions);
}
Expand Down Expand Up @@ -467,13 +448,10 @@ private PigeonCodec() {}
@Override
protected Object readValueOfType(byte type, @NonNull ByteBuffer buffer) {
switch (type) {
case (byte) 129:
{
Object value = readValue(buffer);
return value == null
? null
: FileSelectorExceptionCode.values()[((Long) value).intValue()];
}
case (byte) 129: {
Object value = readValue(buffer);
return value == null ? null : FileSelectorExceptionCode.values()[((Long) value).intValue()];
}
case (byte) 130:
return FileSelectorNativeException.fromList((ArrayList<Object>) readValue(buffer));
case (byte) 131:
Expand Down Expand Up @@ -505,6 +483,7 @@ protected void writeValue(@NonNull ByteArrayOutputStream stream, Object value) {
}
}


/** Asynchronous error handling return type for non-nullable API method returns. */
public interface Result<T> {
/** Success case callback method for handling returns. */
Expand Down Expand Up @@ -532,57 +511,41 @@ public interface VoidResult {
/**
* An API to call to native code to select files or directories.
*
* <p>Generated interface from Pigeon that represents a handler of messages from Flutter.
* Generated interface from Pigeon that represents a handler of messages from Flutter.
*/
public interface FileSelectorApi {
/**
* Opens a file dialog for loading files and returns a file path.
*
* <p>Returns `null` if user cancels the operation.
* Returns `null` if user cancels the operation.
*/
void openFile(
@Nullable String initialDirectory,
@NonNull FileTypes allowedTypes,
@NonNull NullableResult<FileResponse> result);
void openFile(@Nullable String initialDirectory, @NonNull FileTypes allowedTypes, @NonNull NullableResult<FileResponse> result);
/**
* Opens a file dialog for loading files and returns a list of file responses chosen by the
* user.
* Opens a file dialog for loading files and returns a list of file responses
* chosen by the user.
*/
void openFiles(
@Nullable String initialDirectory,
@NonNull FileTypes allowedTypes,
@NonNull Result<List<FileResponse>> result);
void openFiles(@Nullable String initialDirectory, @NonNull FileTypes allowedTypes, @NonNull Result<List<FileResponse>> result);
/**
* Opens a file dialog for loading directories and returns a directory path.
*
* <p>Returns `null` if user cancels the operation.
* Returns `null` if user cancels the operation.
*/
void getDirectoryPath(
@Nullable String initialDirectory, @NonNull NullableResult<String> result);
void getDirectoryPath(@Nullable String initialDirectory, @NonNull NullableResult<String> result);

/** The codec used by FileSelectorApi. */
static @NonNull MessageCodec<Object> getCodec() {
return PigeonCodec.INSTANCE;
}
/**
* Sets up an instance of `FileSelectorApi` to handle messages through the `binaryMessenger`.
*/
/**Sets up an instance of `FileSelectorApi` to handle messages through the `binaryMessenger`. */
static void setUp(@NonNull BinaryMessenger binaryMessenger, @Nullable FileSelectorApi api) {
setUp(binaryMessenger, "", api);
}

static void setUp(
@NonNull BinaryMessenger binaryMessenger,
@NonNull String messageChannelSuffix,
@Nullable FileSelectorApi api) {
static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String messageChannelSuffix, @Nullable FileSelectorApi api) {
messageChannelSuffix = messageChannelSuffix.isEmpty() ? "" : "." + messageChannelSuffix;
{
BasicMessageChannel<Object> channel =
new BasicMessageChannel<>(
binaryMessenger,
"dev.flutter.pigeon.file_selector_android.FileSelectorApi.openFile"
+ messageChannelSuffix,
getCodec());
binaryMessenger, "dev.flutter.pigeon.file_selector_android.FileSelectorApi.openFile" + messageChannelSuffix, getCodec());
if (api != null) {
channel.setMessageHandler(
(message, reply) -> {
Expand Down Expand Up @@ -612,10 +575,7 @@ public void error(Throwable error) {
{
BasicMessageChannel<Object> channel =
new BasicMessageChannel<>(
binaryMessenger,
"dev.flutter.pigeon.file_selector_android.FileSelectorApi.openFiles"
+ messageChannelSuffix,
getCodec());
binaryMessenger, "dev.flutter.pigeon.file_selector_android.FileSelectorApi.openFiles" + messageChannelSuffix, getCodec());
if (api != null) {
channel.setMessageHandler(
(message, reply) -> {
Expand Down Expand Up @@ -645,10 +605,7 @@ public void error(Throwable error) {
{
BasicMessageChannel<Object> channel =
new BasicMessageChannel<>(
binaryMessenger,
"dev.flutter.pigeon.file_selector_android.FileSelectorApi.getDirectoryPath"
+ messageChannelSuffix,
getCodec());
binaryMessenger, "dev.flutter.pigeon.file_selector_android.FileSelectorApi.getDirectoryPath" + messageChannelSuffix, getCodec());
if (api != null) {
channel.setMessageHandler(
(message, reply) -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ android {
ndkVersion = flutter.ndkVersion

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

defaultConfig {
Expand Down
Loading