Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Awesome Flutter Snippets is a collection of commonly used Flutter classes and me
| `mounted` | Mounted | Whether this State object is currently in a tree. |
| `snk` | Sink | A Sink is the input of a stream. |
| `strm` | Stream | A source of asynchronous data events. A stream can be of any data type. |
| `subj` | Subject | A BehaviorSubject is also a broadcast StreamController which returns an Observable rather than a Stream. |
| `toStr` | To String | Returns a string representation of this object. |
| `debugP` | Debug Print | Prints a message to the console, which you can access using the flutter tool's `logs` command (flutter logs). |
| `importM` | Material Package | Import Material package.
Expand Down
10 changes: 9 additions & 1 deletion snippets/snippets.json
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,14 @@
],
"description": "A source of asynchronous data events. A stream can be of any data type <T>"
},
"Subject": {
"prefix": "subj",
"body": [
"Stream<${1:type}> get ${2:name} => _${2:name}Subject.stream;",
"final _${2:name}Subject = BehaviorSubject<${1:type}>();"
],
"description": "A BehaviorSubject is also a broadcast StreamController which returns an Observable rather than a Stream."
},
"toString": {
"prefix": "toStr",
"body": [
Expand Down Expand Up @@ -380,4 +388,4 @@
"}"
]
}
}
}