├── .flutter-plugins-dependencies ├── .gitignore ├── .metadata ├── README.md ├── analysis_options.yaml ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── player │ │ │ │ └── music │ │ │ │ └── flutter_music_app │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-v21 │ │ │ └── launch_background.xml │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── values-night │ │ │ └── styles.xml │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings ├── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h └── RunnerTests │ └── RunnerTests.swift ├── lib ├── api │ └── api.dart ├── assets │ ├── fonts │ │ └── hot.ttf │ └── images │ │ ├── default_avater.png │ │ ├── default_cover.jpg │ │ ├── icon_add.png │ │ ├── icon_app.png │ │ ├── icon_arrow.png │ │ ├── icon_back.png │ │ ├── icon_classify.png │ │ ├── icon_clear.png │ │ ├── icon_collection.png │ │ ├── icon_collection_active.png │ │ ├── icon_comment.png │ │ ├── icon_comment_white.png │ │ ├── icon_delete.png │ │ ├── icon_detail_play.png │ │ ├── icon_down.png │ │ ├── icon_edit.png │ │ ├── icon_empty_star.png │ │ ├── icon_favorite.png │ │ ├── icon_full_star.png │ │ ├── icon_half_star.png │ │ ├── icon_home.png │ │ ├── icon_home_active.png │ │ ├── icon_hot.png │ │ ├── icon_like.png │ │ ├── icon_like_active.png │ │ ├── icon_like_white.png │ │ ├── icon_logo.png │ │ ├── icon_menu_add.png │ │ ├── icon_menu_board.png │ │ ├── icon_menu_collect.png │ │ ├── icon_menu_history.png │ │ ├── icon_menu_like.png │ │ ├── icon_movie.png │ │ ├── icon_movie_active.png │ │ ├── icon_music.png │ │ ├── icon_music_add.png │ │ ├── icon_music_circle.png │ │ ├── icon_music_circle_active.png │ │ ├── icon_music_classics.png │ │ ├── icon_music_classify.png │ │ ├── icon_music_collect.png │ │ ├── icon_music_comments.png │ │ ├── icon_music_default_cover.png │ │ ├── icon_music_down.png │ │ ├── icon_music_like.png │ │ ├── icon_music_loop.png │ │ ├── icon_music_menu.png │ │ ├── icon_music_next.png │ │ ├── icon_music_order.png │ │ ├── icon_music_play.png │ │ ├── icon_music_play_menu.png │ │ ├── icon_music_play_white.png │ │ ├── icon_music_playing.png │ │ ├── icon_music_playing_grey.png │ │ ├── icon_music_prev.png │ │ ├── icon_music_random.png │ │ ├── icon_music_rank.png │ │ ├── icon_music_refresh.png │ │ ├── icon_music_singer.png │ │ ├── icon_music_white_menu.png │ │ ├── icon_no1.png │ │ ├── icon_no2.png │ │ ├── icon_no3.png │ │ ├── icon_password.png │ │ ├── icon_permission.png │ │ ├── icon_play.png │ │ ├── icon_play_record.png │ │ ├── icon_recomment.png │ │ ├── icon_recomment_active.png │ │ ├── icon_record.png │ │ ├── icon_share.png │ │ ├── icon_share_music.png │ │ ├── icon_talk.png │ │ ├── icon_top.png │ │ ├── icon_tv.png │ │ ├── icon_tv_active.png │ │ ├── icon_user.png │ │ └── icon_user_active.png ├── common │ ├── config.dart │ └── constant.dart ├── component │ ├── AllCategoryListComponent.dart │ ├── AvaterComponent.dart │ ├── CategoryComponent.dart │ ├── CommentComponent.dart │ ├── MovieListComponent.dart │ ├── NavigatorTitleComponent.dart │ ├── RecommendComponent.dart │ ├── ScoreComponent.dart │ ├── SearchCommponent.dart │ ├── SwiperComponent.dart │ ├── TitleComponent.dart │ ├── TopNavigators.dart │ └── YouLikesComponent.dart ├── main.dart ├── model │ ├── CategoryModel.dart │ ├── CommentModel.dart │ ├── MovieDetailModel.dart │ ├── MovieStarModel.dart │ ├── MovieUrlModel.dart │ ├── UserInfoModel.dart │ └── UserMsgModel.dart ├── pages │ ├── EditPage.dart │ ├── ForgetPasswordPage.dart │ ├── LaunchPage.dart │ ├── LoginPage.dart │ ├── MovieDetailPage.dart │ ├── MovieHomePage.dart │ ├── MovieIndexPage.dart │ ├── MovieMyPage.dart │ ├── MoviePage.dart │ ├── MoviePlayerPage.dart │ ├── MovieSearchPage.dart │ ├── NewMoviePage.dart │ ├── NotFoundPage.dart │ ├── RegisterPage.dart │ ├── ResetPasswordPage.dart │ ├── UpdatePasswordPage.dart │ ├── UserPage.dart │ ├── VideoPage.dart │ └── WebViewPage.dart ├── provider │ ├── TokenProvider.dart │ └── UserInfoProvider.dart ├── router │ └── index.dart ├── service │ └── serverMethod.dart ├── theme │ ├── ThemeColors.dart │ ├── ThemeSize.dart │ └── ThemeStyle.dart └── utils │ ├── HttpUtil.dart │ ├── LocalStorageUtils.dart │ ├── common.dart │ └── crypto.dart ├── linux ├── .gitignore ├── CMakeLists.txt ├── flutter │ ├── CMakeLists.txt │ ├── generated_plugin_registrant.cc │ ├── generated_plugin_registrant.h │ └── generated_plugins.cmake ├── main.cc ├── my_application.cc └── my_application.h ├── macos ├── .gitignore ├── Flutter │ ├── Flutter-Debug.xcconfig │ ├── Flutter-Release.xcconfig │ └── GeneratedPluginRegistrant.swift ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── app_icon_1024.png │ │ │ ├── app_icon_128.png │ │ │ ├── app_icon_16.png │ │ │ ├── app_icon_256.png │ │ │ ├── app_icon_32.png │ │ │ ├── app_icon_512.png │ │ │ └── app_icon_64.png │ ├── Base.lproj │ │ └── MainMenu.xib │ ├── Configs │ │ ├── AppInfo.xcconfig │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ └── Warnings.xcconfig │ ├── DebugProfile.entitlements │ ├── Info.plist │ ├── MainFlutterWindow.swift │ └── Release.entitlements └── RunnerTests │ └── RunnerTests.swift ├── pubspec.lock ├── pubspec.yaml ├── test └── widget_test.dart ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png ├── index.html └── manifest.json ├── windows ├── .gitignore ├── CMakeLists.txt ├── flutter │ ├── CMakeLists.txt │ ├── generated_plugin_registrant.cc │ ├── generated_plugin_registrant.h │ └── generated_plugins.cmake └── runner │ ├── CMakeLists.txt │ ├── Runner.rc │ ├── flutter_window.cpp │ ├── flutter_window.h │ ├── main.cpp │ ├── resource.h │ ├── resources │ └── app_icon.ico │ ├── runner.exe.manifest │ ├── utils.cpp │ ├── utils.h │ ├── win32_window.cpp │ └── win32_window.h ├── 一键提交到gitee.bat ├── 一键提交到github.bat ├── 修改密码.png ├── 修改用户信息.png ├── 分类歌曲.png ├── 外网映射正常访问提示.png ├── 忘记密码.png ├── 新版电影APP整体预览图.jpg ├── 更改用户信息1.png ├── 更改用户信息2.png ├── 更改用户信息3.png ├── 更改用户信息4.png ├── 用户信息.png ├── 电影app整体预览.jpg ├── 电影app整体预览2.jpg ├── 电影预览1.png ├── 电影预览10.png ├── 电影预览11.png ├── 电影预览13.jpg ├── 电影预览14.jpg ├── 电影预览16.png ├── 电影预览2.png ├── 电影预览3.png ├── 电影预览4.png ├── 电影预览5.png ├── 电影预览6.png ├── 电影预览7.png ├── 电影预览8.png ├── 账号密码登录.png ├── 邮箱验证码登录.png └── 重置密码.png /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Symbolication related 35 | app.*.symbols 36 | 37 | # Obfuscation related 38 | app.*.map.json 39 | 40 | # Android Studio will place build artifacts here 41 | /android/app/debug 42 | /android/app/profile 43 | /android/app/release 44 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: "761747bfc538b5af34aa0d3fac380f1bc331ec49" 8 | channel: "stable" 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49 17 | base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49 18 | - platform: android 19 | create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49 20 | base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49 21 | - platform: ios 22 | create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49 23 | base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49 24 | - platform: linux 25 | create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49 26 | base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49 27 | - platform: macos 28 | create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49 29 | base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49 30 | - platform: web 31 | create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49 32 | base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49 33 | - platform: windows 34 | create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49 35 | base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49 36 | 37 | # User provided section 38 | 39 | # List of Local paths (relative to this file) that should be 40 | # ignored by the migrate tool. 41 | # 42 | # Files that are not part of the templates will be ignored by default. 43 | unmanaged_files: 44 | - 'lib/main.dart' 45 | - 'ios/Runner.xcodeproj/project.pbxproj' 46 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # flutter电影APP 2 | 3 | 开发者:吴怨吴悔 4 | 5 | =============================界面预览(如果无法预览,请查看项目根目录png文件)========================== 6 | ![app首页](新版电影APP整体预览图.jpg) 7 | ![app首页](电影预览1.png) 8 | ![app首页](电影预览2.png) 9 | ![app首页](电影预览3.png) 10 | ![app首页](电影预览4.png) 11 | ![app首页](电影预览5.png) 12 | ![app首页](电影预览6.png) 13 | ![app首页](电影预览7.png) 14 | ![app首页](电影预览8.png) 15 | ![app首页](电影预览10.png) 16 | ![app首页](电影预览11.png) 17 | ![app首页](电影预览13.jpg) 18 | ![app首页](电影预览14.jpg) 19 | ![app首页](电影预览16.png) 20 | ![app首页](账号密码登录.png) 21 | ![app首页](邮箱验证码登录.png) 22 | ![app首页](用户信息.png) 23 | ![app首页](更改用户信息1.png) 24 | ![app首页](更改用户信息2.png) 25 | ![app首页](更改用户信息3.png) 26 | ![app首页](更改用户信息4.png) 27 | ![app首页](忘记密码.png) 28 | ![app首页](修改密码.png) 29 | ![app首页](修改用户信息.png) 30 | ![app首页](重置密码.png) 31 | =============================界面预览(如果无法预览,请查看项目根目录png文件)========================== 32 | 33 | 34 | flutter版本:3.2.22 35 | 36 | dart版本:3.4.3 37 | 38 | 项目系2020年开始搭建,从flutter2.0.2升级到3.2.22 39 | 40 | 运行命令:flutter run 41 | 42 | 后端接口使用springboot开发,所有电影数据来自于python爬虫程序,爬取第三方电影网站数据 43 | 44 | ## 使用的插件 45 | 46 | 轮播:flutter_swiper: ^1.0.2 47 | 48 | 网络请求:dio: ^5.8.0+1 49 | 50 | 路由:fluro: ^2.0.5 51 | 52 | 屏幕相关:flutter_screenutil: ^5.9.3 53 | 54 | 状态管理器: provider: ^6.1.2 55 | 56 | 下拉加载:flutter_easyrefresh: ^2.2.2 57 | 58 | 提示组件fluttertoast: ^8.2.10 59 | 60 | 缓存:shared_preferences: ^2.3.3 61 | 62 | webview:webview_flutter: ^4.8.0 63 | 64 | 路由:fluro: ^2.0.5 65 | 66 | 67 | app功能 68 | 69 | ​ ●获取缓存用户数据 70 | 71 | ​ ●获取token 72 | 73 | ​ ●自动登录 74 | 75 | ​ ●状态管理器provider 76 | 77 | ​ ●底部导航栏 78 | 79 | ​ ●头像 80 | 81 | ​ ●电影搜索 82 | 83 | ​ ●banner轮播 84 | 85 | ​ ●滚动加载分类电影 86 | 87 | ​ ●电影详情页 88 | 89 | ​ ●电影推荐 90 | 91 | ​ ●电影评分 92 | 93 | ​ ●电影收藏 94 | 95 | ​ ●电影评论 96 | 97 | ​ ●电影播放器 98 | 99 | ​ ●电影播放地址切换 100 | 101 | ​ ●电影播放记录 102 | 103 | ​ ●电影浏览记录 104 | 105 | ​ ●电影收藏记录 106 | 107 | ​ ●用户使用情况 108 | 109 | ​ ●电影剧情 110 | 111 | ​ ●电影演员 112 | 113 | ​ ●注册 114 | 115 | ​ ●登录 116 | 117 | ​ ●找回密码 118 | 119 | ​ ●修改密码 120 | 121 | ​ ●退出登录 122 | 123 | ​ ●相机 124 | 125 | ​ ●相册 126 | 127 | ​ ●修改用户信息 128 | 129 | ​ ...... 130 | 131 | 后端接口项目和sql语句: 132 | https://github.com/wuyuanwuhui99/springboot-app-service 133 | https://gitee.com/wuyuanwuhui99/springboot-app-service 134 | 135 | flutter版本参见: 136 | github地址:https://github.com/wuyuanwuhui99/flutter-movie-app-ui 137 | gitee地址:https://gitee.com/wuyuanwuhui99/flutter-movie-app-ui 138 | 139 | flutter音乐项目参见: 140 | github地址:https://github.com/wuyuanwuhui99/flutter-music-app-ui 141 | gitee地址:https://gitee.com/wuyuanwuhui99/flutter-music-app-ui 142 | 143 | react native版本参见: 144 | github地址:https://github.com/wuyuanwuhui99/react-native-app-ui 145 | 146 | java安卓原生版本参见: 147 | 通用地址:https://github.com/wuyuanwuhui99/android-java-movie-app-ui 148 | gitee地址:https://gitee.com/wuyuanwuhui99/android-java-movie-app-ui 149 | 150 | uniapp版本参见: 151 | github地址:https://github.com/wuyuanwuhui99/uniapp-vite-vue3-ts-movie-app-ui 152 | gitee地址:https://gitee.com/wuyuanwuhui99/uniapp-vite-vue3-ts-movie-app-ui 153 | 154 | uniapp音乐项目参见: 155 | github地址:https://github.com/wuyuanwuhui99/uniapp-vite-vue3-ts-music-app-ui 156 | gitee地址:https://gitee.com/wuyuanwuhui99/uniapp-vite-vue3-ts-music-app-ui 157 | 158 | 微信小程序版本参见: 159 | github地址:https://github.com/wuyuanwuhui99/weixin-movie-app-ui、 160 | 161 | harmony鸿蒙版本参见: 162 | github地址:https://github.com/wuyuanwuhui99/Harmony_movie_app_ui 163 | gitee地址:https://gitee.com/wuyuanwuhui99/Harmony_movie_app_ui 164 | 165 | harmony鸿蒙音乐项目参见: 166 | github地址:https://github.com/wuyuanwuhui99/harmony_music_app_ui 167 | gitee地址:https://gitee.com/wuyuanwuhui99/harmony_music_app_ui 168 | 169 | vue在线音乐项目: 170 | github地址:https://github.com/wuyuanwuhui99/vue-music-app-ui 171 | 172 | 在线音乐后端项目: 173 | github地址:https://github.com/wuyuanwuhui99/koa2-music-app-service 174 | 175 | vue3+ts明日头条项目: 176 | github地址:https://github.com/wuyuanwuhui99/vue3-ts-toutiao-app-ui 177 | 178 | 使用token做登录验证,/service/movie/接口不需要验证,/service/movie-getway/接口需要token验证 179 | 180 | 乐播放器正在开发中,音乐数据来自于python爬虫程序,爬取酷狗音乐数据,敬请关注 181 | 182 | 接口和数据请在本地电脑中,暂时没有购买和部署服务器,仅限本地调试,如有需要调试请联系本人启动外网映射 183 | 184 | 本地调试请把 http://192.168.0.5:5001 改成 http://254a2y1767.qicp.vip 185 | 该地址是映射到本人电脑的地址,需要本人电脑开机才能访问,一般在工作日晚上八点半之后或者周末白天会开机 186 | 如需了解是否已开机,请用浏览器直接打开该地址:http://254a2y1767.qicp.vip,如出现以下提示,则正常使用 187 | ![外网映射正常访问提示](外网映射正常访问提示.png) 188 | 189 | 本站所有视频和图片均来自互联网收集而来,版权归原创者所有,本网站只提供web页面服务,并不提供资源存储,也不参与录制、上传 若本站收录的节目无意侵犯了贵司版权,请联系 190 | 191 | 联系方式:(微信)wuwenqiang_99、(邮箱)275018723@qq.com 192 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at https://dart.dev/lints. 17 | # 18 | # Instead of disabling a lint rule for the entire project in the 19 | # section below, it can also be suppressed for a single line of code 20 | # or a specific dart file by using the `// ignore: name_of_lint` and 21 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 22 | # producing the lint. 23 | rules: 24 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 25 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 26 | 27 | # Additional information about this file can be found at 28 | # https://dart.dev/guides/language/analysis-options 29 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "com.android.application" 3 | id "kotlin-android" 4 | // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. 5 | id "dev.flutter.flutter-gradle-plugin" 6 | } 7 | 8 | def localProperties = new Properties() 9 | def localPropertiesFile = rootProject.file("local.properties") 10 | if (localPropertiesFile.exists()) { 11 | localPropertiesFile.withReader("UTF-8") { reader -> 12 | localProperties.load(reader) 13 | } 14 | } 15 | 16 | def flutterVersionCode = localProperties.getProperty("flutter.versionCode") 17 | if (flutterVersionCode == null) { 18 | flutterVersionCode = "1" 19 | } 20 | 21 | def flutterVersionName = localProperties.getProperty("flutter.versionName") 22 | if (flutterVersionName == null) { 23 | flutterVersionName = "1.0" 24 | } 25 | 26 | android { 27 | namespace = "com.player.music.flutter_music_app" 28 | compileSdk = flutter.compileSdkVersion 29 | ndkVersion = flutter.ndkVersion 30 | 31 | compileOptions { 32 | sourceCompatibility = JavaVersion.VERSION_1_8 33 | targetCompatibility = JavaVersion.VERSION_1_8 34 | } 35 | 36 | defaultConfig { 37 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 38 | applicationId = "com.player.music.flutter_music_app" 39 | // You can update the following values to match your application needs. 40 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. 41 | minSdk = flutter.minSdkVersion 42 | targetSdk = flutter.targetSdkVersion 43 | versionCode = flutterVersionCode.toInteger() 44 | versionName = flutterVersionName 45 | } 46 | 47 | buildTypes { 48 | release { 49 | // TODO: Add your own signing config for the release build. 50 | // Signing with the debug keys for now, so `flutter run --release` works. 51 | signingConfig = signingConfigs.debug 52 | } 53 | } 54 | } 55 | 56 | flutter { 57 | source = "../.." 58 | } 59 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 33 | 34 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/player/music/flutter_music_app/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.player.music.flutter_music_app 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() 6 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | allprojects { 2 | repositories { 3 | maven{ url 'https://maven.aliyun.com/repository/public' } 4 | maven { url 'https://maven.aliyun.com/nexus/content/groups/public/'} 5 | maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' } 6 | maven { url 'https://dl.google.com/dl/android/maven2/' } 7 | maven { url "https://www.jitpack.io" } 8 | google() 9 | mavenCentral() 10 | } 11 | } 12 | 13 | rootProject.buildDir = "../build" 14 | subprojects { 15 | project.buildDir = "${rootProject.buildDir}/${project.name}" 16 | } 17 | subprojects { 18 | project.evaluationDependsOn(":app") 19 | } 20 | 21 | tasks.register("clean", Delete) { 22 | delete rootProject.buildDir 23 | } 24 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-7.6.3-all.zip 6 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | def flutterSdkPath = { 3 | def properties = new Properties() 4 | file("local.properties").withInputStream { properties.load(it) } 5 | def flutterSdkPath = properties.getProperty("flutter.sdk") 6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 7 | return flutterSdkPath 8 | }() 9 | 10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") 11 | 12 | repositories { 13 | google() 14 | mavenCentral() 15 | gradlePluginPortal() 16 | } 17 | } 18 | 19 | plugins { 20 | id "dev.flutter.flutter-plugin-loader" version "1.0.0" 21 | id "com.android.application" version "7.3.0" apply false 22 | id "org.jetbrains.kotlin.android" version "1.7.10" apply false 23 | } 24 | 25 | include ":app" 26 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 12.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 43 | 49 | 50 | 51 | 52 | 53 | 63 | 65 | 71 | 72 | 73 | 74 | 80 | 82 | 88 | 89 | 90 | 91 | 93 | 94 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Flutter Music App 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | flutter_music_app 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | CADisableMinimumFrameDurationOnPhone 45 | 46 | UIApplicationSupportsIndirectInputEvents 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /ios/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /lib/api/api.dart: -------------------------------------------------------------------------------- 1 | const servicePath = { 2 | 'getUserData': '/service/user-getway/getUserData', // 获取用户信息 3 | 'login': '/service/user/login', //登录 4 | 'updateUser': '/service/user-getway/updateUser',//更新用户信息 5 | 'updatePassword': '/service/user-getway/updatePassword',//更新密码wq 6 | 'updateAvaterService':'/service/user-getway/updateAvater',//更新头像 7 | 'getBackPasswordByEmail': '/service/user/getBackPasswordByEmail',// 找回密码 8 | 'resetPassword': '/service/user/resetPassword',// 重置密码 9 | 'getCategoryList': '/service/movie/getCategoryList', //获取分类影片 10 | 'getKeyWord': '/service/movie/getKeyWord', //按照classify查询搜索栏的关键词 11 | 'getAllCategoryByClassify': '/service/movie/getAllCategoryByClassify', //按classify大类查询所有catory小类 12 | 'getAllCategoryListByPageName': '/service/movie/getAllCategoryListByPageName', //按页面获取要展示的category小类 13 | 'getUserMsg': '/service/movie-getway/getUserMsg', //获取用户四个指标信息,使用天数,关注,观看记录,浏览记录 14 | 'getSearchResult': '/service/movie/search', //搜索 15 | 'getStar': '/service/movie/getStar/', //获取演员 16 | 'getMovieUrl': '/service/movie/getMovieUrl', //获取演员 17 | 'getViewRecord': '/service/movie-getway/getViewRecord', //获取浏览记录 18 | 'saveViewRecord': '/service/movie-getway/saveViewRecord', //浏览历史 19 | 'getPlayRecord': '/service/movie-getway/getPlayRecord', //获取观看记录 20 | 'savePlayRecord': '/service/movie-getway/savePlayRecord', //播放记录 21 | 'getFavorite': '/service/movie-getway/getFavoriteList', //获取收藏电影 22 | 'saveFavorite': '/service/movie-getway/saveFavorite', //添加收藏 23 | 'deleteFavorite': '/service/movie-getway/deleteFavorite', //删除收藏 24 | 'getYourLikes': '/service/movie/getYourLikes',//猜你想看 25 | 'getRecommend': '/service/movie/getRecommend',//获取推荐 26 | 'isFavorite': '/service/movie-getway/isFavorite',//查询是否已经收藏 27 | 'getCommentCount':'/service/social/getCommentCount',//获取评论总数 28 | 'getTopCommentList':'/service/social/getTopCommentList',//获取一级评论 29 | 'getReplyCommentList':'/service/social/getReplyCommentList',//获取一级评论 30 | 'insertCommentService':'/service/social-getway/insertComment',//新增评论 31 | }; 32 | -------------------------------------------------------------------------------- /lib/assets/fonts/hot.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/fonts/hot.ttf -------------------------------------------------------------------------------- /lib/assets/images/default_avater.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/default_avater.png -------------------------------------------------------------------------------- /lib/assets/images/default_cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/default_cover.jpg -------------------------------------------------------------------------------- /lib/assets/images/icon_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_add.png -------------------------------------------------------------------------------- /lib/assets/images/icon_app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_app.png -------------------------------------------------------------------------------- /lib/assets/images/icon_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_arrow.png -------------------------------------------------------------------------------- /lib/assets/images/icon_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_back.png -------------------------------------------------------------------------------- /lib/assets/images/icon_classify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_classify.png -------------------------------------------------------------------------------- /lib/assets/images/icon_clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_clear.png -------------------------------------------------------------------------------- /lib/assets/images/icon_collection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_collection.png -------------------------------------------------------------------------------- /lib/assets/images/icon_collection_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_collection_active.png -------------------------------------------------------------------------------- /lib/assets/images/icon_comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_comment.png -------------------------------------------------------------------------------- /lib/assets/images/icon_comment_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_comment_white.png -------------------------------------------------------------------------------- /lib/assets/images/icon_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_delete.png -------------------------------------------------------------------------------- /lib/assets/images/icon_detail_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_detail_play.png -------------------------------------------------------------------------------- /lib/assets/images/icon_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_down.png -------------------------------------------------------------------------------- /lib/assets/images/icon_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_edit.png -------------------------------------------------------------------------------- /lib/assets/images/icon_empty_star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_empty_star.png -------------------------------------------------------------------------------- /lib/assets/images/icon_favorite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_favorite.png -------------------------------------------------------------------------------- /lib/assets/images/icon_full_star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_full_star.png -------------------------------------------------------------------------------- /lib/assets/images/icon_half_star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_half_star.png -------------------------------------------------------------------------------- /lib/assets/images/icon_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_home.png -------------------------------------------------------------------------------- /lib/assets/images/icon_home_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_home_active.png -------------------------------------------------------------------------------- /lib/assets/images/icon_hot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_hot.png -------------------------------------------------------------------------------- /lib/assets/images/icon_like.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_like.png -------------------------------------------------------------------------------- /lib/assets/images/icon_like_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_like_active.png -------------------------------------------------------------------------------- /lib/assets/images/icon_like_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_like_white.png -------------------------------------------------------------------------------- /lib/assets/images/icon_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_logo.png -------------------------------------------------------------------------------- /lib/assets/images/icon_menu_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_menu_add.png -------------------------------------------------------------------------------- /lib/assets/images/icon_menu_board.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_menu_board.png -------------------------------------------------------------------------------- /lib/assets/images/icon_menu_collect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_menu_collect.png -------------------------------------------------------------------------------- /lib/assets/images/icon_menu_history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_menu_history.png -------------------------------------------------------------------------------- /lib/assets/images/icon_menu_like.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_menu_like.png -------------------------------------------------------------------------------- /lib/assets/images/icon_movie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_movie.png -------------------------------------------------------------------------------- /lib/assets/images/icon_movie_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_movie_active.png -------------------------------------------------------------------------------- /lib/assets/images/icon_music.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_music.png -------------------------------------------------------------------------------- /lib/assets/images/icon_music_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_music_add.png -------------------------------------------------------------------------------- /lib/assets/images/icon_music_circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_music_circle.png -------------------------------------------------------------------------------- /lib/assets/images/icon_music_circle_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_music_circle_active.png -------------------------------------------------------------------------------- /lib/assets/images/icon_music_classics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_music_classics.png -------------------------------------------------------------------------------- /lib/assets/images/icon_music_classify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_music_classify.png -------------------------------------------------------------------------------- /lib/assets/images/icon_music_collect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_music_collect.png -------------------------------------------------------------------------------- /lib/assets/images/icon_music_comments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_music_comments.png -------------------------------------------------------------------------------- /lib/assets/images/icon_music_default_cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_music_default_cover.png -------------------------------------------------------------------------------- /lib/assets/images/icon_music_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_music_down.png -------------------------------------------------------------------------------- /lib/assets/images/icon_music_like.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_music_like.png -------------------------------------------------------------------------------- /lib/assets/images/icon_music_loop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_music_loop.png -------------------------------------------------------------------------------- /lib/assets/images/icon_music_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_music_menu.png -------------------------------------------------------------------------------- /lib/assets/images/icon_music_next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_music_next.png -------------------------------------------------------------------------------- /lib/assets/images/icon_music_order.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_music_order.png -------------------------------------------------------------------------------- /lib/assets/images/icon_music_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_music_play.png -------------------------------------------------------------------------------- /lib/assets/images/icon_music_play_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_music_play_menu.png -------------------------------------------------------------------------------- /lib/assets/images/icon_music_play_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_music_play_white.png -------------------------------------------------------------------------------- /lib/assets/images/icon_music_playing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_music_playing.png -------------------------------------------------------------------------------- /lib/assets/images/icon_music_playing_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_music_playing_grey.png -------------------------------------------------------------------------------- /lib/assets/images/icon_music_prev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_music_prev.png -------------------------------------------------------------------------------- /lib/assets/images/icon_music_random.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_music_random.png -------------------------------------------------------------------------------- /lib/assets/images/icon_music_rank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_music_rank.png -------------------------------------------------------------------------------- /lib/assets/images/icon_music_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_music_refresh.png -------------------------------------------------------------------------------- /lib/assets/images/icon_music_singer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_music_singer.png -------------------------------------------------------------------------------- /lib/assets/images/icon_music_white_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_music_white_menu.png -------------------------------------------------------------------------------- /lib/assets/images/icon_no1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_no1.png -------------------------------------------------------------------------------- /lib/assets/images/icon_no2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_no2.png -------------------------------------------------------------------------------- /lib/assets/images/icon_no3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_no3.png -------------------------------------------------------------------------------- /lib/assets/images/icon_password.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_password.png -------------------------------------------------------------------------------- /lib/assets/images/icon_permission.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_permission.png -------------------------------------------------------------------------------- /lib/assets/images/icon_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_play.png -------------------------------------------------------------------------------- /lib/assets/images/icon_play_record.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_play_record.png -------------------------------------------------------------------------------- /lib/assets/images/icon_recomment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_recomment.png -------------------------------------------------------------------------------- /lib/assets/images/icon_recomment_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_recomment_active.png -------------------------------------------------------------------------------- /lib/assets/images/icon_record.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_record.png -------------------------------------------------------------------------------- /lib/assets/images/icon_share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_share.png -------------------------------------------------------------------------------- /lib/assets/images/icon_share_music.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_share_music.png -------------------------------------------------------------------------------- /lib/assets/images/icon_talk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_talk.png -------------------------------------------------------------------------------- /lib/assets/images/icon_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_top.png -------------------------------------------------------------------------------- /lib/assets/images/icon_tv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_tv.png -------------------------------------------------------------------------------- /lib/assets/images/icon_tv_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_tv_active.png -------------------------------------------------------------------------------- /lib/assets/images/icon_user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_user.png -------------------------------------------------------------------------------- /lib/assets/images/icon_user_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/lib/assets/images/icon_user_active.png -------------------------------------------------------------------------------- /lib/common/config.dart: -------------------------------------------------------------------------------- 1 | enum CommentEnum { 2 | MUSIC_CIRCLE, 3 | MUSIC, 4 | MOVIE, 5 | MOVIE_CIRCLE 6 | } 7 | 8 | enum CircleEnum { 9 | MUSIC, 10 | MOVIE 11 | } 12 | 13 | Map PermissionMap = { 14 | 0:'私密', 15 | 1:'公开' 16 | }; 17 | 18 | Map SexValueMap = { 19 | 0:'男', 20 | 1:'女' 21 | }; 22 | 23 | Map SexNameMap = { 24 | '男':0, 25 | '女': 1 26 | }; -------------------------------------------------------------------------------- /lib/common/constant.dart: -------------------------------------------------------------------------------- 1 | const SUCCESS = "SUCCESS"; 2 | const FAIL = "FAIL"; 3 | const HOST = 'http://169.254.32.117:5001'; 4 | 5 | const TOKEN_STORAGE_KEY = 'TOKEN_STORAGE_KEY'; 6 | 7 | const MUSIC_SEARCH_STORAGE_KEY = 'MUSIC_SEARCH_STORAGE_KEY'; 8 | 9 | const LOOP_STORAGE_KEY = 'LOOP_STORAGE_KEY'; // 音乐循环播放模式 10 | 11 | const MUSIC_STORAGE_KEY = 'MUSIC_STORAGE_KEY'; // 当前播放的音乐 12 | 13 | const MUSIC_LIST_STORAGE_KEY = 'MUSIC_LIST_STORAGE_KEY'; // 音乐列表 14 | 15 | const MUSIC_CLASSIFY_NAME_STORAGE_KEY = 'MUSIC_CLASSIFY_NAME_STORAGE_KEY'; // 音乐分类的名称 16 | 17 | const MUSIC_FAVORITE_NAME = 'MUSIC_FAVORITE_NAME'; // 音乐收藏夹名称 18 | 19 | const MAX_FAVORITE_NUMBER = 500; // 收藏夹最大数量 20 | 21 | const PAGE_SIZE = 20;// 每页数量 22 | 23 | const MUSIC_SEARCH_NAME = 'MUSIC_SEARCH_NAME';// 音乐搜查 -------------------------------------------------------------------------------- /lib/component/AllCategoryListComponent.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'CategoryComponent.dart'; 3 | 4 | /*-----------------------分类影片------------------------*/ 5 | class AllCategoryListComponent extends StatefulWidget { 6 | final List categoryList; 7 | 8 | AllCategoryListComponent({super.key,required this.categoryList}); 9 | 10 | @override 11 | _AllCategoryListComponentState createState() => _AllCategoryListComponentState(); 12 | } 13 | 14 | class _AllCategoryListComponentState extends State { 15 | List get categoryList => categoryList; 16 | 17 | List getAllCategoryList(List categoryList) { 18 | List list = []; 19 | for (int i = 0; i < categoryList.length; i++) { 20 | list.add(CategoryComponent( 21 | category: categoryList[i]["category"], 22 | classify: categoryList[i]["classify"], 23 | )); 24 | } 25 | return list; 26 | } 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | return Container( 31 | child: Column(children: getAllCategoryList(this.categoryList)), 32 | ); 33 | } 34 | } 35 | /*-----------------------分类影片------------------------*/ -------------------------------------------------------------------------------- /lib/component/AvaterComponent.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../router/index.dart'; 3 | import '../common/constant.dart'; 4 | import '../provider/UserInfoProvider.dart'; 5 | import 'package:provider/provider.dart'; 6 | 7 | /*-----------------------头像组件------------------------*/ 8 | class AvaterComponent extends StatelessWidget { 9 | final double size; 10 | const AvaterComponent({super.key,required this.size}); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return InkWell( 15 | onTap: () { 16 | Routes.router.navigateTo(context, '/UserPage'); 17 | }, 18 | child: Container( 19 | width: size, 20 | height: size, 21 | child: ClipOval( 22 | child: Image.network( 23 | //从全局的provider中获取用户信息 24 | HOST + 25 | Provider.of(context).userInfo.avater, 26 | height: size, 27 | width: size, 28 | fit: BoxFit.cover, 29 | ), 30 | )), 31 | ); 32 | } 33 | } 34 | /*-----------------------头像组件------------------------*/ -------------------------------------------------------------------------------- /lib/component/CategoryComponent.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../service/serverMethod.dart'; 3 | import 'MovieListComponent.dart'; 4 | import '../model/MovieDetailModel.dart'; 5 | import '../theme/ThemeStyle.dart'; 6 | import 'TitleComponent.dart'; 7 | 8 | /*-----------------------分类电影------------------------*/ 9 | class CategoryComponent extends StatelessWidget { 10 | final String category, classify; 11 | 12 | const CategoryComponent({super.key,required this.category,required this.classify}) 13 | ; 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return FutureBuilder( 18 | future: getCategoryListService(this.category, this.classify), 19 | builder: (context, snapshot) { 20 | if (snapshot.data == null) { 21 | return Container(); 22 | } 23 | var result = snapshot.data; 24 | List categoryList = []; 25 | if (result != null && result.data != null) { 26 | result.data.forEach((item) { 27 | categoryList.add(MovieDetailModel.fromJson(item)); 28 | }); 29 | } 30 | return Container( 31 | decoration: ThemeStyle.boxDecoration, 32 | margin: ThemeStyle.margin, 33 | padding: ThemeStyle.padding, 34 | child: Column( 35 | crossAxisAlignment: CrossAxisAlignment.start, 36 | children: [ 37 | TitleComponent(title: category), 38 | MovieListComponent( 39 | movieList: categoryList, 40 | direction: "horizontal", 41 | ) 42 | ], 43 | ), 44 | ); 45 | // return MovieListComponent(movieList: categoryList,title: category,direction: "horizontal",); 46 | }); 47 | } 48 | } 49 | /*-----------------------分类电影------------------------*/ 50 | -------------------------------------------------------------------------------- /lib/component/MovieListComponent.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../pages/MovieDetailPage.dart'; 3 | import '../common/constant.dart'; 4 | import '../model/MovieDetailModel.dart'; 5 | import '../theme/ThemeSize.dart'; 6 | 7 | /*-----------------------获取推荐的影片------------------------*/ 8 | class MovieListComponent extends StatelessWidget { 9 | final List movieList; 10 | final String direction; 11 | 12 | const MovieListComponent( 13 | {super.key,required this.movieList,required this.direction}) 14 | ; 15 | 16 | List _items(BuildContext context) { 17 | int index = -1; 18 | var tempList = movieList.map((item) { 19 | index++; 20 | return InkWell( 21 | onTap: () { 22 | Navigator.push( 23 | context, 24 | MaterialPageRoute( 25 | builder: (context) => MovieDetailPage(movieItem: item))); 26 | }, 27 | child: direction == "verital" 28 | ? Container( 29 | alignment: Alignment.center, 30 | child: movieItemWidget(item, index)) 31 | : movieItemWidget(item, index)); 32 | }); 33 | return tempList.toList(); 34 | } 35 | 36 | Widget movieItemWidget(MovieDetailModel item, int index) { 37 | return Container( 38 | width: ThemeSize.movieWidth, 39 | // height: ThemeSize.movieHeight, 40 | margin: EdgeInsets.only( 41 | left: direction == "horizontal" && index > 0 ? 10 : 0), 42 | child: Column( 43 | children: [ 44 | ClipRRect( 45 | borderRadius: BorderRadius.circular(ThemeSize.middleRadius), 46 | child: Image( 47 | width: ThemeSize.movieWidth, 48 | height: ThemeSize.movieHeight, 49 | fit: BoxFit.fill, 50 | image: NetworkImage(item.localImg != null 51 | ? HOST + item.localImg 52 | : item.img))), 53 | SizedBox(height:ThemeSize.miniMargin), 54 | Text( 55 | item.movieName, 56 | softWrap: true, 57 | textAlign: TextAlign.left, 58 | overflow: TextOverflow.ellipsis, 59 | maxLines: 1, 60 | ) 61 | ], 62 | ), 63 | ); 64 | } 65 | 66 | @override 67 | Widget build(BuildContext context) { 68 | return Column( 69 | crossAxisAlignment: CrossAxisAlignment.start, 70 | children: [ 71 | direction == "vertical" 72 | ? GridView.count( 73 | crossAxisSpacing: 10, 74 | //水平子 Widget 之间间距 75 | crossAxisCount: 3, 76 | //一行的 Widget 数量 77 | physics: NeverScrollableScrollPhysics(), 78 | shrinkWrap: true, 79 | childAspectRatio: 0.55, 80 | children: this._items(context)) 81 | : Container( 82 | height: 230, 83 | width: MediaQuery.of(context).size.width - 84 | ThemeSize.containerPadding * 2, 85 | child: ListView( 86 | scrollDirection: Axis.horizontal, 87 | children: this._items(context), 88 | )) 89 | ]); 90 | } 91 | } 92 | /*-----------------------获取推荐的影片------------------------*/ 93 | -------------------------------------------------------------------------------- /lib/component/NavigatorTitleComponent.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../theme/ThemeSize.dart'; 3 | import '../theme/ThemeColors.dart'; 4 | import '../theme/ThemeStyle.dart'; 5 | 6 | /*-----------------------头像组件------------------------*/ 7 | class NavigatorTitleComponent extends StatelessWidget { 8 | final String title; 9 | const NavigatorTitleComponent({super.key,required this.title}); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Container( 14 | padding: ThemeStyle.padding, 15 | decoration: BoxDecoration(color: ThemeColors.colorWhite), 16 | child: 17 | Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ 18 | InkWell( 19 | onTap: () { 20 | Navigator.of(context).pop(); 21 | }, 22 | child: Image.asset("lib/assets/images/icon_back.png", 23 | width: ThemeSize.smallIcon, height: ThemeSize.smallIcon), 24 | ), 25 | Expanded(flex: 1, child: Center(child: Text(title))), 26 | SizedBox( 27 | width: ThemeSize.smallIcon, 28 | height: ThemeSize.smallIcon, 29 | ), 30 | ])); 31 | } 32 | } 33 | /*-----------------------头像组件------------------------*/ -------------------------------------------------------------------------------- /lib/component/RecommendComponent.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../service/serverMethod.dart'; 3 | import 'MovieListComponent.dart'; 4 | import 'TitleComponent.dart'; 5 | import '../model/MovieDetailModel.dart'; 6 | import '../theme/ThemeStyle.dart'; 7 | 8 | /*-----------------------获取推荐的影片------------------------*/ 9 | class RecommendComponent extends StatelessWidget { 10 | final String classify; 11 | final String direction; 12 | final String title; 13 | 14 | const RecommendComponent({super.key,required this.classify,required this.direction,required this.title}) 15 | ; 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return FutureBuilder( 20 | future: getRecommendSerivce(classify), 21 | builder: (context, snapshot) { 22 | if (snapshot.data == null) { 23 | return Container(); 24 | } else { 25 | List movieList = []; 26 | snapshot.data?.data.forEach((item) { 27 | movieList.add(MovieDetailModel.fromJson(item)); 28 | }); 29 | return Container( 30 | decoration: ThemeStyle.boxDecoration, 31 | padding: ThemeStyle.padding, 32 | margin: ThemeStyle.margin, 33 | child: Column( 34 | crossAxisAlignment: CrossAxisAlignment.start, 35 | children: [ 36 | TitleComponent(title: title), 37 | MovieListComponent(movieList: movieList, direction: direction) 38 | ], 39 | ), 40 | ); 41 | } 42 | }); 43 | } 44 | } 45 | /*-----------------------获取推荐的影片------------------------*/ 46 | -------------------------------------------------------------------------------- /lib/component/ScoreComponent.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ScoreComponent extends StatelessWidget { 4 | final double? score; 5 | const ScoreComponent({super.key,this.score}); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | List result = []; 10 | if (score == null) { 11 | result.add(Container()); 12 | } else { 13 | double count = score! / 2; 14 | var integer = count.floor(); 15 | for (var i = 0; i < integer; i++) { 16 | //实心星星 17 | result 18 | ..add(Image.asset("lib/assets/images/icon_full_star.png", 19 | width: 15, height: 15)) 20 | ..add(SizedBox(width: 5)); 21 | } 22 | var temp = (count * 10 / 5) / 2; 23 | if (count.round() - temp.floor() == 0.5) { 24 | //半个星星 25 | result 26 | ..add(Image.asset("lib/assets/images/icon_half_star.png", 27 | width: 15, height: 15)) 28 | ..add(SizedBox(width: 5)); 29 | } 30 | var leftover = 5 - result.length / 2; 31 | for (int i = 0; i < leftover; i++) { 32 | //空心星星 33 | result 34 | ..add(Image.asset("lib/assets/images/icon_empty_star.png", 35 | width: 15, height: 15)) 36 | ..add(SizedBox(width: 5)); 37 | } 38 | result.add(Text( 39 | score.toString(), 40 | style: TextStyle( 41 | color: Colors.red, fontWeight: FontWeight.bold, fontSize: 15), 42 | )); 43 | } 44 | return Row( 45 | crossAxisAlignment: CrossAxisAlignment.start, 46 | mainAxisAlignment: MainAxisAlignment.start, 47 | children: result, 48 | ); 49 | } 50 | } 51 | /*-----------------------获取得分星星------------------------*/ 52 | -------------------------------------------------------------------------------- /lib/component/SearchCommponent.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../model/MovieDetailModel.dart'; 3 | import '../pages/MovieSearchPage.dart'; 4 | import '../service/serverMethod.dart'; 5 | import '../theme/ThemeColors.dart'; 6 | import '../theme/ThemeSize.dart'; 7 | 8 | /*-----------------------搜索------------------------*/ 9 | class SearchCommponent extends StatelessWidget { 10 | final String classify; 11 | 12 | const SearchCommponent({super.key,required this.classify}); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return FutureBuilder( 17 | future: getKeyWordService(classify), 18 | builder: (context, snapshot) { 19 | if (snapshot.data == null) { 20 | return Container(); 21 | } 22 | var result = snapshot.data; 23 | String keyword = ""; 24 | if (result != null && result.data != null) { 25 | keyword = MovieDetailModel.fromJson(result.data).movieName; 26 | } 27 | return InkWell( 28 | onTap: () { 29 | Navigator.push( 30 | context, 31 | MaterialPageRoute( 32 | builder: (context) => 33 | MovieSearchPage(keyword: keyword))); 34 | }, 35 | child: Container( 36 | height: ThemeSize.buttonHeight, 37 | //修饰黑色背景与圆角 38 | decoration: new BoxDecoration( 39 | color: ThemeColors.colorBg, 40 | borderRadius: new BorderRadius.all( 41 | new Radius.circular(ThemeSize.bigRadius)), 42 | ), 43 | alignment: Alignment.centerLeft, 44 | padding: EdgeInsets.only(left: ThemeSize.containerPadding), 45 | child: Text( 46 | keyword, 47 | style: TextStyle(color: Colors.grey), 48 | ))); 49 | }); 50 | } 51 | } 52 | 53 | /*-----------------------搜索------------------------*/ 54 | -------------------------------------------------------------------------------- /lib/component/SwiperComponent.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_swiper_null_safety/flutter_swiper_null_safety.dart'; 3 | import '../service/serverMethod.dart'; 4 | import '../common/constant.dart'; 5 | import '../pages/MovieDetailPage.dart'; 6 | import '../model/MovieDetailModel.dart'; 7 | import '../theme/ThemeSize.dart'; 8 | import '../theme/ThemeStyle.dart'; 9 | /*-----------------------轮播组件------------------------*/ 10 | class SwiperComponent extends StatelessWidget { 11 | final String classify; 12 | const SwiperComponent({super.key,required this.classify}); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return FutureBuilder( 17 | future: getCategoryListService("轮播", classify), 18 | builder: (context, snapshot) { 19 | if (snapshot.data == null) { 20 | return Container(); 21 | } 22 | var result = snapshot.data; 23 | List swiperDataList = []; 24 | if (result != null && result.data != null) { 25 | result.data.sublist(0, 5).forEach((item) { 26 | swiperDataList.add(MovieDetailModel.fromJson(item)); 27 | }); 28 | } 29 | return Container( 30 | height: ThemeSize.swiperHeight, 31 | margin: ThemeStyle.margin, 32 | child: 33 | Swiper( 34 | itemBuilder: (BuildContext context, int index) { 35 | return 36 | ClipRRect( 37 | child: 38 | Image.network( 39 | swiperDataList[index].localImg != null 40 | ? HOST + swiperDataList[index].localImg 41 | : swiperDataList[index].img, 42 | height: 200, 43 | fit: BoxFit.cover, 44 | ), 45 | borderRadius: BorderRadius.circular(ThemeSize.middleRadius) 46 | ); 47 | }, 48 | itemCount: swiperDataList.length, 49 | // viewportFraction: 0.9, 50 | // scale: 0.9, 51 | pagination: SwiperPagination( 52 | builder: DotSwiperPaginationBuilder( 53 | color: Colors.black54, 54 | activeColor: Colors.white, 55 | )), 56 | control: SwiperControl(), 57 | scrollDirection: Axis.horizontal, 58 | // viewportFraction: 0.8, 59 | // scale: 0.9, 60 | autoplay: true, 61 | loop: true, 62 | onTap: (index) { 63 | Navigator.push( 64 | context, 65 | MaterialPageRoute( 66 | builder: (context) => 67 | MovieDetailPage(movieItem: swiperDataList[index]))); 68 | }, 69 | )); 70 | }); 71 | } 72 | } 73 | /*-----------------------轮播组件------------------------*/ -------------------------------------------------------------------------------- /lib/component/TitleComponent.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../theme/ThemeStyle.dart'; 3 | 4 | class TitleComponent extends StatelessWidget { 5 | final String title; 6 | const TitleComponent({super.key,required this.title}); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Container( 11 | margin: ThemeStyle.margin, 12 | padding: EdgeInsets.only(left: 5), 13 | decoration: BoxDecoration( 14 | border: Border( 15 | left: BorderSide( 16 | width: 3, //宽度 17 | color: Colors.blue, //边框颜色 18 | ), 19 | ), 20 | ), 21 | child: Text(title)); 22 | } 23 | } -------------------------------------------------------------------------------- /lib/component/TopNavigators.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../router/index.dart'; 3 | import '../theme/ThemeSize.dart'; 4 | import '../theme/ThemeStyle.dart'; 5 | 6 | /*-----------------------分类图标------------------------*/ 7 | class TopNavigators extends StatelessWidget { 8 | const TopNavigators({super.key}); 9 | 10 | List _items(BuildContext context) { 11 | List listData = [ 12 | {"image": "lib/assets/images/icon_hot.png", "title": "热门"}, 13 | {"image": "lib/assets/images/icon_play.png", "title": "预告"}, 14 | {"image": "lib/assets/images/icon_top.png", "title": "最新"}, 15 | {"image": "lib/assets/images/icon_classify.png", "title": "分类"} 16 | ]; 17 | var tempList = listData.map((value) { 18 | return Expanded( 19 | flex: 1, 20 | child: InkWell( 21 | onTap: () { 22 | if (value["title"] == "最新") { 23 | Routes.router.navigateTo(context, '/NewMoviePage'); 24 | } 25 | }, 26 | child: Column( 27 | crossAxisAlignment: CrossAxisAlignment.center, 28 | children: [ 29 | Image.asset(value['image'], 30 | height: ThemeSize.bigIcon, 31 | width: ThemeSize.bigIcon, 32 | fit: BoxFit.cover), 33 | SizedBox(height: ThemeSize.containerPadding), 34 | Text( 35 | value['title'], 36 | textAlign: TextAlign.center, 37 | style: TextStyle(fontSize: 14), 38 | ) 39 | ], 40 | ))); 41 | }); 42 | return tempList.toList(); 43 | } 44 | 45 | @override 46 | Widget build(BuildContext context) { 47 | return Container( 48 | decoration: ThemeStyle.boxDecoration, 49 | width: MediaQuery.of(context).size.width, 50 | margin: ThemeStyle.margin, 51 | padding: EdgeInsets.only( 52 | top: ThemeSize.containerPadding, 53 | bottom: ThemeSize.containerPadding), 54 | child: Row( 55 | children: this._items(context), 56 | )); 57 | } 58 | } 59 | /*-----------------------分类图标------------------------*/ 60 | -------------------------------------------------------------------------------- /lib/component/YouLikesComponent.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../service/serverMethod.dart'; 3 | import './MovieListComponent.dart'; 4 | import './TitleComponent.dart'; 5 | import '../model/MovieDetailModel.dart'; 6 | import '../theme/ThemeStyle.dart'; 7 | 8 | /*-----------------------获取推荐的影片------------------------*/ 9 | class YouLikesComponent extends StatelessWidget { 10 | final String label; 11 | 12 | const YouLikesComponent({super.key,required this.label}); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return FutureBuilder( 17 | future: getYourLikesService(label), 18 | builder: (context, snapshot) { 19 | if (snapshot.data == null) { 20 | return Container(); 21 | } else { 22 | List movieList = []; 23 | snapshot.data?.data.forEach((item) { 24 | movieList.add(MovieDetailModel.fromJson(item)); 25 | }); 26 | return Container( 27 | decoration: ThemeStyle.boxDecoration, 28 | margin: ThemeStyle.margin, 29 | child: Column( 30 | children: [ 31 | TitleComponent(title: "猜你想看"), 32 | MovieListComponent( 33 | movieList: movieList, 34 | direction: "horizontal", 35 | ) 36 | ], 37 | )); 38 | } 39 | }); 40 | } 41 | } 42 | /*-----------------------获取推荐的影片------------------------*/ 43 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:provider/provider.dart'; 3 | import './provider/UserInfoProvider.dart'; 4 | import './provider/TokenProvider.dart'; 5 | import './router/index.dart'; 6 | import './pages/LaunchPage.dart'; 7 | 8 | void main() { 9 | runApp( 10 | MultiProvider( 11 | providers: [ 12 | ChangeNotifierProvider.value(value: TokenProvider("")), //初始化默认值 13 | ChangeNotifierProvider.value(value: UserInfoProvider(null)), //初始化默认值 14 | ], 15 | child: MyApp(), 16 | ), 17 | ); 18 | } 19 | 20 | class MyApp extends StatelessWidget { 21 | static final RouteObserver routeObserver = RouteObserver(); 22 | MyApp() { 23 | Routes.initRoutes(); 24 | } 25 | @override 26 | Widget build(BuildContext context) { 27 | return MaterialApp( 28 | navigatorObservers: [MyApp.routeObserver], 29 | onGenerateRoute: Routes.router.generator, 30 | title: 'Flutter bottomNavigationBar', 31 | debugShowCheckedModeBanner:false, 32 | theme: ThemeData.light(), 33 | home: const LaunchPage()); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/model/CategoryModel.dart: -------------------------------------------------------------------------------- 1 | class CategoryModel { 2 | String category; //小分类 3 | String classify; //大分类 4 | 5 | CategoryModel({ 6 | required this.category, 7 | required this.classify 8 | }); 9 | 10 | //工厂模式-用这种模式可以省略New关键字 11 | factory CategoryModel.fromJson(dynamic json){ 12 | return CategoryModel( 13 | category:json['category'], 14 | classify:json['classify'] 15 | ); 16 | } 17 | } -------------------------------------------------------------------------------- /lib/model/CommentModel.dart: -------------------------------------------------------------------------------- 1 | class CommentModel{ 2 | int? id;//主键 3 | String type;// 类型 4 | String content;//评论内容 5 | int? parentId;//父节点id 6 | int? topId;//顶级节点id 7 | int relationId;//影片id 8 | String? createTime;//创建时间 9 | String? updateTime;//更新时间 10 | int? replyCount;//回复数量 11 | String? userId;//用户id 12 | String? username;//用户名 13 | String? avater;//用户头像 14 | String? replyUserId;//被回复者id 15 | String? replyUserName;//被回复者名称 16 | String? showCommentCount;//显示的回复数量 17 | int? replyPageNum; 18 | List?replyList; 19 | CommentModel({ 20 | this.id, 21 | required this.type, 22 | required this.content, 23 | this.parentId, 24 | this.topId, 25 | required this.relationId, 26 | this.createTime, 27 | this.updateTime, 28 | this.replyCount, 29 | this.userId, 30 | this.username, 31 | this.avater, 32 | this.replyUserId, 33 | this.replyUserName, 34 | this.replyPageNum, 35 | this.replyList 36 | }); 37 | //工厂模式-用这种模式可以省略New关键字 38 | factory CommentModel.fromJson(dynamic json){ 39 | return CommentModel( 40 | id:json['id'], 41 | type:json['type'], 42 | content:json['content'], 43 | parentId:json['parentId'], 44 | topId:json['topId'], 45 | relationId:json['relationId'], 46 | createTime:json['createTime'], 47 | updateTime:json['updateTime'], 48 | replyCount:json['replyCount'], 49 | userId:json['userId'], 50 | username:json['username'], 51 | avater:json['avater'], 52 | replyUserId:json['replyUserId'], 53 | replyUserName:json['replyUserName'], 54 | replyPageNum:0, 55 | replyList: ((json['replyList'] == null ? [] : json['replyList'])as List).map((item){ 56 | return CommentModel.fromJson(item); 57 | }).toList() 58 | ); 59 | } 60 | 61 | Map toMap() { 62 | return { 63 | 'id':id, 64 | 'type':type, 65 | 'content':content, 66 | 'parentId':parentId, 67 | 'topId':topId, 68 | 'relationId':relationId, 69 | 'createTime':createTime, 70 | 'updateTime':updateTime, 71 | 'replyCount':replyCount, 72 | 'userId':userId, 73 | 'username':username, 74 | 'avater':avater, 75 | 'replyUserId':replyUserId, 76 | 'replyUserName':replyUserName, 77 | }; 78 | } 79 | } -------------------------------------------------------------------------------- /lib/model/MovieDetailModel.dart: -------------------------------------------------------------------------------- 1 | class MovieDetailModel { 2 | int id; //主键 3 | int? movieId; //电影id 4 | String movieName; //电影名称 5 | String? director; //导演 6 | String? star; //主演 7 | String? type; //类型 8 | String? countryLanguage; //国家/语言 9 | String? viewingState; //观看状态 10 | String? releaseTime; //上映时间 11 | String? plot; //剧情 12 | String? updateTime; //更新时间 13 | String? isRecommend; //是否推荐,0:不推荐,1:推荐 14 | String img; //电影海报 15 | String? classify; //分类 电影,电视剧,动漫,综艺,新片库,福利,午夜,恐怖,其他 16 | String sourceName; //来源名称,本地,骑士影院,爱奇艺 17 | String sourceUrl; //来源地址 18 | String? createTime; //创建时间 19 | String localImg; //本地图片 20 | String? label; //标签 21 | String? description; //简单描述 22 | String? useStatus; //0代表未使用,1表示正在使用,是banner和carousel图的才有 23 | double? score; //评分 24 | String? category; //类目,值为banner首屏,carousel:滚动轮播 25 | String? ranks; //排名 26 | String? doubanUrl; //对应豆瓣网的地址 27 | String? duration;// 时长 28 | String? privilegeId;// 权限 29 | MovieDetailModel( 30 | { 31 | required this.id, 32 | this.movieId, 33 | required this.movieName, 34 | this.director, 35 | this.star, 36 | this.type, 37 | this.countryLanguage, 38 | this.viewingState, 39 | this.releaseTime, 40 | this.plot, 41 | this.updateTime, 42 | this.isRecommend, 43 | required this.img, 44 | this.classify, 45 | required this.sourceName, 46 | required this.sourceUrl, 47 | this.createTime, 48 | required this.localImg, 49 | this.label, 50 | this.description, 51 | this.useStatus, 52 | this.score, 53 | this.category, 54 | this.ranks, 55 | this.doubanUrl}); 56 | 57 | //工厂模式-用这种模式可以省略New关键字 58 | factory MovieDetailModel.fromJson(dynamic json) { 59 | return MovieDetailModel( 60 | id: json["id"], 61 | movieId: json["movieId"], 62 | movieName: json["movieName"], 63 | director: json["director"], 64 | star: json["star"], 65 | type: json["type"], 66 | countryLanguage: json["countryLanguage"], 67 | viewingState: json["viewingState"], 68 | releaseTime: json["releaseTime"], 69 | plot: json["plot"], 70 | updateTime: json["updateTime"].toString(), 71 | isRecommend: json["isRecommend"], 72 | img: json["img"], 73 | classify: json["classify"], 74 | sourceName: json["sourceName"], 75 | sourceUrl: json["sourceUrl"], 76 | createTime: json["createTime"].toString(), 77 | localImg: json["localImg"], 78 | label: json["label"], 79 | description: json["description"], 80 | useStatus: json["useStatus"], 81 | score: json["score"], 82 | category: json["category"], 83 | ranks: json["ranks"], 84 | doubanUrl: json["doubanUrl"]); 85 | } 86 | 87 | Map toMap() { 88 | return { 89 | 'id': id, //主键 90 | 'movieId': movieId, //电影id 91 | 'movieName': movieName, //电影名称 92 | 'director': director, //导演 93 | 'star': star, //主演 94 | 'type': type, //类型 95 | 'countryLanguage': countryLanguage, //国家/语言 96 | 'viewingState': viewingState, //观看状态 97 | 'releaseTime': releaseTime, //上映时间 98 | 'plot': plot, //剧情 99 | 'updateTime': updateTime, //更新时间 100 | 'isRecommend': isRecommend, //是否推荐,0:不推荐,1:推荐 101 | 'img': img, //电影海报 102 | 'classify': classify, //分类 电影,电视剧,动漫,综艺,新片库,福利,午夜,恐怖,其他 103 | 'sourceName': sourceName, //来源名称,本地,骑士影院,爱奇艺 104 | 'sourceUrl': sourceUrl, //来源地址 105 | 'createTime': createTime, //创建时间 106 | 'localImg': localImg, //本地图片 107 | 'label': label, //标签 108 | 'description': description, //简单描述 109 | 'useStatus': useStatus, //0代表未使用,1表示正在使用,是banner和carousel图的才有 110 | 'score': score, //评分 111 | 'category': category, //类目,值为banner首屏,carousel:滚动轮播 112 | 'ranks': ranks, //排名 113 | 'doubanUrl': doubanUrl //对应豆瓣网的地址 114 | }; 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /lib/model/MovieStarModel.dart: -------------------------------------------------------------------------------- 1 | class MovieStarModel{ 2 | int id;//主键 3 | String starName;//演员名称 4 | String img;//演员图片地址 5 | String localImg;//演员本地图片地址 6 | String? createTime;//创建时间 7 | String? updateTime;//更新时间 8 | String movieId;//对应电影的id 9 | String movieName;//对应电影的名称 10 | String? role;//角色 11 | String? href;//演员的豆瓣链接地址 12 | String? works;//代表作 13 | MovieStarModel({ 14 | required this.id, 15 | required this.starName, 16 | required this.img, 17 | required this.localImg, 18 | this.createTime, 19 | this.updateTime, 20 | required this.movieId, 21 | required this.movieName, 22 | this.role, 23 | this.href, 24 | this.works, 25 | }); 26 | //工厂模式-用这种模式可以省略New关键字 27 | factory MovieStarModel.fromJson(dynamic json){ 28 | return MovieStarModel( 29 | id: json["id"], 30 | starName: json["starName"], 31 | img: json["img"], 32 | localImg: json["localImg"], 33 | createTime: json["createTime"].toString(), 34 | updateTime: json["updateTime"].toString(), 35 | movieId: json["movieId"], 36 | movieName: json["movieName"], 37 | role: json["role"], 38 | href: json["href"], 39 | works: json["works"], 40 | ); 41 | } 42 | } -------------------------------------------------------------------------------- /lib/model/MovieUrlModel.dart: -------------------------------------------------------------------------------- 1 | class MovieUrlModel{ 2 | int id;//主键 3 | String movieName;//电影名称 4 | int movieId;//对应的电影的id 5 | String href;//源地址 6 | String? label;//集数 7 | String? createTime;//创建时间 8 | String? updateTime;//更新时间 9 | String url;//播放地址 10 | String? playGroup;//播放分组,1, 2 11 | MovieUrlModel({ 12 | required this.id, 13 | required this.movieName, 14 | required this.movieId, 15 | required this.href, 16 | this.label, 17 | this.createTime, 18 | this.updateTime, 19 | required this.url, 20 | this.playGroup 21 | }); 22 | //工厂模式-用这种模式可以省略New关键字 23 | factory MovieUrlModel.fromJson(dynamic json){ 24 | return MovieUrlModel( 25 | id:json["id"], 26 | movieName:json["movieName"], 27 | movieId:json["movieId"], 28 | href:json["href"], 29 | label:json["label"], 30 | createTime:json["createTime"].toString(), 31 | updateTime:json["updateTime"].toString(), 32 | url:json["url"], 33 | playGroup: json["playGroup"] 34 | ); 35 | } 36 | } -------------------------------------------------------------------------------- /lib/model/UserInfoModel.dart: -------------------------------------------------------------------------------- 1 | class UserInfoModel{ 2 | String? avater; 3 | String? birthday; 4 | String createDate; 5 | String? email; 6 | String? role; 7 | int? sex; 8 | String? telephone; 9 | String updateDate; 10 | String userId; 11 | String username; 12 | String? sign; 13 | String? region; 14 | int? disabled; 15 | int? permission; 16 | UserInfoModel({ 17 | this.avater, 18 | this.birthday, 19 | required this.createDate, 20 | this.email, 21 | this.role, 22 | this.sex, 23 | this.telephone, 24 | required this.updateDate, 25 | required this.userId, 26 | required this.username, 27 | this.sign, 28 | this.region, 29 | this.disabled, 30 | this.permission 31 | }); 32 | //工厂模式-用这种模式可以省略New关键字 33 | factory UserInfoModel.fromJson(dynamic json){ 34 | return UserInfoModel( 35 | avater: json["avater"], 36 | birthday: json["birthday"], 37 | createDate: json["createDate"], 38 | email: json["email"], 39 | role: json["role"], 40 | sex: json["sex"], 41 | telephone: json["telephone"], 42 | updateDate: json["updateDate"], 43 | userId: json["userId"], 44 | username: json["username"], 45 | sign: json["sign"], 46 | region: json["region"], 47 | disabled:json["disabled"], 48 | permission:json["permission"] 49 | ); 50 | } 51 | 52 | Map toMap() { 53 | return { 54 | "avater": avater, 55 | "birthday": birthday, 56 | "createDate": createDate, 57 | "email": email, 58 | "role": role, 59 | "sex": sex, 60 | "telephone": telephone, 61 | "updateDate": updateDate, 62 | "userId": userId, 63 | "username": username, 64 | "sign": sign, 65 | "region": region 66 | }; 67 | } 68 | 69 | dynamic get(String propertyName) { 70 | var _mapRep = toMap(); 71 | if (_mapRep.containsKey(propertyName)) { 72 | return _mapRep[propertyName]; 73 | } 74 | throw ArgumentError('propery not found'); 75 | } 76 | } -------------------------------------------------------------------------------- /lib/model/UserMsgModel.dart: -------------------------------------------------------------------------------- 1 | class UserMsgModel{ 2 | String userAge;//使用天数 3 | String favoriteCount;//收藏数 4 | String playRecordCount;//观看记录 5 | String viewRecordCount;//浏览记录 6 | 7 | UserMsgModel({ 8 | required this.userAge, 9 | required this.favoriteCount, 10 | required this.playRecordCount, 11 | required this.viewRecordCount 12 | }); 13 | //工厂模式-用这种模式可以省略New关键字 14 | factory UserMsgModel.fromJson(dynamic json){ 15 | return UserMsgModel( 16 | userAge: json["userAge"], 17 | favoriteCount: json["favoriteCount"], 18 | playRecordCount: json["playRecordCount"], 19 | viewRecordCount: json["viewRecordCount"] 20 | ); 21 | } 22 | } -------------------------------------------------------------------------------- /lib/pages/LaunchPage.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:package_info_plus/package_info_plus.dart'; 5 | import 'package:device_info_plus/device_info_plus.dart'; 6 | import '../router/index.dart'; 7 | import '../service/serverMethod.dart'; 8 | import '../utils/HttpUtil.dart'; 9 | import '../provider/UserInfoProvider.dart'; 10 | import 'package:provider/provider.dart'; 11 | import '../utils/LocalStorageUtils.dart'; 12 | import '../model/UserInfoModel.dart'; 13 | 14 | class LaunchPage extends StatefulWidget { 15 | const LaunchPage({super.key}); 16 | 17 | @override 18 | LaunchPageState createState() => LaunchPageState(); 19 | } 20 | 21 | class LaunchPageState extends State { 22 | late UserInfoProvider userInfoprovider; 23 | late String version; 24 | 25 | @override 26 | void initState() { 27 | userInfoprovider = Provider.of(context,listen: false); 28 | 29 | LocalStorageUtils.getToken().then((res){ 30 | Future.delayed(const Duration(seconds: 1), () { 31 | // 这里是你想要延时执行的代码 32 | HttpUtil.getInstance().setToken(res); 33 | if(res != ''){// 已经登录 34 | getUserDataService().then((data){ 35 | if(data.token != null){ 36 | String token = data.token!; 37 | LocalStorageUtils.setToken(token); 38 | HttpUtil.getInstance().setToken(token); 39 | userInfoprovider.setUserInfo(UserInfoModel.fromJson(data.data)); 40 | } 41 | Routes.router.navigateTo(context, '/MovieIndexPage',replace: true); 42 | }); 43 | }else{// 没有登录 44 | Routes.router.navigateTo(context, '/LoginPage',replace: true); 45 | } 46 | }); 47 | }); 48 | PackageInfo.fromPlatform().then((value){ 49 | userInfoprovider.setVersion(value.version); 50 | }); 51 | DeviceInfoPlugin deviceInfo = DeviceInfoPlugin(); 52 | if (Platform.isAndroid) { 53 | deviceInfo.androidInfo.then((value){ 54 | userInfoprovider.setDevice(value.model); 55 | }); 56 | } else if (Platform.isIOS) { 57 | deviceInfo.iosInfo.then((value){ 58 | userInfoprovider.setDevice(value.model); 59 | }); 60 | }else{ 61 | userInfoprovider.setDevice('Unknown'); 62 | } 63 | super.initState(); 64 | } 65 | 66 | @override 67 | Widget build(BuildContext context) { 68 | return const Scaffold( 69 | backgroundColor: Colors.white, 70 | body: SafeArea( 71 | child: SizedBox( 72 | width: double.infinity, 73 | height: double.infinity, 74 | child:Center(child: Text('欢迎使用')), 75 | ), 76 | )); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /lib/pages/MovieIndexPage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'MovieHomePage.dart'; 3 | import 'MoviePage.dart'; 4 | import 'VideoPage.dart'; 5 | import 'MovieMyPage.dart'; 6 | import '../theme/ThemeColors.dart'; 7 | import '../theme/ThemeSize.dart'; 8 | 9 | 10 | class MovieIndexPage extends StatefulWidget { 11 | const MovieIndexPage({super.key}); 12 | 13 | @override 14 | MovieIndexPageState createState() => MovieIndexPageState(); 15 | } 16 | 17 | class MovieIndexPageState extends State { 18 | int _currentIndex = 0; 19 | List pages = [null, null, null, null]; 20 | bool isInit = false; 21 | @override 22 | void initState(){ 23 | super.initState(); 24 | } 25 | 26 | @override 27 | void dispose() { 28 | super.dispose(); 29 | _pageController.dispose(); 30 | } 31 | 32 | List icons = [ 33 | "lib/assets/images/icon_home.png", 34 | "lib/assets/images/icon_movie.png", 35 | "lib/assets/images/icon_tv.png", 36 | "lib/assets/images/icon_user.png" 37 | ]; 38 | 39 | List titles = ["首页", "电影", "电视剧", "我的"]; 40 | 41 | Widget bottomAppBarItem(int index) { 42 | //设置默认未选中的状态 43 | TextStyle style = const TextStyle(color: Colors.grey); 44 | if (_currentIndex == index) { 45 | //选中的话 46 | style = const TextStyle(color: Colors.orange); 47 | } 48 | //构造返回的Widget 49 | 50 | return GestureDetector( 51 | behavior: HitTestBehavior.opaque, 52 | child: Column( 53 | children: [ 54 | Image.asset(icons[index], 55 | color: _currentIndex == index ? Colors.orange : Colors.black, 56 | width: ThemeSize.navigationIcon, 57 | height: ThemeSize.navigationIcon), 58 | SizedBox(height: ThemeSize.smallMargin), 59 | Text( 60 | titles[index], 61 | style: TextStyle(color: _currentIndex == index ? Colors.orange : Colors.black), 62 | ) 63 | ], 64 | ), 65 | onTap: () { 66 | if (_currentIndex != index) { 67 | setState(() { 68 | _currentIndex = index; 69 | }); 70 | } 71 | }, 72 | ); 73 | } 74 | 75 | final _pageController = PageController(); 76 | 77 | Widget? _getPage() { 78 | if (pages[_currentIndex] == null) { 79 | if (_currentIndex == 0) { 80 | pages[_currentIndex] = const MovieHomePage(); 81 | } else if (_currentIndex == 1) { 82 | pages[_currentIndex] = const MoviePage(); 83 | } else if (_currentIndex == 2) { 84 | pages[_currentIndex] = VideoPage(); 85 | } else if (_currentIndex == 3) { 86 | pages[_currentIndex] = const MovieMyPage(); 87 | } 88 | } 89 | return pages[_currentIndex]; 90 | } 91 | 92 | @override 93 | Widget build(BuildContext context) { 94 | return Scaffold( 95 | backgroundColor: ThemeColors.colorBg, 96 | body: SafeArea( 97 | top: true, 98 | child: PageView.builder( 99 | controller: _pageController, 100 | physics: const NeverScrollableScrollPhysics(), 101 | onPageChanged: _pageChanged, 102 | itemCount: 4, 103 | itemBuilder: (context, index) { 104 | return _getPage(); 105 | })), 106 | bottomNavigationBar: BottomAppBar( 107 | height:ThemeSize.bottomBarHeight, 108 | color: ThemeColors.colorWhite, 109 | child: Row( 110 | mainAxisAlignment: MainAxisAlignment.spaceAround, 111 | crossAxisAlignment: CrossAxisAlignment.center, 112 | children: [ 113 | bottomAppBarItem(0), 114 | bottomAppBarItem(1), 115 | bottomAppBarItem(2), 116 | bottomAppBarItem(3) 117 | ], 118 | ))); 119 | 120 | } 121 | 122 | void _pageChanged(int index) { 123 | setState(() { 124 | if (_currentIndex != index) _currentIndex = index; 125 | }); 126 | } 127 | 128 | void onTabTapped(int index) { 129 | _pageController.jumpToPage(index); 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /lib/pages/MoviePage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_easyrefresh/easy_refresh.dart'; 3 | import 'package:fluttertoast/fluttertoast.dart'; 4 | import '../theme/ThemeColors.dart'; 5 | import '../service/serverMethod.dart'; 6 | import '../component/SearchCommponent.dart'; 7 | import '../component/AvaterComponent.dart'; 8 | import '../component/CategoryComponent.dart'; 9 | import '../component/SwiperComponent.dart'; 10 | import '../theme/ThemeSize.dart'; 11 | import '../theme/ThemeStyle.dart'; 12 | import '../model/CategoryModel.dart'; 13 | 14 | class MoviePage extends StatefulWidget { 15 | const MoviePage({super.key}); 16 | 17 | @override 18 | _MoviePageState createState() => _MoviePageState(); 19 | } 20 | 21 | class _MoviePageState extends State 22 | with AutomaticKeepAliveClientMixin { 23 | @override 24 | bool get wantKeepAlive => true; 25 | List categoryList = []; 26 | List allCategoryLists = []; 27 | EasyRefreshController easyRefreshController = EasyRefreshController(); 28 | 29 | @override 30 | void initState() { 31 | super.initState(); 32 | getAllCategoryByClassifyService("电影").then((res) { 33 | allCategoryLists = res.data.map((element){ 34 | return CategoryModel.fromJson(element); 35 | }).toList(); 36 | setState(() { 37 | categoryList.addAll(allCategoryLists.sublist(0, 2)); 38 | }); 39 | }); 40 | } 41 | 42 | void _getCategoryItem() { 43 | if (categoryList.length < allCategoryLists.length) { 44 | setState(() { 45 | categoryList.add(allCategoryLists[categoryList.length]); 46 | }); 47 | easyRefreshController.finishLoad(success: true,noMore: categoryList.length == allCategoryLists.length); 48 | } 49 | } 50 | 51 | @override 52 | Widget build(BuildContext context) { 53 | return Container( 54 | width: MediaQuery.of(context).size.width, 55 | padding: ThemeStyle.paddingBox, 56 | child: Column(children: [ 57 | Row( 58 | children: [ 59 | Container( 60 | width: MediaQuery.of(context).size.width - 61 | ThemeSize.containerPadding * 2, 62 | margin: ThemeStyle.margin, 63 | decoration: ThemeStyle.boxDecoration, 64 | padding: ThemeStyle.padding, 65 | child: Row( 66 | children: [ 67 | AvaterComponent( 68 | size: ThemeSize.middleAvater, 69 | ), 70 | Expanded( 71 | flex: 1, 72 | child: Padding( 73 | padding: 74 | EdgeInsets.only(left: ThemeSize.smallMargin), 75 | child: SearchCommponent(classify: "电影"))) 76 | ], 77 | )) 78 | ], 79 | ), 80 | Expanded( 81 | flex: 1, 82 | child: EasyRefresh( 83 | controller: easyRefreshController, 84 | footer: ClassicalFooter( 85 | loadText: '上拉加载', 86 | loadReadyText: '准备加载', 87 | loadingText: '加载中...', 88 | loadedText: '加载完成', 89 | noMoreText: '没有更多', 90 | bgColor: Colors.transparent, 91 | textColor: ThemeColors.disableColor, 92 | ), 93 | onLoad: () async { 94 | if (categoryList.length == allCategoryLists.length) { 95 | Fluttertoast.showToast( 96 | msg: "已经到底了", 97 | toastLength: Toast.LENGTH_SHORT, 98 | gravity: ToastGravity.CENTER, 99 | timeInSecForIosWeb: 1, 100 | backgroundColor: Colors.blue, 101 | textColor: Colors.white, 102 | fontSize: ThemeSize.middleFontSize); 103 | } else { 104 | _getCategoryItem(); 105 | } 106 | }, 107 | child: ListView( 108 | children: [ 109 | Column(children: [SwiperComponent(classify: "电影")]), 110 | Column( 111 | children: categoryList.map((item) => CategoryComponent( 112 | category: item.category, 113 | classify: item.classify, 114 | )).toList(), 115 | ) 116 | ], 117 | )), 118 | ) 119 | ]), 120 | ); 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /lib/pages/NewMoviePage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../model/MovieDetailModel.dart'; 3 | import '../component/RecommendComponent.dart'; 4 | class NewMoviePage extends StatefulWidget { 5 | final MovieDetailModel movieItem; 6 | const NewMoviePage({super.key,required this.movieItem}); 7 | 8 | @override 9 | _NewMoviePageState createState() => _NewMoviePageState(); 10 | } 11 | 12 | class _NewMoviePageState extends State { 13 | bool isFavoriteFlag = false; 14 | @override 15 | void initState() { 16 | super.initState(); 17 | } 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return const Scaffold( 22 | body: SingleChildScrollView(child: 23 | Padding(padding: EdgeInsets.all(10),child:Column(children:[ 24 | RecommendComponent(classify: "电影",direction: "vertical",title:"电影"), 25 | RecommendComponent(classify: "电视剧",direction: "vertical",title:"电视剧") 26 | ])) 27 | ,) 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/pages/NotFoundPage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../theme/ThemeColors.dart'; 3 | 4 | class NotFoundPage extends StatefulWidget { 5 | const NotFoundPage({super.key}); 6 | 7 | @override 8 | _NotFoundPageState createState() => _NotFoundPageState(); 9 | } 10 | 11 | class _NotFoundPageState extends State { 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Scaffold( 16 | backgroundColor: ThemeColors.colorBg, 17 | body: const Text('找不到页面')); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/pages/VideoPage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_easyrefresh/material_footer.dart'; 3 | import 'package:fluttertoast/fluttertoast.dart'; 4 | import 'package:flutter_easyrefresh/easy_refresh.dart'; 5 | import '../theme/ThemeColors.dart'; 6 | import '../service/serverMethod.dart'; 7 | import '../component/SearchCommponent.dart'; 8 | import '../component/AvaterComponent.dart'; 9 | import '../component/CategoryComponent.dart'; 10 | import '../component/SwiperComponent.dart'; 11 | import '../theme/ThemeStyle.dart'; 12 | import '../theme/ThemeSize.dart'; 13 | import '../model/CategoryModel.dart'; 14 | 15 | class VideoPage extends StatefulWidget { 16 | VideoPage({super.key}); 17 | 18 | @override 19 | _VideoPageState createState() => _VideoPageState(); 20 | } 21 | 22 | class _VideoPageState extends State 23 | with AutomaticKeepAliveClientMixin { 24 | @override 25 | bool get wantKeepAlive => true; 26 | 27 | List categoryList = []; 28 | 29 | List allCategoryLists = []; 30 | 31 | EasyRefreshController easyRefreshController = EasyRefreshController(); 32 | 33 | @override 34 | void initState() { 35 | super.initState(); 36 | getAllCategoryByClassifyService("电视剧").then((res) { 37 | for(var element in res.data){ 38 | allCategoryLists.add(CategoryModel.fromJson(element)); 39 | } 40 | setState(() { 41 | categoryList.addAll(allCategoryLists.sublist(0, 2)); 42 | }); 43 | }); 44 | } 45 | 46 | void _getCategoryItem() { 47 | if (categoryList.length < allCategoryLists.length) { 48 | setState(() { 49 | categoryList.add(allCategoryLists[categoryList.length]); 50 | }); 51 | easyRefreshController.finishLoad(success: true,noMore: categoryList.length == allCategoryLists.length); 52 | } 53 | } 54 | 55 | @override 56 | Widget build(BuildContext context) { 57 | return Container( 58 | width: MediaQuery.of(context).size.width, 59 | padding: ThemeStyle.paddingBox, 60 | child: Column(children: [ 61 | Row( 62 | children: [ 63 | Container( 64 | width: MediaQuery.of(context).size.width - 65 | ThemeSize.containerPadding * 2, 66 | decoration: ThemeStyle.boxDecoration, 67 | margin: ThemeStyle.margin, 68 | padding: ThemeStyle.padding, 69 | child: Row( 70 | children: [ 71 | AvaterComponent(size: ThemeSize.middleAvater), 72 | Expanded( 73 | flex: 1, 74 | child: Padding( 75 | padding: EdgeInsets.only(left: ThemeSize.smallMargin), 76 | child: SearchCommponent(classify: "电视剧"))) 77 | ], 78 | ), 79 | ) 80 | ], 81 | ), 82 | Expanded( 83 | flex: 1, 84 | child: EasyRefresh( 85 | controller: easyRefreshController, 86 | footer: ClassicalFooter( 87 | loadText: '上拉加载', 88 | loadReadyText: '准备加载', 89 | loadingText: '加载中...', 90 | loadedText: '加载完成', 91 | noMoreText: '没有更多', 92 | bgColor: Colors.transparent, 93 | textColor: ThemeColors.disableColor, 94 | ), 95 | onLoad: () async { 96 | if (categoryList.length == allCategoryLists.length) { 97 | Fluttertoast.showToast( 98 | msg: "已经到底了", 99 | toastLength: Toast.LENGTH_SHORT, 100 | gravity: ToastGravity.CENTER, 101 | timeInSecForIosWeb: 1, 102 | backgroundColor: Colors.blue, 103 | textColor: Colors.white, 104 | fontSize: ThemeSize.middleFontSize); 105 | } else { 106 | _getCategoryItem(); 107 | } 108 | }, 109 | child: ListView( 110 | children: [ 111 | Column( 112 | children: [SwiperComponent(classify: "电视剧")], 113 | ), 114 | Column( 115 | children: categoryList 116 | .map((item) => CategoryComponent( 117 | category: item.category, 118 | classify: item.classify, 119 | )) 120 | .toList()) 121 | ], 122 | )), 123 | ) 124 | ]), 125 | ); 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /lib/pages/WebViewPage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:webview_flutter/webview_flutter.dart'; 3 | import '../provider/UserInfoProvider.dart'; 4 | import '../provider/TokenProvider.dart'; 5 | import 'package:provider/provider.dart'; 6 | import 'dart:convert' as convert; 7 | class WebViewPage extends StatefulWidget { 8 | final String url; 9 | final String title; 10 | 11 | const WebViewPage({super.key,required this.url,required this.title}); 12 | 13 | @override 14 | createState() => _WebViewPageState(this.url, this.title); 15 | } 16 | 17 | class _WebViewPageState extends State { 18 | final String _url; 19 | final String _title; 20 | late WebViewController controller; 21 | _WebViewPageState(this._url, this._title); 22 | 23 | @override 24 | void initState() { 25 | super.initState(); 26 | _initWebViewController(); 27 | } 28 | 29 | void _initWebViewController() { 30 | controller = WebViewController() 31 | ..setJavaScriptMode(JavaScriptMode.unrestricted) 32 | ..setBackgroundColor(const Color(0x00000000)) 33 | ..setNavigationDelegate( 34 | NavigationDelegate( 35 | onProgress: (int progress) { 36 | // Update loading bar. 37 | }, 38 | onPageStarted: (String url) {}, 39 | onPageFinished: (String url) { 40 | //页面加载完成后才能执行js 41 | // _handleBackForbid(); 42 | }, 43 | onWebResourceError: (WebResourceError error) {}, 44 | onNavigationRequest: (NavigationRequest request) { 45 | return NavigationDecision.navigate; 46 | }, 47 | ), 48 | ) 49 | ..loadRequest(Uri.parse(_url)); 50 | } 51 | 52 | @override 53 | Widget build(BuildContext context) { 54 | return Scaffold( 55 | appBar: AppBar( 56 | title: Text(_title), 57 | ), 58 | body: Container( 59 | width: MediaQuery.of(context).size.width, 60 | height: MediaQuery.of(context).size.height, 61 | child: WebViewWidget( 62 | controller: controller, 63 | ))); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /lib/provider/TokenProvider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | class TokenProvider with ChangeNotifier { 3 | String _token; 4 | TokenProvider(this._token); 5 | 6 | void setToken(String token) { 7 | _token = token; 8 | // notifyListeners(); //2 9 | } 10 | 11 | get token => _token; //3 12 | } 13 | -------------------------------------------------------------------------------- /lib/provider/UserInfoProvider.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import '../model/UserInfoModel.dart'; 5 | class UserInfoProvider with ChangeNotifier { 6 | UserInfoModel? _userInfo; 7 | UserInfoProvider(this._userInfo); 8 | late String _version; 9 | late String _device; 10 | final String _platform = '${Platform.operatingSystem} ${Platform.operatingSystemVersion}'; 11 | 12 | void setUserInfo(UserInfoModel userInfo) { 13 | _userInfo = userInfo; 14 | notifyListeners(); //2 15 | } 16 | 17 | void setVersion(String version){ 18 | _version = version; 19 | } 20 | 21 | void setDevice(String device){ 22 | _device = device; 23 | } 24 | 25 | get userInfo => _userInfo; 26 | 27 | get version => _version; 28 | 29 | get device => _device; 30 | 31 | get platform => _platform; 32 | } 33 | -------------------------------------------------------------------------------- /lib/router/index.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:fluro/fluro.dart'; 3 | import 'package:flutter/material.dart'; 4 | import '../pages/MovieDetailPage.dart'; 5 | import '../pages/MovieIndexPage.dart'; 6 | import '../model/MovieDetailModel.dart'; 7 | import '../pages/MoviePlayerPage.dart'; 8 | import '../pages/UpdatePasswordPage.dart'; 9 | import '../pages/UserPage.dart'; 10 | import '../pages/NewMoviePage.dart'; 11 | import '../pages/LoginPage.dart'; 12 | import '../pages/ForgetPasswordPage.dart'; 13 | import '../pages/NotFoundPage.dart'; 14 | import '../pages/ResetPasswordPage.dart'; 15 | 16 | class Routes { 17 | static final FluroRouter router = FluroRouter(); 18 | static void initRoutes() { 19 | /// 指定路由跳转错误返回页 20 | /// 指定路由跳转错误返回页 21 | router.notFoundHandler = Handler( 22 | handlerFunc: (BuildContext? context, Map> params) { 23 | debugPrint('未找到目标页'); 24 | return const NotFoundPage(); 25 | }); 26 | router.define('/MovieDetailPage', handler: Handler(handlerFunc: (BuildContext? context, Map> params) { 27 | return MovieDetailPage(movieItem: MovieDetailModel.fromJson(json.decode(params["movieItem"]!.first))); 28 | })); 29 | router.define('/MovieIndexPage', handler: Handler(handlerFunc: (BuildContext? context, Map> params) { 30 | return MovieIndexPage(); 31 | })); 32 | router.define('/MoviePlayerPage', handler: Handler(handlerFunc: (BuildContext? context, Map> params) { 33 | return MoviePlayerPage(movieItem: MovieDetailModel.fromJson(json.decode(params["movieItem"]!.first))); 34 | })); 35 | router.define('/UserPage', handler: Handler(handlerFunc: (BuildContext? context, Map> params) { 36 | return const UserPage(); 37 | })); 38 | router.define('/NewMoviePage', handler: Handler(handlerFunc: (BuildContext? context, Map> params) { 39 | return NewMoviePage(movieItem: MovieDetailModel.fromJson(json.decode(params["movieItem"]!.first)),); 40 | })); 41 | router.define('/UpdatePasswordPage', handler: Handler(handlerFunc: (BuildContext? context, Map> params) { 42 | return UpdatePasswordPage(); 43 | })); 44 | router.define('/LoginPage', handler: Handler(handlerFunc: (BuildContext? context, Map> params) { 45 | return const LoginPage(); 46 | })); 47 | router.define('/ForgetPasswordPage', handler: Handler(handlerFunc: (BuildContext? context, Map> params) { 48 | return ForgetPasswordPage(); 49 | })); 50 | router.define('/ResetPasswordPage', handler: Handler(handlerFunc: (BuildContext? context, Map> params) { 51 | return ResetPasswordPage(email: json.decode(params['email']!.first)); 52 | })); 53 | } 54 | } -------------------------------------------------------------------------------- /lib/theme/ThemeColors.dart: -------------------------------------------------------------------------------- 1 | import'package:flutter/material.dart'; 2 | class ThemeColors { 3 | static Color colorBg = const Color.fromRGBO(238,238,238,1); 4 | static Color colorWhite = Colors.white; 5 | static Color mainTitle = const Color.fromRGBO(102, 102, 102, 1); 6 | static Color subTitle = const Color.fromRGBO(153, 153, 153, 1); 7 | static Color borderColor = const Color.fromRGBO(221, 221, 221, 1); 8 | static Color activeColor = const Color.fromRGBO(24, 144, 255, 1); 9 | static Color disableColor = const Color.fromRGBO(221, 221, 221, 1); 10 | static Color blueColor = const Color.fromRGBO(62,125,155,1); 11 | static Color opcityColor = const Color.fromRGBO(0,0,0,0.1); 12 | static Color opcityWhiteColor = const Color.fromRGBO(255,255,255,0.3); 13 | static Color popupMenuColor = const Color.fromRGBO(0,0,0,0.8); 14 | static Color warnColor = const Color.fromRGBO(247, 69, 59, 1); 15 | } -------------------------------------------------------------------------------- /lib/theme/ThemeSize.dart: -------------------------------------------------------------------------------- 1 | class ThemeSize { 2 | static double containerPadding = 15;// 每个模块之间的内边距和外边距 3 | static double columnPadding = 20;// 上下边距 4 | static double middleRadius = 10;// 圆角大小 5 | static double textareaHeight = 150;// 多行文本框的高度 6 | static double bigRadius = 20;// 圆角大小 7 | static double superRadius = 30;// 加大版圆角 8 | static double minBtnRadius = 5;// 小圆角 9 | static double middleBtnWidth = 70;// 中等按钮宽度 10 | static double middleBtnHeight = 35;// 中等按钮高度 11 | static double swiperHeight = 200; // 轮播高度 12 | static double movieWidth = 150; // 电影图片宽度 13 | static double movieHeight = 200;// 电影图片高度 14 | static double modualHeight = 250;// 模块的高度 15 | static double bigIcon = 40;// 大图标 16 | static double middleIcon = 30;// 中等图标 17 | static double playIcon = 25;// 中等图标 18 | static double navigationIcon = 30;// 导航图标 19 | static double smallIcon = 20;// 中等图标 20 | static double miniIcon = 15;// 超小图片 21 | static double smallMargin = 10;//小边距 22 | static double miniMargin = 5;// 超小边距 23 | static double smallFontSize = 14;//常规字体 24 | static double middleFontSize = 16;//常规字体 25 | static double bigFontSize = 20;// 大标题字体 26 | static double smallAvater = 30;// 小头像 27 | static double middleAvater = 50;// 中等头像 28 | static double bigAvater = 60;// 大头像 29 | static double borderWidth = 1;// 边框大小 30 | static double buttonHeight = 40;//按钮大小 31 | static int crossAxisCount = 5;// 网格布局每行元素个数 32 | static double childAspectRatio = 1.6;// 网格布局宽高比例 33 | static int pageSize = 20;// 每页显示大小 34 | static double minPlayIcon = 80;// 音乐播放器圈圈大小 35 | static double menuWidth = 180;// 弹出点赞和评论菜单的宽度 36 | static double menuHeight = 40;// 弹出点赞和评论菜单的高度 37 | static double bottomBarHeight = 90;// 底部导航条高度 38 | } -------------------------------------------------------------------------------- /lib/theme/ThemeStyle.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import './ThemeSize.dart'; 3 | import './ThemeColors.dart'; 4 | 5 | class ThemeStyle { 6 | static BoxDecoration boxDecoration = BoxDecoration( 7 | color: Colors.white, 8 | borderRadius: BorderRadius.all(Radius.circular(ThemeSize.middleRadius)), 9 | ); 10 | 11 | static EdgeInsets margin = EdgeInsets.only(bottom: ThemeSize.containerPadding); 12 | 13 | static EdgeInsets padding = EdgeInsets.all(ThemeSize.containerPadding); 14 | 15 | static EdgeInsets paddingBox = EdgeInsets.only(left: ThemeSize.containerPadding,right: ThemeSize.containerPadding); 16 | 17 | static TextStyle mainTitleStyle = TextStyle( 18 | color: ThemeColors.mainTitle, 19 | fontSize: ThemeSize.bigFontSize, 20 | fontWeight: FontWeight.bold); 21 | 22 | static TextStyle subTitleStyle = 23 | TextStyle(color: ThemeColors.subTitle, fontSize: ThemeSize.smallFontSize); 24 | 25 | static BoxDecoration bottomDecoration = BoxDecoration( 26 | border: Border( 27 | bottom: BorderSide( 28 | // 设置单侧边框的样式 29 | color: ThemeColors.borderColor, 30 | width: 1, 31 | style: BorderStyle.solid))); 32 | 33 | //列边距 34 | static EdgeInsets columnPadding = EdgeInsets.only(top: ThemeSize.columnPadding,bottom: ThemeSize.columnPadding); 35 | } 36 | -------------------------------------------------------------------------------- /lib/utils/HttpUtil.dart: -------------------------------------------------------------------------------- 1 | import '../common/constant.dart'; 2 | import 'package:dio/dio.dart'; 3 | 4 | class ResponseModel { 5 | final String status; 6 | final String? msg; 7 | final int? total; 8 | final String? token; 9 | final T data; 10 | ResponseModel({ 11 | required this.status, 12 | this.msg, 13 | this.total, 14 | this.token, 15 | required this.data 16 | }); 17 | 18 | //工厂模式-用这种模式可以省略New关键字 19 | factory ResponseModel.fromJson(dynamic json) { 20 | return ResponseModel( 21 | status:json["status"], 22 | msg:json["msg"], 23 | total:json["total"], 24 | token:json["token"], 25 | data:json["data"] as T); 26 | } 27 | } 28 | 29 | // 网络请求工具类 30 | class HttpUtil { 31 | static HttpUtil instance = HttpUtil(); 32 | late Dio dio; 33 | late BaseOptions options; 34 | late String token; 35 | 36 | void setToken(String mToken){ 37 | token = mToken; 38 | } 39 | 40 | static HttpUtil getInstance(){ 41 | return instance; 42 | } 43 | 44 | HttpUtil(){ 45 | //BaseOptions、Options、RequestOptions 都可以配置参数,优先级别依次递增,且可以根据优先级别覆盖参数 46 | options = BaseOptions( 47 | //请求基地址,可以包含子路径 48 | baseUrl: HOST, 49 | //连接服务器超时时间,单位是毫秒. 50 | connectTimeout: const Duration(seconds: 10), 51 | //响应流上前后两次接受到数据的间隔,单位为毫秒。 52 | receiveTimeout: const Duration(seconds: 20), 53 | //Http请求头. 54 | headers: { 55 | //do something 56 | "version": "1.0.0", 57 | // 'Content-Type':'application/json ' 58 | }, 59 | //请求的Content-Type,默认值是"application/json; charset=utf-8",Headers.formUrlEncodedContentType会自动编码请求体. 60 | contentType: Headers.jsonContentType, 61 | //表示期望以那种格式(方式)接受响应数据。接受4种类型 `json`, `stream`, `plain`, `bytes`. 默认值是 `json`, 62 | responseType: ResponseType.json, 63 | ); 64 | dio = Dio(options); 65 | // 添加请求后拦截器 66 | dio.interceptors.add(InterceptorsWrapper( 67 | onResponse: (Response response, ResponseInterceptorHandler handler){ 68 | if (response.statusCode == 200 && response.data["status"] == SUCCESS) { 69 | return handler.next(response); // 继续 70 | } else { 71 | throw Exception('后端接口出现异常,请检测代码和服务器情况.........'); 72 | } 73 | }, 74 | onRequest: (RequestOptions options, RequestInterceptorHandler handler){ 75 | options.headers['Authorization'] = token; 76 | return handler.next(options); // 继续 77 | }, 78 | onError: (DioException err, ErrorInterceptorHandler handler){ 79 | return handler.next(err); // 继续 80 | } 81 | )); 82 | } 83 | } 84 | 85 | Dio dio = HttpUtil.getInstance().dio; -------------------------------------------------------------------------------- /lib/utils/LocalStorageUtils.dart: -------------------------------------------------------------------------------- 1 | import 'package:shared_preferences/shared_preferences.dart'; 2 | import '../common/constant.dart'; 3 | 4 | class LocalStorageUtils { 5 | static final Future _prefs = SharedPreferences.getInstance(); 6 | 7 | //从缓存中获取token 8 | static Future getToken() async { 9 | final SharedPreferences prefs = await _prefs; 10 | return prefs.getString(TOKEN_STORAGE_KEY) ?? ''; 11 | // 测试数据 12 | // return 'eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MjE0MDMxMzMsInN1YiI6IntcImF2YXRlclwiOlwiL3N0YXRpYy91c2VyL2F2YXRlci_lkLTmgKjlkLTmgpQuanBnXCIsXCJiaXJ0aGRheVwiOlwiMTk5MC0xMC04XCIsXCJjcmVhdGVEYXRlXCI6MTU2NTYyNTYwMDAwMCxcImRpc2FibGVkXCI6MCxcImVtYWlsXCI6XCIyNzUwMTg3MjNAcXEuY29tXCIsXCJwZXJtaXNzaW9uXCI6MSxcInJvbGVcIjpcImFkbWluXCIsXCJzZXhcIjpcIjFcIixcInNpZ25cIjpcIuaXoOaAqO-8jOacieaClFwiLFwidGVsZXBob25lXCI6XCIxNTMwMjY4Njk0N1wiLFwidXBkYXRlRGF0ZVwiOjE3MTM3OTgwMzMwMDAsXCJ1c2VySWRcIjpcIuWQtOaAqOWQtOaClFwiLFwidXNlcm5hbWVcIjpcIuWQtOaAqOWQtOaClFwifSIsImV4cCI6MTcyMzk5NTEzM30.pB3xyg5-gnwzGerKDyeK2646l4FpHTwzpoRplKQg0zk'; 13 | } 14 | 15 | //保存token 16 | static Future setToken(String token) async { 17 | final SharedPreferences prefs = await _prefs; 18 | prefs.setString(TOKEN_STORAGE_KEY, token); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/utils/common.dart: -------------------------------------------------------------------------------- 1 | // md5 加密 2 | import 'package:flutter/cupertino.dart'; 3 | 4 | import '../common/constant.dart'; 5 | 6 | String formatTime(String data) { 7 | // 获取当前时间对象 8 | DateTime now = DateTime.now(); 9 | DateTime date = DateTime.parse(data); 10 | // 相差多少分钟 11 | int minutes = now.difference(date).inMinutes; 12 | if(minutes < 1){ 13 | return '刚刚'; 14 | }else if(minutes >= 1 && minutes < 60){ 15 | return minutes.toString() + '分钟前'; 16 | }else if(minutes >= 60 && minutes < 60*24){ 17 | return (minutes/60).truncate().toString() + '小时前'; 18 | }else if(minutes > 60 * 24 && minutes < 60 * 24 *30){ 19 | return (minutes/60/24).truncate().toString() + '天前'; 20 | }else if(minutes > 60 * 24 * 30 && minutes < 60 * 24 *30 *12){ 21 | return (minutes/60 / 24 / 30).truncate().toString() + '个月前'; 22 | }else{ 23 | return data; 24 | } 25 | } 26 | 27 | ///补零 28 | String zeroFill(int i) { 29 | return i >= 10 ? "$i" : "0$i"; 30 | } 31 | 32 | ///毫秒转成时分秒 33 | String getDuration(int sec){ 34 | int h = sec ~/ 3600; 35 | int m = (sec % 3600) ~/ 60; 36 | int s = sec % 60; 37 | if(h > 0){ 38 | return "${zeroFill(h)}:${zeroFill(m)}:${zeroFill(s)}"; 39 | } 40 | return "${zeroFill(m)}:${zeroFill(s)}"; 41 | } 42 | 43 | String getMusicCover (String cover) { 44 | return cover.contains('http') ? cover.replaceAll('{size}', '480') : HOST + cover; 45 | } 46 | 47 | enum Action { Ok, Cancel } 48 | 49 | Future showCustomDialog(BuildContext context,Widget body,String name,Function ok) async { 50 | final action = await showCupertinoDialog( 51 | context: context, 52 | builder: (context) { 53 | return CupertinoAlertDialog( 54 | title: Text('修改$name'), 55 | content:body, 56 | actions: [ 57 | CupertinoDialogAction( 58 | child: Text('确认'), 59 | onPressed: () { 60 | Navigator.pop(context, Action.Ok); 61 | }, 62 | ), 63 | CupertinoDialogAction( 64 | child: Text('取消'), 65 | isDestructiveAction: true, 66 | onPressed: () { 67 | Navigator.pop(context, Action.Cancel); 68 | }, 69 | ), 70 | ], 71 | ); 72 | }, 73 | ); 74 | 75 | switch (action) { 76 | case Action.Ok: 77 | ok(); 78 | break; 79 | case Action.Cancel: 80 | break; 81 | default: 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /lib/utils/crypto.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:crypto/crypto.dart'; 3 | 4 | // md5 加密 5 | String generateMd5(String data) { 6 | Listcontent = const Utf8Encoder().convert(data); 7 | Digest digest = md5.convert(content); 8 | // 这里其实就是 digest.toString() 9 | return digest.toString(); 10 | } -------------------------------------------------------------------------------- /linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /linux/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.10) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | 12 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...), 13 | # which isn't available in 3.10. 14 | function(list_prepend LIST_NAME PREFIX) 15 | set(NEW_LIST "") 16 | foreach(element ${${LIST_NAME}}) 17 | list(APPEND NEW_LIST "${PREFIX}${element}") 18 | endforeach(element) 19 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) 20 | endfunction() 21 | 22 | # === Flutter Library === 23 | # System-level dependencies. 24 | find_package(PkgConfig REQUIRED) 25 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 26 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) 27 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) 28 | 29 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") 30 | 31 | # Published to parent scope for install step. 32 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 33 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 34 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 35 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) 36 | 37 | list(APPEND FLUTTER_LIBRARY_HEADERS 38 | "fl_basic_message_channel.h" 39 | "fl_binary_codec.h" 40 | "fl_binary_messenger.h" 41 | "fl_dart_project.h" 42 | "fl_engine.h" 43 | "fl_json_message_codec.h" 44 | "fl_json_method_codec.h" 45 | "fl_message_codec.h" 46 | "fl_method_call.h" 47 | "fl_method_channel.h" 48 | "fl_method_codec.h" 49 | "fl_method_response.h" 50 | "fl_plugin_registrar.h" 51 | "fl_plugin_registry.h" 52 | "fl_standard_message_codec.h" 53 | "fl_standard_method_codec.h" 54 | "fl_string_codec.h" 55 | "fl_value.h" 56 | "fl_view.h" 57 | "flutter_linux.h" 58 | ) 59 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") 60 | add_library(flutter INTERFACE) 61 | target_include_directories(flutter INTERFACE 62 | "${EPHEMERAL_DIR}" 63 | ) 64 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") 65 | target_link_libraries(flutter INTERFACE 66 | PkgConfig::GTK 67 | PkgConfig::GLIB 68 | PkgConfig::GIO 69 | ) 70 | add_dependencies(flutter flutter_assemble) 71 | 72 | # === Flutter tool backend === 73 | # _phony_ is a non-existent file to force this command to run every time, 74 | # since currently there's no way to get a full input/output list from the 75 | # flutter tool. 76 | add_custom_command( 77 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 78 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_ 79 | COMMAND ${CMAKE_COMMAND} -E env 80 | ${FLUTTER_TOOL_ENVIRONMENT} 81 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" 82 | ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} 83 | VERBATIM 84 | ) 85 | add_custom_target(flutter_assemble DEPENDS 86 | "${FLUTTER_LIBRARY}" 87 | ${FLUTTER_LIBRARY_HEADERS} 88 | ) 89 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | 11 | void fl_register_plugins(FlPluginRegistry* registry) { 12 | g_autoptr(FlPluginRegistrar) file_selector_linux_registrar = 13 | fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin"); 14 | file_selector_plugin_register_with_registrar(file_selector_linux_registrar); 15 | } 16 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void fl_register_plugins(FlPluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | file_selector_linux 7 | ) 8 | 9 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 10 | ) 11 | 12 | set(PLUGIN_BUNDLED_LIBRARIES) 13 | 14 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 15 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 16 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 19 | endforeach(plugin) 20 | 21 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 22 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 24 | endforeach(ffi_plugin) 25 | -------------------------------------------------------------------------------- /linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /linux/my_application.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | #include 4 | #ifdef GDK_WINDOWING_X11 5 | #include 6 | #endif 7 | 8 | #include "flutter/generated_plugin_registrant.h" 9 | 10 | struct _MyApplication { 11 | GtkApplication parent_instance; 12 | char** dart_entrypoint_arguments; 13 | }; 14 | 15 | G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) 16 | 17 | // Implements GApplication::activate. 18 | static void my_application_activate(GApplication* application) { 19 | MyApplication* self = MY_APPLICATION(application); 20 | GtkWindow* window = 21 | GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); 22 | 23 | // Use a header bar when running in GNOME as this is the common style used 24 | // by applications and is the setup most users will be using (e.g. Ubuntu 25 | // desktop). 26 | // If running on X and not using GNOME then just use a traditional title bar 27 | // in case the window manager does more exotic layout, e.g. tiling. 28 | // If running on Wayland assume the header bar will work (may need changing 29 | // if future cases occur). 30 | gboolean use_header_bar = TRUE; 31 | #ifdef GDK_WINDOWING_X11 32 | GdkScreen* screen = gtk_window_get_screen(window); 33 | if (GDK_IS_X11_SCREEN(screen)) { 34 | const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); 35 | if (g_strcmp0(wm_name, "GNOME Shell") != 0) { 36 | use_header_bar = FALSE; 37 | } 38 | } 39 | #endif 40 | if (use_header_bar) { 41 | GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); 42 | gtk_widget_show(GTK_WIDGET(header_bar)); 43 | gtk_header_bar_set_title(header_bar, "flutter_music_app"); 44 | gtk_header_bar_set_show_close_button(header_bar, TRUE); 45 | gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); 46 | } else { 47 | gtk_window_set_title(window, "flutter_music_app"); 48 | } 49 | 50 | gtk_window_set_default_size(window, 1280, 720); 51 | gtk_widget_show(GTK_WIDGET(window)); 52 | 53 | g_autoptr(FlDartProject) project = fl_dart_project_new(); 54 | fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); 55 | 56 | FlView* view = fl_view_new(project); 57 | gtk_widget_show(GTK_WIDGET(view)); 58 | gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); 59 | 60 | fl_register_plugins(FL_PLUGIN_REGISTRY(view)); 61 | 62 | gtk_widget_grab_focus(GTK_WIDGET(view)); 63 | } 64 | 65 | // Implements GApplication::local_command_line. 66 | static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { 67 | MyApplication* self = MY_APPLICATION(application); 68 | // Strip out the first argument as it is the binary name. 69 | self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); 70 | 71 | g_autoptr(GError) error = nullptr; 72 | if (!g_application_register(application, nullptr, &error)) { 73 | g_warning("Failed to register: %s", error->message); 74 | *exit_status = 1; 75 | return TRUE; 76 | } 77 | 78 | g_application_activate(application); 79 | *exit_status = 0; 80 | 81 | return TRUE; 82 | } 83 | 84 | // Implements GApplication::startup. 85 | static void my_application_startup(GApplication* application) { 86 | //MyApplication* self = MY_APPLICATION(object); 87 | 88 | // Perform any actions required at application startup. 89 | 90 | G_APPLICATION_CLASS(my_application_parent_class)->startup(application); 91 | } 92 | 93 | // Implements GApplication::shutdown. 94 | static void my_application_shutdown(GApplication* application) { 95 | //MyApplication* self = MY_APPLICATION(object); 96 | 97 | // Perform any actions required at application shutdown. 98 | 99 | G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application); 100 | } 101 | 102 | // Implements GObject::dispose. 103 | static void my_application_dispose(GObject* object) { 104 | MyApplication* self = MY_APPLICATION(object); 105 | g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); 106 | G_OBJECT_CLASS(my_application_parent_class)->dispose(object); 107 | } 108 | 109 | static void my_application_class_init(MyApplicationClass* klass) { 110 | G_APPLICATION_CLASS(klass)->activate = my_application_activate; 111 | G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; 112 | G_APPLICATION_CLASS(klass)->startup = my_application_startup; 113 | G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown; 114 | G_OBJECT_CLASS(klass)->dispose = my_application_dispose; 115 | } 116 | 117 | static void my_application_init(MyApplication* self) {} 118 | 119 | MyApplication* my_application_new() { 120 | return MY_APPLICATION(g_object_new(my_application_get_type(), 121 | "application-id", APPLICATION_ID, 122 | "flags", G_APPLICATION_NON_UNIQUE, 123 | nullptr)); 124 | } 125 | -------------------------------------------------------------------------------- /linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import device_info_plus 9 | import file_selector_macos 10 | import package_info_plus 11 | import shared_preferences_foundation 12 | 13 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 14 | DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) 15 | FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin")) 16 | FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) 17 | SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) 18 | } 19 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 43 | 49 | 50 | 51 | 52 | 53 | 63 | 65 | 71 | 72 | 73 | 74 | 80 | 82 | 88 | 89 | 90 | 91 | 93 | 94 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "app_icon_16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "app_icon_32.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "app_icon_32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "app_icon_64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "app_icon_128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "app_icon_256.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "app_icon_256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "app_icon_512.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "app_icon_512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "app_icon_1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = flutter_music_app 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.player.music.flutterMusicApp 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2025 com.player.music. All rights reserved. 15 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility in the flutter_test package. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:flutter_music_app/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(const MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/web/icons/Icon-512.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | flutter_music_app 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "flutter_music_app", 3 | "short_name": "flutter_music_app", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /windows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Project-level configuration. 2 | cmake_minimum_required(VERSION 3.14) 3 | project(flutter_music_app LANGUAGES CXX) 4 | 5 | # The name of the executable created for the application. Change this to change 6 | # the on-disk name of your application. 7 | set(BINARY_NAME "flutter_music_app") 8 | 9 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent 10 | # versions of CMake. 11 | cmake_policy(VERSION 3.14...3.25) 12 | 13 | # Define build configuration option. 14 | get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) 15 | if(IS_MULTICONFIG) 16 | set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" 17 | CACHE STRING "" FORCE) 18 | else() 19 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 20 | set(CMAKE_BUILD_TYPE "Debug" CACHE 21 | STRING "Flutter build mode" FORCE) 22 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 23 | "Debug" "Profile" "Release") 24 | endif() 25 | endif() 26 | # Define settings for the Profile build mode. 27 | set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") 28 | set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") 29 | set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") 30 | set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") 31 | 32 | # Use Unicode for all projects. 33 | add_definitions(-DUNICODE -D_UNICODE) 34 | 35 | # Compilation settings that should be applied to most targets. 36 | # 37 | # Be cautious about adding new options here, as plugins use this function by 38 | # default. In most cases, you should add new options to specific targets instead 39 | # of modifying this function. 40 | function(APPLY_STANDARD_SETTINGS TARGET) 41 | target_compile_features(${TARGET} PUBLIC cxx_std_17) 42 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") 43 | target_compile_options(${TARGET} PRIVATE /EHsc) 44 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") 45 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") 46 | endfunction() 47 | 48 | # Flutter library and tool build rules. 49 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 50 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 51 | 52 | # Application build; see runner/CMakeLists.txt. 53 | add_subdirectory("runner") 54 | 55 | 56 | # Generated plugin build rules, which manage building the plugins and adding 57 | # them to the application. 58 | include(flutter/generated_plugins.cmake) 59 | 60 | 61 | # === Installation === 62 | # Support files are copied into place next to the executable, so that it can 63 | # run in place. This is done instead of making a separate bundle (as on Linux) 64 | # so that building and running from within Visual Studio will work. 65 | set(BUILD_BUNDLE_DIR "$") 66 | # Make the "install" step default, as it's required to run. 67 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) 68 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 69 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 70 | endif() 71 | 72 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 73 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") 74 | 75 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 76 | COMPONENT Runtime) 77 | 78 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 79 | COMPONENT Runtime) 80 | 81 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 82 | COMPONENT Runtime) 83 | 84 | if(PLUGIN_BUNDLED_LIBRARIES) 85 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" 86 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 87 | COMPONENT Runtime) 88 | endif() 89 | 90 | # Copy the native assets provided by the build.dart from all packages. 91 | set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/windows/") 92 | install(DIRECTORY "${NATIVE_ASSETS_DIR}" 93 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 94 | COMPONENT Runtime) 95 | 96 | # Fully re-copy the assets directory on each build to avoid having stale files 97 | # from a previous install. 98 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 99 | install(CODE " 100 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 101 | " COMPONENT Runtime) 102 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 103 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 104 | 105 | # Install the AOT library on non-Debug builds only. 106 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 107 | CONFIGURATIONS Profile;Release 108 | COMPONENT Runtime) 109 | -------------------------------------------------------------------------------- /windows/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.14) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") 12 | 13 | # Set fallback configurations for older versions of the flutter tool. 14 | if (NOT DEFINED FLUTTER_TARGET_PLATFORM) 15 | set(FLUTTER_TARGET_PLATFORM "windows-x64") 16 | endif() 17 | 18 | # === Flutter Library === 19 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") 20 | 21 | # Published to parent scope for install step. 22 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 23 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 24 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 25 | set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) 26 | 27 | list(APPEND FLUTTER_LIBRARY_HEADERS 28 | "flutter_export.h" 29 | "flutter_windows.h" 30 | "flutter_messenger.h" 31 | "flutter_plugin_registrar.h" 32 | "flutter_texture_registrar.h" 33 | ) 34 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") 35 | add_library(flutter INTERFACE) 36 | target_include_directories(flutter INTERFACE 37 | "${EPHEMERAL_DIR}" 38 | ) 39 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") 40 | add_dependencies(flutter flutter_assemble) 41 | 42 | # === Wrapper === 43 | list(APPEND CPP_WRAPPER_SOURCES_CORE 44 | "core_implementations.cc" 45 | "standard_codec.cc" 46 | ) 47 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") 48 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN 49 | "plugin_registrar.cc" 50 | ) 51 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") 52 | list(APPEND CPP_WRAPPER_SOURCES_APP 53 | "flutter_engine.cc" 54 | "flutter_view_controller.cc" 55 | ) 56 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") 57 | 58 | # Wrapper sources needed for a plugin. 59 | add_library(flutter_wrapper_plugin STATIC 60 | ${CPP_WRAPPER_SOURCES_CORE} 61 | ${CPP_WRAPPER_SOURCES_PLUGIN} 62 | ) 63 | apply_standard_settings(flutter_wrapper_plugin) 64 | set_target_properties(flutter_wrapper_plugin PROPERTIES 65 | POSITION_INDEPENDENT_CODE ON) 66 | set_target_properties(flutter_wrapper_plugin PROPERTIES 67 | CXX_VISIBILITY_PRESET hidden) 68 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) 69 | target_include_directories(flutter_wrapper_plugin PUBLIC 70 | "${WRAPPER_ROOT}/include" 71 | ) 72 | add_dependencies(flutter_wrapper_plugin flutter_assemble) 73 | 74 | # Wrapper sources needed for the runner. 75 | add_library(flutter_wrapper_app STATIC 76 | ${CPP_WRAPPER_SOURCES_CORE} 77 | ${CPP_WRAPPER_SOURCES_APP} 78 | ) 79 | apply_standard_settings(flutter_wrapper_app) 80 | target_link_libraries(flutter_wrapper_app PUBLIC flutter) 81 | target_include_directories(flutter_wrapper_app PUBLIC 82 | "${WRAPPER_ROOT}/include" 83 | ) 84 | add_dependencies(flutter_wrapper_app flutter_assemble) 85 | 86 | # === Flutter tool backend === 87 | # _phony_ is a non-existent file to force this command to run every time, 88 | # since currently there's no way to get a full input/output list from the 89 | # flutter tool. 90 | set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") 91 | set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) 92 | add_custom_command( 93 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 94 | ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} 95 | ${CPP_WRAPPER_SOURCES_APP} 96 | ${PHONY_OUTPUT} 97 | COMMAND ${CMAKE_COMMAND} -E env 98 | ${FLUTTER_TOOL_ENVIRONMENT} 99 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" 100 | ${FLUTTER_TARGET_PLATFORM} $ 101 | VERBATIM 102 | ) 103 | add_custom_target(flutter_assemble DEPENDS 104 | "${FLUTTER_LIBRARY}" 105 | ${FLUTTER_LIBRARY_HEADERS} 106 | ${CPP_WRAPPER_SOURCES_CORE} 107 | ${CPP_WRAPPER_SOURCES_PLUGIN} 108 | ${CPP_WRAPPER_SOURCES_APP} 109 | ) 110 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | 11 | void RegisterPlugins(flutter::PluginRegistry* registry) { 12 | FileSelectorWindowsRegisterWithRegistrar( 13 | registry->GetRegistrarForPlugin("FileSelectorWindows")); 14 | } 15 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | file_selector_windows 7 | ) 8 | 9 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 10 | ) 11 | 12 | set(PLUGIN_BUNDLED_LIBRARIES) 13 | 14 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 15 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 16 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 19 | endforeach(plugin) 20 | 21 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 22 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 24 | endforeach(ffi_plugin) 25 | -------------------------------------------------------------------------------- /windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(runner LANGUAGES CXX) 3 | 4 | # Define the application target. To change its name, change BINARY_NAME in the 5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer 6 | # work. 7 | # 8 | # Any new source files that you add to the application should be added here. 9 | add_executable(${BINARY_NAME} WIN32 10 | "flutter_window.cpp" 11 | "main.cpp" 12 | "utils.cpp" 13 | "win32_window.cpp" 14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 15 | "Runner.rc" 16 | "runner.exe.manifest" 17 | ) 18 | 19 | # Apply the standard set of build settings. This can be removed for applications 20 | # that need different build settings. 21 | apply_standard_settings(${BINARY_NAME}) 22 | 23 | # Add preprocessor definitions for the build version. 24 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") 25 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") 26 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") 27 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") 28 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") 29 | 30 | # Disable Windows macros that collide with C++ standard library functions. 31 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 32 | 33 | # Add dependency libraries and include directories. Add any application-specific 34 | # dependencies here. 35 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 36 | target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") 37 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 38 | 39 | # Run the Flutter tool portions of the build. This must not be removed. 40 | add_dependencies(${BINARY_NAME} flutter_assemble) 41 | -------------------------------------------------------------------------------- /windows/runner/Runner.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #pragma code_page(65001) 4 | #include "resource.h" 5 | 6 | #define APSTUDIO_READONLY_SYMBOLS 7 | ///////////////////////////////////////////////////////////////////////////// 8 | // 9 | // Generated from the TEXTINCLUDE 2 resource. 10 | // 11 | #include "winres.h" 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // English (United States) resources 18 | 19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 21 | 22 | #ifdef APSTUDIO_INVOKED 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // 25 | // TEXTINCLUDE 26 | // 27 | 28 | 1 TEXTINCLUDE 29 | BEGIN 30 | "resource.h\0" 31 | END 32 | 33 | 2 TEXTINCLUDE 34 | BEGIN 35 | "#include ""winres.h""\r\n" 36 | "\0" 37 | END 38 | 39 | 3 TEXTINCLUDE 40 | BEGIN 41 | "\r\n" 42 | "\0" 43 | END 44 | 45 | #endif // APSTUDIO_INVOKED 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Icon 51 | // 52 | 53 | // Icon with lowest ID value placed first to ensure application icon 54 | // remains consistent on all systems. 55 | IDI_APP_ICON ICON "resources\\app_icon.ico" 56 | 57 | 58 | ///////////////////////////////////////////////////////////////////////////// 59 | // 60 | // Version 61 | // 62 | 63 | #if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) 64 | #define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD 65 | #else 66 | #define VERSION_AS_NUMBER 1,0,0,0 67 | #endif 68 | 69 | #if defined(FLUTTER_VERSION) 70 | #define VERSION_AS_STRING FLUTTER_VERSION 71 | #else 72 | #define VERSION_AS_STRING "1.0.0" 73 | #endif 74 | 75 | VS_VERSION_INFO VERSIONINFO 76 | FILEVERSION VERSION_AS_NUMBER 77 | PRODUCTVERSION VERSION_AS_NUMBER 78 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 79 | #ifdef _DEBUG 80 | FILEFLAGS VS_FF_DEBUG 81 | #else 82 | FILEFLAGS 0x0L 83 | #endif 84 | FILEOS VOS__WINDOWS32 85 | FILETYPE VFT_APP 86 | FILESUBTYPE 0x0L 87 | BEGIN 88 | BLOCK "StringFileInfo" 89 | BEGIN 90 | BLOCK "040904e4" 91 | BEGIN 92 | VALUE "CompanyName", "com.player.music" "\0" 93 | VALUE "FileDescription", "flutter_music_app" "\0" 94 | VALUE "FileVersion", VERSION_AS_STRING "\0" 95 | VALUE "InternalName", "flutter_music_app" "\0" 96 | VALUE "LegalCopyright", "Copyright (C) 2025 com.player.music. All rights reserved." "\0" 97 | VALUE "OriginalFilename", "flutter_music_app.exe" "\0" 98 | VALUE "ProductName", "flutter_music_app" "\0" 99 | VALUE "ProductVersion", VERSION_AS_STRING "\0" 100 | END 101 | END 102 | BLOCK "VarFileInfo" 103 | BEGIN 104 | VALUE "Translation", 0x409, 1252 105 | END 106 | END 107 | 108 | #endif // English (United States) resources 109 | ///////////////////////////////////////////////////////////////////////////// 110 | 111 | 112 | 113 | #ifndef APSTUDIO_INVOKED 114 | ///////////////////////////////////////////////////////////////////////////// 115 | // 116 | // Generated from the TEXTINCLUDE 3 resource. 117 | // 118 | 119 | 120 | ///////////////////////////////////////////////////////////////////////////// 121 | #endif // not APSTUDIO_INVOKED 122 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.cpp: -------------------------------------------------------------------------------- 1 | #include "flutter_window.h" 2 | 3 | #include 4 | 5 | #include "flutter/generated_plugin_registrant.h" 6 | 7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project) 8 | : project_(project) {} 9 | 10 | FlutterWindow::~FlutterWindow() {} 11 | 12 | bool FlutterWindow::OnCreate() { 13 | if (!Win32Window::OnCreate()) { 14 | return false; 15 | } 16 | 17 | RECT frame = GetClientArea(); 18 | 19 | // The size here must match the window dimensions to avoid unnecessary surface 20 | // creation / destruction in the startup path. 21 | flutter_controller_ = std::make_unique( 22 | frame.right - frame.left, frame.bottom - frame.top, project_); 23 | // Ensure that basic setup of the controller was successful. 24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) { 25 | return false; 26 | } 27 | RegisterPlugins(flutter_controller_->engine()); 28 | SetChildContent(flutter_controller_->view()->GetNativeWindow()); 29 | 30 | flutter_controller_->engine()->SetNextFrameCallback([&]() { 31 | this->Show(); 32 | }); 33 | 34 | // Flutter can complete the first frame before the "show window" callback is 35 | // registered. The following call ensures a frame is pending to ensure the 36 | // window is shown. It is a no-op if the first frame hasn't completed yet. 37 | flutter_controller_->ForceRedraw(); 38 | 39 | return true; 40 | } 41 | 42 | void FlutterWindow::OnDestroy() { 43 | if (flutter_controller_) { 44 | flutter_controller_ = nullptr; 45 | } 46 | 47 | Win32Window::OnDestroy(); 48 | } 49 | 50 | LRESULT 51 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 52 | WPARAM const wparam, 53 | LPARAM const lparam) noexcept { 54 | // Give Flutter, including plugins, an opportunity to handle window messages. 55 | if (flutter_controller_) { 56 | std::optional result = 57 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 58 | lparam); 59 | if (result) { 60 | return *result; 61 | } 62 | } 63 | 64 | switch (message) { 65 | case WM_FONTCHANGE: 66 | flutter_controller_->engine()->ReloadSystemFonts(); 67 | break; 68 | } 69 | 70 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 71 | } 72 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "utils.h" 7 | 8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 9 | _In_ wchar_t *command_line, _In_ int show_command) { 10 | // Attach to console when present (e.g., 'flutter run') or create a 11 | // new console when running with a debugger. 12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 13 | CreateAndAttachConsole(); 14 | } 15 | 16 | // Initialize COM, so that it is available for use in the library and/or 17 | // plugins. 18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 19 | 20 | flutter::DartProject project(L"data"); 21 | 22 | std::vector command_line_arguments = 23 | GetCommandLineArguments(); 24 | 25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 26 | 27 | FlutterWindow window(project); 28 | Win32Window::Point origin(10, 10); 29 | Win32Window::Size size(1280, 720); 30 | if (!window.Create(L"flutter_music_app", origin, size)) { 31 | return EXIT_FAILURE; 32 | } 33 | window.SetQuitOnClose(true); 34 | 35 | ::MSG msg; 36 | while (::GetMessage(&msg, nullptr, 0, 0)) { 37 | ::TranslateMessage(&msg); 38 | ::DispatchMessage(&msg); 39 | } 40 | 41 | ::CoUninitialize(); 42 | return EXIT_SUCCESS; 43 | } 44 | -------------------------------------------------------------------------------- /windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /windows/runner/utils.cpp: -------------------------------------------------------------------------------- 1 | #include "utils.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | void CreateAndAttachConsole() { 11 | if (::AllocConsole()) { 12 | FILE *unused; 13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) { 14 | _dup2(_fileno(stdout), 1); 15 | } 16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) { 17 | _dup2(_fileno(stdout), 2); 18 | } 19 | std::ios::sync_with_stdio(); 20 | FlutterDesktopResyncOutputStreams(); 21 | } 22 | } 23 | 24 | std::vector GetCommandLineArguments() { 25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. 26 | int argc; 27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); 28 | if (argv == nullptr) { 29 | return std::vector(); 30 | } 31 | 32 | std::vector command_line_arguments; 33 | 34 | // Skip the first argument as it's the binary name. 35 | for (int i = 1; i < argc; i++) { 36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i])); 37 | } 38 | 39 | ::LocalFree(argv); 40 | 41 | return command_line_arguments; 42 | } 43 | 44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) { 45 | if (utf16_string == nullptr) { 46 | return std::string(); 47 | } 48 | unsigned int target_length = ::WideCharToMultiByte( 49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 50 | -1, nullptr, 0, nullptr, nullptr) 51 | -1; // remove the trailing null character 52 | int input_length = (int)wcslen(utf16_string); 53 | std::string utf8_string; 54 | if (target_length == 0 || target_length > utf8_string.max_size()) { 55 | return utf8_string; 56 | } 57 | utf8_string.resize(target_length); 58 | int converted_length = ::WideCharToMultiByte( 59 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 60 | input_length, utf8_string.data(), target_length, nullptr, nullptr); 61 | if (converted_length == 0) { 62 | return std::string(); 63 | } 64 | return utf8_string; 65 | } 66 | -------------------------------------------------------------------------------- /windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /windows/runner/win32_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_WIN32_WINDOW_H_ 2 | #define RUNNER_WIN32_WINDOW_H_ 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | // A class abstraction for a high DPI-aware Win32 Window. Intended to be 11 | // inherited from by classes that wish to specialize with custom 12 | // rendering and input handling 13 | class Win32Window { 14 | public: 15 | struct Point { 16 | unsigned int x; 17 | unsigned int y; 18 | Point(unsigned int x, unsigned int y) : x(x), y(y) {} 19 | }; 20 | 21 | struct Size { 22 | unsigned int width; 23 | unsigned int height; 24 | Size(unsigned int width, unsigned int height) 25 | : width(width), height(height) {} 26 | }; 27 | 28 | Win32Window(); 29 | virtual ~Win32Window(); 30 | 31 | // Creates a win32 window with |title| that is positioned and sized using 32 | // |origin| and |size|. New windows are created on the default monitor. Window 33 | // sizes are specified to the OS in physical pixels, hence to ensure a 34 | // consistent size this function will scale the inputted width and height as 35 | // as appropriate for the default monitor. The window is invisible until 36 | // |Show| is called. Returns true if the window was created successfully. 37 | bool Create(const std::wstring& title, const Point& origin, const Size& size); 38 | 39 | // Show the current window. Returns true if the window was successfully shown. 40 | bool Show(); 41 | 42 | // Release OS resources associated with window. 43 | void Destroy(); 44 | 45 | // Inserts |content| into the window tree. 46 | void SetChildContent(HWND content); 47 | 48 | // Returns the backing Window handle to enable clients to set icon and other 49 | // window properties. Returns nullptr if the window has been destroyed. 50 | HWND GetHandle(); 51 | 52 | // If true, closing this window will quit the application. 53 | void SetQuitOnClose(bool quit_on_close); 54 | 55 | // Return a RECT representing the bounds of the current client area. 56 | RECT GetClientArea(); 57 | 58 | protected: 59 | // Processes and route salient window messages for mouse handling, 60 | // size change and DPI. Delegates handling of these to member overloads that 61 | // inheriting classes can handle. 62 | virtual LRESULT MessageHandler(HWND window, 63 | UINT const message, 64 | WPARAM const wparam, 65 | LPARAM const lparam) noexcept; 66 | 67 | // Called when CreateAndShow is called, allowing subclass window-related 68 | // setup. Subclasses should return false if setup fails. 69 | virtual bool OnCreate(); 70 | 71 | // Called when Destroy is called. 72 | virtual void OnDestroy(); 73 | 74 | private: 75 | friend class WindowClassRegistrar; 76 | 77 | // OS callback called by message pump. Handles the WM_NCCREATE message which 78 | // is passed when the non-client area is being created and enables automatic 79 | // non-client DPI scaling so that the non-client area automatically 80 | // responds to changes in DPI. All other messages are handled by 81 | // MessageHandler. 82 | static LRESULT CALLBACK WndProc(HWND const window, 83 | UINT const message, 84 | WPARAM const wparam, 85 | LPARAM const lparam) noexcept; 86 | 87 | // Retrieves a class instance pointer for |window| 88 | static Win32Window* GetThisFromHandle(HWND const window) noexcept; 89 | 90 | // Update the window frame's theme to match the system theme. 91 | static void UpdateTheme(HWND const window); 92 | 93 | bool quit_on_close_ = false; 94 | 95 | // window handle for top level window. 96 | HWND window_handle_ = nullptr; 97 | 98 | // window handle for hosted content. 99 | HWND child_content_ = nullptr; 100 | }; 101 | 102 | #endif // RUNNER_WIN32_WINDOW_H_ 103 | -------------------------------------------------------------------------------- /一键提交到gitee.bat: -------------------------------------------------------------------------------- 1 | git remote rm origin 2 | git remote add origin https://gitee.com/wuyuanwuhui99/flutter-movie-app-ui.git 3 | git push origin main 4 | pause -------------------------------------------------------------------------------- /一键提交到github.bat: -------------------------------------------------------------------------------- 1 | git remote rm origin 2 | git remote add origin https://github.com/wuyuanwuhui99/flutter-movie-app-ui 3 | git push origin main 4 | pause -------------------------------------------------------------------------------- /修改密码.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/修改密码.png -------------------------------------------------------------------------------- /修改用户信息.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/修改用户信息.png -------------------------------------------------------------------------------- /分类歌曲.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/分类歌曲.png -------------------------------------------------------------------------------- /外网映射正常访问提示.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/外网映射正常访问提示.png -------------------------------------------------------------------------------- /忘记密码.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/忘记密码.png -------------------------------------------------------------------------------- /新版电影APP整体预览图.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/新版电影APP整体预览图.jpg -------------------------------------------------------------------------------- /更改用户信息1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/更改用户信息1.png -------------------------------------------------------------------------------- /更改用户信息2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/更改用户信息2.png -------------------------------------------------------------------------------- /更改用户信息3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/更改用户信息3.png -------------------------------------------------------------------------------- /更改用户信息4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/更改用户信息4.png -------------------------------------------------------------------------------- /用户信息.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/用户信息.png -------------------------------------------------------------------------------- /电影app整体预览.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/电影app整体预览.jpg -------------------------------------------------------------------------------- /电影app整体预览2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/电影app整体预览2.jpg -------------------------------------------------------------------------------- /电影预览1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/电影预览1.png -------------------------------------------------------------------------------- /电影预览10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/电影预览10.png -------------------------------------------------------------------------------- /电影预览11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/电影预览11.png -------------------------------------------------------------------------------- /电影预览13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/电影预览13.jpg -------------------------------------------------------------------------------- /电影预览14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/电影预览14.jpg -------------------------------------------------------------------------------- /电影预览16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/电影预览16.png -------------------------------------------------------------------------------- /电影预览2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/电影预览2.png -------------------------------------------------------------------------------- /电影预览3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/电影预览3.png -------------------------------------------------------------------------------- /电影预览4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/电影预览4.png -------------------------------------------------------------------------------- /电影预览5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/电影预览5.png -------------------------------------------------------------------------------- /电影预览6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/电影预览6.png -------------------------------------------------------------------------------- /电影预览7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/电影预览7.png -------------------------------------------------------------------------------- /电影预览8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/电影预览8.png -------------------------------------------------------------------------------- /账号密码登录.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/账号密码登录.png -------------------------------------------------------------------------------- /邮箱验证码登录.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/邮箱验证码登录.png -------------------------------------------------------------------------------- /重置密码.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyuanwuhui99/flutter-movie-app-ui/fbf36adf0449bcc2a03b28720568fff77b420308/重置密码.png --------------------------------------------------------------------------------