Skip to content

Instantly share code, notes, and snippets.

@horgag1
Created September 18, 2018 14:12
Show Gist options
  • Save horgag1/19ad4054c35e52ee66c7c8bcda2be7a5 to your computer and use it in GitHub Desktop.
Save horgag1/19ad4054c35e52ee66c7c8bcda2be7a5 to your computer and use it in GitHub Desktop.
ListView.builder(
itemCount: data == null ? 1 : data.length + 1,
itemBuilder: (BuildContext context, int index) {
if (index == 0) {
// return the header
return new Column(...);
}
index -= 1;
// return row
var row = data[index];
return new InkWell(... with row ...);
},
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment