123456789101112131415161718192021222324252627282930313233 |
- import 'package:flutter/material.dart';
- import 'package:get/get.dart';
- import '../index.dart';
- import 'widgets.dart';
- class MicrophoneUI extends GetView<HardwareDetectionController> {
- @override
- Widget build(BuildContext context) {
- return Obx(
- () => controller.state.isDisplayMicrophoneWave
- ? MicrophoneWave(
- isRecording: controller.state.detectingMicrophone,
- recorder: controller.flutterRecorder,
- width: 250.0,
- height: 60.0,
- )
- : Container(
- width: 250,
- height: 60,
- child: Align(
- alignment: Alignment.centerLeft,
- child: Text(
- "麦克风输入:",
- style: TextStyle(
- height: 1,
- color: Colors.black87,
- ),
- ),
- ),
- ),
- );
- }
- }
|