@@ -17,8 +17,7 @@ Future<void> main() async {
17
17
final message = "Hello, World!" ;
18
18
final cipher = runSample (sodium, message);
19
19
20
- querySelector ('#output' )! .innerHtml =
21
- 'Sodium Version: ${sodium .version }<br/>'
20
+ querySelector ('#output' )! .innerHtml = 'Sodium Version: ${sodium .version }<br/>'
22
21
'Plain text: $message <br/>'
23
22
'Secret box cipher:$cipher ' ;
24
23
}
@@ -30,7 +29,9 @@ Future<dynamic> _initImpl() async {
30
29
setProperty (
31
30
window,
32
31
'sodium' ,
33
- SodiumBrowserInit (onload: allowInterop (completer.complete)),
32
+ SodiumBrowserInit (
33
+ onload: allowInterop (completer.complete),
34
+ ),
34
35
);
35
36
print ('> setup window' );
36
37
@@ -45,12 +46,10 @@ Future<dynamic> _initImpl() async {
45
46
46
47
return completer.future.timeout (
47
48
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
+ ),
55
54
);
56
55
}
0 commit comments