Skip to content

Commit

Permalink
Upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Amir-P committed Jul 17, 2023
1 parent 288766b commit ba55e6c
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 29 deletions.
4 changes: 4 additions & 0 deletions lib/chunked_uploader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ import 'package:async/async.dart';
import 'package:dio/dio.dart';
import 'package:universal_io/io.dart';

/// Uploads large files by chunking them into smaller parts
class ChunkedUploader {
final Dio _dio;

const ChunkedUploader(this._dio);

/// Uploads the file using it's data stream
/// Suitable for Web platform since the file path isn't available
Future<Response?> upload({
required Stream<List<int>> fileDataStream,
required String fileName,
Expand Down Expand Up @@ -39,6 +42,7 @@ class ChunkedUploader {
headersCallback: headersCallback,
).upload();

/// Uploads the file using it's path
Future<Response?> uploadUsingFilePath({
required String filePath,
required String fileName,
Expand Down
55 changes: 30 additions & 25 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,92 +5,97 @@ packages:
dependency: "direct main"
description:
name: async
url: "https://pub.dartlang.org"
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
url: "https://pub.dev"
source: hosted
version: "2.10.0"
version: "2.11.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
sha256: "8e36feea6de5ea69f2199f29cf42a450a855738c498b57c0b980e2d3cca9c362"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
url: "https://pub.dev"
source: hosted
version: "1.16.0"
crypto:
dependency: transitive
description:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.0"
version: "1.17.2"
dio:
dependency: "direct main"
description:
name: dio
url: "https://pub.dartlang.org"
sha256: a9d76e72985d7087eb7c5e7903224ae52b337131518d127c554b9405936752b8
url: "https://pub.dev"
source: hosted
version: "4.0.6"
version: "5.2.1+1"
http_parser:
dependency: transitive
description:
name: http_parser
url: "https://pub.dartlang.org"
sha256: e362d639ba3bc07d5a71faebb98cde68c05bfbcfbbb444b60b6f60bb67719185
url: "https://pub.dev"
source: hosted
version: "4.0.0"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
url: "https://pub.dev"
source: hosted
version: "1.8.0"
version: "1.9.1"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
url: "https://pub.dev"
source: hosted
version: "1.8.3"
source_span:
dependency: transitive
description:
name: source_span
url: "https://pub.dartlang.org"
sha256: d5f89a9e52b36240a80282b3dc0667dd36e53459717bb17b8fb102d30496606a
url: "https://pub.dev"
source: hosted
version: "1.8.1"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
sha256: dd11571b8a03f7cadcf91ec26a77e02bfbd6bbba2a512924d3116646b4198fc4
url: "https://pub.dev"
source: hosted
version: "1.1.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
sha256: a88162591b02c1f3a3db3af8ce1ea2b374bd75a7bb8d5e353bcfbdc79d719830
url: "https://pub.dev"
source: hosted
version: "1.2.0"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
sha256: "53bdf7e979cfbf3e28987552fd72f637e63f3c8724c9e56d9246942dc2fa36ee"
url: "https://pub.dev"
source: hosted
version: "1.3.0"
universal_io:
dependency: "direct main"
description:
name: universal_io
url: "https://pub.dartlang.org"
sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad"
url: "https://pub.dev"
source: hosted
version: "2.0.4"
version: "2.2.2"
sdks:
dart: ">=2.18.0 <3.0.0"
dart: ">=2.18.0 <4.0.0"
8 changes: 4 additions & 4 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ homepage: https://github.com/Taskulu/chunked_uploader
repository: https://github.com/Taskulu/chunked_uploader

environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=2.12.0 <4.0.0'

dependencies:
dio: ">=4.0.0 <5.0.0"
universal_io: ^2.0.4
async: ^2.9.0
dio: ">=4.0.0 <6.0.0"
universal_io: ^2.2.2
async: ^2.11.0

0 comments on commit ba55e6c

Please sign in to comment.