This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
class A { | |
final FutureOr<int> a; | |
const A({this.a: 2}); | |
} | |
void main() async { | |
final b = const A(); // Here we have an error; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Advanced config for NGINX | |
server_tokens off; | |
add_header X-XSS-Protection "1; mode=block"; | |
add_header X-Content-Type-Options nosniff; | |
# Redirect all HTTP traffic to HTTPS | |
server { | |
listen 80; | |
server_name www.domain.com domain.com; | |
return 301 https://$host$request_uri; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
final a = ['11', '22', '33']; | |
final m = new Map<String, int>.fromIterable( | |
a, | |
key: (String s) => s.substring(1), | |
value: (String s) => s.codeUnitAt(0), | |
); | |
print(m); |