Qoohoo 提交
?️ 音频录制/播放应用。?
这是一个基本的音频录制应用,使用 Flutter 开发。
截图
| 录音界面(默认主题) | 录音界面(主题 #2) | 录音界面(主题 #3) | 录音界面(主题 #4) | 录音界面(主题 #5) |
|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
| 录音 | 点击并按住锁定 | 之前的录音 | 最后录音 | 已暂停 |
|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
更多截图可在 /screenshots 文件夹中找到。
功能
- 录制高质量音频
- 长按快速录音
- 暂停和恢复录音(仅限 API 24+ (Nougat 及更高版本))
- 以多种文件格式录制(.mp3, .wav, .m4a)
- 以多种采样率录制(16, 44.1, 48)
- 目前仅以 128kbps 采样率录制,以获得更小的文件
- 一键轻松播放最后录音
- 查看所有之前的录音
- 播放任何录音
- 流畅的动画和触觉反馈
- 实时可视化振幅
- 支持 40+ 主题
权限
Kai 仅需要这三项权限
[INTERNET]访问互联网以下载字体(来自 Google Fonts 的 Rubik)。应用在没有互联网的情况下也能正常工作。[MICROPHONE]录制音频(必需)。[WRITE_EXTERNAL_STORAGE]保存音频文件,应用访问应用程序文档文件夹,并且不可见其他文件夹(作用域存储),即使拒绝也工作。
构建于
入门
要在 MacOS 或 Windows 上构建,请遵循这些简单的步骤。
步骤 1
git clone https://github.com/codenameakshay/kai-qoohoo.git
步骤 2
请在此 处 按照说明安装 Android Studio。然后您就可以构建应用了。
要测试该应用,您可以按照此处的 处 步骤创建一个模拟器,或直接在物理 Android 设备上运行。
步骤 3
请在此 处 按照说明安装 Flutter。由于 Odin 使用 stable 频道,如果您在 dev 或 beta 频道上,需要切换频道。只需输入
flutter channel stable
步骤 4
您需要先生成必要的代码。
flutter pub run build_runner build --delete-conflicting-outputs
步骤 5
要运行该应用,只需在终端中输入这些命令,或使用您选择的编辑器中的“运行和调试”选项。
flutter pub get
flutter run
代码演练
文件夹结构
文件夹结构解释如下。
lib (All flutter code in present here)
┃
┣ constants (Various constant values used throughout the app)
┃
┣ controllers (All the controllers/notifiers used in the app)
┃
┣ pages (All the UI pages in the app)
┃
┣ painters (All the custom painters used in the app)
┃
┣ router (All the routes used in the app)
┃
┣ services (All the services used in the app)
┃
┣ utils (All reusable code (functions, classes, etc.) used in the app)
┃
┗ widgets (All the widgets used in the app)
lib
┃
┣ constants
┃ ┣ app_color.dart (App color constants)
┃ ┗ app_data.dart (App data constants such as device size)
┃
┣ controllers
┃ ┣ audio_player_controller.dart (Audio player controller)
┃ ┣ path_controller.dart (Path controller)
┃ ┣ record_controller.dart (Recording controller)
┃ ┣ settings_controller.dart (Settings controller)
┃ ┣ theme_controller.dart (Theme controller)
┃ ┣ timer_controller.dart (Timer controller to check recording duration)
┃ ┗ waveform_controller.dart (Waveform controller, to plot amplitude waveform)
┃
┣ pages
┃ ┣ home_page.dart (The default home page, which consists of app bar and body)
┃ ┣ loading_page.dart (A loading page is shown for data loading)
┃ ┗ record_page.dart (The main body of the app, which consists of recording, playback, and settings)
┃
┣ painters
┃ ┣ audio_waveform_painter.dart (Painter to draw the waveform, not in use)
┃ ┣ ripple_painter.dart (Painter to draw the ripple effect behind record button)
┃ ┗ wave_painter.dart (Painter to draw the waveform of the amplitude + animations)
┃
┣ router
┃ ┣ app_router.dart (Define routes inside the app)
┃ ┣ app_router.gr.dart (Generated file)
┃ ┣ route_observer.dart (Define route observer to get current route stack, and debug)
┃ ┗ transition_route_builders.dart (Animations which happen on route transition)
┃
┣ services
┃ ┣ locator.dart (Service locator, using get_it package to register notifiers and services)
┃ ┣ logger.dart (Logger service, which logs errors, infos or any warnings)
┃ ┣ product_service.dart (Product service, which handles all product related operations like fetching them)
┃ ┣ theme_pref_service.dart (Theme preference service, which handles the theme preference, and change theme)
┃ ┣ theme_service.dart (Theme service, which handles the theme, and change theme)
┃ ┗ transaction_service.dart (Transaction service, which handles all stock record related operations like fetching, updating them)
┃ ┣ audio_player_service.dart
┃ ┣ locator_service.dart (Service locator, using get_it package to register notifiers and services)
┃ ┣ logger_service.dart (Logger service, which logs errors, infos or any warnings)
┃ ┣ path_service.dart (Path service, which handles all path related operations like fetching docs, etc.)
┃ ┣ record_service.dart (Recording service, which handles all recording related operations)
┃ ┣ settings_service.dart (Settings service, which handles all settings, currently handles only graph style)
┃ ┣ snackbar_service.dart (Snackbar service, which handles all snackbars)
┃ ┣ theme_pref_service.dart (Theme preference service, which handles the theme preference, and change theme)
┃ ┣ theme_service.dart (Theme service, which handles the theme, and change theme)
┃ ┣ timer_service.dart (Timer service, which handles all timers which are used for recording duration, amplitude waveform, etc.)
┃ ┗ waveform_service.dart (Waveform service, which handles all waveform related operations, currently not in use)
┃
┣ utils
┃ ┗ smoothing.dart (A filter to smooth out the amplitude waveform matrix)
┃
┣ widgets
┃ ┣ amplitude_widget.dart (Widget to draw the amplitude waveform)
┃ ┣ audio_waveform_widget.dart (Widget to draw the waveform, not in use)
┃ ┣ bug_report_button.dart (Button to send bug reports)
┃ ┣ directory_button.dart (Widget to display the directory button)
┃ ┣ directory_sheet.dart (Widget to display the directory sheet)
┃ ┣ format_settings.dart (Widget to display the format settings)
┃ ┣ last_recording_bubble.dart (Widget to display the last recording bubble)
┃ ┣ pause_button.dart (Widget to display the pause button)
┃ ┣ realistic_graph_button.dart (Widget to display the realistic graph button)
┃ ┣ recording_card.dart (Widget to display the recording card in directory sheet)
┃ ┣ record_button.dart (Widget to display the record button)
┃ ┣ record_duration.dart (Widget to display the recording duration)
┃ ┗ scrollable_bottom_sheet.dart (Widget to display the bottom sheet i.e. used in directory sheet)
┃
┣ generated_plugin_registrant.dart (Generated file for plugins)
┗ main.dart (Main file, which is the entry point of the app, used for registering theme, providers, routes, etc.)
使用的软件包
应用中使用的所有不同软件包及其说明。
animations: ^2.0.2– 用于页面/路由过渡期间的动画auto_route: ^3.2.0– 用于自动生成路由device_info_plus: ^3.2.0– 用于获取设备信息以进行错误报告flex_color_scheme: ^4.1.1– 用于主题设置flutter_archive: ^4.1.0– 用于创建日志的 zip 文件flutter_mailer: ^2.0.1– 用于通过电子邮件发送错误报告get_it: ^7.2.0– 用于状态管理google_fonts: ^2.1.0– 用于 Rubik 字体intl: ^0.17.0– 用于格式化日期和时间just_audio: ^0.9.18– 用于播放音频录音just_waveform: ^0.0.1– 用于显示音频波形linalg: ^0.4.0– 用于解决平滑滤波器的矩阵logger: ^1.1.0– 用于记录错误、信息或警告path_provider: ^2.0.8– 用于获取应用程序目录路径以保存音频文件provider: ^6.0.1– 用于状态管理record: ^3.0.2– 用于录制和保存音频rxdart: ^0.27.3– 用于创建流shared_preferences: ^2.0.11– 用于保存主题偏好sprung: ^3.0.0– 用于动画阻尼
开发依赖项 –
auto_route_generator: ^3.1.0– 用于生成路由build_runner: ^2.1.7– 用于生成必要代码
版本
请参阅 版本页面 以获取有关最新版本的更多详细信息。
贡献
首先,感谢您访问此仓库并花时间阅读此文档。
您的任何贡献都将非常感激。
如果您想提出一个功能,请在此 处 提交一个问题。
许可证
根据 GPL-3.0 许可证分发。有关更多信息,请参阅 LICENSE。









