diff --git a/templates/dart/lib/src/client_io.dart.twig b/templates/dart/lib/src/client_io.dart.twig index 5b7e291c8..e93251525 100644 --- a/templates/dart/lib/src/client_io.dart.twig +++ b/templates/dart/lib/src/client_io.dart.twig @@ -153,7 +153,7 @@ class ClientIO extends ClientBase with ClientMixin { } while (offset < size) { - var chunk; + List chunk = []; if (file.bytes != null) { final end = min(offset + CHUNK_SIZE-1, size-1); chunk = file.bytes!.getRange(offset, end).toList(); diff --git a/templates/flutter/.travis.yml.twig b/templates/flutter/.travis.yml.twig index 8e11af1a5..1b299c31b 100644 --- a/templates/flutter/.travis.yml.twig +++ b/templates/flutter/.travis.yml.twig @@ -24,6 +24,6 @@ install: deploy: provider: script skip_cleanup: true - script: dart format ./lib/ && flutter pub publish -f + script: cd $TRAVIS_BUILD_DIR && dart format ./lib/ && flutter pub publish -f on: tags: true diff --git a/templates/flutter/lib/src/client_io.dart.twig b/templates/flutter/lib/src/client_io.dart.twig index 125ef2aa6..32da13e6a 100644 --- a/templates/flutter/lib/src/client_io.dart.twig +++ b/templates/flutter/lib/src/client_io.dart.twig @@ -274,7 +274,7 @@ class ClientIO extends ClientBase with ClientMixin { } while (offset < size) { - var chunk; + List chunk = []; if (file.bytes != null) { final end = min(offset + CHUNK_SIZE-1, size-1); chunk = file.bytes!.getRange(offset, end).toList();