@@ -87,32 +87,32 @@ class _PollWidgetState extends State<PollWidget> {
87
87
crossAxisAlignment: CrossAxisAlignment .baseline,
88
88
textBaseline: localizedTextBaseline (context),
89
89
children: [
90
- GestureDetector (
91
- // TODO: Implement feedback when the user taps the button
92
- onTap : () => _toggleVote (option),
93
- behavior : HitTestBehavior .translucent,
94
- child : ConstrainedBox (
95
- constraints : const BoxConstraints (minWidth : 44 , minHeight : 44 ),
96
- child : Padding (
97
- // For accessibility, the touch target is padded to be larger
98
- // than the vote count box. Still, we avoid padding at the
99
- // start because we want to align all the poll options to the
100
- // surrounding messages.
101
- padding : const EdgeInsetsDirectional . only (
102
- end : 5 , top : verticalPadding, bottom : verticalPadding ),
103
- child: Container (
104
- // Inner padding preserves whitespace even when the text's
105
- // width approaches the button's min-width (e.g. because
106
- // there are more than three digits).
107
- padding: const EdgeInsets .symmetric (horizontal: 4 ),
108
- decoration: BoxDecoration (
109
- color: theme.colorPollVoteCountBackground,
110
- border: Border .all (color: theme.colorPollVoteCountBorder),
111
- borderRadius: BorderRadius .circular (3 )),
112
- child: Center (
113
- child: Text (option.voters.length.toString (),
114
- style: textStyleBold.copyWith (
115
- color: theme.colorPollVoteCountText, fontSize: 20 ))))))),
90
+ ConstrainedBox (
91
+ constraints : const BoxConstraints (minWidth : 44 , minHeight : 44 ),
92
+ child : Padding (
93
+ // For accessibility, the touch target is padded to be larger
94
+ // than the vote count box. Still, we avoid padding at the
95
+ // start because we want to align all the poll options to the
96
+ // surrounding messages.
97
+ padding : const EdgeInsetsDirectional . only (
98
+ end : 5 , top : verticalPadding, bottom : verticalPadding),
99
+ child : Material (
100
+ color : Colors .transparent,
101
+ child : InkWell (
102
+ onTap : () => _toggleVote (option ),
103
+ child: Ink (
104
+ // Inner padding preserves whitespace even when the text's
105
+ // width approaches the button's min-width (e.g. because
106
+ // there are more than three digits).
107
+ padding: const EdgeInsets .symmetric (horizontal: 4 ),
108
+ decoration: BoxDecoration (
109
+ color: theme.colorPollVoteCountBackground,
110
+ border: Border .all (color: theme.colorPollVoteCountBorder),
111
+ borderRadius: BorderRadius .circular (3 )),
112
+ child: Center (
113
+ child: Text (option.voters.length.toString (),
114
+ style: textStyleBold.copyWith (
115
+ color: theme.colorPollVoteCountText, fontSize: 20 ) ))))))),
116
116
Expanded (
117
117
child: Padding (
118
118
// This and the padding on the vote count box both extend the row
0 commit comments