update to v3 upload action
Some checks failed
Release / meta (push) Successful in 3s
Release / linux-build (push) Successful in 1m35s
Release / android-build (push) Successful in 4m50s
Release / windows-build (push) Has been cancelled
Release / release-dev (push) Has been cancelled
Release / release-master (push) Has been cancelled
Some checks failed
Release / meta (push) Successful in 3s
Release / linux-build (push) Successful in 1m35s
Release / android-build (push) Successful in 4m50s
Release / windows-build (push) Has been cancelled
Release / release-dev (push) Has been cancelled
Release / release-master (push) Has been cancelled
This commit is contained in:
@@ -210,7 +210,9 @@ class _TractionPageState extends State<TractionPage> {
|
||||
children: [
|
||||
SizedBox(
|
||||
width: isMobile ? double.infinity : 240,
|
||||
child: Autocomplete<String>(
|
||||
child: RawAutocomplete<String>(
|
||||
textEditingController: _classController,
|
||||
focusNode: _classFocusNode,
|
||||
optionsBuilder: (TextEditingValue textEditingValue) {
|
||||
final query = textEditingValue.text.toLowerCase();
|
||||
if (query.isEmpty) {
|
||||
@@ -220,8 +222,6 @@ class _TractionPageState extends State<TractionPage> {
|
||||
(c) => c.toLowerCase().contains(query),
|
||||
);
|
||||
},
|
||||
textEditingController: _classController,
|
||||
focusNode: _classFocusNode,
|
||||
fieldViewBuilder:
|
||||
(
|
||||
context,
|
||||
@@ -239,6 +239,40 @@ class _TractionPageState extends State<TractionPage> {
|
||||
onSubmitted: (_) => _refreshTraction(),
|
||||
);
|
||||
},
|
||||
optionsViewBuilder:
|
||||
(context, onSelected, options) {
|
||||
final optionList = options.toList();
|
||||
if (optionList.isEmpty) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
final maxWidth = isMobile
|
||||
? MediaQuery.of(context).size.width - 64
|
||||
: 240.0;
|
||||
return Align(
|
||||
alignment: Alignment.topLeft,
|
||||
child: Material(
|
||||
elevation: 4,
|
||||
child: ConstrainedBox(
|
||||
constraints: BoxConstraints(
|
||||
maxWidth: maxWidth,
|
||||
maxHeight: 240,
|
||||
),
|
||||
child: ListView.builder(
|
||||
padding: EdgeInsets.zero,
|
||||
shrinkWrap: true,
|
||||
itemCount: optionList.length,
|
||||
itemBuilder: (context, index) {
|
||||
final option = optionList[index];
|
||||
return ListTile(
|
||||
title: Text(option),
|
||||
onTap: () => onSelected(option),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
onSelected: (String selection) {
|
||||
setState(() {
|
||||
_selectedClass = selection;
|
||||
|
||||
Reference in New Issue
Block a user