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

This commit is contained in:
2025-12-11 01:52:48 +00:00
parent 40fb88a089
commit c8d962b770
4 changed files with 63 additions and 10 deletions

View File

@@ -509,6 +509,7 @@ class _NewEntryPageState extends State<NewEntryPage> {
return ReorderableListView.builder(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
buildDefaultDragHandles: false,
onReorder: (oldIndex, newIndex) {
if (newIndex > oldIndex) newIndex -= 1;
setState(() {

View File

@@ -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;