dart: fix

This commit is contained in:
xkeyC
2025-08-15 22:52:13 +08:00
parent 44bf771f4c
commit 99104527d4
30 changed files with 57 additions and 56 deletions

View File

@@ -239,7 +239,7 @@ class InputMethodDialogUI extends HookConsumerWidget {
}
}
_onSwitchAutoTranslate(
Future<void> _onSwitchAutoTranslate(
BuildContext context, InputMethodDialogUIModel model, bool b) async {
if (b) {
final ok = await showConfirmDialogs(

View File

@@ -148,7 +148,7 @@ class InputMethodDialogUIModel extends _$InputMethodDialogUIModel {
}
}
toggleAutoTranslate(bool b) async {
Future<void> toggleAutoTranslate(bool b) async {
state = state.copyWith(isEnableAutoTranslate: b);
final appConf = await Hive.openBox("app_conf");
await appConf.put("isEnableAutoTranslate", b);

View File

@@ -2,7 +2,6 @@ import 'dart:convert';
import 'dart:io';
import 'package:fluent_ui/fluent_ui.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';

View File

@@ -24,7 +24,7 @@ class ServerQrState extends _$ServerQrState {
_context = context;
}
popDialog() {
void popDialog() {
_context?.pop();
}
}