feat(app): create, rename, star, close and hide chat sessions
This commit is contained in:
@@ -117,16 +117,27 @@ class MaterialPickerField extends StatelessWidget {
|
||||
return DropdownButtonFormField<String>(
|
||||
key: Key('chat-create-${label.toLowerCase().replaceAll(' ', '-')}'),
|
||||
initialValue: value,
|
||||
isExpanded: true,
|
||||
// Intrinsic item height: a 2x label must not be clipped by the 48px
|
||||
// default, and a real path must ellipsize instead of overflowing.
|
||||
itemHeight: null,
|
||||
decoration: InputDecoration(labelText: label),
|
||||
selectedItemBuilder: (context) => [
|
||||
for (final item in values) _fieldLabel(item),
|
||||
],
|
||||
items: [
|
||||
for (final item in values)
|
||||
DropdownMenuItem(value: item, child: Text(item)),
|
||||
DropdownMenuItem(value: item, child: _fieldLabel(item)),
|
||||
],
|
||||
onChanged: (item) {
|
||||
if (item != null) onSelected(item);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Widget _fieldLabel(String item) {
|
||||
return Text(item, maxLines: 1, overflow: TextOverflow.ellipsis);
|
||||
}
|
||||
}
|
||||
|
||||
class CupertinoPickerField extends StatelessWidget {
|
||||
|
||||
Reference in New Issue
Block a user