bypass check for flutter ownership
Some checks failed
Release / meta (push) Successful in 2s
Release / linux-build (push) Failing after 1m25s
Release / android-build (push) Failing after 5m4s
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 2s
Release / linux-build (push) Failing after 1m25s
Release / android-build (push) Failing after 5m4s
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:
@@ -74,6 +74,9 @@ jobs:
|
||||
with:
|
||||
channel: ${{ env.FLUTTER_CHANNEL }}
|
||||
|
||||
- name: Allow all git directories (CI)
|
||||
run: git config --global --add safe.directory '*'
|
||||
|
||||
- name: Flutter dependencies
|
||||
run: flutter pub get
|
||||
|
||||
@@ -110,6 +113,9 @@ jobs:
|
||||
with:
|
||||
channel: ${{ env.FLUTTER_CHANNEL }}
|
||||
|
||||
- name: Allow all git directories (CI)
|
||||
run: git config --global --add safe.directory '*'
|
||||
|
||||
- name: Flutter dependencies
|
||||
run: flutter pub get
|
||||
|
||||
@@ -142,6 +148,10 @@ jobs:
|
||||
with:
|
||||
channel: ${{ env.FLUTTER_CHANNEL }}
|
||||
|
||||
- name: Allow all git directories (CI)
|
||||
if: env.BUILD_WINDOWS == 'true'
|
||||
run: git config --global --add safe.directory '*'
|
||||
|
||||
- name: Flutter dependencies
|
||||
if: env.BUILD_WINDOWS == 'true'
|
||||
run: flutter pub get
|
||||
|
||||
@@ -21,6 +21,7 @@ class TractionPage extends StatefulWidget {
|
||||
|
||||
class _TractionPageState extends State<TractionPage> {
|
||||
final _classController = TextEditingController();
|
||||
final _classFocusNode = FocusNode();
|
||||
final _numberController = TextEditingController();
|
||||
bool _mileageFirst = true;
|
||||
bool _initialised = false;
|
||||
@@ -37,6 +38,12 @@ class _TractionPageState extends State<TractionPage> {
|
||||
final _domainController = TextEditingController();
|
||||
final _typeController = TextEditingController();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_classController.addListener(_onClassTextChanged);
|
||||
}
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
super.didChangeDependencies();
|
||||
@@ -52,7 +59,9 @@ class _TractionPageState extends State<TractionPage> {
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_classController.removeListener(_onClassTextChanged);
|
||||
_classController.dispose();
|
||||
_classFocusNode.dispose();
|
||||
_numberController.dispose();
|
||||
_nameController.dispose();
|
||||
_operatorController.dispose();
|
||||
@@ -131,6 +140,15 @@ class _TractionPageState extends State<TractionPage> {
|
||||
_refreshTraction();
|
||||
}
|
||||
|
||||
void _onClassTextChanged() {
|
||||
if (_selectedClass != null &&
|
||||
_classController.text.trim() != (_selectedClass ?? '')) {
|
||||
setState(() {
|
||||
_selectedClass = null;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final data = context.watch<DataService>();
|
||||
@@ -202,9 +220,8 @@ class _TractionPageState extends State<TractionPage> {
|
||||
(c) => c.toLowerCase().contains(query),
|
||||
);
|
||||
},
|
||||
initialValue: TextEditingValue(
|
||||
text: _classController.text,
|
||||
),
|
||||
textEditingController: _classController,
|
||||
focusNode: _classFocusNode,
|
||||
fieldViewBuilder:
|
||||
(
|
||||
context,
|
||||
@@ -212,7 +229,6 @@ class _TractionPageState extends State<TractionPage> {
|
||||
focusNode,
|
||||
onFieldSubmitted,
|
||||
) {
|
||||
controller.value = _classController.value;
|
||||
return TextField(
|
||||
controller: controller,
|
||||
focusNode: focusNode,
|
||||
@@ -220,9 +236,6 @@ class _TractionPageState extends State<TractionPage> {
|
||||
labelText: 'Class',
|
||||
border: OutlineInputBorder(),
|
||||
),
|
||||
onChanged: (val) {
|
||||
_classController.text = val;
|
||||
},
|
||||
onSubmitted: (_) => _refreshTraction(),
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user