diff --git a/README.md b/README.md index 03f9a25..8de7664 100644 --- a/README.md +++ b/README.md @@ -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` | diff --git a/snippets/snippets.json b/snippets/snippets.json index f81e271..937765b 100644 --- a/snippets/snippets.json +++ b/snippets/snippets.json @@ -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": [