Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent web build from failing #273

Merged
merged 2 commits into from
Jul 25, 2024
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
3 changes: 1 addition & 2 deletions lib/models/answer.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'package:flutter/foundation.dart';
import 'package:intl/intl.dart';

import 'question_catalog/answer_definition.dart';
Expand Down Expand Up @@ -239,7 +238,7 @@ class DurationAnswer extends Answer<DurationAnswerDefinition, Duration> {

// wrap duration parts according to the units present in the output

const maxInteger = kIsWeb ? 0x20000000000000 : 0x7FFFFFFFFFFFFFFF;
final maxInteger = double.maxFinite.toInt();
7h30n3 marked this conversation as resolved.
Show resolved Hide resolved
var (wrapHours, wrapMinutes, wrapSeconds) = (maxInteger, maxInteger, maxInteger);

if (definition.input.days.output) {
Expand Down
4 changes: 2 additions & 2 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<link rel="manifest" href="manifest.json">
<script>
// The value below is injected by flutter build, do not touch.
var serviceWorkerVersion = null;
var serviceWorkerVersion = '{{flutter_service_worker_version}}';
</script>
<!-- This script adds the flutter initialization JS code -->
<script src="flutter.js" defer></script>
Expand All @@ -40,7 +40,7 @@
<script>
window.addEventListener('load', function(ev) {
// Download main.dart.js
_flutter.loader.loadEntrypoint({
_flutter.loader.load({
serviceWorker: {
serviceWorkerVersion: serviceWorkerVersion,
}
Expand Down
Loading