Commit f23bcd8

derdilla <82763757+NobodyForNothing@users.noreply.github.com>
2024-06-15 15:12:28
fix autofil
Signed-off-by: derdilla <82763757+NobodyForNothing@users.noreply.github.com>
1 parent c646eca
Changed files (1)
app
lib
app/lib/components/bluetooth_input.dart
@@ -99,6 +99,7 @@ class _BluetoothInputState extends State<BluetoothInput> {
             bloc: () { _deviceReadCubit = BleReadCubit(state.device); return _deviceReadCubit; }(),
             builder: (BuildContext context, BleReadState state) {
               Log.trace('_BluetoothInputState BleReadCubit: $state');
+              if (state is BleReadSuccess) widget.onMeasurement(state.data);
               return switch (state) {
                 BleReadInProgress() => _buildMainCard(context,
                   child: const CircularProgressIndicator(),
@@ -108,10 +109,7 @@ class _BluetoothInputState extends State<BluetoothInput> {
                   onTap: _returnToIdle,
                 ),
                 BleReadSuccess() => MeasurementSuccess(
-                  onTap: () {
-                    widget.onMeasurement(state.data);
-                    return _returnToIdle();
-                  },
+                  onTap: _returnToIdle,
                 ),
               };
             },