An open API service indexing awesome lists of open source software.

https://github.com/henryquan/dart_safeguard

Safe Guard for Dart
https://github.com/henryquan/dart_safeguard

dart flutter guard

Last synced: 3 months ago
JSON representation

Safe Guard for Dart

Awesome Lists containing this project

README

        

# Dart Safeguard

Please write a model whenever possible and avoid using this. However, this is indeed really handy to retreive data from an object.

# Usage

```
obj - anything
path - names connected with dots
dval - a default value
```

## Path

For example, `This.is.an.example.1.value` will get `1` from the following object.

```dart
{
'This': {
'is': {
'an': {
'example': [
{
'value': 0
},
{
'value': 1
},
]
}
}
}
};
```

Try it on https://dartpad.dartlang.org/