Skip to content

Commit

Permalink
Flutter test snippets (#20)
Browse files Browse the repository at this point in the history
* Created snippets for the test and testWidgets functions

* new line at EOF
  • Loading branch information
TNorbury committed May 2, 2020
1 parent 10bd5d3 commit ba6d825
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ Awesome Flutter Snippets is a collection of commonly used Flutter classes and me
| `cupeapp` | Cupertino Package | Create a New Cupertino App.
| `tweenAnimationBuilder` | Tween Animation Builder | Widget builder that animates a property of a Widget to a target value whenever the target value changes.
| `valueListenableBuilder` | Value Listenable Builder | Given a ValueListenable<T> and a builder which builds widgets from concrete values of T, this class will automatically register itself as a listener of the ValueListenable and call the builder with updated values when the value changes.
| `f-test` | Test | Create a test function.
| `f-testWidgets` | Test Widgets | Create a testWidgets function.

<br>

Expand Down
20 changes: 20 additions & 0 deletions snippets/snippets.json
Original file line number Diff line number Diff line change
Expand Up @@ -418,5 +418,25 @@
" ),"
],
"description": "Given a ValueListenable<T> and a builder which builds widgets from concrete values of T, this class will automatically register itself as a listener of the ValueListenable and call the builder with updated values when the value changes."
},
"Test": {
"prefix": "f-test",
"body": [
"test(",
" \"${1:test description}\",",
" () {},",
");"
],
"description": "Create a test function"
},
"Test Widgets": {
"prefix": "f-testWidgets",
"body": [
"testWidgets(",
" \"${1:test description}\",",
" (WidgetTester tester) async {},",
");"
],
"description": "Create a testWidgets function"
}
}

0 comments on commit ba6d825

Please sign in to comment.