Skip to content

Added support for Listview.Separated #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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 @@ -20,6 +20,7 @@ Awesome Flutter Snippets is a collection of commonly used Flutter classes and me
| `customClipper` | Custom Clipper | Used for creating custom shapes |
| `customPainter` | Custom Painter | Used for creating custom paint |
| `listViewB` | ListView.Builder | Creates a scrollable, linear array of widgets that are created on demand.Providing a non-null `itemCount` improves the ability of the `ListView` to estimate the maximum scroll extent. |
| `listViewS` | ListView.Separated | Creates a fixed-length scrollable linear array of list 'items' separated by list item 'separators'. |
| `customScrollV` | Custom ScrollView | Creates a `ScrollView` that creates custom scroll effects using slivers. If the `primary` argument is true, the `controller` must be null. |
| `streamBldr` | Stream Builder | Creates a new `StreamBuilder` that builds itself based on the latest snapshot of interaction with the specified `stream` |
| `animatedBldr` | Animated Builder | Creates an Animated Builder. The widget specified to `child` is passed to the `builder` |
Expand Down
15 changes: 15 additions & 0 deletions snippets/snippets.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,21 @@
],
"description": "Creates a scrollable, linear array of widgets that are created on demand.Providing a non-null `itemCount` improves the ability of the [ListView] to estimate the maximum scroll extent."
},
"ListView.Separated": {
"prefix": "listViewS",
"body": [
"ListView.separated(",
" itemCount: ${1:1},",
" separatorBuilder: (BuildContext context, int index) {",
" return ${2:};",
" },",
" itemBuilder: (BuildContext context, int index) {",
" return ${3:};",
" },",
"),"
],
"description": "Creates a fixed-length scrollable linear array of list 'items' separated by list item 'separators'."
},
"Custom Scroll View": {
"prefix": "customScrollV",
"body": [
Expand Down