view.dart 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. import 'package:fis_lib_basictest/hardware_detection/widgets/camera_ui.dart';
  2. import 'package:flutter/material.dart';
  3. import 'package:fis_ui/index.dart';
  4. import 'package:get/get.dart';
  5. import 'index.dart';
  6. import 'widgets/widgets.dart';
  7. class HardwareDetectionPage extends GetView<HardwareDetectionController> {
  8. HardwareDetectionPage({Key? key}) : super(key: key);
  9. final bigTitleStyle = TextStyle(
  10. fontSize: 24,
  11. );
  12. // 主视图
  13. Widget _buildView() {
  14. return Center(
  15. child: Container(
  16. padding: EdgeInsets.all(20),
  17. child: Column(
  18. crossAxisAlignment: CrossAxisAlignment.start,
  19. children: [
  20. Text("视频", style: bigTitleStyle),
  21. _decorateLine(),
  22. CameraDetection(),
  23. SizedBox(height: 20),
  24. CameraUI(),
  25. SizedBox(height: 40),
  26. Text("音频", style: bigTitleStyle),
  27. _decorateLine(),
  28. SpeakerDetection(),
  29. SizedBox(height: 20),
  30. SpeakerUI(),
  31. SizedBox(height: 40),
  32. MicrophoneDetection(),
  33. SizedBox(height: 20),
  34. MicrophoneUI(),
  35. SizedBox(height: 20),
  36. ],
  37. ),
  38. ),
  39. );
  40. }
  41. Widget _decorateLine() {
  42. return FContainer(
  43. height: 8,
  44. width: double.infinity,
  45. margin: EdgeInsets.only(top: 5, bottom: 10, right: 200),
  46. decoration: BoxDecoration(
  47. color: Colors.grey[300],
  48. borderRadius: BorderRadius.circular(3),
  49. ),
  50. );
  51. }
  52. @override
  53. Widget build(BuildContext context) {
  54. return GetBuilder<HardwareDetectionController>(
  55. builder: (_) {
  56. return Scaffold(
  57. appBar: AppBar(title: const Text("hardware_detection")),
  58. body: SafeArea(
  59. child: _buildView(),
  60. ),
  61. );
  62. },
  63. );
  64. }
  65. }