From fde7f780cd22d248a876fb024277feb60d89858d Mon Sep 17 00:00:00 2001 From: Tyler Norbury Date: Thu, 30 Apr 2020 08:30:42 -0700 Subject: [PATCH 1/2] Created snippets for the test and testWidgets functions --- README.md | 2 ++ snippets/snippets.json | 22 +++++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5ff37d4..03f9a25 100644 --- a/README.md +++ b/README.md @@ -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 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.
diff --git a/snippets/snippets.json b/snippets/snippets.json index eaa53c7..9d899a4 100644 --- a/snippets/snippets.json +++ b/snippets/snippets.json @@ -418,5 +418,25 @@ " )," ], "description": "Given a ValueListenable 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" } -} +} \ No newline at end of file From 73776cb6faa31a19ac35ffad0c2bbc5798a7dcd6 Mon Sep 17 00:00:00 2001 From: Tyler Norbury Date: Thu, 30 Apr 2020 08:31:53 -0700 Subject: [PATCH 2/2] new line at EOF --- snippets/snippets.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/snippets.json b/snippets/snippets.json index 9d899a4..f81e271 100644 --- a/snippets/snippets.json +++ b/snippets/snippets.json @@ -439,4 +439,4 @@ ], "description": "Create a testWidgets function" } -} \ No newline at end of file +}