Skip to content

Commit 9070071

Browse files
committed
..
1 parent c7debbe commit 9070071

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

packages/sodium/example/web/main_web.dart

+9-10
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ Future<void> main() async {
1717
final message = "Hello, World!";
1818
final cipher = runSample(sodium, message);
1919

20-
querySelector('#output')!.innerHtml =
21-
'Sodium Version: ${sodium.version}<br/>'
20+
querySelector('#output')!.innerHtml = 'Sodium Version: ${sodium.version}<br/>'
2221
'Plain text: $message<br/>'
2322
'Secret box cipher:$cipher';
2423
}
@@ -30,7 +29,9 @@ Future<dynamic> _initImpl() async {
3029
setProperty(
3130
window,
3231
'sodium',
33-
SodiumBrowserInit(onload: allowInterop(completer.complete)),
32+
SodiumBrowserInit(
33+
onload: allowInterop(completer.complete),
34+
),
3435
);
3536
print('> setup window');
3637

@@ -45,12 +46,10 @@ Future<dynamic> _initImpl() async {
4546

4647
return completer.future.timeout(
4748
const Duration(seconds: 5),
48-
onTimeout:
49-
() =>
50-
throw Exception(
51-
'You must first download sodium.js from '
52-
'https://github.com/jedisct1/libsodium.js '
53-
'and place it in the web folder!',
54-
),
49+
onTimeout: () => throw Exception(
50+
'You must first download sodium.js from '
51+
'https://github.com/jedisct1/libsodium.js/tree/master/dist/browsers '
52+
'and place it in the web folder!',
53+
),
5554
);
5655
}

0 commit comments

Comments
 (0)