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
- Host: GitHub
- URL: https://github.com/henryquan/dart_safeguard
- Owner: HenryQuan
- Created: 2019-03-28T02:47:17.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-19T03:02:55.000Z (about 5 years ago)
- Last Synced: 2025-01-18T04:28:51.759Z (4 months ago)
- Topics: dart, flutter, guard
- Language: Dart
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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/