File tree 1 file changed +12
-3
lines changed 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 1
1
import 'package:flutter/material.dart' ;
2
2
3
+ import 'content.dart' ;
3
4
import 'store.dart' ;
4
5
import '../model/autocomplete.dart' ;
5
6
import '../model/compose.dart' ;
@@ -123,23 +124,31 @@ class _ComposeAutocompleteState extends State<ComposeAutocomplete> with PerAccou
123
124
124
125
Widget _buildItem (BuildContext _, int index) {
125
126
final option = _resultsToDisplay[index];
127
+ Widget avatar;
126
128
String label;
127
129
switch (option) {
128
130
case UserMentionAutocompleteResult (: var userId):
129
- // TODO(#227) avatar
131
+ avatar = Avatar (userId : userId, size : 28 , borderRadius : 3 );
130
132
label = PerAccountStoreWidget .of (context).users[userId]! .fullName;
131
133
case WildcardMentionAutocompleteResult ():
134
+ avatar = const SizedBox .shrink ();
132
135
label = '[unimplemented]' ; // TODO(#234)
133
136
case UserGroupMentionAutocompleteResult ():
137
+ avatar = const SizedBox .shrink ();
134
138
label = '[unimplemented]' ; // TODO(#233)
135
139
}
136
140
return InkWell (
137
141
onTap: () {
138
142
_onTapOption (option);
139
143
},
140
144
child: Padding (
141
- padding: const EdgeInsets .all (16.0 ),
142
- child: Text (label)));
145
+ padding: const EdgeInsets .symmetric (horizontal: 16.0 , vertical: 8.0 ),
146
+ child: Row (
147
+ children: [
148
+ avatar,
149
+ const SizedBox (width: 8 ),
150
+ Text (label),
151
+ ])));
143
152
}
144
153
145
154
@override
You can’t perform that action at this time.
0 commit comments