Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
48 changes: 24 additions & 24 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,32 @@ concurrency:
jobs:
analyze:
timeout-minutes: 5
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: kuhnroyal/flutter-fvm-config-action@v2
id: fvm-config-action
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: ${{ env.FLUTTER_CHANNEL }}
- name: Get all dependencies
run: flutter pub get
- name: analyze app
run: flutter analyze
- uses: actions/checkout@v3
- uses: kuhnroyal/flutter-fvm-config-action@v2
id: fvm-config-action
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: ${{ env.FLUTTER_CHANNEL }}
- name: Get all dependencies
run: flutter pub get
- name: analyze app
run: flutter analyze

format:
timeout-minutes: 5
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: kuhnroyal/flutter-fvm-config-action@v2
id: fvm-config-action
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: ${{ env.FLUTTER_CHANNEL }}
- name: Get all dependencies
run: flutter pub get
- name: Check formatting
run: dart format -o none --set-exit-if-changed $(find . -name '*.dart' ! -name '*.g.dart' ! -name '*.freezed.dart' ! -path '*/generated/*' ! -path '*/gen/*')
- uses: actions/checkout@v3
- uses: kuhnroyal/flutter-fvm-config-action@v2
id: fvm-config-action
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: ${{ env.FLUTTER_CHANNEL }}
- name: Get all dependencies
run: flutter pub get
- name: Check formatting
run: dart format -o none --set-exit-if-changed $(find . -name '*.dart' ! -name '*.g.dart' ! -name '*.freezed.dart' ! -path '*/generated/*' ! -path '*/gen/*')
22 changes: 21 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
TODO: Add your license here.
MIT License

Copyright (c) 2026 Tapped

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
47 changes: 24 additions & 23 deletions lib/src/integration_test/browser_stack_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,30 @@ class BrowserStackApi {
stdout.writeln('Upload: $filename:\n');

int? uploadPercent;
final request = ProgressUpdateMultipartRequest(
"POST",
Uri.parse(url),
onProgress: (bytes, totalBytes) {
final remainingMbs = (bytes / 1024 / 1024);
final totalMbs = (totalBytes / 1024 / 1024);

final percent = ((100 * remainingMbs) / totalMbs).round();

if (percent != uploadPercent) {
// https://stackoverflow.com/questions/72917845/how-to-remove-previous-printed-line-from-console-in-dart
// Append a \r to make sure we update the statement instead of adding a new one.
// Keep in mind to use write instead of writeln.
stdout.write(
'\r🚀 Uploading file: $filename... $percent% (${remainingMbs.toStringAsFixed(2)}MB / ${totalMbs.toStringAsFixed(2)}MB)',
);
uploadPercent = percent;
}
},
)
..headers[HttpHeaders.authorizationHeader] = basicAuthHeader
..files.add(await http.MultipartFile.fromPath("file", file.path))
..fields.addAll(fields);
final request =
ProgressUpdateMultipartRequest(
"POST",
Uri.parse(url),
onProgress: (bytes, totalBytes) {
final remainingMbs = (bytes / 1024 / 1024);
final totalMbs = (totalBytes / 1024 / 1024);

final percent = ((100 * remainingMbs) / totalMbs).round();

if (percent != uploadPercent) {
// https://stackoverflow.com/questions/72917845/how-to-remove-previous-printed-line-from-console-in-dart
// Append a \r to make sure we update the statement instead of adding a new one.
// Keep in mind to use write instead of writeln.
stdout.write(
'\r🚀 Uploading file: $filename... $percent% (${remainingMbs.toStringAsFixed(2)}MB / ${totalMbs.toStringAsFixed(2)}MB)',
);
uploadPercent = percent;
}
},
)
..headers[HttpHeaders.authorizationHeader] = basicAuthHeader
..files.add(await http.MultipartFile.fromPath("file", file.path))
..fields.addAll(fields);

final response = await http.Response.fromStream(await request.send());

Expand Down
Loading