Skip to content

Instantly share code, notes, and snippets.

@salihgueler
Last active January 12, 2019 14:47
Show Gist options
  • Save salihgueler/04556f6025a2512e8200f27afdb79a2b to your computer and use it in GitHub Desktop.
Save salihgueler/04556f6025a2512e8200f27afdb79a2b to your computer and use it in GitHub Desktop.
ListView.builder(
itemCount: 5,
itemBuilder: (context, position) {
return Semantics(
label: 'Container with 200 width 200 height and red background',
enabled: position == 1 ? true : false,
selected: position == 0 ? true : false,
onTap: () {
Scaffold.of(context).showSnackBar(SnackBar(content: Text('Item $position Clicked!')));
},
onScrollDown: (){
print('Scroll down happened');
},
child: Container(
margin: EdgeInsets.all(16),
color: Colors.red,
height: 200,
width: 200,
),
);
},
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment