Last active
January 12, 2019 16:16
-
-
Save salihgueler/afaaea88fb25d001b343f66977b2661b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ListView.builder( | |
itemCount: 5, | |
addSemanticIndexes: false, | |
semanticChildCount: 3, | |
itemBuilder: (context, position) { | |
return MergeSemantics( | |
child: 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, | |
child: Column( | |
children: <Widget>[ | |
Text('First inside text of item $position'), | |
BlockSemantics( | |
child: Text('Second inside text of item $position')), | |
ExcludeSemantics( | |
child: Text('Third inside text of item $position')), | |
Text('Fourth inside text of item $position') | |
], | |
), | |
), | |
), | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment