microphone_ui.dart 936 B

123456789101112131415161718192021222324252627282930313233
  1. import 'package:flutter/material.dart';
  2. import 'package:get/get.dart';
  3. import '../index.dart';
  4. import 'widgets.dart';
  5. class MicrophoneUI extends GetView<HardwareDetectionController> {
  6. @override
  7. Widget build(BuildContext context) {
  8. return Obx(
  9. () => controller.state.isDisplayMicrophoneWave
  10. ? MicrophoneWave(
  11. isRecording: controller.state.detectingMicrophone,
  12. recorder: controller.flutterRecorder,
  13. width: 250.0,
  14. height: 60.0,
  15. )
  16. : Container(
  17. width: 250,
  18. height: 60,
  19. child: Align(
  20. alignment: Alignment.centerLeft,
  21. child: Text(
  22. "麦克风输入:",
  23. style: TextStyle(
  24. height: 1,
  25. color: Colors.black87,
  26. ),
  27. ),
  28. ),
  29. ),
  30. );
  31. }
  32. }