Soru/moor
This commit is contained in:
parent
79a306351e
commit
f594c7005d
55 changed files with 1034 additions and 1133 deletions
|
|
@ -16,7 +16,7 @@ class RecordingDialog extends StatefulWidget {
|
|||
|
||||
class _RecordingDialogState extends State<RecordingDialog> {
|
||||
FlutterSound flutterSound = FlutterSound();
|
||||
String time = "00:00:00";
|
||||
String time = '00:00:00';
|
||||
|
||||
StreamSubscription _recorderSubscription;
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ class _RecordingDialogState extends State<RecordingDialog> {
|
|||
codec: t_CODEC.CODEC_AAC,
|
||||
);
|
||||
_recorderSubscription = flutterSound.onRecorderStateChanged.listen((e) {
|
||||
DateTime date =
|
||||
var date =
|
||||
DateTime.fromMillisecondsSinceEpoch(e.currentPosition.toInt());
|
||||
setState(() => time = DateFormat('mm:ss:SS', 'en_US').format(date));
|
||||
});
|
||||
|
|
@ -67,7 +67,7 @@ class _RecordingDialogState extends State<RecordingDialog> {
|
|||
SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: Text(
|
||||
"${L10n.of(context).recording}: $time",
|
||||
'${L10n.of(context).recording}: $time',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
),
|
||||
|
|
@ -95,7 +95,7 @@ class _RecordingDialogState extends State<RecordingDialog> {
|
|||
),
|
||||
onPressed: () async {
|
||||
await _recorderSubscription?.cancel();
|
||||
final String result = await flutterSound.stopRecorder();
|
||||
final result = await flutterSound.stopRecorder();
|
||||
if (widget.onFinished != null) {
|
||||
widget.onFinished(result);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,8 @@ class SimpleDialogs {
|
|||
bool password = false,
|
||||
bool multiLine = false,
|
||||
}) async {
|
||||
final TextEditingController controller = TextEditingController();
|
||||
var textEditingController = TextEditingController();
|
||||
final controller = textEditingController;
|
||||
String input;
|
||||
await showDialog(
|
||||
context: context,
|
||||
|
|
@ -77,7 +78,7 @@ class SimpleDialogs {
|
|||
String confirmText,
|
||||
String cancelText,
|
||||
}) async {
|
||||
bool confirmed = false;
|
||||
var confirmed = false;
|
||||
await showDialog(
|
||||
context: context,
|
||||
builder: (c) => AlertDialog(
|
||||
|
|
@ -157,8 +158,8 @@ class SimpleDialogs {
|
|||
}
|
||||
}
|
||||
|
||||
showLoadingDialog(BuildContext context) {
|
||||
showDialog(
|
||||
void showLoadingDialog(BuildContext context) async {
|
||||
await showDialog(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (BuildContext context) => AlertDialog(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue