fix lints

This commit is contained in:
Fabian Freund
2026-02-16 19:59:32 +01:00
parent cfa7e3ac89
commit 645bbb9b53
78 changed files with 244 additions and 210 deletions
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:speech_to_text_dialog/speech_to_text_dialog.dart';
void main() {
@@ -50,7 +50,7 @@ class _MyAppState extends State<MyApp> {
@override
void dispose() {
_textSubscription?.cancel();
unawaited(_textSubscription?.cancel());
_speechToTextDialog.dispose();
super.dispose();
}
@@ -26,15 +26,11 @@ dependencies:
# the parent directory to use the current plugin's version.
path: ../
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.8
dev_dependencies:
integration_test:
sdk: flutter
flutter_test:
sdk: flutter
integration_test:
sdk: flutter
# The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practices. The lint set provided by the package is
@@ -20,7 +20,7 @@
import 'dart:async';
import 'package:flutter/services.dart' show BinaryMessenger;
import 'src/pigeons/speech_to_text.g.dart';
import 'package:speech_to_text_dialog/src/pigeons/speech_to_text.g.dart';
/// Speech recognition dialog using Android's RecognizerIntent.
///
@@ -82,7 +82,7 @@ class SpeechToTextDialog implements SpeechToTextEvents {
/// print('Speech recognition not available');
/// }
/// ```
Future<bool> showDialog({String? locale}) async {
Future<bool> showDialog({String? locale}) {
return _api.showDialog(locale: locale);
}
@@ -101,7 +101,7 @@ class SpeechToTextDialog implements SpeechToTextEvents {
if (!_disposed) {
_disposed = true;
SpeechToTextEvents.setUp(null, binaryMessenger: _binaryMessenger);
_textStreamController.close();
unawaited(_textStreamController.close());
}
}
}