Skip to content

Instantly share code, notes, and snippets.

void main() {
Map map = {
0: "not null",
1: null
};
bool test(key) => map[key] == null;
// This will remove all key/value pairs where the value is null.
map.keys.where(test).toList().forEach(map.remove);
void main() {
Map map = {
0: "not null",
1: null
};
bool test(key) => map[key] == null;
// This will remove all key/value pairs where the value is null.
map.keys.where(test).toList().forEach(map.remove);
void main() {
Map map = {
0: "not null",
1: null
};
bool test(key) => map[key] == null;
//test
// This will remove all key/value pairs where the value is null.
map.keys.where(test).toList().forEach(map.remove);
<!doctype html>
<html>
<head>
<!--material design lite-->
<link rel="stylesheet" href="https://storage.googleapis.com/code.getmdl.io/1.0.0/material.indigo-indigo.min.css">
<link rel="stylesheet" href="styles.css">
</head>
<body>
@kasperpeulen
kasperpeulen / main.dart
Last active August 29, 2015 14:26
dart.core_Map.remove
void main() {
Map map = {
0: "not null",
1: null
};
bool test(key) => map[key] == null;
//test
// This will remove all key/value pairs where the value is null.
map.keys.where(test).toList().forEach(map.remove);
@kasperpeulen
kasperpeulen / index.html
Last active August 29, 2015 14:26
tutorial2
<!doctype html>
<html>
<head>
<!--material design lite-->
<link rel="stylesheet" href="https://storage.googleapis.com/code.getmdl.io/1.0.0/material.indigo-indigo.min.css">
<link rel="stylesheet" href="styles.css">
</head>
<body>
void main() {
Map map = {
0: "not null",
1: null
};
bool test(key) => map[key] == null;
//test
// This will remove all key/value pairs where the value is null.
map.keys.where(test).toList().forEach(map.remove);
<!doctype html>
<html>
<head>
<!--material design lite-->
<link rel="stylesheet" href="https://storage.googleapis.com/code.getmdl.io/1.0.0/material.indigo-indigo.min.css">
<link rel="stylesheet" href="styles.css">
</head>
<body>
void main() {
Map map = {
0: "not null",
1: null
};
bool test(key) => map[key] == null;
//test
// This will remove all key/value pairs where the value is null.
map.keys.where(test).toList().forEach(map.remove);
<!doctype html>
<html>
<head>
<!--material design lite-->
<link rel="stylesheet" href="https://storage.googleapis.com/code.getmdl.io/1.0.0/material.indigo-indigo.min.css">
<link rel="stylesheet" href="styles.css">
</head>
<body>