Browse Source

fix(neon_files): Use universal_io to compile for web

Signed-off-by: jld3103 <jld3103yt@gmail.com>
pull/372/head
jld3103 1 year ago
parent
commit
65ff49345f
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 2
      packages/neon/neon/lib/src/app.dart
  2. 3
      packages/neon/neon/lib/src/platform/linux.dart
  3. 2
      packages/neon/neon/lib/src/platform/platform.dart
  4. 3
      packages/neon/neon/lib/src/utils/global_options.dart
  5. 2
      packages/neon/neon/lib/src/utils/save_file.dart
  6. 2
      packages/neon/neon/lib/src/widgets/error.dart
  7. 1
      packages/neon/neon/pubspec.yaml
  8. 2
      packages/neon/neon_files/lib/neon_files.dart
  9. 1
      packages/neon/neon_files/pubspec.yaml

2
packages/neon/neon/lib/src/app.dart

@ -1,6 +1,5 @@
import 'dart:async'; import 'dart:async';
import 'dart:convert'; import 'dart:convert';
import 'dart:io';
import 'package:collection/collection.dart'; import 'package:collection/collection.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -27,6 +26,7 @@ import 'package:nextcloud/core.dart' as core;
import 'package:nextcloud/nextcloud.dart'; import 'package:nextcloud/nextcloud.dart';
import 'package:quick_actions/quick_actions.dart'; import 'package:quick_actions/quick_actions.dart';
import 'package:tray_manager/tray_manager.dart' as tray; import 'package:tray_manager/tray_manager.dart' as tray;
import 'package:universal_io/io.dart';
import 'package:window_manager/window_manager.dart'; import 'package:window_manager/window_manager.dart';
@internal @internal

3
packages/neon/neon/lib/src/platform/linux.dart

@ -1,9 +1,8 @@
import 'dart:io';
import 'package:meta/meta.dart'; import 'package:meta/meta.dart';
import 'package:neon/src/platform/platform.dart'; import 'package:neon/src/platform/platform.dart';
import 'package:path/path.dart' as p; import 'package:path/path.dart' as p;
import 'package:sqflite_common_ffi/sqflite_ffi.dart'; import 'package:sqflite_common_ffi/sqflite_ffi.dart';
import 'package:universal_io/io.dart';
@immutable @immutable
@internal @internal

2
packages/neon/neon/lib/src/platform/platform.dart

@ -1,9 +1,9 @@
import 'dart:async'; import 'dart:async';
import 'dart:io';
import 'package:meta/meta.dart'; import 'package:meta/meta.dart';
import 'package:neon/src/platform/android.dart'; import 'package:neon/src/platform/android.dart';
import 'package:neon/src/platform/linux.dart'; import 'package:neon/src/platform/linux.dart';
import 'package:universal_io/io.dart';
/// Implements platform specific functionality and exposes the availability of certain features. /// Implements platform specific functionality and exposes the availability of certain features.
@immutable @immutable

3
packages/neon/neon/lib/src/utils/global_options.dart

@ -1,4 +1,4 @@
import 'dart:io'; import 'dart:async';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:meta/meta.dart'; import 'package:meta/meta.dart';
@ -10,6 +10,7 @@ import 'package:neon/src/settings/models/options_collection.dart';
import 'package:neon/src/settings/models/storage.dart'; import 'package:neon/src/settings/models/storage.dart';
import 'package:package_info_plus/package_info_plus.dart'; import 'package:package_info_plus/package_info_plus.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:universal_io/io.dart';
const unifiedPushNextPushID = 'org.unifiedpush.distributor.nextpush'; const unifiedPushNextPushID = 'org.unifiedpush.distributor.nextpush';

2
packages/neon/neon/lib/src/utils/save_file.dart

@ -1,9 +1,9 @@
import 'dart:io';
import 'dart:typed_data'; import 'dart:typed_data';
import 'package:file_picker/file_picker.dart'; import 'package:file_picker/file_picker.dart';
import 'package:flutter_file_dialog/flutter_file_dialog.dart'; import 'package:flutter_file_dialog/flutter_file_dialog.dart';
import 'package:neon/src/platform/platform.dart'; import 'package:neon/src/platform/platform.dart';
import 'package:universal_io/io.dart';
Future<String?> saveFileWithPickDialog(final String fileName, final Uint8List data) async { Future<String?> saveFileWithPickDialog(final String fileName, final Uint8List data) async {
if (NeonPlatform.instance.shouldUseFileDialog) { if (NeonPlatform.instance.shouldUseFileDialog) {

2
packages/neon/neon/lib/src/widgets/error.dart

@ -1,5 +1,4 @@
import 'dart:async'; import 'dart:async';
import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:http/http.dart'; import 'package:http/http.dart';
@ -10,6 +9,7 @@ import 'package:neon/src/router.dart';
import 'package:neon/src/utils/exceptions.dart'; import 'package:neon/src/utils/exceptions.dart';
import 'package:neon/src/utils/provider.dart'; import 'package:neon/src/utils/provider.dart';
import 'package:nextcloud/nextcloud.dart'; import 'package:nextcloud/nextcloud.dart';
import 'package:universal_io/io.dart';
/// An indicator that an [error] has occurred. /// An indicator that an [error] has occurred.
/// ///

1
packages/neon/neon/pubspec.yaml

@ -51,6 +51,7 @@ dependencies:
tray_manager: ^0.2.0 tray_manager: ^0.2.0
unifiedpush: ^5.0.0 unifiedpush: ^5.0.0
unifiedpush_android: ^2.0.0 unifiedpush_android: ^2.0.0
universal_io: ^2.0.0
url_launcher: ^6.1.0 url_launcher: ^6.1.0
vector_graphics: ^1.0.0 vector_graphics: ^1.0.0
window_manager: ^0.3.0 window_manager: ^0.3.0

2
packages/neon/neon_files/lib/neon_files.dart

@ -1,7 +1,6 @@
library neon_files; library neon_files;
import 'dart:async'; import 'dart:async';
import 'dart:io';
import 'package:collection/collection.dart'; import 'package:collection/collection.dart';
import 'package:file_icons/file_icons.dart'; import 'package:file_icons/file_icons.dart';
@ -30,6 +29,7 @@ import 'package:path_provider/path_provider.dart';
import 'package:queue/queue.dart'; import 'package:queue/queue.dart';
import 'package:rxdart/rxdart.dart'; import 'package:rxdart/rxdart.dart';
import 'package:share_plus/share_plus.dart'; import 'package:share_plus/share_plus.dart';
import 'package:universal_io/io.dart';
part 'blocs/browser.dart'; part 'blocs/browser.dart';
part 'blocs/files.dart'; part 'blocs/files.dart';

1
packages/neon/neon_files/pubspec.yaml

@ -36,6 +36,7 @@ dependencies:
queue: ^3.0.0 queue: ^3.0.0
rxdart: ^0.27.0 rxdart: ^0.27.0
share_plus: ^7.0.0 share_plus: ^7.0.0
universal_io: ^2.0.0
dev_dependencies: dev_dependencies:
build_runner: ^2.4.6 build_runner: ^2.4.6

Loading…
Cancel
Save