File tree Expand file tree Collapse file tree
packages/firebase_storage/firebase_storage/windows
tests/integration_test/firebase_storage Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -470,22 +470,18 @@ void FirebaseStoragePlugin::ReferenceList(
470470 const InternalStorageReference& reference,
471471 const InternalListOptions& options,
472472 std::function<void (ErrorOr<InternalListResult> reply)> result) {
473- // C++ doesn't support list yet
474- flutter::EncodableList items = flutter::EncodableList ();
475- flutter::EncodableList prefixs = flutter::EncodableList ();
476- InternalListResult pigeon_result = InternalListResult (items, prefixs);
477- result (pigeon_result);
473+ result (FlutterError (
474+ " unimplemented" ,
475+ " Listing files is not supported by the Firebase C++ SDK on Windows." ));
478476}
479477
480478void FirebaseStoragePlugin::ReferenceListAll (
481479 const InternalStorageFirebaseApp& app,
482480 const InternalStorageReference& reference,
483481 std::function<void (ErrorOr<InternalListResult> reply)> result) {
484- // C++ doesn't support listAll yet
485- flutter::EncodableList items = flutter::EncodableList ();
486- flutter::EncodableList prefixs = flutter::EncodableList ();
487- InternalListResult pigeon_result = InternalListResult (items, prefixs);
488- result (pigeon_result);
482+ result (FlutterError (
483+ " unimplemented" ,
484+ " Listing files is not supported by the Firebase C++ SDK on Windows." ));
489485}
490486
491487void FirebaseStoragePlugin::ReferenceGetData (
Original file line number Diff line number Diff line change @@ -224,6 +224,28 @@ void setupReferenceTests() {
224224 skip: defaultTargetPlatform == TargetPlatform .windows,
225225 );
226226
227+ test (
228+ 'list operations report that they are unsupported on Windows' ,
229+ () async {
230+ final Reference ref = storage.ref ('flutter-tests/list' );
231+ final unsupportedError = isA <FirebaseException >()
232+ .having ((error) => error.code, 'code' , 'unimplemented' )
233+ .having (
234+ (error) => error.message,
235+ 'message' ,
236+ 'Listing files is not supported by the Firebase C++ SDK on '
237+ 'Windows.' ,
238+ );
239+
240+ await expectLater (
241+ ref.list (const ListOptions (maxResults: 25 )),
242+ throwsA (unsupportedError),
243+ );
244+ await expectLater (ref.listAll (), throwsA (unsupportedError));
245+ },
246+ skip: defaultTargetPlatform != TargetPlatform .windows,
247+ );
248+
227249 test (
228250 'listAll' ,
229251 () async {
You can’t perform that action at this time.
0 commit comments