12345678910111213141516171819202122232425262728293031323334353637 |
- 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(() {
- if (controller.state.microphoneList.isEmpty) {
- return Container();
- }
- return controller.state.isDisplayMicrophoneWave
- ? MicrophoneWave(
- isRecording: controller.state.detectingMicrophone,
- recorder: controller.flutterRecorder,
- onAutoDetectPass: () => controller.setMicrophoneAvailable(true),
- 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,
- ),
- ),
- ),
- );
- });
- }
- }
|