-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.g.dart
61 lines (51 loc) · 1.73 KB
/
main.g.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'main.dart';
// **************************************************************************
// TemplateGenerator
// **************************************************************************
// ignore_for_file: duplicate_ignore
// ignore_for_file: unused_local_variable
// ignore_for_file: unnecessary_string_interpolations
@GenerateFor(_productTemplate)
TrustedHtml productTemplate(Product product) {
var $ = StringBuffer();
$.write(' ');
if (template.nonNullBool(product.icon != null)) {
$.write('<img src="${TrustedHtml.escape.attribute(product.icon)}">');
}
$.write('\n ');
$.write('<h1${template.classAttribute({'new': product.isNew})}>');
$.write('${TrustedHtml.escape(product)}');
$.write('</h1>');
$.write('\n ');
return TrustedHtml($.toString());
}
// ignore_for_file: duplicate_ignore
// ignore_for_file: unused_local_variable
// ignore_for_file: unnecessary_string_interpolations
@GenerateFor(_pageTemplate)
TrustedHtml pageTemplate(Product product, {List<String>? scripts}) {
var $ = StringBuffer();
var script = '';
$.write('<html lang="${TrustedHtml.escape.attribute(Language.current)}">');
$.write('<head>');
$.write('\n ');
$.write('<title>');
$.write('${TrustedHtml.escape(product.name)} - My site');
$.write('</title>');
$.write('\n ');
for (var script in template.nonNullIterable(scripts)) {
$.write('<script src="${TrustedHtml.escape.attribute(script)}" async="">');
$.write('</script>');
}
$.write('\n ');
$.write('</head>');
$.write('\n ');
$.write('<body>');
$.write('''
${TrustedHtml.escape(productTemplate(product))}
''');
$.write('</body>');
$.write('</html>');
return TrustedHtml($.toString());
}