Skip to content

Commit dffe70e

Browse files
authored
Flutter 3 Updates (#61)
* rename prefix for widgetTest * Fixed bug in inheritedW code * Migrate remaining widgets to Flutter 3 * Update package version to 4.0.0 * Update Changelog * Update Readme info * sanitize svg
1 parent 004dba0 commit dffe70e

File tree

5 files changed

+166
-93
lines changed

5 files changed

+166
-93
lines changed

CHANGELOG.md

Lines changed: 53 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,105 @@
1+
# CHANGELOG
2+
13
# Changelog
4+
25
All notable changes to this project will be documented in this file.
36

47
## [Changes]
8+
9+
### 4.0.0
10+
11+
- **Breaking: Change `testWdigets` to `f-testWidgets` to better align with function snippets**
12+
- Support for `group` test function `f-group`
13+
- Support for app localisation import `importAL`
14+
- Support for Flutter 3
15+
- Migrate to super initialisers
16+
- Not on Flutter 3? The Flutter 2.xx branch is up to date and ready for you :)
17+
- Fixed Lint issue - Added `const` to applicable widgets
18+
519
### 3.0.3
6-
- Use State<T> createState on statefulW snippet (Thank you [@marcossevilla](https://github.com/Nash0x7E2/awesome-flutter-snippets/commit/b18505ae59128ce8c2ff4cc60100603dc11259d5))
20+
21+
- Use State
22+
23+
createState on statefulW snippet (Thank you [@marcossevilla](https://github.com/Nash0x7E2/awesome-flutter-snippets/commit/b18505ae59128ce8c2ff4cc60100603dc11259d5))
24+
725

826
### 3.0.2
27+
928
- Removed trailing whitespaces (Thank you @leoshusar https://github.com/Nash0x7E2/awesome-flutter-snippets/pull/45)
1029
- Make widgets default to Container only (Thank you @Ascenio https://github.com/Nash0x7E2/awesome-flutter-snippets/pull/43)
1130

1231
### 3.0.1
32+
1333
- Support for `Listview.builder`
1434
- Support for `GridView.count`
1535
- Support for `GridView.extent`
1636

1737
### 3.0.0
18-
- Update all widgets to null safety
38+
39+
- Update all widgets to null safety
1940
- Update engine to `1.56.0`
2041

2142
### 2.0.4
43+
2244
- Add Flutter test import (Thank you @arthurdenner https://github.com/Nash0x7E2/awesome-flutter-snippets/pull/16)
2345
- Support for unit and widget test functions (Thank you @TNorbury https://github.com/Nash0x7E2/awesome-flutter-snippets/pull/20)
2446
- Added support for Listview.Separated (Thank you @timilehinjegede https://github.com/Nash0x7E2/awesome-flutter-snippets/pull/26)
2547
- Fixed inheritedW (Thank you @ianwith https://github.com/Nash0x7E2/awesome-flutter-snippets/pull/22)
2648

2749
### 2.0.3
50+
2851
- Support for `BehaviorSubject` (Thanks @sinadarvi https://github.com/Nash0x7E2/awesome-flutter-snippets/pull/7)
2952
- Support for `TweenAnimationBuilder`
3053
- Support for `ValueListenableBuilder`
3154
- Fixed various bug fixes and typos
3255

3356
### 2.0.2
34-
- Resolved issue [#6](https://github.com/Nash0x7E2/awesome-flutter-snippets/issues/6)
3557

36-
### 2.0.1
58+
- Resolved issue [#6](https://github.com/Nash0x7E2/awesome-flutter-snippets/issues/6)
59+
60+
### 2.0.1
61+
3762
- Removed Stateful and Statless Widget since they are included with DartCode.
3863
- Added Material App.
3964
- Added Cupertino App.
4065

41-
### 2.0.0
66+
### 2.0.0
67+
4268
- Changed prefixes to use a keyword associated with the widget/function (in camel case)
43-
- Bug fixes
69+
- Bug fixes
4470

4571
### 1.0.6
72+
4673
- Added support for debug print
47-
- Added support for to string
48-
- Added support for importing Cupertino package
74+
- Added support for to string
75+
- Added support for importing Cupertino package
4976
- Added support for importing Material package (PR #2)
5077
- Added child logic to Stateless and Stateful widgets snippets (PR #3)
5178

52-
### 1.0.5
53-
- Adjusted tab stops to improve efficiency and workflow
79+
### 1.0.5
80+
81+
- Adjusted tab stops to improve efficiency and workflow
5482
- Removed blank Containers from builders in favor of a tab stop with semi-colon
5583
- Added trailing comma at the end of child parameter
5684

5785
### 1.0.4
58-
- Fixed formatting
86+
87+
- Fixed formatting
5988
- Removed unused tabs
60-
- Corrected spelling errors
89+
- Corrected spelling errors
6190

6291
### 1.0.3
63-
Added support for:
64-
- Stream
65-
- Sink
66-
- Inherited Widget
67-
- Mounted
68-
- NoSuchMethod
69-
70-
71-
### 1.0.2
72-
Added support for:
73-
- Stateful Builder
74-
- Orientation Builder
75-
- Layout Builder
76-
- Single Child Scroll View
77-
- Future Builder
78-
79-
80-
### 1.0.1
81-
Added support for:
82-
- Stream Builder
83-
- Animated Builder
84-
- Custom Scroll View
85-
- Listview.Builder
92+
93+
Added support for: - Stream - Sink - Inherited Widget - Mounted - NoSuchMethod
94+
95+
### 1.0.2
96+
97+
Added support for: - Stateful Builder - Orientation Builder - Layout Builder - Single Child Scroll View - Future Builder
98+
99+
### 1.0.1
100+
101+
Added support for: - Stream Builder - Animated Builder - Custom Scroll View - Listview.Builder
86102

87103
### 1.0.0
88-
- Initial Relase
104+
105+
- Initial Relase

README.md

Lines changed: 69 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
1-
# Awesome Flutter Snippets
2-
Awesome Flutter Snippets is a collection of commonly used Flutter classes and methods. It increases your speed of development by eliminating most of the boilerplate code associated with creating a widget. Widgets such as `StreamBuilder` and `SingleChildScrollView` can be created by typing the shortcut `streamBldr` and `singleChildSV` respectively.
3-
<br>
1+
# README
2+
3+
Awesome Flutter Snippets is a collection of commonly used Flutter classes and methods. It increases your speed of development by eliminating most of the boilerplate code associated with creating a widget. Widgets such as `StreamBuilder` and `SingleChildScrollView` can be created by typing the shortcut `streamBldr` and `singleChildSV` respectively.
4+
5+
<br/>
6+
47
## Features
5-
- Speeds up development
6-
- Eliminates boilerplate
8+
9+
- Speeds up development
10+
- Eliminates boilerplate
711
- Supports complex widgets (Eg: Custom Clipper and Custom Paint)
8-
<br>
12+
13+
<br/>
14+
15+
<center>
16+
<a href="https://newsletter.neevash.dev/" target="_blank"><img width="700px" src="https://raw.githubusercontent.com/Nash0x7E2/awesome-flutter-snippets/nash/flutter-3-validation/images/the_flutter_bi_weekly.svg?sanitize=true"/></a>
17+
</center>
18+
19+
&nbsp;
920

1021
| Shortcut | Expanded | Description |
1122
| ---------- | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -43,110 +54,116 @@ Awesome Flutter Snippets is a collection of commonly used Flutter classes and me
4354
| `importM` | Material Package | Import Material package.
4455
| `importC` | Cupertino Package | Import Cupertino package.
4556
| `importFT` | flutter_test Package | Import flutter_test package.
57+
| `importAL` | App localisation | Allows for the importation of app_localisation following [generation](https://docs.flutter.dev/development/accessibility-and-localization/internationalization).
4658
| `mateapp` | Material App | Create a new Material App.
4759
| `cupeapp` | Cupertino Package | Create a New Cupertino App.
4860
| `tweenAnimationBuilder` | Tween Animation Builder | Widget builder that animates a property of a Widget to a target value whenever the target value changes.
4961
| `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.
5062
| `f-group` | Group | Create a group test function.
5163
| `f-test` | Test | Create a test function.
52-
| `widgetTest` | Test Widgets | Create a testWidgets function.
64+
| `f-testWidgets` | Test Widgets | Create a testWidgets function.
5365

54-
<br>
66+
<br/>
5567

5668
## Requirements
57-
Vscode: `1.56.0`
5869

59-
<br>
70+
Vscode: `1.56.0`
6071

6172
## Known Issues
62-
At this time, there are no known issues. If you discover a bug or would like to see a shortcut added, please create a pull request at our GitHub page.
73+
74+
At this time, there are no known issues. If you discover a bug or would like to see a shortcut added, please create a pull request at our GitHub page.
6375

6476
## Release Notes
6577

78+
### 4.0.0
79+
80+
- **Breaking: Change `testWdigets` to `f-testWidgets` to better align with function snippets**
81+
- Support for `group` test function `f-group`
82+
- Support for app localisation import `importAL`
83+
- Support for Flutter 3
84+
- Migrate to super initialisers
85+
- Not on Flutter 3? The Flutter 2.xx branch is up to date and ready for you :)
86+
- Fixed Lint issue - Added `const` to applicable widgets
87+
6688
### 3.0.3
67-
- Use State<T> createState on statefulW snippet (Thank you [@marcossevilla](https://github.com/Nash0x7E2/awesome-flutter-snippets/commit/b18505ae59128ce8c2ff4cc60100603dc11259d5))
89+
90+
- Use createState on statefulW snippet (Thank you [@marcossevilla](https://github.com/Nash0x7E2/awesome-flutter-snippets/commit/b18505ae59128ce8c2ff4cc60100603dc11259d5))
6891

6992
### 3.0.2
93+
7094
- Removed trailing whitespaces (Thank you [@leoshusar](https://github.com/Nash0x7E2/awesome-flutter-snippets/pull/45))
7195
- Make widgets default to Container only (Thank you [@Ascenio](https://github.com/Nash0x7E2/awesome-flutter-snippets/pull/43))
7296

73-
7497
### 3.0.1
98+
7599
- Support for `Listview.builder`
76100
- Support for `GridView.count`
77101
- Support for `GridView.extent`
78102

79103
### 3.0.0
80-
- Update all widgets to null safety
104+
105+
- Update all widgets to null safety
81106
- Update engine to `1.56.0`
82107

83108
### 2.0.4
109+
84110
- Add Flutter test import (Thank you @arthurdenner https://github.com/Nash0x7E2/awesome-flutter-snippets/pull/16)
85111
- Support for unit and widget test functions (Thank you @TNorbury https://github.com/Nash0x7E2/awesome-flutter-snippets/pull/20)
86112
- Added support for Listview.Separated (Thank you @timilehinjegede https://github.com/Nash0x7E2/awesome-flutter-snippets/pull/26)
87113
- Fixed inheritedW (Thank you @ianwith https://github.com/Nash0x7E2/awesome-flutter-snippets/pull/22)
88114

89115
### 2.0.3
116+
90117
- Support for `BehaviorSubject` (Thanks @sinadarvi https://github.com/Nash0x7E2/awesome-flutter-snippets/pull/7)
91118
- Support for `TweenAnimationBuilder`
92119
- Support for `ValueListenableBuilder`
93120
- Fixed various bug fixes and typos
94121

95122
### 2.0.2
96-
- Resolved issue [#6](https://github.com/Nash0x7E2/awesome-flutter-snippets/issues/6)
97123

98-
### 2.0.1
124+
- Resolved issue [#6](https://github.com/Nash0x7E2/awesome-flutter-snippets/issues/6)
125+
126+
### 2.0.1
127+
99128
- Removed Stateful and Statless Widget since they are included with DartCode.
100129
- Added Material App.
101130
- Added Cupertino App.
102131

103-
### 2.0.0
132+
### 2.0.0
133+
104134
- Changed prefixes to use a keyword associated with the widget/function (in camel case)
105-
- Bug fixes
135+
- Bug fixes
106136

107137
### 1.0.6
138+
108139
- Added support for debug print
109-
- Added support for to string
110-
- Added support for importing Cupertino package
140+
- Added support for to string
141+
- Added support for importing Cupertino package
111142
- Added support for importing Material package (PR #2)
112143
- Added child logic to Stateless and Stateful widgets snippets (PR #3)
113144

114-
### 1.0.5
115-
Critical bug fixes:
116-
- Adjusted tab stops to improve efficiency and workflow
117-
- Removed blank Containers from builders in favor of a tab stop with semi-colon
118-
- Added trailing comma at the end of child parameter
145+
### 1.0.5
146+
147+
Critical bug fixes: - Adjusted tab stops to improve efficiency and workflow - Removed blank Containers from builders in favor of a tab stop with semi-colon - Added trailing comma at the end of child parameter
119148

120149
### 1.0.4
121-
- Fixed formatting
122-
- Removed unused tabs
123-
- Corrected spelling errors
124150

151+
- Fixed formatting
152+
- Removed unused tabs
153+
- Corrected spelling errors
125154

126155
### 1.0.3
127-
Added support for:
128-
- Stream
129-
- Sink
130-
- Inherited Widget
131-
- Mounted
132-
- NoSuchMethod
133-
134-
135-
### 1.0.2
136-
Added support for:
137-
- Stateful Builder
138-
- Orientation Builder
139-
- Layout Builder
140-
- Single Child Scroll View
141-
- Future Builder
142-
143-
144-
## 1.0.1
145-
Added support for:
146-
- Stream Builder
147-
- Animated Builder
148-
- Custom Scroll View
149-
- Listview.Builder
156+
157+
Added support for: - Stream - Sink - Inherited Widget - Mounted - NoSuchMethod
158+
159+
### 1.0.2
160+
161+
Added support for: - Stateful Builder - Orientation Builder - Layout Builder - Single Child Scroll View - Future Builder
162+
163+
## 1.0.1
164+
165+
Added support for: - Stream Builder - Animated Builder - Custom Scroll View - Listview.Builder
150166

151167
### 1.0.0
152-
Initial release of Awesome Flutter Snippets
168+
169+
Initial release of Awesome Flutter Snippets

images/the_flutter_bi_weekly.svg

Lines changed: 39 additions & 0 deletions
Loading

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "awesome-flutter-snippets",
33
"displayName": "Awesome Flutter Snippets",
44
"description": "Awesome Flutter Snippets is a collection snippets and shortcuts for commonly used Flutter functions and classes",
5-
"version": "3.0.3",
5+
"version": "4.0.0",
66
"icon": "logo.png",
77
"publisher": "Nash",
88
"engines": {

snippets/snippets.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@
308308
"prefix": "inheritedW",
309309
"body": [
310310
"class ${1:Name} extends InheritedWidget {",
311-
" const ${1:Name}({super.key, required super.child});",
311+
" const ${1:Name}({super.key, required this.child}) : super(child: child);",
312312
"",
313313
" final Widget child;",
314314
"",
@@ -402,7 +402,7 @@
402402
"void main() => runApp(const MyApp());",
403403
"",
404404
"class MyApp extends StatelessWidget {",
405-
" const MyApp({Key? key}) : super(key: key);",
405+
" const MyApp({super.key});",
406406
"",
407407
" @override",
408408
" Widget build(BuildContext context) {",
@@ -430,7 +430,7 @@
430430
"void main() => runApp(const MyApp());",
431431
"",
432432
"class MyApp extends StatelessWidget {",
433-
" const MyApp({Key? key}) : super(key: key);",
433+
" const MyApp({super.key});",
434434
"",
435435
" @override",
436436
" Widget build(BuildContext context) {",
@@ -495,7 +495,7 @@
495495
"description": "Create a group test function"
496496
},
497497
"Test Widgets": {
498-
"prefix": "widgetTest",
498+
"prefix": "f-testWidgets",
499499
"body": [
500500
"testWidgets(",
501501
" \"${1:test description}\",",

0 commit comments

Comments
 (0)