├── lib ├── model │ ├── new_dish.dart │ ├── recommend_song_list.dart │ └── swiper.dart ├── routers │ ├── application.dart │ ├── routes.dart │ └── router_handler.dart ├── utils │ └── number.dart ├── provider │ ├── current_index.dart │ ├── count.dart │ ├── find │ │ └── new_dish.dart │ └── song_list │ │ └── song_detail.dart ├── config │ ├── service_url.dart │ └── http.dart ├── pages │ ├── account │ │ ├── balck_vip.dart │ │ ├── account.dart │ │ ├── is_login_top.dart │ │ ├── row_navigation.dart │ │ └── column_block.dart │ ├── player │ │ ├── button.dart │ │ ├── play_group.dart │ │ ├── btn_group.dart │ │ ├── player_content.dart │ │ ├── slider.dart │ │ ├── player.dart │ │ └── palyer_title.dart │ ├── friend │ │ ├── friend.dart │ │ └── tab.dart │ ├── video │ │ └── video.dart │ ├── find │ │ ├── search.dart │ │ ├── find.dart │ │ ├── swipper.dart │ │ ├── top_navigation.dart │ │ ├── recommend_song_list.dart │ │ └── new_dish.dart │ ├── my │ │ ├── my.dart │ │ ├── center_block.dart │ │ └── top_area.dart │ └── song_list │ │ ├── share_area.dart │ │ ├── bottom_model.dart │ │ ├── song_list.dart │ │ ├── bottom_list.dart │ │ ├── song_auth.dart │ │ └── top_area.dart ├── components │ └── play.dart ├── splash_screen.dart ├── main.dart ├── material │ ├── flexible_app_bar.dart │ └── marquee.text.dart └── bottom_navigation.dart ├── android ├── gradle.properties ├── key.properties ├── app │ ├── src │ │ └── main │ │ │ ├── res │ │ │ ├── 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 │ │ │ │ └── styles.xml │ │ │ └── drawable │ │ │ │ └── launch_background.xml │ │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── uvdream │ │ │ │ └── flutterneteasecloudmusic │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── settings.gradle └── build.gradle ├── ios ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── 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-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Info.plist │ └── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ └── project.pbxproj ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── Podfile ├── images ├── black.png ├── music.png ├── bottom │ ├── my.png │ ├── find.png │ ├── video.png │ ├── account.png │ ├── friend.png │ ├── find_selected.png │ ├── my_selected.png │ ├── friend_selected.png │ ├── video_selected.png │ └── account_selected.png ├── play │ ├── disc.png │ ├── play.png │ └── play_background.png ├── icons │ └── music.png ├── place_block.png └── placeholder.png ├── docs └── images │ ├── my.PNG │ ├── qq.jpg │ ├── Find.PNG │ ├── count.PNG │ ├── wechat.png │ └── songList.JPG ├── assets └── fonts │ └── IconFont.ttf ├── .metadata ├── LICENSE ├── test └── widget_test.dart ├── .gitignore ├── README.md └── pubspec.yaml /lib/model/new_dish.dart: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" -------------------------------------------------------------------------------- /images/black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/images/black.png -------------------------------------------------------------------------------- /images/music.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/images/music.png -------------------------------------------------------------------------------- /docs/images/my.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/docs/images/my.PNG -------------------------------------------------------------------------------- /docs/images/qq.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/docs/images/qq.jpg -------------------------------------------------------------------------------- /docs/images/Find.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/docs/images/Find.PNG -------------------------------------------------------------------------------- /docs/images/count.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/docs/images/count.PNG -------------------------------------------------------------------------------- /images/bottom/my.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/images/bottom/my.png -------------------------------------------------------------------------------- /images/play/disc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/images/play/disc.png -------------------------------------------------------------------------------- /images/play/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/images/play/play.png -------------------------------------------------------------------------------- /docs/images/wechat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/docs/images/wechat.png -------------------------------------------------------------------------------- /images/bottom/find.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/images/bottom/find.png -------------------------------------------------------------------------------- /images/bottom/video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/images/bottom/video.png -------------------------------------------------------------------------------- /images/icons/music.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/images/icons/music.png -------------------------------------------------------------------------------- /images/place_block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/images/place_block.png -------------------------------------------------------------------------------- /images/placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/images/placeholder.png -------------------------------------------------------------------------------- /assets/fonts/IconFont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/assets/fonts/IconFont.ttf -------------------------------------------------------------------------------- /docs/images/songList.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/docs/images/songList.JPG -------------------------------------------------------------------------------- /images/bottom/account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/images/bottom/account.png -------------------------------------------------------------------------------- /images/bottom/friend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/images/bottom/friend.png -------------------------------------------------------------------------------- /android/key.properties: -------------------------------------------------------------------------------- 1 | storePassword=android 2 | keyPassword=android 3 | keyAlias=key 4 | storeFile=/Users/wangzhongjie/key.jks -------------------------------------------------------------------------------- /images/bottom/find_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/images/bottom/find_selected.png -------------------------------------------------------------------------------- /images/bottom/my_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/images/bottom/my_selected.png -------------------------------------------------------------------------------- /images/play/play_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/images/play/play_background.png -------------------------------------------------------------------------------- /lib/routers/application.dart: -------------------------------------------------------------------------------- 1 | import 'package:fluro/fluro.dart'; 2 | 3 | class Application { 4 | static Router router; 5 | } 6 | -------------------------------------------------------------------------------- /images/bottom/friend_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/images/bottom/friend_selected.png -------------------------------------------------------------------------------- /images/bottom/video_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/images/bottom/video_selected.png -------------------------------------------------------------------------------- /images/bottom/account_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/images/bottom/account_selected.png -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /lib/utils/number.dart: -------------------------------------------------------------------------------- 1 | String getFormattedNumber(number) { 2 | if (number < 10000) { 3 | return number.toString(); 4 | } 5 | number = number ~/ 10000; 6 | return "$number万"; 7 | } 8 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/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/UvDream/flutter_netease_cloud_music/HEAD/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/UvDream/flutter_netease_cloud_music/HEAD/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/UvDream/flutter_netease_cloud_music/HEAD/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/UvDream/flutter_netease_cloud_music/HEAD/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/UvDream/flutter_netease_cloud_music/HEAD/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/UvDream/flutter_netease_cloud_music/HEAD/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/UvDream/flutter_netease_cloud_music/HEAD/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/UvDream/flutter_netease_cloud_music/HEAD/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/UvDream/flutter_netease_cloud_music/HEAD/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/UvDream/flutter_netease_cloud_music/HEAD/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/UvDream/flutter_netease_cloud_music/HEAD/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/UvDream/flutter_netease_cloud_music/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UvDream/flutter_netease_cloud_music/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/provider/current_index.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CurrentIndexProvider with ChangeNotifier { 4 | int currentIndex = 0; 5 | changeIndex(int newIndex) { 6 | currentIndex = newIndex; 7 | notifyListeners(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip 7 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /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 | BuildSystemType 6 | Original 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # This file should be version controlled and should not be manually edited. 4 | 5 | version: 6 | revision: cb6fec10dc83a11f536cbad0f4c05c099b6e5401 7 | channel: master 8 | 9 | project_type: app 10 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /lib/config/service_url.dart: -------------------------------------------------------------------------------- 1 | const serviceUrl = 'http://94.191.31.210:3000'; 2 | const servicePath = { 3 | 'findSwiper': serviceUrl + '/banner', //首页轮播图 4 | 'songListApi': serviceUrl + '/personalized', //推荐歌单 5 | 'newDishApi': serviceUrl + '/top/album', //新碟 6 | 'songListDetail': serviceUrl + '/playlist/detail', //歌单详情 7 | 'mvDetail': serviceUrl + '/mv/detail', //歌曲mv详情 8 | 'songDetail': serviceUrl + '/song/detail' // 歌曲详情 9 | }; 10 | -------------------------------------------------------------------------------- /lib/pages/account/balck_vip.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | 4 | class BlackVip extends StatelessWidget { 5 | @override 6 | Widget build(BuildContext context) { 7 | return Container( 8 | color: Colors.white, 9 | width: ScreenUtil().setWidth(750), 10 | padding: EdgeInsets.all(15), 11 | child: Image.asset('images/black.png'), 12 | ); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/uvdream/flutterneteasecloudmusic/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.uvdream.flutterneteasecloudmusic 2 | 3 | import android.os.Bundle 4 | 5 | import io.flutter.app.FlutterActivity 6 | import io.flutter.plugins.GeneratedPluginRegistrant 7 | 8 | class MainActivity: FlutterActivity() { 9 | override fun onCreate(savedInstanceState: Bundle?) { 10 | super.onCreate(savedInstanceState) 11 | GeneratedPluginRegistrant.registerWith(this) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /lib/pages/player/button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | 4 | class BtnBar extends StatelessWidget { 5 | final int icon; 6 | final double size; 7 | BtnBar(this.icon, this.size); 8 | @override 9 | Widget build(BuildContext context) { 10 | return Container( 11 | width: ScreenUtil().setWidth(140), 12 | child: Icon( 13 | IconData(icon, fontFamily: "IconFont"), 14 | color: Colors.white, 15 | size: size, 16 | ), 17 | ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/provider/count.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | class CounterBloc { 4 | StreamController _streamController; 5 | Stream _stream; 6 | int _count; 7 | 8 | CounterBloc() { 9 | _count = 0; 10 | _streamController = StreamController.broadcast(); 11 | _stream = _streamController.stream; 12 | } 13 | 14 | Stream get stream => _stream; 15 | int get count => _count; 16 | 17 | addCounter() { 18 | _streamController.sink.add(++_count); 19 | } 20 | 21 | subCounter() { 22 | _streamController.sink.add(--_count); 23 | } 24 | 25 | dispose() { 26 | _streamController.close(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/routers/routes.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:fluro/fluro.dart'; 3 | import './router_handler.dart'; 4 | 5 | class Routes { 6 | static String root = '/'; 7 | static String songListPage = '/songList'; 8 | static String palyer = '/player'; 9 | static void configureRoutes(Router router) { 10 | router.notFoundHandler = new Handler( 11 | handlerFunc: (BuildContext context, Map> params) { 12 | print('ERROR=====>ROUTE NOT FOUND'); 13 | }); 14 | router.define(songListPage, handler: songListHandler); 15 | router.define(palyer, handler: playerHandler); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/components/play.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class PlayButton extends StatelessWidget { 4 | PlayButton({this.color = false}); 5 | final bool color; 6 | @override 7 | Widget build(BuildContext context) { 8 | return Container( 9 | child: InkWell( 10 | onTap: () {}, 11 | child: Container( 12 | // color: Colors.orange, 13 | width: 54, 14 | child: Icon( 15 | IconData(0xe649, fontFamily: 'IconFont'), 16 | size: 25, 17 | color: color ? Colors.white : Colors.black, 18 | ), 19 | ), 20 | ), 21 | ); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/config/http.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'dart:async'; 3 | 4 | Future fetch(url, {formData}) async { 5 | try { 6 | print('-------------------开始调试接口,传入的参数-------------'); 7 | print(formData); 8 | Response res; 9 | Dio dio = new Dio(); 10 | if (formData == null) { 11 | res = await dio.get(url); 12 | } else { 13 | res = await dio.get(url, queryParameters: formData); 14 | } 15 | if (res.statusCode == 200) { 16 | return res.data; 17 | } else { 18 | throw Exception('后端接口出现异常,请检测代码和服务器情况.........'); 19 | } 20 | } catch (e) { 21 | return print('ERROR:======>${e}'); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/routers/router_handler.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:fluro/fluro.dart'; 3 | import '../pages/song_list/song_list.dart'; 4 | import '../pages/player/player.dart'; 5 | 6 | Handler songListHandler = Handler( 7 | handlerFunc: (BuildContext context, Map> params) { 8 | String songListId = params['id'].first; 9 | return SongListPage(songListId); 10 | }); 11 | Handler playerHandler = Handler( 12 | handlerFunc: (BuildContext context, Map> params) { 13 | print("路由传参+++++++++"); 14 | print(params); 15 | String songId = params['id'].first; 16 | return PlayerPage(songId); 17 | }); 18 | -------------------------------------------------------------------------------- /lib/provider/find/new_dish.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../../config/http.dart'; 3 | import '../../config/service_url.dart'; 4 | 5 | class NewDishProvider with ChangeNotifier { 6 | bool _isLeft = true; 7 | List songList = []; 8 | bool get isLeft => _isLeft; 9 | void changeSelect(val) { 10 | _isLeft = val; 11 | notifyListeners(); 12 | } 13 | 14 | void getNewDish() async { 15 | await fetch(servicePath['newDishApi']).then((val) { 16 | // print('-----------新歌新碟----------'); 17 | // print(val); 18 | songList = (val['albums'] as List).cast(); 19 | // print('新的列表'); 20 | // print(songList); 21 | }); 22 | notifyListeners(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.2.71' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.2.1' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /lib/pages/player/play_group.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: wangzhongjie 3 | * @Date: 2019-09-03 16:24:50 4 | * @LastEditors: wangzhongjie 5 | * @LastEditTime: 2019-09-05 14:59:38 6 | * @Description: 播放按钮区域 7 | * @Email: UvDream@163.com 8 | */ 9 | import 'package:flutter/material.dart'; 10 | import './button.dart'; 11 | 12 | class PlayGroup extends StatelessWidget { 13 | @override 14 | Widget build(BuildContext context) { 15 | return Container( 16 | child: Row( 17 | mainAxisAlignment: MainAxisAlignment.center, 18 | children: [ 19 | BtnBar(0xe664, 30.0), 20 | BtnBar(0xe664, 30.0), 21 | BtnBar(0xe666, 50.0), 22 | BtnBar(0xe663, 30.0), 23 | BtnBar(0xe66a, 30.0), 24 | ], 25 | ), 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /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 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/pages/player/btn_group.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: wangzhongjie 3 | * @Date: 2019-09-03 16:23:19 4 | * @LastEditors: wangzhongjie 5 | * @LastEditTime: 2019-09-05 15:05:06 6 | * @Description: 按钮区域 7 | * @Email: UvDream@163.com 8 | */ 9 | import 'package:flutter/material.dart'; 10 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 11 | import './button.dart'; 12 | 13 | class BtnGroup extends StatelessWidget { 14 | @override 15 | Widget build(BuildContext context) { 16 | return Container( 17 | height: ScreenUtil().setHeight(100), 18 | child: Row( 19 | mainAxisAlignment: MainAxisAlignment.center, 20 | children: [ 21 | BtnBar(0xe66d, 30.0), 22 | BtnBar(0xe65a, 30.0), 23 | BtnBar(0xe669, 30.0), 24 | BtnBar(0xe66e, 30.0), 25 | BtnBar(0xe612, 30.0), 26 | ], 27 | )); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/pages/friend/friend.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: wangzhongjie 3 | * @Date: 2019-02-20 15:47:53 4 | * @LastEditors: wangzhongjie 5 | * @LastEditTime: 2019-08-19 10:06:06 6 | * @Description: 账户 7 | * @Email: uvdream@163.com 8 | */ 9 | import 'package:flutter/material.dart'; 10 | import '../../components/play.dart'; 11 | import './tab.dart'; 12 | 13 | class FriendPage extends StatelessWidget { 14 | @override 15 | Widget build(BuildContext context) { 16 | return Scaffold( 17 | appBar: AppBar( 18 | leading: InkWell( 19 | onTap: () {}, 20 | child: Icon( 21 | IconData(0xe60d, fontFamily: 'IconFont'), 22 | size: 32, 23 | ), 24 | ), 25 | title: TabPage(), 26 | elevation: 1, 27 | centerTitle: true, 28 | actions: [PlayButton()], 29 | ), 30 | body: Container( 31 | child: Center( 32 | child: Text('还在努力研发中!'), 33 | ), 34 | ), 35 | ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lib/pages/video/video.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: wangzhongjie 3 | * @Date: 2019-02-20 15:47:58 4 | * @LastEditors: wangzhongjie 5 | * @LastEditTime: 2019-08-19 10:05:42 6 | * @Description: 我的 7 | * @Email: uvdream@163.com 8 | */ 9 | import 'package:flutter/material.dart'; 10 | import '../../components/play.dart'; 11 | import '../find/search.dart'; 12 | 13 | class VideoPage extends StatelessWidget { 14 | @override 15 | Widget build(BuildContext context) { 16 | return Scaffold( 17 | appBar: AppBar( 18 | leading: InkWell( 19 | onTap: () {}, 20 | child: Icon( 21 | IconData(0xe647, fontFamily: 'IconFont'), 22 | size: 25, 23 | ), 24 | ), 25 | title: SearchArea(), 26 | elevation: 1, 27 | titleSpacing: 0, 28 | centerTitle: true, 29 | actions: [PlayButton()], 30 | ), 31 | body: Container( 32 | child: Center( 33 | child: Text('还在努力研发中!'), 34 | ), 35 | ), 36 | ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 wangzhongjie 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /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 that Flutter provides. 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_netease_cloud_music/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(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 | -------------------------------------------------------------------------------- /lib/pages/account/account.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: wangzhongjie 3 | * @Date: 2019-02-20 15:47:45 4 | * @LastEditors: wangzhongjie 5 | * @LastEditTime: 2019-08-26 11:40:11 6 | * @Description: 账户 7 | * @Email: uvdream@163.com 8 | */ 9 | import 'package:flutter/material.dart'; 10 | import '../../components/play.dart'; 11 | import './is_login_top.dart'; 12 | import './row_navigation.dart'; 13 | import './column_block.dart'; 14 | import './balck_vip.dart'; 15 | 16 | class AccountPage extends StatelessWidget { 17 | @override 18 | Widget build(BuildContext context) { 19 | return Scaffold( 20 | appBar: AppBar( 21 | leading: InkWell( 22 | onTap: () {}, 23 | child: Icon( 24 | IconData(0xe610, fontFamily: 'IconFont'), 25 | size: 23, 26 | ), 27 | ), 28 | elevation: 1, 29 | centerTitle: true, 30 | actions: [PlayButton()], 31 | ), 32 | body: SingleChildScrollView( 33 | child: Column( 34 | children: [ 35 | IsLoginPage(), 36 | BlackVip(), 37 | RowNavigationPage(), 38 | ColumnBlock() 39 | ], 40 | ), 41 | ), 42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /lib/pages/account/is_login_top.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | 4 | class IsLoginPage extends StatelessWidget { 5 | @override 6 | Widget build(BuildContext context) { 7 | return Container( 8 | color: Colors.white, 9 | padding: EdgeInsets.only(top: 25), 10 | alignment: Alignment.center, 11 | child: Column( 12 | children: [ 13 | Text('登陆网易云音乐'), 14 | Text('手机电脑多端同步,尽享海量高品质音乐'), 15 | Container( 16 | margin: EdgeInsets.only(top: 10, bottom: 10), 17 | width: ScreenUtil().setWidth(720), 18 | height: ScreenUtil().setHeight(80), 19 | child: RaisedButton( 20 | elevation: 0, 21 | color: Colors.white, 22 | shape: RoundedRectangleBorder( 23 | borderRadius: BorderRadius.circular(25), 24 | side: BorderSide(color: Color(0xffe6e6e6))), 25 | onPressed: () {}, 26 | child: Text( 27 | '立即登录', 28 | style: TextStyle(fontSize: ScreenUtil().setSp(32)), 29 | ), 30 | ), 31 | ) 32 | ], 33 | ), 34 | ); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/pages/find/search.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | 4 | class SearchArea extends StatelessWidget { 5 | @override 6 | Widget build(BuildContext context) { 7 | return Container( 8 | color: Colors.white, 9 | width: ScreenUtil().setWidth(550), 10 | height: ScreenUtil().setHeight(95), 11 | alignment: Alignment.center, 12 | child: Container( 13 | width: ScreenUtil().setWidth(520), 14 | height: ScreenUtil().setHeight(80), 15 | alignment: Alignment.center, 16 | decoration: BoxDecoration( 17 | color: Color(0xfff7f7f7), 18 | borderRadius: BorderRadius.circular(ScreenUtil().setHeight(95))), 19 | child: Row( 20 | mainAxisAlignment: MainAxisAlignment.center, 21 | children: [ 22 | Icon( 23 | IconData(0xe618, fontFamily: 'IconFont'), 24 | size: 18, 25 | color: Color(0xffc5c5c6), 26 | ), 27 | Text( 28 | '一曲相思', 29 | style: TextStyle( 30 | fontSize: ScreenUtil().setSp(30), color: Color(0xffc5c5c6)), 31 | ) 32 | ], 33 | ), 34 | ), 35 | ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lib/pages/my/my.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: wangzhongjie 3 | * @Date: 2019-02-20 15:47:58 4 | * @LastEditors: wangzhongjie 5 | * @LastEditTime: 2019-08-06 15:27:51 6 | * @Description: 我的 7 | * @Email: uvdream@163.com 8 | */ 9 | import 'package:flutter/material.dart'; 10 | import '../../components/play.dart'; 11 | import './top_area.dart'; 12 | import './center_block.dart'; 13 | import '../find/recommend_song_list.dart'; 14 | 15 | class MyPage extends StatelessWidget { 16 | @override 17 | Widget build(BuildContext context) { 18 | return Scaffold( 19 | appBar: AppBar( 20 | leading: InkWell( 21 | onTap: () {}, 22 | child: Icon( 23 | IconData(0xe67c, fontFamily: 'IconFont'), 24 | size: 32, 25 | ), 26 | ), 27 | title: Text( 28 | "我的音乐", 29 | style: TextStyle(fontSize: 18), 30 | ), 31 | elevation: 0, 32 | centerTitle: true, 33 | actions: [PlayButton()], 34 | ), 35 | body: SingleChildScrollView( 36 | child: Column( 37 | children: [ 38 | TopAreaPage(), 39 | CenterBlockPage(), 40 | RecommendSongList() 41 | ], 42 | ))); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /lib/splash_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import './bottom_navigation.dart'; 3 | 4 | class SplashScreen extends StatefulWidget { 5 | @override 6 | _SplashScreenState createState() => _SplashScreenState(); 7 | } 8 | 9 | class _SplashScreenState extends State 10 | with SingleTickerProviderStateMixin { 11 | AnimationController _controller; 12 | Animation _animation; 13 | 14 | @override 15 | void initState() { 16 | super.initState(); 17 | _controller = AnimationController( 18 | vsync: this, duration: Duration(milliseconds: 3000)); 19 | _animation = Tween(begin: 0.0, end: 1.0).animate(_controller); 20 | 21 | _animation.addStatusListener((status) { 22 | if (status == AnimationStatus.completed) { 23 | Navigator.of(context).pushAndRemoveUntil( 24 | MaterialPageRoute(builder: (context) => BottomNavigationWidget()), 25 | (route) => route == null); 26 | } 27 | }); 28 | 29 | _controller.forward(); //播放动画 30 | } 31 | 32 | @override 33 | void dispose() { 34 | _controller.dispose(); 35 | super.dispose(); 36 | } 37 | 38 | @override 39 | Widget build(BuildContext context) { 40 | return FadeTransition( 41 | opacity: _animation, 42 | child: Image.asset( 43 | 'images/music.png', 44 | scale: 2.0, 45 | fit: BoxFit.cover, 46 | )); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /lib/pages/friend/tab.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | 4 | class TabPage extends StatelessWidget { 5 | @override 6 | Widget build(BuildContext context) { 7 | return Container( 8 | child: Container( 9 | width: ScreenUtil().setWidth(284), 10 | height: ScreenUtil().setHeight(60), 11 | decoration: BoxDecoration( 12 | border: Border.all(width: 1, color: Colors.red), 13 | borderRadius: BorderRadius.circular(50)), 14 | child: Row( 15 | children: [ 16 | Container( 17 | decoration: BoxDecoration( 18 | color: Colors.red, 19 | borderRadius: BorderRadius.circular(50), 20 | ), 21 | alignment: Alignment.center, 22 | width: ScreenUtil().setWidth(140), 23 | height: ScreenUtil().setHeight(60), 24 | child: Text( 25 | '动态', 26 | style: TextStyle(fontSize: 16, color: Colors.white), 27 | ), 28 | ), 29 | Container( 30 | alignment: Alignment.center, 31 | width: ScreenUtil().setWidth(140), 32 | height: ScreenUtil().setHeight(60), 33 | child: Text( 34 | '附近', 35 | style: TextStyle(fontSize: 16, color: Colors.red), 36 | ), 37 | ) 38 | ], 39 | ), 40 | ), 41 | ); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /lib/provider/song_list/song_detail.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import '../../config/http.dart'; 4 | import '../../config/service_url.dart'; 5 | 6 | class SongDetailProvider with ChangeNotifier { 7 | // 标题 8 | var title = ''; 9 | // 描述 10 | var description = ''; 11 | // 歌单头像 12 | var songImg = ''; 13 | // 歌曲列表 14 | List songList = []; 15 | // 作者名字 16 | var nickName = ''; 17 | //作者头像 18 | var avatarUrl = ''; 19 | // 播放量 20 | int playCount = 0; 21 | // 评论量 22 | int commentCount = 0; 23 | // 分享量 24 | int shareCount = 0; 25 | //列表歌曲数量 26 | int trackCount = 0; 27 | 28 | void getSongDetail(id) async { 29 | var formData = {'id': id}; 30 | await fetch(servicePath['songListDetail'], formData: formData).then((val) { 31 | print('-----歌单详情-----'); 32 | print(val['playlist']['shareCount']); 33 | print('+++++++实际数据++++++'); 34 | title = val['playlist']['name']; 35 | description = val['playlist']['description']; 36 | songList = (val['playlist']['tracks'] as List).cast(); 37 | songImg = val['playlist']['coverImgUrl']; 38 | nickName = val['playlist']['creator']['nickname']; 39 | avatarUrl = val['playlist']['creator']['avatarUrl']; 40 | playCount = val['playlist']['playCount']; 41 | shareCount = val['playlist']['shareCount']; 42 | commentCount = val['playlist']['commentCount']; 43 | trackCount = val['playlist']['trackCount']; 44 | }); 45 | notifyListeners(); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.lock 4 | *.log 5 | *.pyc 6 | *.swp 7 | .DS_Store 8 | .atom/ 9 | .buildlog/ 10 | .history 11 | .svn/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # Visual Studio Code related 20 | .vscode/ 21 | 22 | # Flutter/Dart/Pub related 23 | **/doc/api/ 24 | .dart_tool/ 25 | .flutter-plugins 26 | .packages 27 | .pub-cache/ 28 | .pub/ 29 | build/ 30 | 31 | # Android related 32 | **/android/**/gradle-wrapper.jar 33 | **/android/.gradle 34 | **/android/captures/ 35 | **/android/gradlew 36 | **/android/gradlew.bat 37 | **/android/local.properties 38 | **/android/**/GeneratedPluginRegistrant.java 39 | 40 | # iOS/XCode related 41 | **/ios/**/*.mode1v3 42 | **/ios/**/*.mode2v3 43 | **/ios/**/*.moved-aside 44 | **/ios/**/*.pbxuser 45 | **/ios/**/*.perspectivev3 46 | **/ios/**/*sync/ 47 | **/ios/**/.sconsign.dblite 48 | **/ios/**/.tags* 49 | **/ios/**/.vagrant/ 50 | **/ios/**/DerivedData/ 51 | **/ios/**/Icon? 52 | **/ios/**/Pods/ 53 | **/ios/**/.symlinks/ 54 | **/ios/**/profile 55 | **/ios/**/xcuserdata 56 | **/ios/.generated/ 57 | **/ios/Flutter/App.framework 58 | **/ios/Flutter/Flutter.framework 59 | **/ios/Flutter/Generated.xcconfig 60 | **/ios/Flutter/app.flx 61 | **/ios/Flutter/app.zip 62 | **/ios/Flutter/flutter_assets/ 63 | **/ios/ServiceDefinitions.json 64 | **/ios/Runner/GeneratedPluginRegistrant.* 65 | 66 | # Exceptions to above rules. 67 | !**/ios/**/default.mode1v3 68 | !**/ios/**/default.mode2v3 69 | !**/ios/**/default.pbxuser 70 | !**/ios/**/default.perspectivev3 71 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | 网易云音乐(仿) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/pages/player/player_content.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: wangzhongjie 3 | * @Date: 2019-09-03 16:19:55 4 | * @LastEditors: wangzhongjie 5 | * @LastEditTime: 2019-09-05 15:05:48 6 | * @Description: 播放器中间区域 7 | * @Email: UvDream@163.com 8 | */ 9 | import 'package:flutter/material.dart'; 10 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 11 | 12 | class PlayerContent extends StatefulWidget { 13 | @override 14 | _PlayerContentState createState() => _PlayerContentState(); 15 | } 16 | 17 | class _PlayerContentState extends State { 18 | static const double HEIGHT_SPACE_ALBUM_TOP = 100; 19 | @override 20 | void initState() { 21 | super.initState(); 22 | } 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return Container( 27 | width: ScreenUtil().setWidth(750), 28 | height: ScreenUtil().setHeight(850), 29 | child: Stack( 30 | children: [ 31 | ClipRect( 32 | child: Container( 33 | child: Align( 34 | alignment: Alignment(0, -1), 35 | child: Transform.translate( 36 | offset: Offset(40, -15), 37 | child: Container( 38 | width: ScreenUtil().setSp(200), 39 | height: ScreenUtil().setSp(368), 40 | child: Image.asset("images/play/play.png"), 41 | ), 42 | ), 43 | ), 44 | ), 45 | ), 46 | Positioned( 47 | top: ScreenUtil().setHeight(100), 48 | left: ScreenUtil().setWidth(100), 49 | child: Container( 50 | child: Text('data'), 51 | ), 52 | ) 53 | ], 54 | ), 55 | ); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /lib/pages/player/slider.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: wangzhongjie 3 | * @Date: 2019-09-03 16:22:14 4 | * @LastEditors: wangzhongjie 5 | * @LastEditTime: 2019-09-05 14:34:48 6 | * @Description: 进度条 7 | * @Email: UvDream@163.com 8 | */ 9 | import 'package:flutter/material.dart'; 10 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 11 | 12 | class SliderBar extends StatelessWidget { 13 | @override 14 | Widget build(BuildContext context) { 15 | return Container( 16 | height: ScreenUtil().setHeight(100), 17 | child: Row( 18 | children: [ 19 | _time('03:10'), 20 | // _sliderBar(), 21 | _SliderBar(), 22 | _time('03:10'), 23 | ], 24 | ), 25 | ); 26 | } 27 | 28 | Widget _time(time) { 29 | return Container( 30 | width: ScreenUtil().setWidth(80), 31 | alignment: Alignment.center, 32 | child: Text( 33 | '$time', 34 | style: TextStyle(color: Colors.white, fontSize: ScreenUtil().setSp(20)), 35 | ), 36 | ); 37 | } 38 | 39 | // Widget _sliderBar() { 40 | // return 41 | // } 42 | } 43 | 44 | class _SliderBar extends StatefulWidget { 45 | double sliderLength = 10; 46 | @override 47 | __SliderBarState createState() => __SliderBarState(); 48 | } 49 | 50 | class __SliderBarState extends State<_SliderBar> { 51 | @override 52 | Widget build(BuildContext context) { 53 | return Container( 54 | width: ScreenUtil().setWidth(590), 55 | child: Slider( 56 | value: widget.sliderLength, 57 | max: 100.0, 58 | min: 0.0, 59 | activeColor: Colors.white, 60 | inactiveColor: Colors.black12, 61 | onChanged: (val) { 62 | setState(() { 63 | widget.sliderLength = val; 64 | }); 65 | }, 66 | ), 67 | ); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /lib/pages/account/row_navigation.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/rendering.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | 5 | class RowNavigationPage extends StatelessWidget { 6 | @override 7 | Widget build(BuildContext context) { 8 | return Container( 9 | color: Colors.white, 10 | padding: EdgeInsets.only(bottom: 8), 11 | child: Row( 12 | children: [ 13 | _block(0xe614, '信息', 30.0), 14 | _block(0xe615, '商城', 22.0, '赠99无线充'), 15 | _block(0xe674, '演出', 25.0, '刺猬'), 16 | _block(0xe6b6, '个性皮肤', 25.0), 17 | ], 18 | ), 19 | ); 20 | } 21 | 22 | Widget _block(icon, title, size, [remark = '']) { 23 | return InkWell( 24 | onTap: () {}, 25 | child: Container( 26 | width: ScreenUtil().setWidth(187.5), 27 | child: Column( 28 | children: [ 29 | Container( 30 | alignment: Alignment.center, 31 | width: ScreenUtil().setWidth(65), 32 | height: ScreenUtil().setWidth(65), 33 | child: Icon( 34 | IconData(icon, fontFamily: 'IconFont'), 35 | color: Colors.red, 36 | size: size, 37 | ), 38 | ), 39 | Container( 40 | margin: EdgeInsets.only(top: 5), 41 | child: Text( 42 | title, 43 | style: TextStyle( 44 | fontSize: ScreenUtil().setSp(25), 45 | ), 46 | ), 47 | ), 48 | Container( 49 | child: Text( 50 | remark, 51 | style: TextStyle( 52 | color: Colors.black26, 53 | fontSize: ScreenUtil().setSp(20), 54 | ), 55 | ), 56 | ) 57 | ], 58 | ), 59 | ), 60 | ); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:provider/provider.dart'; 3 | import './provider/count.dart'; 4 | import './provider/find/new_dish.dart'; 5 | import './provider/current_index.dart'; 6 | import './provider/song_list/song_detail.dart'; 7 | // void main() => runApp(MyApp()); 8 | import './splash_screen.dart'; 9 | import 'package:fluro/fluro.dart'; 10 | import './routers/routes.dart'; 11 | import './routers/application.dart'; 12 | 13 | // void main() => runApp(ChangeNotifierProvider( 14 | // builder: (context) => CounterBloc(), child: MyApp())); 15 | 16 | void main() { 17 | Provider.debugCheckInvalidValueType = null; 18 | // var counter = CounterBloc(); 19 | // var newDish = NewDishProvider(); 20 | // runApp(MultiProvider( 21 | // providers: [ 22 | // Provider.value(value: counter), 23 | // Provider.value(value: newDish), 24 | // // ChangeNotifierProvider(builder: (_) => NewDishProvider()), 25 | // ], 26 | // child: MyApp(), 27 | // )); 28 | runApp(MyApp()); 29 | } 30 | 31 | class MyApp extends StatelessWidget { 32 | // This widget is the root of your application. 33 | @override 34 | Widget build(BuildContext context) { 35 | // 注册路由 36 | final router = Router(); 37 | Routes.configureRoutes(router); 38 | Application.router = router; 39 | 40 | var counter = CounterBloc(); 41 | // var newDish = NewDishProvider(); 42 | return MultiProvider( 43 | providers: [ 44 | Provider.value(value: counter), 45 | // Provider管理恒定数据不通知视图刷新 46 | // Provider.value(value: newDish), 47 | ChangeNotifierProvider(builder: (_) => NewDishProvider()), 48 | ChangeNotifierProvider(builder: (_) => CurrentIndexProvider()), 49 | ChangeNotifierProvider(builder: (_) => SongDetailProvider()), 50 | ], 51 | child: MaterialApp( 52 | debugShowCheckedModeBanner: false, 53 | title: '网易云音乐(仿)', 54 | theme: ThemeData( 55 | primaryColor: Colors.white, 56 | ), 57 | home: SplashScreen(), 58 | ), 59 | ); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /lib/pages/my/center_block.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | 4 | class CenterBlockPage extends StatelessWidget { 5 | @override 6 | Widget build(BuildContext context) { 7 | return Container( 8 | child: Column( 9 | children: [ 10 | _block(0xe601, '本地音乐', '0'), 11 | _block(0xe60c, '最近播放', '0'), 12 | _block(0xe66b, '我的电台', '0'), 13 | _block(0xe629, '我的收藏', '0', true) 14 | ], 15 | ), 16 | ); 17 | } 18 | 19 | Widget _block(icon, title, num, [border = false]) { 20 | return InkWell( 21 | onTap: () {}, 22 | child: Container( 23 | color: Colors.white, 24 | child: Row( 25 | children: [ 26 | Container( 27 | width: ScreenUtil().setWidth(152), 28 | height: ScreenUtil().setHeight(105), 29 | child: Icon( 30 | IconData(icon, fontFamily: 'IconFont'), 31 | ), 32 | ), 33 | Container( 34 | width: ScreenUtil().setWidth(598), 35 | height: ScreenUtil().setHeight(105), 36 | decoration: BoxDecoration( 37 | border: Border( 38 | bottom: BorderSide( 39 | width: 1, 40 | color: border ? Colors.white : Color(0xffe6e6e6), 41 | ), 42 | ), 43 | ), 44 | child: Row( 45 | children: [ 46 | Text(title), 47 | Container( 48 | alignment: Alignment.centerRight, 49 | width: ScreenUtil().setWidth(430), 50 | child: Text(num), 51 | ), 52 | Icon( 53 | Icons.chevron_right, 54 | color: Color(0xffe6e6e6), 55 | ) 56 | ], 57 | ), 58 | ) 59 | ], 60 | ), 61 | )); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 15 | 19 | 26 | 30 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /lib/pages/song_list/share_area.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: wangzhongjie 3 | * @Date: 2019-08-19 16:55:23 4 | * @LastEditors: wangzhongjie 5 | * @LastEditTime: 2019-08-22 15:33:56 6 | * @Description: 顶部分享区域 7 | * @Email: UvDream@163.com 8 | */ 9 | import 'package:flutter/material.dart'; 10 | import 'package:flutter/painting.dart'; 11 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 12 | import '../../provider/song_list/song_detail.dart'; 13 | import 'package:provider/provider.dart'; 14 | 15 | class ShareArea extends StatelessWidget { 16 | @override 17 | Widget build(BuildContext context) { 18 | var message = Provider.of(context); 19 | return Container( 20 | margin: EdgeInsets.only(top: 0), 21 | height: ScreenUtil().setHeight(130), 22 | child: Row( 23 | mainAxisAlignment: MainAxisAlignment.center, 24 | children: [ 25 | _iconBlock(0xe626, message.commentCount), 26 | _iconBlock(0xe654, message.shareCount), 27 | _iconBlock(0xe61c, '下载'), 28 | _iconBlock(0xe700, '多选'), 29 | ], 30 | ), 31 | ); 32 | } 33 | 34 | Widget _iconBlock(icon, num) { 35 | return Container( 36 | width: ScreenUtil().setWidth(180), 37 | height: ScreenUtil().setHeight(200), 38 | margin: EdgeInsets.only(top: ScreenUtil().setHeight(20)), 39 | child: InkWell( 40 | onTap: () {}, 41 | child: Column( 42 | children: [ 43 | Container( 44 | child: Icon( 45 | IconData(icon, fontFamily: 'IconFont'), 46 | color: Colors.white, 47 | size: 32, 48 | ), 49 | ), 50 | Expanded( 51 | child: Container( 52 | height: ScreenUtil().setHeight(150), 53 | margin: EdgeInsets.only(top: ScreenUtil().setHeight(10.0)), 54 | child: Text( 55 | '$num', 56 | style: TextStyle( 57 | color: Colors.white, fontSize: ScreenUtil().setSp(25)), 58 | ), 59 | ), 60 | ) 61 | ], 62 | ), 63 | ), 64 | ); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # flutter_netease_cloud_music 2 | 3 | [![GitHub status](https://img.shields.io/badge/status-10%25-brightgreen.svg)](https://github.com/UvDream/flutter_netease_cloud_music) 4 | [![GitHub stars](https://img.shields.io/github/stars/UvDream/flutter_netease_cloud_music.svg)](https://github.com/UvDream/flutter_netease_cloud_music/stargazers) 5 | [![GitHub forks](https://img.shields.io/github/forks/UvDream/flutter_netease_cloud_music.svg)](https://github.com/UvDream/flutter_netease_cloud_music/network) 6 | [![GitHub issues](https://img.shields.io/github/issues/UvDream/flutter_netease_cloud_music.svg)](https://github.com/UvDream/flutter_netease_cloud_music/issues) 7 | 8 | 利用 flutter 高仿网易云音乐 IOS 版本 9 | 10 | ## 目前进度 11 | 12 | - [x] 首页布局界面以及接口初略完成大部分 13 | - [x] 首页保持状态完成 14 | - [x] 底部导航栏静态组件结合状态管理完成 15 | - [x] 启动页完成 16 | - [x] 账户界面完成 17 | - [x] 推荐歌单列表页主体界面完成 18 | - [ ] 歌曲播放界面 19 | - [ ] 每日推荐界面 20 | - [ ] 歌曲播放界面 21 | - [ ] 歌单广场 22 | - [ ] 歌曲播放界面 23 | - [ ] 排行榜 24 | - [ ] 歌曲播放界面 25 | - [ ] 主播电台 26 | - [ ] 听歌识曲 27 | - [ ] 登录 28 | - [ ] 添加关注 29 | 30 | | 发现界面 | 我的界面 | 账号界面 | 31 | | :------------------------------------------------: | :----------------------------------------------: | :-------------------------------------------------: | 32 | | | | | 33 | 34 | | 推荐歌单列表 | 暂无 | 暂无 | 35 | | :----------------------------------------------------: | :--: | :--: | 36 | | | 暂无 | 暂无 | 37 | 38 | 安装包版本下载 39 | 40 | ### android v0.1.0 41 | 42 | [v0.1.0 apk 文件下载](https://github.com/UvDream/flutter_netease_cloud_music/releases/download/v0.1.0/app-release.apk "v0.1.0") 43 | 44 | Flutter QQ 交流群(167646174) 45 | 46 | 47 | 48 | Flutter 微信交流群 49 | 50 | 51 | -------------------------------------------------------------------------------- /lib/pages/my/top_area.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | 4 | class TopAreaPage extends StatelessWidget { 5 | @override 6 | Widget build(BuildContext context) { 7 | return Container( 8 | alignment: Alignment.center, 9 | height: ScreenUtil().setHeight(150), 10 | color: Colors.white, 11 | child: Container( 12 | decoration: BoxDecoration( 13 | border: Border( 14 | bottom: BorderSide( 15 | width: 1, 16 | color: Color(0xffe6e6e6), 17 | ), 18 | ), 19 | ), 20 | child: ListView( 21 | scrollDirection: Axis.horizontal, 22 | children: [ 23 | _block(0xe60b, 18.0, '私人FM'), 24 | _block(0xe60f, 18.0, 'Sati空间'), 25 | _block(0xe64a, 18.0, '私藏空间'), 26 | _block(0xe60b, 18.0, '因乐交友'), 27 | _block(0xe600, 18.0, '亲子频道'), 28 | _block(0xe60e, 18.0, '古典专区'), 29 | _block(0xe607, 18.0, '跑步FM'), 30 | _block(0xe6e3, 18.0, '驾驶模式'), 31 | _block(0xe604, 18.0, '编辑'), 32 | ], 33 | ), 34 | )); 35 | } 36 | 37 | Widget _block(icon, fontSize, title) { 38 | return Container( 39 | width: ScreenUtil().setWidth(150), 40 | child: Column( 41 | crossAxisAlignment: CrossAxisAlignment.center, 42 | mainAxisAlignment: MainAxisAlignment.center, 43 | children: [ 44 | Container( 45 | width: ScreenUtil().setWidth(70), 46 | height: ScreenUtil().setWidth(70), 47 | margin: EdgeInsets.only(bottom: 5), 48 | decoration: BoxDecoration( 49 | color: title == '编辑' ? Colors.black12 : Colors.red, 50 | borderRadius: BorderRadius.circular(70), 51 | ), 52 | child: Icon( 53 | IconData(icon, fontFamily: 'IconFont'), 54 | size: fontSize, 55 | color: Colors.white, 56 | ), 57 | ), 58 | Text(title, style: TextStyle(fontSize: ScreenUtil().setSp(22))), 59 | ], 60 | ), 61 | ); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /lib/pages/find/find.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: wangzhongjie 3 | * @Date: 2019-02-18 17:08:30 4 | * @LastEditors: wangzhongjie 5 | * @LastEditTime: 2019-08-20 14:33:26 6 | * @Description: 发现 7 | * @Email: uvdream@163.com 8 | */ 9 | import 'package:flutter/material.dart'; 10 | import './search.dart'; 11 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 12 | import './swipper.dart'; 13 | import './top_navigation.dart'; 14 | import './recommend_song_list.dart'; 15 | import './new_dish.dart'; 16 | import '../../components/play.dart'; 17 | 18 | class FindPage extends StatefulWidget { 19 | @override 20 | _FindPageState createState() => _FindPageState(); 21 | } 22 | 23 | class _FindPageState extends State 24 | with AutomaticKeepAliveClientMixin { 25 | // 保持状态 26 | @override 27 | bool get wantKeepAlive => true; 28 | @override 29 | Widget build(BuildContext context) { 30 | ScreenUtil.instance = ScreenUtil(width: 750, height: 1334)..init(context); 31 | return MaterialApp( 32 | debugShowCheckedModeBanner: false, 33 | theme: ThemeData(primaryColor: Colors.red), 34 | home: Scaffold( 35 | appBar: AppBar( 36 | // 改变状态栏字体颜色 37 | brightness: Brightness.light, 38 | // 改变状态栏背景颜色 39 | backgroundColor: Colors.white, 40 | titleSpacing: 0, 41 | leading: InkWell( 42 | onTap: () {}, 43 | child: Container( 44 | // color: Colors.green, 45 | child: Icon( 46 | IconData(0xe64f, fontFamily: 'IconFont'), 47 | size: 25, 48 | color: Colors.black, 49 | ), 50 | ), 51 | ), 52 | title: SearchArea(), 53 | elevation: 0, 54 | centerTitle: true, 55 | actions: [PlayButton()], 56 | ), 57 | body: ListView( 58 | children: [ 59 | Container( 60 | color: Colors.white, 61 | child: Column( 62 | children: [ 63 | SwiperPage(), 64 | TopNavigation(), 65 | RecommendSongList(buildContext: context), 66 | NewDishPage(), 67 | ], 68 | ), 69 | ) 70 | ], 71 | ), 72 | ), 73 | ); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /lib/model/recommend_song_list.dart: -------------------------------------------------------------------------------- 1 | class RecommendSongListModel { 2 | bool hasTaste; 3 | int code; 4 | int category; 5 | List result; 6 | 7 | RecommendSongListModel( 8 | {this.hasTaste, this.code, this.category, this.result}); 9 | 10 | RecommendSongListModel.fromJson(Map json) { 11 | hasTaste = json['hasTaste']; 12 | code = json['code']; 13 | category = json['category']; 14 | if (json['result'] != null) { 15 | result = new List(); 16 | json['result'].forEach((v) { 17 | result.add(new Result.fromJson(v)); 18 | }); 19 | } 20 | } 21 | 22 | Map toJson() { 23 | final Map data = new Map(); 24 | data['hasTaste'] = this.hasTaste; 25 | data['code'] = this.code; 26 | data['category'] = this.category; 27 | if (this.result != null) { 28 | data['result'] = this.result.map((v) => v.toJson()).toList(); 29 | } 30 | return data; 31 | } 32 | } 33 | 34 | class Result { 35 | int id; 36 | int type; 37 | String name; 38 | String copywriter; 39 | String picUrl; 40 | bool canDislike; 41 | int playCount; 42 | int trackCount; 43 | bool highQuality; 44 | String alg; 45 | 46 | Result( 47 | {this.id, 48 | this.type, 49 | this.name, 50 | this.copywriter, 51 | this.picUrl, 52 | this.canDislike, 53 | this.playCount, 54 | this.trackCount, 55 | this.highQuality, 56 | this.alg}); 57 | 58 | Result.fromJson(Map json) { 59 | id = json['id']; 60 | type = json['type']; 61 | name = json['name']; 62 | copywriter = json['copywriter']; 63 | picUrl = json['picUrl']; 64 | canDislike = json['canDislike']; 65 | playCount = json['playCount']; 66 | trackCount = json['trackCount']; 67 | highQuality = json['highQuality']; 68 | alg = json['alg']; 69 | } 70 | 71 | Map toJson() { 72 | final Map data = new Map(); 73 | data['id'] = this.id; 74 | data['type'] = this.type; 75 | data['name'] = this.name; 76 | data['copywriter'] = this.copywriter; 77 | data['picUrl'] = this.picUrl; 78 | data['canDislike'] = this.canDislike; 79 | data['playCount'] = this.playCount; 80 | data['trackCount'] = this.trackCount; 81 | data['highQuality'] = this.highQuality; 82 | data['alg'] = this.alg; 83 | return data; 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /lib/pages/player/player.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: wangzhongjie 3 | * @Date: 2019-09-02 09:23:21 4 | * @LastEditors: wangzhongjie 5 | * @LastEditTime: 2019-09-03 16:34:36 6 | * @Description: 播放界面 7 | * @Email: UvDream@163.com 8 | */ 9 | import 'dart:ui'; 10 | 11 | import 'package:flutter/material.dart'; 12 | import './palyer_title.dart'; 13 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 14 | import './player_content.dart'; 15 | import './btn_group.dart'; 16 | import './slider.dart'; 17 | import './play_group.dart'; 18 | 19 | class PlayerPage extends StatelessWidget { 20 | final String songId; 21 | PlayerPage(this.songId); 22 | @override 23 | Widget build(BuildContext context) { 24 | print("歌曲详情id=${this.songId}"); 25 | return Scaffold( 26 | body: Stack( 27 | children: [ 28 | PlayerBackground( 29 | music: 30 | "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1567503437930&di=f6d79426d7fdf2345f5cff9701f8eb05&imgtype=0&src=http%3A%2F%2Fimg0.cache.hxsd.com%2Fnews%2F2010%2F09%2F20%2F202045036454.jpg"), 31 | Material( 32 | color: Colors.transparent, 33 | child: Column( 34 | children: [ 35 | PlayingTitle(), 36 | PlayerContent(), 37 | BtnGroup(), 38 | SliderBar(), 39 | PlayGroup(), 40 | ], 41 | ), 42 | ) 43 | ], 44 | ), 45 | ); 46 | } 47 | } 48 | 49 | // 播放器模糊背景利用高斯模糊 50 | class PlayerBackground extends StatelessWidget { 51 | final music; 52 | const PlayerBackground({Key key, this.music}) : super(key: key); 53 | @override 54 | Widget build(BuildContext context) { 55 | return Container( 56 | child: Stack( 57 | fit: StackFit.passthrough, 58 | children: [ 59 | Opacity( 60 | opacity: 1, 61 | child: Container( 62 | height: ScreenUtil().setHeight(1334), 63 | color: Colors.red, 64 | child: Image.network( 65 | music, 66 | fit: BoxFit.fill, 67 | ), 68 | ), 69 | ), 70 | BackdropFilter( 71 | filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10), 72 | child: Container( 73 | color: Colors.black.withOpacity(0.3), 74 | ), 75 | ) 76 | ], 77 | ), 78 | ); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def parse_KV_file(file, separator='=') 14 | file_abs_path = File.expand_path(file) 15 | if !File.exists? file_abs_path 16 | return []; 17 | end 18 | pods_ary = [] 19 | skip_line_start_symbols = ["#", "/"] 20 | File.foreach(file_abs_path) { |line| 21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } 22 | plugin = line.split(pattern=separator) 23 | if plugin.length == 2 24 | podname = plugin[0].strip() 25 | path = plugin[1].strip() 26 | podpath = File.expand_path("#{path}", file_abs_path) 27 | pods_ary.push({:name => podname, :path => podpath}); 28 | else 29 | puts "Invalid plugin specification: #{line}" 30 | end 31 | } 32 | return pods_ary 33 | end 34 | 35 | target 'Runner' do 36 | use_frameworks! 37 | 38 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock 39 | # referring to absolute paths on developers' machines. 40 | system('rm -rf .symlinks') 41 | system('mkdir -p .symlinks/plugins') 42 | 43 | # Flutter Pods 44 | generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig') 45 | if generated_xcode_build_settings.empty? 46 | puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first." 47 | end 48 | generated_xcode_build_settings.map { |p| 49 | if p[:name] == 'FLUTTER_FRAMEWORK_DIR' 50 | symlink = File.join('.symlinks', 'flutter') 51 | File.symlink(File.dirname(p[:path]), symlink) 52 | pod 'Flutter', :path => File.join(symlink, File.basename(p[:path])) 53 | end 54 | } 55 | 56 | # Plugin Pods 57 | plugin_pods = parse_KV_file('../.flutter-plugins') 58 | plugin_pods.map { |p| 59 | symlink = File.join('.symlinks', 'plugins', p[:name]) 60 | File.symlink(p[:path], symlink) 61 | pod p[:name], :path => File.join(symlink, 'ios') 62 | } 63 | end 64 | 65 | post_install do |installer| 66 | installer.pods_project.targets.each do |target| 67 | target.build_configurations.each do |config| 68 | config.build_settings['ENABLE_BITCODE'] = 'NO' 69 | end 70 | end 71 | end 72 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/pages/find/swipper.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../../config/http.dart'; 3 | import '../../config/service_url.dart'; 4 | import 'package:flutter_swiper/flutter_swiper.dart'; 5 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 6 | 7 | class SwiperPage extends StatefulWidget { 8 | @override 9 | _SwiperPageState createState() => _SwiperPageState(); 10 | } 11 | 12 | class _SwiperPageState extends State { 13 | List SwiperList = []; 14 | var formData = {'type': 'iphone'}; 15 | @override 16 | void initState() { 17 | super.initState(); 18 | _getBanner(); 19 | } 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return FutureBuilder( 24 | future: fetch(servicePath['findSwiper'], formData: formData), 25 | builder: (context, snapshot) { 26 | if (snapshot.hasData) { 27 | return Container( 28 | margin: EdgeInsets.only(top: 20), 29 | width: ScreenUtil().setWidth(688), 30 | height: ScreenUtil().setHeight(265), 31 | // decoration: BoxDecoration( 32 | // border: Border.all(width: 2, color: Colors.red), 33 | // borderRadius: BorderRadius.circular(ScreenUtil().setHeight(95)), 34 | // ), 35 | child: Swiper( 36 | itemWidth: 100, 37 | pagination: SwiperPagination(), 38 | autoplay: true, 39 | itemCount: SwiperList.length, 40 | itemBuilder: (BuildContext context, int index) { 41 | return InkWell( 42 | onTap: () {}, 43 | child: ClipRRect( 44 | borderRadius: BorderRadius.circular(20), 45 | child: FadeInImage.assetNetwork( 46 | placeholder: 'images/placeholder.png', 47 | image: '${SwiperList[index]['imageUrl']}', 48 | fit: BoxFit.fill, 49 | ), 50 | )); 51 | }, 52 | ), 53 | ); 54 | } else { 55 | return Text('数据加载中'); 56 | } 57 | }, 58 | ); 59 | } 60 | 61 | void _getBanner() async { 62 | // print('开始'); 63 | var formData = {'type': 'iphone'}; 64 | await fetch(servicePath['findSwiper'], formData: formData).then((val) { 65 | // print('返回参数了'); 66 | List newGoodsList = (val['banners'] as List).cast(); 67 | // print(newGoodsList); 68 | setState(() { 69 | SwiperList = newGoodsList; 70 | }); 71 | }); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /lib/pages/player/palyer_title.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: wangzhongjie 3 | * @Date: 2019-09-03 14:12:00 4 | * @LastEditors: wangzhongjie 5 | * @LastEditTime: 2019-09-03 15:08:43 6 | * @Description: 播放界面AppBar 7 | * @Email: UvDream@163.com 8 | */ 9 | import 'package:flutter/material.dart'; 10 | import 'package:flutter/widgets.dart'; 11 | import '../../material/marquee.text.dart'; 12 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 13 | 14 | class PlayingTitle extends StatelessWidget { 15 | @override 16 | Widget build(BuildContext context) { 17 | return AppBar( 18 | brightness: Brightness.dark, 19 | leading: InkWell( 20 | onTap: () { 21 | Navigator.pop(context); 22 | }, 23 | child: Container( 24 | child: Icon(IconData(0xe707, fontFamily: 'IconFont'), 25 | color: Colors.white), 26 | ), 27 | ), 28 | backgroundColor: Colors.transparent, 29 | elevation: 0, 30 | titleSpacing: 0, 31 | title: InkWell( 32 | onTap: () {}, 33 | child: Container( 34 | child: Column( 35 | children: [ 36 | MarqueeText.rich( 37 | TextSpan( 38 | text: "很长的标题就是很长", style: TextStyle(color: Colors.white)), 39 | ), 40 | Container( 41 | alignment: Alignment.center, 42 | child: Row( 43 | mainAxisAlignment: MainAxisAlignment.center, 44 | crossAxisAlignment: CrossAxisAlignment.center, 45 | children: [ 46 | Container( 47 | child: Text( 48 | '周几轮', 49 | style: TextStyle( 50 | fontSize: ScreenUtil().setSp(25), 51 | color: Colors.white), 52 | ), 53 | ), 54 | Container( 55 | child: Icon( 56 | Icons.chevron_right, 57 | color: Colors.white, 58 | ), 59 | ) 60 | ], 61 | ), 62 | ) 63 | ], 64 | ), 65 | ), 66 | ), 67 | actions: [ 68 | InkWell( 69 | onTap: () {}, 70 | child: Container( 71 | width: ScreenUtil().setWidth(100), 72 | alignment: Alignment.center, 73 | child: Icon( 74 | IconData(0xe654, fontFamily: "IconFont"), 75 | color: Colors.white, 76 | ), 77 | ), 78 | ) 79 | ], 80 | ); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | def keystoreProperties = new Properties() 28 | def keystorePropertiesFile = rootProject.file('key.properties') 29 | if (keystorePropertiesFile.exists()) { 30 | keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) 31 | } 32 | android { 33 | compileSdkVersion 27 34 | 35 | sourceSets { 36 | main.java.srcDirs += 'src/main/kotlin' 37 | } 38 | 39 | lintOptions { 40 | disable 'InvalidPackage' 41 | } 42 | 43 | defaultConfig { 44 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 45 | applicationId "com.uvdream.flutterneteasecloudmusic" 46 | minSdkVersion 16 47 | targetSdkVersion 27 48 | versionCode flutterVersionCode.toInteger() 49 | versionName flutterVersionName 50 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 51 | } 52 | 53 | signingConfigs { 54 | release { 55 | keyAlias keystoreProperties['keyAlias'] 56 | keyPassword keystoreProperties['keyPassword'] 57 | storeFile file(keystoreProperties['storeFile']) 58 | storePassword keystoreProperties['storePassword'] 59 | } 60 | } 61 | buildTypes { 62 | release { 63 | signingConfig signingConfigs.release 64 | } 65 | } 66 | } 67 | 68 | flutter { 69 | source '../..' 70 | } 71 | 72 | dependencies { 73 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 74 | testImplementation 'junit:junit:4.12' 75 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 76 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 77 | } 78 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_netease_cloud_music 2 | description: A new Flutter application. 3 | 4 | # The following defines the version and build number for your application. 5 | # A version number is three numbers separated by dots, like 1.2.43 6 | # followed by an optional build number separated by a +. 7 | # Both the version and the builder number may be overridden in flutter 8 | # build by specifying --build-name and --build-number, respectively. 9 | # Read more about versioning at semver.org. 10 | version: 1.0.0+1 11 | 12 | environment: 13 | sdk: ">=2.0.0-dev.68.0 <3.0.0" 14 | 15 | dependencies: 16 | flutter: 17 | sdk: flutter 18 | 19 | # The following adds the Cupertino Icons font to your application. 20 | # Use with the CupertinoIcons class for iOS style icons. 21 | cupertino_icons: ^0.1.2 22 | dio: ^2.0.9 23 | flutter_swiper: ^1.1.6 24 | flutter_screenutil: ^0.5.3 25 | flutter_easyrefresh: ^1.2.7 26 | fluro: ^1.4.0 27 | shared_preferences: ^0.5.1 28 | provider: ^3.0.0 29 | 30 | dev_dependencies: 31 | flutter_test: 32 | sdk: flutter 33 | 34 | # For information on the generic Dart part of this file, see the 35 | # following page: https://www.dartlang.org/tools/pub/pubspec 36 | 37 | # The following section is specific to Flutter. 38 | flutter: 39 | # The following line ensures that the Material Icons font is 40 | # included with your application, so that you can use the icons in 41 | # the material Icons class. 42 | uses-material-design: true 43 | 44 | # To add assets to your application, add an assets section, like this: 45 | assets: 46 | - images/ 47 | - images/bottom/ 48 | - images/icons/ 49 | - images/play/ 50 | 51 | # An image asset can refer to one or more resolution-specific "variants", see 52 | # https://flutter.io/assets-and-images/#resolution-aware. 53 | 54 | # For details regarding adding assets from package dependencies, see 55 | # https://flutter.io/assets-and-images/#from-packages 56 | 57 | # To add custom fonts to your application, add a fonts section here, 58 | # in this "flutter" section. Each entry in this list should have a 59 | # "family" key with the font family name, and a "fonts" key with a 60 | # list giving the asset and other descriptors for the font. For 61 | # example: 62 | fonts: 63 | - family: IconFont 64 | fonts: 65 | - asset: assets/fonts/iconfont.ttf 66 | # - family: Schyler 67 | # fonts: 68 | # - asset: fonts/Schyler-Regular.ttf 69 | # - asset: fonts/Schyler-Italic.ttf 70 | # style: italic 71 | # - family: Trajan Pro 72 | # fonts: 73 | # - asset: fonts/TrajanPro.ttf 74 | # - asset: fonts/TrajanPro_Bold.ttf 75 | # weight: 700 76 | # 77 | # For details regarding fonts from package dependencies, 78 | # see https://flutter.io/custom-fonts/#from-packages 79 | -------------------------------------------------------------------------------- /lib/pages/song_list/bottom_model.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: wangzhongjie 3 | * @Date: 2019-08-26 13:46:44 4 | * @LastEditors: wangzhongjie 5 | * @LastEditTime: 2019-08-26 14:52:01 6 | * @Description: 举报底部弹出框 7 | * @Email: UvDream@163.com 8 | */ 9 | import 'package:flutter/cupertino.dart'; 10 | import 'package:flutter/material.dart'; 11 | import '../../provider/song_list/song_detail.dart'; 12 | import 'package:provider/provider.dart'; 13 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 14 | 15 | class BottomModel extends StatelessWidget { 16 | @override 17 | Widget build(BuildContext context) { 18 | return Container( 19 | child: Column( 20 | crossAxisAlignment: CrossAxisAlignment.start, 21 | children: [ 22 | Container( 23 | alignment: Alignment.centerLeft, 24 | padding: EdgeInsets.only(left: 10.0), 25 | width: ScreenUtil().setWidth(750), 26 | height: ScreenUtil().setHeight(98), 27 | decoration: BoxDecoration( 28 | border: Border( 29 | bottom: BorderSide(width: 1, color: Colors.black12), 30 | ), 31 | ), 32 | child: Text( 33 | Provider.of(context).title, 34 | style: TextStyle(color: Colors.black54), 35 | ), 36 | ), 37 | InkWell( 38 | onTap: () { 39 | print('排序'); 40 | showModalBottomSheet( 41 | context: context, 42 | builder: (BuildContext context) { 43 | return Container( 44 | child: Text('data'), 45 | ); 46 | }); 47 | }, 48 | child: _rowElement(0xe7a3, '选择歌曲排序'), 49 | ), 50 | _rowElement(0xe6d9, '清空下载文件'), 51 | _rowElement(0xe61d, '举报'), 52 | ], 53 | ), 54 | ); 55 | } 56 | 57 | Widget _rowElement(icon, title) { 58 | return Container( 59 | height: ScreenUtil().setHeight(98), 60 | child: Row( 61 | children: [ 62 | Container( 63 | width: ScreenUtil().setWidth(50), 64 | margin: EdgeInsets.only(left: 5, right: 5), 65 | child: Icon( 66 | IconData( 67 | icon, 68 | fontFamily: "IconFont", 69 | ), 70 | size: 20, 71 | ), 72 | ), 73 | Container( 74 | alignment: Alignment.centerLeft, 75 | width: ScreenUtil().setWidth(680), 76 | height: ScreenUtil().setHeight(98), 77 | decoration: BoxDecoration( 78 | border: Border( 79 | bottom: BorderSide(width: 1, color: Colors.black12), 80 | ), 81 | ), 82 | child: Text('$title'), 83 | ) 84 | ], 85 | ), 86 | ); 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/pages/find/top_navigation.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: wangzhongjie 3 | * @Date: 2019-07-29 08:28:16 4 | * @LastEditors: wangzhongjie 5 | * @LastEditTime: 2019-08-20 15:15:22 6 | * @Description: 首页顶部导航栏 7 | * @Email: uvdream@163.com 8 | */ 9 | import 'package:flutter/material.dart'; 10 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 11 | import '../../routers/application.dart'; 12 | 13 | class TopNavigation extends StatelessWidget { 14 | @override 15 | Widget build(BuildContext context) { 16 | return Container( 17 | width: ScreenUtil().setWidth(750), 18 | height: ScreenUtil().setHeight(200), 19 | color: Colors.white, 20 | child: Row( 21 | children: [ 22 | _containPage(0xe624, '每日推荐', 24.0, context), 23 | _containPage(0xe64b, '歌单', 20.0, context), 24 | _containPage(0xe608, '排行榜', 20.0, context), 25 | _containPage(0xe66b, '电台', 24.0, context), 26 | _containPage(0xe605, '直播', 24.0, context) 27 | ], 28 | ), 29 | ); 30 | } 31 | 32 | Widget _containPage( 33 | int icon, String title, double IconSize, BuildContext context) { 34 | int _date = new DateTime.now().day; 35 | return Container( 36 | decoration: BoxDecoration( 37 | border: 38 | Border(bottom: BorderSide(width: 1, color: Colors.black12))), 39 | width: ScreenUtil().setWidth(150), 40 | child: InkWell( 41 | onTap: () { 42 | Application.router.navigateTo(context, '/songList?id=0'); 43 | var now = new DateTime.now(); 44 | var date = new DateTime(now.day); 45 | print(date); 46 | print(now.day); 47 | }, 48 | child: Stack( 49 | alignment: Alignment.center, 50 | children: [ 51 | Column( 52 | children: [ 53 | Container( 54 | margin: EdgeInsets.only(top: 17, bottom: 8), 55 | width: ScreenUtil().setWidth(90), 56 | height: ScreenUtil().setWidth(90), 57 | alignment: Alignment.center, 58 | decoration: BoxDecoration( 59 | color: Colors.red, 60 | borderRadius: BorderRadius.circular(45)), 61 | child: Icon( 62 | IconData(icon, fontFamily: 'IconFont'), 63 | size: IconSize, 64 | color: Colors.white, 65 | ), 66 | ), 67 | Text( 68 | title, 69 | style: TextStyle( 70 | fontSize: ScreenUtil().setSp(24), 71 | ), 72 | ) 73 | ], 74 | ), 75 | Positioned( 76 | top: ScreenUtil().setSp(76), 77 | child: title == '每日推荐' 78 | ? Text( 79 | '$_date', 80 | style: TextStyle(color: Colors.red, fontSize: 10), 81 | ) 82 | : Text(''), 83 | ) 84 | ], 85 | ))); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 56 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 77 | 83 | 84 | 85 | 86 | 88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /lib/material/flexible_app_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | ///the same as [FlexibleSpaceBar] 4 | class FlexibleDetailBar extends StatelessWidget { 5 | ///the content of bar 6 | ///scroll with the parent ScrollView 7 | final Widget content; 8 | 9 | ///the background of bar 10 | ///scroll in parallax 11 | final Widget background; 12 | 13 | ///custom content interaction with t 14 | ///[t] 0.0 -> Expanded 1.0 -> Collapsed to toolbar 15 | final Widget Function(BuildContext context, double t) builder; 16 | 17 | static double percentage(BuildContext context) { 18 | _FlexibleDetail value = 19 | context.inheritFromWidgetOfExactType(_FlexibleDetail); 20 | assert(value != null, 'ooh , can not find'); 21 | return value.t; 22 | } 23 | 24 | const FlexibleDetailBar({ 25 | Key key, 26 | @required this.content, 27 | this.builder, 28 | @required this.background, 29 | }) : assert(content != null), 30 | assert(background != null), 31 | super(key: key); 32 | 33 | @override 34 | Widget build(BuildContext context) { 35 | final FlexibleSpaceBarSettings settings = 36 | context.inheritFromWidgetOfExactType(FlexibleSpaceBarSettings); 37 | 38 | final List children = []; 39 | 40 | final double deltaExtent = settings.maxExtent - settings.minExtent; 41 | // 0.0 -> Expanded 42 | // 1.0 -> Collapsed to toolbar 43 | final double t = 44 | (1.0 - (settings.currentExtent - settings.minExtent) / deltaExtent) 45 | .clamp(0.0, 1.0); 46 | 47 | //背景添加视差滚动效果 48 | children.add(Positioned( 49 | top: -Tween(begin: 0.0, end: deltaExtent / 4.0).transform(t), 50 | left: 0, 51 | right: 0, 52 | height: settings.maxExtent, 53 | child: background, 54 | )); 55 | 56 | //为content 添加 底部的 padding 57 | double bottomPadding = 0; 58 | SliverAppBar sliverBar = context.ancestorWidgetOfExactType(SliverAppBar); 59 | if (sliverBar != null && sliverBar.bottom != null) { 60 | bottomPadding = sliverBar.bottom.preferredSize.height; 61 | } 62 | children.add(Positioned( 63 | top: settings.currentExtent - settings.maxExtent, 64 | left: 0, 65 | right: 0, 66 | height: settings.maxExtent, 67 | child: Opacity( 68 | opacity: 1 - t, 69 | child: Padding( 70 | padding: EdgeInsets.only(bottom: bottomPadding), 71 | child: Material( 72 | child: DefaultTextStyle( 73 | style: Theme.of(context).primaryTextTheme.body1, 74 | child: content), 75 | elevation: 0, 76 | color: Colors.transparent), 77 | ), 78 | ), 79 | )); 80 | 81 | if (builder != null) { 82 | children.add(Column(children: [builder(context, t)])); 83 | } 84 | 85 | return _FlexibleDetail(t, 86 | child: ClipRect( 87 | child: DefaultTextStyle( 88 | style: Theme.of(context).primaryTextTheme.body1, 89 | child: Stack(children: children, fit: StackFit.expand)))); 90 | } 91 | } 92 | 93 | class _FlexibleDetail extends InheritedWidget { 94 | ///0 : Expanded 95 | ///1 : Collapsed 96 | final double t; 97 | 98 | _FlexibleDetail(this.t, {Widget child}) : super(child: child); 99 | 100 | @override 101 | bool updateShouldNotify(_FlexibleDetail oldWidget) { 102 | return t != oldWidget.t; 103 | } 104 | } 105 | 106 | /// 107 | /// 用在 [FlexibleDetailBar.background] 108 | /// child上下滑动的时候会覆盖上黑色阴影 109 | /// 110 | class FlexShadowBackground extends StatelessWidget { 111 | final Widget child; 112 | 113 | const FlexShadowBackground({Key key, this.child}) : super(key: key); 114 | 115 | @override 116 | Widget build(BuildContext context) { 117 | var t = FlexibleDetailBar.percentage(context); 118 | t = Curves.ease.transform(t) / 2 + 0.2; 119 | return Container( 120 | foregroundDecoration: BoxDecoration(color: Colors.black.withOpacity(t)), 121 | child: child, 122 | ); 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /lib/model/swiper.dart: -------------------------------------------------------------------------------- 1 | class FindSwiperModel { 2 | List banners; 3 | int code; 4 | 5 | FindSwiperModel({this.banners, this.code}); 6 | 7 | FindSwiperModel.fromJson(Map json) { 8 | if (json['banners'] != null) { 9 | banners = new List(); 10 | json['banners'].forEach((v) { 11 | banners.add(new Banners.fromJson(v)); 12 | }); 13 | } 14 | code = json['code']; 15 | } 16 | 17 | Map toJson() { 18 | final Map data = new Map(); 19 | if (this.banners != null) { 20 | data['banners'] = this.banners.map((v) => v.toJson()).toList(); 21 | } 22 | data['code'] = this.code; 23 | return data; 24 | } 25 | } 26 | 27 | class Banners { 28 | String imageUrl; 29 | int targetId; 30 | Null adid; 31 | int targetType; 32 | String titleColor; 33 | String typeTitle; 34 | String url; 35 | bool exclusive; 36 | Null monitorImpress; 37 | Null monitorClick; 38 | Null monitorType; 39 | Null monitorImpressList; 40 | Null monitorClickList; 41 | Null monitorBlackList; 42 | Null extMonitor; 43 | Null extMonitorInfo; 44 | Null adSource; 45 | Null adLocation; 46 | String encodeId; 47 | Null program; 48 | Null event; 49 | Null video; 50 | Null song; 51 | String scm; 52 | 53 | Banners( 54 | {this.imageUrl, 55 | this.targetId, 56 | this.adid, 57 | this.targetType, 58 | this.titleColor, 59 | this.typeTitle, 60 | this.url, 61 | this.exclusive, 62 | this.monitorImpress, 63 | this.monitorClick, 64 | this.monitorType, 65 | this.monitorImpressList, 66 | this.monitorClickList, 67 | this.monitorBlackList, 68 | this.extMonitor, 69 | this.extMonitorInfo, 70 | this.adSource, 71 | this.adLocation, 72 | this.encodeId, 73 | this.program, 74 | this.event, 75 | this.video, 76 | this.song, 77 | this.scm}); 78 | 79 | Banners.fromJson(Map json) { 80 | imageUrl = json['imageUrl']; 81 | targetId = json['targetId']; 82 | adid = json['adid']; 83 | targetType = json['targetType']; 84 | titleColor = json['titleColor']; 85 | typeTitle = json['typeTitle']; 86 | url = json['url']; 87 | exclusive = json['exclusive']; 88 | monitorImpress = json['monitorImpress']; 89 | monitorClick = json['monitorClick']; 90 | monitorType = json['monitorType']; 91 | monitorImpressList = json['monitorImpressList']; 92 | monitorClickList = json['monitorClickList']; 93 | monitorBlackList = json['monitorBlackList']; 94 | extMonitor = json['extMonitor']; 95 | extMonitorInfo = json['extMonitorInfo']; 96 | adSource = json['adSource']; 97 | adLocation = json['adLocation']; 98 | encodeId = json['encodeId']; 99 | program = json['program']; 100 | event = json['event']; 101 | video = json['video']; 102 | song = json['song']; 103 | scm = json['scm']; 104 | } 105 | 106 | Map toJson() { 107 | final Map data = new Map(); 108 | data['imageUrl'] = this.imageUrl; 109 | data['targetId'] = this.targetId; 110 | data['adid'] = this.adid; 111 | data['targetType'] = this.targetType; 112 | data['titleColor'] = this.titleColor; 113 | data['typeTitle'] = this.typeTitle; 114 | data['url'] = this.url; 115 | data['exclusive'] = this.exclusive; 116 | data['monitorImpress'] = this.monitorImpress; 117 | data['monitorClick'] = this.monitorClick; 118 | data['monitorType'] = this.monitorType; 119 | data['monitorImpressList'] = this.monitorImpressList; 120 | data['monitorClickList'] = this.monitorClickList; 121 | data['monitorBlackList'] = this.monitorBlackList; 122 | data['extMonitor'] = this.extMonitor; 123 | data['extMonitorInfo'] = this.extMonitorInfo; 124 | data['adSource'] = this.adSource; 125 | data['adLocation'] = this.adLocation; 126 | data['encodeId'] = this.encodeId; 127 | data['program'] = this.program; 128 | data['event'] = this.event; 129 | data['video'] = this.video; 130 | data['song'] = this.song; 131 | data['scm'] = this.scm; 132 | return data; 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /lib/pages/account/column_block.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:flutter/cupertino.dart'; 4 | 5 | class ColumnBlock extends StatelessWidget { 6 | @override 7 | Widget build(BuildContext context) { 8 | return Container( 9 | child: Column( 10 | children: [ 11 | _firstBlock(), 12 | _twoBlock(), 13 | _threeBlock(), 14 | _fourBlock() 15 | ], 16 | ), 17 | ); 18 | } 19 | 20 | Widget _firstBlock() { 21 | return Container( 22 | margin: EdgeInsets.only(top: 8), 23 | color: Colors.white, 24 | child: Column( 25 | children: [ 26 | _block(0xe6d8, '口袋铃声', ''), 27 | _block(0xe616, '我的订单', '', true), 28 | ], 29 | ), 30 | ); 31 | } 32 | 33 | Widget _twoBlock() { 34 | return Container( 35 | margin: EdgeInsets.only(top: 8), 36 | color: Colors.white, 37 | child: Column( 38 | children: [ 39 | _block(0xe658, '设置', ''), 40 | _block(0xe633, '夜间模式', '', false, true), 41 | _block(0xe6b3, '定时关闭', ''), 42 | _block(0xe61b, '音乐闹钟', '', true), 43 | ], 44 | ), 45 | ); 46 | } 47 | 48 | Widget _threeBlock() { 49 | return Container( 50 | margin: EdgeInsets.only(top: 8), 51 | color: Colors.white, 52 | child: Column( 53 | children: [ 54 | _block(0xe622, '在线听歌免流量', ''), 55 | _block(0xe617, '优惠券', '', true), 56 | ], 57 | ), 58 | ); 59 | } 60 | 61 | Widget _fourBlock() { 62 | return Container( 63 | margin: EdgeInsets.only(top: 8), 64 | color: Colors.white, 65 | child: Column( 66 | children: [ 67 | _block(0xe61a, '我要直播', ''), 68 | _block(0xe67e, '分享网易云音乐', ''), 69 | _block(0xe627, '关于', '', true), 70 | ], 71 | ), 72 | ); 73 | } 74 | 75 | Widget _block(icon, title, num, [border = false, btn = false]) { 76 | return InkWell( 77 | onTap: () {}, 78 | child: Container( 79 | color: Colors.white, 80 | child: Row( 81 | children: [ 82 | Container( 83 | width: ScreenUtil().setWidth(152), 84 | height: ScreenUtil().setHeight(105), 85 | child: Icon( 86 | IconData(icon, fontFamily: 'IconFont'), 87 | ), 88 | ), 89 | Container( 90 | width: ScreenUtil().setWidth(598), 91 | height: ScreenUtil().setHeight(105), 92 | decoration: BoxDecoration( 93 | border: Border( 94 | bottom: BorderSide( 95 | width: 1, 96 | color: border ? Colors.white : Color(0xffe6e6e6), 97 | ), 98 | ), 99 | ), 100 | child: Row( 101 | children: [ 102 | Container( 103 | width: ScreenUtil().setWidth(250), 104 | child: Text(title), 105 | ), 106 | Container( 107 | alignment: Alignment.centerRight, 108 | width: btn 109 | ? ScreenUtil().setWidth(230) 110 | : ScreenUtil().setWidth(290), 111 | child: Text(num), 112 | ), 113 | Container( 114 | width: btn 115 | ? ScreenUtil().setWidth(110) 116 | : ScreenUtil().setWidth(50), 117 | alignment: Alignment.centerRight, 118 | child: btn 119 | ? CupertinoSwitch( 120 | value: true, 121 | onChanged: (bool val) {}, 122 | ) 123 | : Icon( 124 | Icons.chevron_right, 125 | color: Color(0xffe6e6e6), 126 | ), 127 | ) 128 | ], 129 | ), 130 | ) 131 | ], 132 | ), 133 | )); 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /lib/pages/song_list/song_list.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: wangzhongjie 3 | * @Date: 2019-08-09 15:24:30 4 | * @LastEditors: wangzhongjie 5 | * @LastEditTime: 2019-08-23 16:59:07 6 | * @Description: 歌单详情进入页面 7 | * @Email: UvDream@163.com 8 | */ 9 | import 'package:flutter/material.dart'; 10 | import './bottom_list.dart'; 11 | import 'package:async/async.dart'; 12 | import './top_area.dart'; 13 | import '../../provider/song_list/song_detail.dart'; 14 | import 'package:provider/provider.dart'; 15 | 16 | class SongListPage extends StatefulWidget { 17 | final String songListId; 18 | SongListPage(this.songListId); 19 | @override 20 | _SongListPageState createState() => _SongListPageState(); 21 | } 22 | 23 | class _SongListPageState extends State { 24 | AsyncMemoizer _memoizer = AsyncMemoizer(); 25 | @override 26 | Widget build(BuildContext context) { 27 | print('歌曲id+${widget.songListId}'); 28 | return Scaffold( 29 | body: FutureBuilder( 30 | future: _getDetail(context), 31 | builder: (context, snapshot) { 32 | if (snapshot.connectionState != ConnectionState.waiting) { 33 | return NestedScrollView( 34 | headerSliverBuilder: _sliverBuilder, 35 | body: 36 | BottomList(Provider.of(context).songList), 37 | ); 38 | } else { 39 | return Scaffold( 40 | appBar: AppBar( 41 | title: Text(''), 42 | elevation: 0, 43 | ), 44 | body: Center( 45 | child: Text('数据加载中!'), 46 | ), 47 | ); 48 | } 49 | }, 50 | ), 51 | ); 52 | } 53 | 54 | List _sliverBuilder(BuildContext context, bool innerBoxIsScrolled) { 55 | return [ 56 | TopArea(), 57 | // SliverPersistentHeader( 58 | // pinned: true, 59 | // delegate: _SliverAppBarDelegate(), 60 | // ) 61 | ]; 62 | } 63 | 64 | _getDetail(BuildContext context) { 65 | return _memoizer.runOnce(() async { 66 | return await Provider.of(context) 67 | .getSongDetail(widget.songListId); 68 | }); 69 | // await Provider.of(context) 70 | // .getSongDetail(widget.songListId); 71 | // return true; 72 | } 73 | } 74 | // class SongListPage extends StatelessWidget { 75 | // final String songListId; 76 | // SongListPage(this.songListId); 77 | // @override 78 | // Widget build(BuildContext context) { 79 | // return Scaffold( 80 | // body: FutureBuilder( 81 | // future: _getDetail(context), 82 | // builder: (context, snapshot) { 83 | // if (snapshot.hasData) { 84 | // return NestedScrollView( 85 | // headerSliverBuilder: _sliverBuilder, 86 | // body: BottomList(), 87 | // ); 88 | // } else { 89 | // return Scaffold( 90 | // appBar: AppBar(title: Text('')), 91 | // body: Center( 92 | // child: Text('数据加载中!'), 93 | // ), 94 | // ); 95 | // } 96 | // }, 97 | // ), 98 | // ); 99 | // } 100 | 101 | // List _sliverBuilder(BuildContext context, bool innerBoxIsScrolled) { 102 | // return [ 103 | // TopArea(), 104 | // // SliverPersistentHeader( 105 | // // pinned: true, 106 | // // delegate: _SliverAppBarDelegate(), 107 | // // ) 108 | // ]; 109 | // } 110 | 111 | // Future _getDetail(BuildContext context) async { 112 | // await Provider.of(context).getSongDetail(songListId); 113 | // return true; 114 | // } 115 | // } 116 | 117 | // 废弃的顶部 118 | // class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate { 119 | // @override 120 | // Widget build( 121 | // BuildContext context, double shrinkOffset, bool overlapsContent) { 122 | // return Container( 123 | // decoration: BoxDecoration( 124 | // color: Colors.red, 125 | // borderRadius: BorderRadius.only( 126 | // topLeft: Radius.circular(10), topRight: Radius.circular(10)), 127 | // ), 128 | // alignment: Alignment.center, 129 | // child: Text('我是一个头部部件', 130 | // style: TextStyle(color: Colors.white, fontSize: 30.0))); 131 | // } 132 | // // 头部展示内容 133 | 134 | // @override 135 | // double get maxExtent => 50.0; // 最大高度 136 | 137 | // @override 138 | // double get minExtent => 50.0; // 最小高度 139 | 140 | // @override 141 | // bool shouldRebuild(SliverPersistentHeaderDelegate oldDelegate) => false; 142 | // } 143 | -------------------------------------------------------------------------------- /lib/pages/song_list/bottom_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import '../../routers/application.dart'; 4 | 5 | class BottomList extends StatelessWidget { 6 | final List songList; 7 | BottomList(this.songList); 8 | @override 9 | Widget build(BuildContext context) { 10 | return Container( 11 | child: ListView.builder( 12 | padding: EdgeInsets.only(top: 0), 13 | itemBuilder: _itemBuilder, 14 | itemCount: songList.length, 15 | ), 16 | ); 17 | } 18 | 19 | Widget _itemBuilder(BuildContext context, int index) { 20 | // return ListTile( 21 | // leading: Text('${index + 1}'), 22 | // title: Text('${songList[index]['name']}'), 23 | // subtitle: Text('副标题'), 24 | // ); 25 | // print('列表数据------'); 26 | // print(songList[0]['mv']); 27 | return InkWell( 28 | onTap: () { 29 | Application.router 30 | .navigateTo(context, '/player?id=${songList[index]['id']}'); 31 | }, 32 | child: Container( 33 | margin: EdgeInsets.only(top: 10), 34 | height: ScreenUtil().setHeight(70), 35 | child: Row( 36 | children: [ 37 | Container( 38 | width: ScreenUtil().setWidth(82), 39 | alignment: Alignment.center, 40 | child: Text( 41 | '${index + 1}', 42 | style: TextStyle(color: Colors.black54), 43 | ), 44 | ), 45 | Container( 46 | // color: Colors.red, 47 | width: ScreenUtil().setWidth(500), 48 | alignment: Alignment.centerLeft, 49 | child: Column( 50 | mainAxisAlignment: MainAxisAlignment.center, 51 | children: [ 52 | Container( 53 | alignment: Alignment.centerLeft, 54 | child: Text( 55 | '${songList[index]['name']}', 56 | maxLines: 1, 57 | overflow: TextOverflow.ellipsis, 58 | ), 59 | ), 60 | Container( 61 | child: Row( 62 | children: [ 63 | _authLine(songList[index]['ar']), 64 | Text( 65 | '-', 66 | style: TextStyle( 67 | color: Colors.black45, 68 | fontSize: ScreenUtil().setSp(20), 69 | ), 70 | ), 71 | Expanded( 72 | child: Text( 73 | '${songList[index]['al']['name']}', 74 | maxLines: 1, 75 | overflow: TextOverflow.ellipsis, 76 | style: TextStyle( 77 | color: Colors.black45, 78 | fontSize: ScreenUtil().setSp(20), 79 | ), 80 | ), 81 | ) 82 | ], 83 | ), 84 | ) 85 | ], 86 | ), 87 | ), 88 | InkWell( 89 | onTap: () {}, 90 | child: Container( 91 | width: ScreenUtil().setWidth(100), 92 | height: ScreenUtil().setHeight(70), 93 | // color: Colors.green, 94 | child: songList[index]['mv'] != 0 95 | ? Icon( 96 | IconData(0xe623, fontFamily: 'IconFont'), 97 | size: 20, 98 | color: Colors.black45, 99 | ) 100 | : Text(''), 101 | ), 102 | ), 103 | InkWell( 104 | onTap: () {}, 105 | child: Container( 106 | width: ScreenUtil().setWidth(60), 107 | height: ScreenUtil().setHeight(70), 108 | child: Icon( 109 | IconData( 110 | 0xe612, 111 | fontFamily: "IconFont", 112 | ), 113 | color: Colors.black45, 114 | ), 115 | )), 116 | ], 117 | ), 118 | ), 119 | ); 120 | } 121 | 122 | Widget _authLine(list) { 123 | var name = ''; 124 | for (var item in list) { 125 | if (name == '') { 126 | name = '$name' + '${item['name']}'; 127 | } else { 128 | name = '$name' + '/' + '${item['name']}'; 129 | } 130 | } 131 | return Text( 132 | name, 133 | style: TextStyle( 134 | color: Colors.black45, 135 | fontSize: ScreenUtil().setSp(20), 136 | ), 137 | ); 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /lib/pages/find/recommend_song_list.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: wangzhongjie 3 | * @Date: 2019-07-29 11:43:47 4 | * @LastEditors: wangzhongjie 5 | * @LastEditTime: 2019-08-20 14:16:53 6 | * @Description: 推荐歌单 7 | * @Email: uvdream@163.com 8 | */ 9 | import 'package:flutter/material.dart'; 10 | import 'package:flutter/widgets.dart'; 11 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 12 | import '../../config/http.dart'; 13 | import '../../config/service_url.dart'; 14 | import '../../utils/number.dart'; 15 | import '../../routers/application.dart'; 16 | 17 | class RecommendSongList extends StatefulWidget { 18 | final BuildContext buildContext; 19 | RecommendSongList({this.buildContext}); 20 | @override 21 | _RecommendSongListState createState() => _RecommendSongListState(); 22 | } 23 | 24 | class _RecommendSongListState extends State { 25 | List SongListData = []; 26 | @override 27 | void initState() { 28 | super.initState(); 29 | _getSongList(); 30 | } 31 | 32 | @override 33 | Widget build(BuildContext context) { 34 | return Container( 35 | child: Container( 36 | color: Colors.white, 37 | width: ScreenUtil().setWidth(686), 38 | child: Column( 39 | children: [ 40 | _title(), 41 | _songList(context), 42 | ], 43 | ), 44 | )); 45 | } 46 | 47 | // 推荐歌单标题 48 | Widget _title() { 49 | return Container( 50 | height: ScreenUtil().setHeight(120), 51 | child: Row( 52 | children: [ 53 | Container( 54 | width: ScreenUtil().setWidth(532), 55 | child: Text( 56 | '推荐歌单', 57 | style: TextStyle( 58 | fontSize: ScreenUtil().setSp(32), 59 | fontWeight: FontWeight.bold), 60 | ), 61 | ), 62 | Container( 63 | width: ScreenUtil().setWidth(154), 64 | child: Container( 65 | width: ScreenUtil().setWidth(154), 66 | height: ScreenUtil().setHeight(60), 67 | alignment: Alignment.center, 68 | decoration: BoxDecoration( 69 | borderRadius: BorderRadius.circular(75), 70 | border: Border.all(width: 1, color: Colors.black12)), 71 | child: Text( 72 | '歌单广场', 73 | style: TextStyle(fontSize: ScreenUtil().setSp(26)), 74 | ), 75 | ), 76 | ) 77 | ], 78 | )); 79 | } 80 | 81 | // 推荐歌单 82 | Widget _songList(context) { 83 | if (SongListData.length > 0) { 84 | List listWidget = SongListData.map((val) { 85 | return InkWell( 86 | onTap: () { 87 | Application.router 88 | .navigateTo(widget.buildContext, '/songList?id=${val['id']}'); 89 | }, 90 | child: Container( 91 | width: ScreenUtil().setWidth(218), 92 | child: Column( 93 | children: [ 94 | _songBlock(val), 95 | Text( 96 | val['name'], 97 | maxLines: 2, 98 | overflow: TextOverflow.ellipsis, 99 | ) 100 | ], 101 | ), 102 | ), 103 | ); 104 | }).toList(); 105 | return Wrap( 106 | spacing: 3, 107 | children: listWidget, 108 | ); 109 | } else { 110 | return Center( 111 | child: Text('加载中'), 112 | ); 113 | } 114 | } 115 | 116 | Widget _songBlock(val) { 117 | return Container( 118 | child: Stack( 119 | children: [ 120 | // Image.network(val['picUrl']), 121 | ClipRRect( 122 | borderRadius: BorderRadius.circular(4), 123 | child: FadeInImage.assetNetwork( 124 | placeholder: 'images/place_block.png', 125 | image: val['picUrl'], 126 | fit: BoxFit.fill, 127 | ), 128 | ), 129 | Positioned( 130 | right: 4, 131 | top: 2, 132 | child: Row( 133 | children: [ 134 | Icon( 135 | IconData(0xe62f, fontFamily: 'IconFont'), 136 | color: Colors.white, 137 | size: 15, 138 | ), 139 | Text( 140 | '${getFormattedNumber(val['playCount'])}', 141 | style: TextStyle(color: Colors.white), 142 | ) 143 | ], 144 | ), 145 | ) 146 | ], 147 | ), 148 | ); 149 | } 150 | 151 | void _getSongList() async { 152 | await fetch(servicePath['songListApi']).then((val) { 153 | // print('111$val'); 154 | // print('------------------推荐歌单------------------------'); 155 | List data = (val['result'] as List).cast(); 156 | data.removeRange(6, data.length); 157 | // print(data); 158 | setState(() { 159 | SongListData = data; 160 | }); 161 | }); 162 | } 163 | } 164 | -------------------------------------------------------------------------------- /lib/pages/song_list/song_auth.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: wangzhongjie 3 | * @Date: 2019-08-19 16:51:48 4 | * @LastEditors: wangzhongjie 5 | * @LastEditTime: 2019-08-26 10:54:58 6 | * @Description: 歌单作者以及简介 7 | * @Email: UvDream@163.com 8 | */ 9 | import 'package:flutter/material.dart'; 10 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 11 | import '../../provider/song_list/song_detail.dart'; 12 | import 'package:provider/provider.dart'; 13 | import '../../utils/number.dart'; 14 | 15 | class AuthDescription extends StatelessWidget { 16 | @override 17 | Widget build(BuildContext context) { 18 | var message = Provider.of(context); 19 | return Container( 20 | margin: EdgeInsets.only(top: ScreenUtil().setHeight(142.0)), 21 | child: Row( 22 | mainAxisAlignment: MainAxisAlignment.center, 23 | children: [ 24 | _imgAvatar(context, message.songImg, message.playCount), 25 | _description(context, message), 26 | ], 27 | ), 28 | ); 29 | } 30 | 31 | // 头像区域 32 | Widget _imgAvatar(context, imgUrl, count) { 33 | return Container( 34 | child: Stack( 35 | children: [ 36 | Container( 37 | width: ScreenUtil().setWidth(280), 38 | height: ScreenUtil().setWidth(280), 39 | child: ClipRRect( 40 | borderRadius: BorderRadius.circular(4), 41 | child: FadeInImage.assetNetwork( 42 | placeholder: 'images/place_block.png', 43 | image: imgUrl, 44 | fit: BoxFit.fill, 45 | ), 46 | ), 47 | ), 48 | Positioned( 49 | right: 4, 50 | top: 2, 51 | child: Row( 52 | children: [ 53 | Icon( 54 | IconData(0xe62f, fontFamily: 'IconFont'), 55 | color: Colors.white, 56 | size: 15, 57 | ), 58 | Text( 59 | '${getFormattedNumber(count)}', 60 | style: TextStyle(color: Colors.white), 61 | ), 62 | ], 63 | ), 64 | ) 65 | ], 66 | ), 67 | ); 68 | } 69 | 70 | // 作者以及简介 71 | Widget _description(context, message) { 72 | return Container( 73 | margin: EdgeInsets.only(left: ScreenUtil().setWidth(35)), 74 | width: ScreenUtil().setWidth(370), 75 | height: ScreenUtil().setWidth(280), 76 | child: Column( 77 | children: [ 78 | Text( 79 | message.title, 80 | maxLines: 2, 81 | overflow: TextOverflow.ellipsis, 82 | style: TextStyle( 83 | fontSize: ScreenUtil().setSp(38), 84 | color: Colors.white, 85 | ), 86 | ), 87 | _authLine(message), 88 | _message(message) 89 | ], 90 | ), 91 | ); 92 | } 93 | 94 | Widget _authLine(message) { 95 | return Container( 96 | margin: EdgeInsets.only(top: ScreenUtil().setHeight(10)), 97 | child: Row( 98 | children: [ 99 | Stack( 100 | children: [ 101 | Container( 102 | width: ScreenUtil().setWidth(66), 103 | child: ClipRRect( 104 | borderRadius: BorderRadius.circular(66), 105 | child: FadeInImage.assetNetwork( 106 | placeholder: 'images/place_block.png', 107 | image: message.avatarUrl, 108 | ), 109 | ), 110 | ), 111 | Positioned( 112 | bottom: 0, 113 | right: 0, 114 | child: Container( 115 | width: ScreenUtil().setWidth(24), 116 | height: ScreenUtil().setWidth(24), 117 | decoration: BoxDecoration( 118 | color: Colors.orange, 119 | borderRadius: BorderRadius.circular(24)), 120 | child: Icon( 121 | IconData(0xe620, fontFamily: 'IconFont'), 122 | size: 10, 123 | color: Colors.white, 124 | ), 125 | )) 126 | ], 127 | ), 128 | Container( 129 | width: ScreenUtil().setWidth(250), 130 | margin: EdgeInsets.only(left: 4), 131 | child: Text( 132 | message.nickName, 133 | style: TextStyle(color: Colors.white), 134 | maxLines: 1, 135 | overflow: TextOverflow.ellipsis, 136 | ), 137 | ), 138 | Icon(Icons.chevron_right, color: Colors.white), 139 | ], 140 | ), 141 | ); 142 | } 143 | 144 | Widget _message(message) { 145 | return Container( 146 | margin: EdgeInsets.only(top: ScreenUtil().setHeight(10)), 147 | child: Row( 148 | children: [ 149 | Container( 150 | width: ScreenUtil().setWidth(320), 151 | child: Text( 152 | message.description == null ? '暂无描述' : message.description, 153 | style: TextStyle(color: Colors.white), 154 | maxLines: 2, 155 | overflow: TextOverflow.ellipsis, 156 | ), 157 | ), 158 | Icon(Icons.chevron_right, color: Colors.white), 159 | ], 160 | ), 161 | ); 162 | } 163 | } 164 | -------------------------------------------------------------------------------- /lib/pages/song_list/top_area.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: wangzhongjie 3 | * @Date: 2019-08-12 11:18:06 4 | * @LastEditors: wangzhongjie 5 | * @LastEditTime: 2019-09-03 14:56:25 6 | * @Description: 顶部区域 7 | * @Email: UvDream@163.com 8 | */ 9 | import 'dart:ui'; 10 | import 'package:flutter/material.dart'; 11 | import '../../material/flexible_app_bar.dart'; 12 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 13 | import './song_auth.dart'; 14 | import './share_area.dart'; 15 | import '../../provider/song_list/song_detail.dart'; 16 | import 'package:provider/provider.dart'; 17 | import '../../material/marquee.text.dart'; 18 | import '../../components/play.dart'; 19 | import './bottom_model.dart'; 20 | 21 | class TopArea extends StatelessWidget { 22 | @override 23 | Widget build(BuildContext context) { 24 | var message = Provider.of(context); 25 | return SliverAppBar( 26 | elevation: 0, 27 | leading: 28 | Icon(IconData(0xe707, fontFamily: 'IconFont'), color: Colors.white), 29 | backgroundColor: Colors.transparent, 30 | expandedHeight: ScreenUtil().setHeight(550), 31 | pinned: true, 32 | bottom: _buildListHeader(context, message.trackCount), 33 | flexibleSpace: _PlaylistDetailHeader(message.songImg, message.title), 34 | ); 35 | } 36 | 37 | Widget _buildListHeader(BuildContext context, trackCount) { 38 | return MusicListHeader(trackCount); 39 | } 40 | } 41 | 42 | class _PlaylistDetailHeader extends StatelessWidget { 43 | final String songImg; 44 | final String title; 45 | _PlaylistDetailHeader(this.songImg, this.title); 46 | @override 47 | Widget build(BuildContext context) { 48 | return FlexibleDetailBar( 49 | background: PlayListHeaderBackground(imageUrl: songImg), 50 | content: TopContent(), 51 | builder: (context, t) => AppBar( 52 | brightness: Brightness.dark, 53 | leading: InkWell( 54 | onTap: () { 55 | Navigator.pop(context); 56 | }, 57 | child: Container( 58 | child: Icon(IconData(0xe707, fontFamily: 'IconFont'), 59 | color: Colors.white), 60 | ), 61 | ), 62 | centerTitle: true, 63 | title: t > 0.5 64 | ? MarqueeText.rich(TextSpan( 65 | text: title, style: TextStyle(color: Colors.white))) 66 | : Text( 67 | '歌单', 68 | style: TextStyle(color: Colors.white), 69 | ), 70 | // 解决头部问题 71 | backgroundColor: Colors.transparent, 72 | elevation: 0, 73 | actions: [ 74 | InkWell( 75 | onTap: () { 76 | showModalBottomSheet( 77 | context: context, 78 | backgroundColor: Colors.transparent, 79 | builder: (BuildContext context) { 80 | return Container( 81 | height: ScreenUtil().setHeight(392), 82 | decoration: BoxDecoration( 83 | color: Colors.white, 84 | borderRadius: BorderRadius.only( 85 | topLeft: Radius.circular(20), 86 | topRight: Radius.circular(20), 87 | ), 88 | ), 89 | child: BottomModel(), 90 | ); 91 | }); 92 | }, 93 | child: Icon( 94 | IconData( 95 | 0xe612, 96 | fontFamily: "IconFont", 97 | ), 98 | color: Colors.white, 99 | ), 100 | ), 101 | PlayButton( 102 | color: true, 103 | ) 104 | ], 105 | ), 106 | ); 107 | } 108 | } 109 | 110 | ///播放列表头部背景 111 | class PlayListHeaderBackground extends StatelessWidget { 112 | final String imageUrl; 113 | 114 | const PlayListHeaderBackground({Key key, @required this.imageUrl}) 115 | : super(key: key); 116 | 117 | @override 118 | Widget build(BuildContext context) { 119 | return Stack( 120 | fit: StackFit.passthrough, 121 | children: [ 122 | Opacity( 123 | opacity: 1, 124 | child: Image.network( 125 | imageUrl, 126 | fit: BoxFit.fitWidth, 127 | ), 128 | ), 129 | BackdropFilter( 130 | filter: ImageFilter.blur(sigmaX: 24, sigmaY: 24), 131 | child: Container(color: Colors.black.withOpacity(0.3)), 132 | ) 133 | ], 134 | ); 135 | } 136 | } 137 | 138 | ///音乐列表头 139 | class MusicListHeader extends StatelessWidget implements PreferredSizeWidget { 140 | MusicListHeader(this.count, {this.tail}); 141 | 142 | final int count; 143 | 144 | final Widget tail; 145 | 146 | @override 147 | Widget build(BuildContext context) { 148 | return ClipRRect( 149 | borderRadius: BorderRadius.vertical(top: Radius.circular(16)), 150 | child: Material( 151 | color: Theme.of(context).scaffoldBackgroundColor, 152 | elevation: 0, 153 | child: InkWell( 154 | onTap: () {}, 155 | child: SizedBox.fromSize( 156 | size: preferredSize, 157 | child: Row( 158 | children: [ 159 | Padding(padding: EdgeInsets.only(left: 16)), 160 | Icon( 161 | Icons.play_circle_outline, 162 | color: Theme.of(context).iconTheme.color, 163 | ), 164 | Padding(padding: EdgeInsets.only(left: 4)), 165 | Text( 166 | "播放全部", 167 | style: Theme.of(context).textTheme.body1, 168 | ), 169 | Padding(padding: EdgeInsets.only(left: 2)), 170 | Text( 171 | "(共$count首)", 172 | style: Theme.of(context).textTheme.caption, 173 | ), 174 | Spacer(), 175 | tail, 176 | ]..removeWhere((v) => v == null), 177 | ), 178 | ), 179 | ), 180 | ), 181 | ); 182 | } 183 | 184 | @override 185 | Size get preferredSize => const Size.fromHeight(50); 186 | } 187 | 188 | class TopContent extends StatelessWidget { 189 | @override 190 | Widget build(BuildContext context) { 191 | return Container( 192 | child: Column( 193 | children: [ 194 | AuthDescription(), 195 | ShareArea(), 196 | ], 197 | ), 198 | ); 199 | } 200 | } 201 | -------------------------------------------------------------------------------- /lib/bottom_navigation.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/widgets.dart'; 3 | import './pages/find/find.dart'; 4 | import './pages/account/account.dart'; 5 | import './pages/my/my.dart'; 6 | import './pages/friend/friend.dart'; 7 | import './pages/video/video.dart'; 8 | import 'package:provider/provider.dart'; 9 | import './provider/current_index.dart'; 10 | 11 | class BottomNavigationWidget extends StatelessWidget { 12 | final List _pageList = [ 13 | FindPage(), 14 | VideoPage(), 15 | MyPage(), 16 | FriendPage(), 17 | AccountPage(), 18 | ]; 19 | var currentIndex = 0; 20 | @override 21 | Widget build(BuildContext context) { 22 | var currentIndex = Provider.of(context).currentIndex; 23 | return Scaffold( 24 | body: IndexedStack( 25 | index: currentIndex, 26 | children: _pageList, 27 | ), 28 | bottomNavigationBar: BottomNavigationBar( 29 | onTap: (index) { 30 | Provider.of(context).changeIndex(index); 31 | }, 32 | type: BottomNavigationBarType.fixed, 33 | currentIndex: currentIndex, 34 | backgroundColor: Colors.white, 35 | elevation: 0, 36 | items: [ 37 | BottomNavigationBarItem( 38 | icon: Container( 39 | width: 30, 40 | child: currentIndex == 0 41 | ? Image.asset('images/bottom/find_selected.png') 42 | : Image.asset('images/bottom/find.png'), 43 | ), 44 | title: Text( 45 | '发现', 46 | style: TextStyle( 47 | color: currentIndex == 0 ? Colors.red : Colors.black, 48 | fontSize: 10, 49 | ), 50 | ), 51 | ), 52 | BottomNavigationBarItem( 53 | icon: Container( 54 | width:30, 55 | child: currentIndex == 1 56 | ? Image.asset('images/bottom/video_selected.png') 57 | : Image.asset('images/bottom/video.png'), 58 | ), 59 | title: Text('视频', style: TextStyle( 60 | color: currentIndex == 1 ? Colors.red : Colors.black, 61 | fontSize:10, 62 | ),), 63 | ), 64 | BottomNavigationBarItem( 65 | icon: Container( 66 | width: 30, 67 | child: currentIndex == 2 68 | ? Image.asset('images/bottom/my_selected.png') 69 | : Image.asset('images/bottom/my.png'), 70 | ), 71 | title: Text('我的', style: TextStyle( 72 | color: currentIndex == 2 ? Colors.red : Colors.black, 73 | fontSize: 10, 74 | ),), 75 | ), 76 | BottomNavigationBarItem( 77 | icon: Container( 78 | width: 30, 79 | child: currentIndex == 3 80 | ? Image.asset('images/bottom/friend_selected.png') 81 | : Image.asset('images/bottom/friend.png'), 82 | ), 83 | title: Text('朋友', style: TextStyle( 84 | color: currentIndex == 3 ? Colors.red : Colors.black, 85 | fontSize: 10, 86 | ),), 87 | ), 88 | BottomNavigationBarItem( 89 | icon: Container( 90 | width: 30, 91 | child: currentIndex == 4 92 | ? Image.asset('images/bottom/account_selected.png') 93 | : Image.asset('images/bottom/account.png'), 94 | ), 95 | title: Text('账号', style: TextStyle( 96 | color: currentIndex == 4 ? Colors.red : Colors.black, 97 | fontSize: 10, 98 | ),), 99 | ) 100 | ], 101 | ), 102 | ); 103 | } 104 | } 105 | // class BottomNavigationWidget extends StatefulWidget { 106 | // @override 107 | // State createState() => BottomNavigationWidgetState(); 108 | // } 109 | 110 | // class BottomNavigationWidgetState extends State { 111 | // int _tabIndex = 0; 112 | // var tabImages; 113 | // var appBarTitles = ['发现', '视频', '我的', '朋友', '账号']; 114 | // //存放5个页面,跟fragmentList一样 115 | 116 | // var _pageList; 117 | 118 | // //根据选择获得对应的normal或是press的img 119 | 120 | // Image getTabIcon(int curIndex) { 121 | // if (curIndex == _tabIndex) { 122 | // return tabImages[curIndex][1]; 123 | // } 124 | // return tabImages[curIndex][0]; 125 | // } 126 | 127 | // //获取bottomTab的颜色和文字 128 | 129 | // Text getTabTitle(int curIndex) { 130 | // if (curIndex == _tabIndex) { 131 | // return new Text(appBarTitles[curIndex], 132 | // style: new TextStyle(fontSize: 9.0, color: const Color(0xffD43C33))); 133 | // } else { 134 | // return new Text(appBarTitles[curIndex], 135 | // style: new TextStyle(fontSize: 9.0, color: const Color(0xff515151))); 136 | // } 137 | // } 138 | 139 | // // 根据image路径获取图片 140 | 141 | // Image getTabImage(path) { 142 | // return new Image.asset(path, width: 30.0, height: 30.0); 143 | // } 144 | 145 | // void initData() { 146 | // /* 147 | // * 初始化选中和未选中的icon 148 | // */ 149 | // tabImages = [ 150 | // [ 151 | // getTabImage('images/bottom/find.png'), 152 | // getTabImage('images/bottom/find_selected.png') 153 | // ], 154 | // [ 155 | // getTabImage('images/bottom/video.png'), 156 | // getTabImage('images/bottom/video_selected.png') 157 | // ], 158 | // [ 159 | // getTabImage('images/bottom/my.png'), 160 | // getTabImage('images/bottom/my_selected.png') 161 | // ], 162 | // [ 163 | // getTabImage('images/bottom/friend.png'), 164 | // getTabImage('images/bottom/friend_selected.png') 165 | // ], 166 | // [ 167 | // getTabImage('images/bottom/account.png'), 168 | // getTabImage('images/bottom/account_selected.png') 169 | // ], 170 | // ]; 171 | // /* 172 | // * 5个子界面 173 | // */ 174 | // _pageList = [ 175 | // FindPage(), 176 | // VideoPage(), 177 | // MyPage(), 178 | // FriendPage(), 179 | // AccountPage(), 180 | // ]; 181 | // } 182 | 183 | // @override 184 | // Widget build(BuildContext context) { 185 | // //初始化数据 186 | // initData(); 187 | // return Scaffold( 188 | // body: _pageList[_tabIndex], 189 | // bottomNavigationBar: new BottomNavigationBar( 190 | // backgroundColor: Colors.white, 191 | // elevation: 0, 192 | // items: [ 193 | // new BottomNavigationBarItem( 194 | // icon: getTabIcon(0), title: getTabTitle(0)), 195 | // new BottomNavigationBarItem( 196 | // icon: getTabIcon(1), title: getTabTitle(1)), 197 | // new BottomNavigationBarItem( 198 | // icon: getTabIcon(2), title: getTabTitle(2)), 199 | // new BottomNavigationBarItem( 200 | // icon: getTabIcon(3), title: getTabTitle(3)), 201 | // new BottomNavigationBarItem( 202 | // icon: getTabIcon(4), title: getTabTitle(4)), 203 | // ], 204 | // type: BottomNavigationBarType.fixed, 205 | // //默认选中首页 206 | // currentIndex: _tabIndex, 207 | // //点击事件 208 | // onTap: (index) { 209 | // setState(() { 210 | // _tabIndex = index; 211 | // }); 212 | // }, 213 | // )); 214 | // } 215 | // } 216 | -------------------------------------------------------------------------------- /lib/pages/find/new_dish.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:provider/provider.dart'; 4 | import '../../provider/find/new_dish.dart'; 5 | 6 | class NewDishPage extends StatelessWidget { 7 | @override 8 | Widget build(BuildContext context) { 9 | var dish = Provider.of(context); 10 | if (dish.songList.length == 0) { 11 | dish.getNewDish(); 12 | } 13 | if (Provider.of(context).songList.length > 0) { 14 | return Container( 15 | child: Container( 16 | color: Colors.white, 17 | width: ScreenUtil().setWidth(686), 18 | child: Column( 19 | children: [ 20 | _title(context), 21 | Row( 22 | crossAxisAlignment: CrossAxisAlignment.center, 23 | children: [ 24 | _newSong( 25 | context, 26 | Provider.of(context).songList[0] 27 | ['blurPicUrl'], 28 | Provider.of(context).songList[0]['name'], 29 | Provider.of(context).songList[0]['artist'] 30 | ['name'], 31 | ), 32 | _newSong( 33 | context, 34 | Provider.of(context).songList[1] 35 | ['blurPicUrl'], 36 | Provider.of(context).songList[1]['name'], 37 | Provider.of(context).songList[1]['artist'] 38 | ['name'], 39 | ), 40 | _newSong( 41 | context, 42 | Provider.of(context).songList[2] 43 | ['blurPicUrl'], 44 | Provider.of(context).songList[2]['name'], 45 | Provider.of(context).songList[2]['artist'] 46 | ['name'], 47 | ), 48 | ], 49 | ) 50 | ], 51 | ), 52 | ), 53 | ); 54 | } else { 55 | return Center(child: Text('数据加载中')); 56 | } 57 | } 58 | 59 | // 标题 60 | Widget _title(context) { 61 | return Container( 62 | height: ScreenUtil().setHeight(80), 63 | child: Row( 64 | children: [ 65 | Container( 66 | width: ScreenUtil().setWidth(532), child: _titleText(context)), 67 | Container( 68 | width: ScreenUtil().setWidth(154), 69 | child: Container( 70 | width: ScreenUtil().setWidth(154), 71 | height: ScreenUtil().setHeight(60), 72 | alignment: Alignment.center, 73 | decoration: BoxDecoration( 74 | borderRadius: BorderRadius.circular(75), 75 | border: Border.all(width: 1, color: Colors.black12)), 76 | child: Text( 77 | '新歌推荐', 78 | style: TextStyle(fontSize: ScreenUtil().setSp(26)), 79 | ), 80 | ), 81 | ) 82 | ], 83 | )); 84 | } 85 | 86 | // 标题切换新歌/新碟 87 | Widget _titleText(context) { 88 | return Row( 89 | children: [ 90 | InkWell( 91 | onTap: () { 92 | Provider.of(context).changeSelect(true); 93 | }, 94 | child: Container( 95 | alignment: Alignment.centerLeft, 96 | height: ScreenUtil().setWidth(40), 97 | width: ScreenUtil().setWidth(82), 98 | child: Text( 99 | '新碟', 100 | style: TextStyle( 101 | fontSize: ScreenUtil().setSp(32), 102 | color: Provider.of(context).isLeft 103 | ? Colors.black 104 | : Colors.black26), 105 | ), 106 | ), 107 | ), 108 | InkWell( 109 | onTap: () { 110 | Provider.of(context).changeSelect(false); 111 | }, 112 | child: Container( 113 | alignment: Alignment.centerRight, 114 | height: ScreenUtil().setWidth(40), 115 | width: ScreenUtil().setWidth(82), 116 | decoration: BoxDecoration( 117 | border: 118 | Border(left: BorderSide(width: 1, color: Colors.black12))), 119 | child: Text( 120 | '新歌', 121 | style: TextStyle( 122 | fontSize: ScreenUtil().setSp(32), 123 | color: Provider.of(context).isLeft 124 | ? Colors.black26 125 | : Colors.black), 126 | ), 127 | ), 128 | ), 129 | ], 130 | ); 131 | } 132 | 133 | // 内容 134 | Widget _newSong(context, url, name, auth) { 135 | return Container( 136 | width: ScreenUtil().setWidth(215), 137 | height: ScreenUtil().setWidth(290), 138 | margin: EdgeInsets.fromLTRB( 139 | ScreenUtil().setWidth(6), 140 | ScreenUtil().setWidth(16), 141 | ScreenUtil().setWidth(6), 142 | ScreenUtil().setWidth(30)), 143 | child: InkWell( 144 | onTap: () {}, 145 | child: Column( 146 | crossAxisAlignment: CrossAxisAlignment.start, 147 | mainAxisAlignment: MainAxisAlignment.start, 148 | children: [ 149 | Container( 150 | width: ScreenUtil().setWidth(215), 151 | height: ScreenUtil().setWidth(215), 152 | child: Stack( 153 | children: [ 154 | ClipRRect( 155 | borderRadius: BorderRadius.circular(4), 156 | child: FadeInImage.assetNetwork( 157 | placeholder: 'images/place_block.png', 158 | image: url, 159 | fit: BoxFit.fill, 160 | ), 161 | ), 162 | _empty(context), 163 | ], 164 | ), 165 | ), 166 | Text( 167 | name, 168 | maxLines: 1, 169 | overflow: TextOverflow.ellipsis, 170 | style: TextStyle(fontSize: ScreenUtil().setSp(24)), 171 | ), 172 | Text( 173 | auth, 174 | maxLines: 1, 175 | overflow: TextOverflow.ellipsis, 176 | style: TextStyle( 177 | fontSize: ScreenUtil().setSp(26), color: Colors.black45), 178 | ), 179 | ], 180 | ), 181 | ), 182 | ); 183 | } 184 | 185 | Widget _empty(context) { 186 | if (!Provider.of(context).isLeft) { 187 | return Positioned( 188 | bottom: 4, 189 | right: 4, 190 | child: Container( 191 | width: ScreenUtil().setWidth(62), 192 | height: ScreenUtil().setWidth(62), 193 | padding: EdgeInsets.only(left: 3), 194 | decoration: BoxDecoration( 195 | color: Color.fromRGBO(255, 255, 255, .5), 196 | borderRadius: BorderRadius.circular(62), 197 | ), 198 | child: Icon( 199 | IconData(0xe613, fontFamily: 'IconFont'), 200 | color: Color(0xffeb4d44), 201 | size: 18, 202 | ), 203 | ), 204 | ); 205 | } else { 206 | return Text(''); 207 | } 208 | } 209 | } 210 | -------------------------------------------------------------------------------- /lib/material/marquee.text.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: wangzhongjie 3 | * @Date: 2019-08-26 11:12:32 4 | * @LastEditors: wangzhongjie 5 | * @LastEditTime: 2019-08-26 11:18:09 6 | * @Description: 跑马灯插件 7 | * @Email: UvDream@163.com 8 | */ 9 | import 'package:flutter/foundation.dart'; 10 | import 'package:flutter/material.dart'; 11 | import 'package:flutter/rendering.dart'; 12 | 13 | ///默认的滚动速度 14 | const double _default_speed = 50.0; 15 | 16 | ///默认的两个文本之间的间隔 17 | const double _default_gap = 10.0; 18 | 19 | ///默认字体的放大倍数 20 | const double _default_text_scale_factor = 1.0; 21 | 22 | class MarqueeText extends StatelessWidget { 23 | const MarqueeText( 24 | this.data, { 25 | Key key, 26 | this.style, 27 | this.locale, 28 | this.gap = _default_gap, 29 | this.speed = _default_speed, 30 | this.textScaleFactor, 31 | }) : assert(data != null), 32 | this.textSpan = null, 33 | super(key: key); 34 | 35 | const MarqueeText.rich( 36 | this.textSpan, { 37 | Key key, 38 | this.style, 39 | this.gap = _default_gap, 40 | this.speed = _default_speed, 41 | this.locale, 42 | this.textScaleFactor, 43 | }) : assert(textSpan != null), 44 | data = null, 45 | super(key: key); 46 | 47 | /// 待显示的文本,如果[textSpan]提供了则不会null 48 | final String data; 49 | 50 | /// 待显示的文本,如果[data]提供了则不会null 51 | final TextSpan textSpan; 52 | 53 | ///字体的style,如果为空则用系统默认的style, 54 | final TextStyle style; 55 | 56 | /// 滚动速度,单位为 dp/秒 57 | final double speed; 58 | 59 | /// 区域设置 默认会通过Localizations.localeOf(context)得到 60 | final Locale locale; 61 | 62 | /// 滚动的文本之间的间隔,单位为dp 63 | final double textScaleFactor; 64 | 65 | /// 滚动的文本之间的间隔,单位为dp 66 | final double gap; 67 | 68 | @override 69 | Widget build(BuildContext context) { 70 | final DefaultTextStyle defaultTextStyle = DefaultTextStyle.of(context); 71 | TextStyle effectiveTextStyle = style; 72 | if (style == null || style.inherit) { 73 | effectiveTextStyle = defaultTextStyle.style.merge(style); 74 | } 75 | 76 | if (MediaQuery.boldTextOverride(context)) { 77 | effectiveTextStyle = effectiveTextStyle 78 | .merge(const TextStyle(fontWeight: FontWeight.bold)); 79 | } 80 | 81 | Widget result = MarqueeRichText( 82 | locale: locale, 83 | speed: speed, 84 | gap: gap, 85 | textScaleFactor: textScaleFactor ?? MediaQuery.textScaleFactorOf(context), 86 | text: TextSpan( 87 | style: effectiveTextStyle, 88 | text: data, 89 | children: textSpan != null ? [textSpan] : null, 90 | ), 91 | ); 92 | 93 | return result; 94 | } 95 | 96 | @override 97 | void debugFillProperties(DiagnosticPropertiesBuilder properties) { 98 | super.debugFillProperties(properties); 99 | properties.add(StringProperty('data', data, showName: false)); 100 | if (textSpan != null) { 101 | properties.add(textSpan.toDiagnosticsNode( 102 | name: 'textSpan', style: DiagnosticsTreeStyle.transition)); 103 | } 104 | properties.add( 105 | DoubleProperty('textScaleFactor', textScaleFactor, defaultValue: null)); 106 | properties 107 | .add(DoubleProperty('spped', speed, defaultValue: _default_speed)); 108 | properties.add(DoubleProperty('gap', gap, defaultValue: _default_gap)); 109 | } 110 | } 111 | 112 | class MarqueeRichText extends StatefulWidget { 113 | ///待展示的文本 114 | final TextSpan text; 115 | 116 | /// 滚动速度,单位为 dp/秒 117 | final double speed; 118 | 119 | /// 字体的缩放比例 例如缩放因子为1.5则文本将设置的字体大小放大50% 120 | final double textScaleFactor; 121 | 122 | /// 区域设置 默认会通过Localizations.localeOf(context)得到 123 | final Locale locale; 124 | 125 | /// 滚动的文本之间的间隔,单位为dp 126 | final double gap; 127 | 128 | /// Creates a marquee rich text widget. 129 | /// 130 | /// The [text], [gap], [speed] and [textScaleFactor] 131 | /// arguments must not be null. 132 | const MarqueeRichText( 133 | {Key key, 134 | @required this.text, 135 | this.gap = _default_gap, 136 | this.locale, 137 | this.textScaleFactor = _default_text_scale_factor, 138 | this.speed = _default_speed}) 139 | : assert(text != null), 140 | assert(gap != null && gap > 0), 141 | assert(speed != null && speed > 0), 142 | super(key: key); 143 | 144 | @override 145 | State createState() { 146 | return _MarqueRichTextState(); 147 | } 148 | } 149 | 150 | /// The state of marquee text 151 | class _MarqueRichTextState extends State 152 | with SingleTickerProviderStateMixin { 153 | @override 154 | Widget build(BuildContext context) { 155 | return new _MarqueRenderObjectWidget( 156 | text: widget.text, 157 | gap: widget.gap, 158 | locale: widget.locale, 159 | textScaleFactor: widget.textScaleFactor, 160 | speed: widget.speed, 161 | vsync: this, 162 | ); 163 | } 164 | } 165 | 166 | class _MarqueRenderObjectWidget extends LeafRenderObjectWidget { 167 | /// MarqueeRichText的render object 168 | /// 169 | ///[text] 参数 不能为空 170 | 171 | const _MarqueRenderObjectWidget({ 172 | Key key, 173 | @required this.text, 174 | this.textScaleFactor = 1.0, 175 | this.speed, 176 | this.vsync, 177 | this.locale, 178 | this.gap, 179 | }) : assert(text != null), 180 | assert(textScaleFactor != null), 181 | super(key: key); 182 | 183 | final TextSpan text; 184 | final double speed; 185 | final double textScaleFactor; 186 | final Locale locale; 187 | final double gap; 188 | 189 | /// See [TickerProvider] for more information. 190 | final TickerProvider vsync; 191 | 192 | @override 193 | _MarqueeRenderParagraph createRenderObject(BuildContext context) { 194 | return _MarqueeRenderParagraph(text, 195 | locale: locale, 196 | vsync: vsync, 197 | speed: speed, 198 | gap: gap, 199 | textScaleFactor: textScaleFactor); 200 | } 201 | 202 | @override 203 | void updateRenderObject( 204 | BuildContext context, _MarqueeRenderParagraph renderObject) { 205 | renderObject 206 | ..text = text 207 | ..speed = speed 208 | ..vsync = vsync 209 | ..gap = gap 210 | ..textScaleFactor = textScaleFactor 211 | ..locale = locale ?? Localizations.localeOf(context, nullOk: true); 212 | } 213 | 214 | @override 215 | void debugFillProperties(DiagnosticPropertiesBuilder properties) { 216 | super.debugFillProperties(properties); 217 | properties.add(DoubleProperty('textScaleFactor', textScaleFactor, 218 | defaultValue: _default_text_scale_factor)); 219 | properties 220 | .add(DoubleProperty('spped', speed, defaultValue: _default_speed)); 221 | properties.add(DoubleProperty('gap', gap, defaultValue: _default_gap)); 222 | properties.add(StringProperty('text', text.toPlainText())); 223 | } 224 | } 225 | 226 | class _MarqueeRenderParagraph extends RenderBox { 227 | AnimationController _controller; 228 | Animation _animation; 229 | double _width; 230 | TextPainter _textPainter; 231 | 232 | _MarqueeRenderParagraph(TextSpan textSpan, 233 | {Locale locale, 234 | TickerProvider vsync, 235 | double speed, 236 | double gap, 237 | double textScaleFactor}) 238 | : assert(textSpan != null), 239 | assert(textSpan.debugAssertIsValid()), 240 | _vsync = vsync, 241 | _speed = speed, 242 | _gap = gap, 243 | _textPainter = new TextPainter( 244 | text: textSpan, 245 | textDirection: TextDirection.ltr, 246 | locale: locale, 247 | textAlign: TextAlign.start, 248 | textScaleFactor: textScaleFactor, 249 | maxLines: 1, 250 | ) { 251 | _textPainter.layout(); 252 | _width = _textPainter.size.width + _gap; 253 | double duration = (_width * 1000) / speed; 254 | _controller = new AnimationController( 255 | vsync: vsync, 256 | duration: new Duration(milliseconds: duration.ceil()), 257 | ); 258 | _animation = Tween(begin: 0.0, end: 1.0).animate(_controller); 259 | _animation.addListener(() { 260 | markNeedsPaint(); 261 | }); 262 | _controller.repeat(); 263 | } 264 | 265 | @override 266 | void detach() { 267 | _controller.stop(); 268 | super.detach(); 269 | } 270 | 271 | bool get isRepaintBoundary => true; 272 | 273 | /// 文本滚动的速度 274 | double _speed; 275 | 276 | set speed(double value) { 277 | assert(value != null); 278 | if (value == _speed) return; 279 | _speed = value; 280 | _controller.duration = 281 | new Duration(milliseconds: (_width * 1000 / _speed).ceil()); 282 | _controller.forward(); 283 | } 284 | 285 | /// 滚动文本之间的间隔 286 | double _gap; 287 | 288 | set gap(double value) { 289 | assert(value != null); 290 | if (value == _gap) return; 291 | _gap = value; 292 | markNeedsPaint(); 293 | } 294 | 295 | TickerProvider get vsync => _vsync; 296 | TickerProvider _vsync; 297 | 298 | set vsync(TickerProvider value) { 299 | assert(value != null); 300 | if (value == _vsync) return; 301 | _vsync = value; 302 | _controller.resync(vsync); 303 | } 304 | 305 | TextSpan get text => _textPainter.text; 306 | 307 | /// 重新设置文本 308 | set text(TextSpan value) { 309 | assert(value != null); 310 | switch (_textPainter.text.compareTo(value)) { 311 | case RenderComparison.identical: 312 | case RenderComparison.metadata: 313 | return; 314 | case RenderComparison.paint: 315 | _textPainter.text = value; 316 | markNeedsPaint(); 317 | markNeedsSemanticsUpdate(); 318 | break; 319 | case RenderComparison.layout: 320 | _textPainter.text = value; 321 | _textPainter.layout(); 322 | _width = _textPainter.size.width + _gap; 323 | _controller.duration = 324 | new Duration(milliseconds: (_width * 1000 / _speed).ceil()); 325 | markNeedsLayout(); 326 | break; 327 | } 328 | } 329 | 330 | Locale get locale => _textPainter.locale; 331 | 332 | set locale(Locale value) { 333 | if (_textPainter.locale == value) return; 334 | _textPainter.locale = value; 335 | markNeedsLayout(); 336 | } 337 | 338 | double get textScaleFactor => _textPainter.textScaleFactor; 339 | 340 | set textScaleFactor(double value) { 341 | assert(value != null); 342 | if (_textPainter.textScaleFactor == value) return; 343 | _textPainter.textScaleFactor = value; 344 | _textPainter.layout(); 345 | _width = _textPainter.size.width + _gap; 346 | _controller.duration = 347 | new Duration(milliseconds: (_width * 1000 / _speed).ceil()); 348 | markNeedsLayout(); 349 | } 350 | 351 | void _layoutText({double minWidth = 0.0, double maxWidth = double.infinity}) { 352 | _textPainter.layout(minWidth: minWidth, maxWidth: maxWidth); 353 | } 354 | 355 | void _layoutTextWithConstraints(BoxConstraints constraints) { 356 | _layoutText(minWidth: constraints.minWidth, maxWidth: constraints.maxWidth); 357 | } 358 | 359 | @override 360 | double computeMinIntrinsicWidth(double height) { 361 | _layoutText(); 362 | return _textPainter.minIntrinsicWidth; 363 | } 364 | 365 | /// 视图的最大宽度 366 | @override 367 | double computeMaxIntrinsicWidth(double height) { 368 | _layoutText(); 369 | return _textPainter.maxIntrinsicWidth; 370 | } 371 | 372 | double _computeIntrinsicHeight(double width) { 373 | _layoutText(minWidth: width, maxWidth: width); 374 | return _textPainter.height; 375 | } 376 | 377 | /// 视图的最小高度 378 | @override 379 | double computeMinIntrinsicHeight(double width) { 380 | return _computeIntrinsicHeight(width); 381 | } 382 | 383 | /// 视图的最大高度 384 | @override 385 | double computeMaxIntrinsicHeight(double width) { 386 | return _computeIntrinsicHeight(width); 387 | } 388 | 389 | @override 390 | double computeDistanceToActualBaseline(TextBaseline baseline) { 391 | assert(!debugNeedsLayout); 392 | assert(constraints != null); 393 | assert(constraints.debugAssertIsValid()); 394 | _layoutTextWithConstraints(constraints); 395 | return _textPainter.computeDistanceToActualBaseline(baseline); 396 | } 397 | 398 | @override 399 | bool hitTestSelf(Offset position) => true; 400 | 401 | @override 402 | void handleEvent(PointerEvent event, BoxHitTestEntry entry) { 403 | assert(debugHandleEvent(event, entry)); 404 | if (event is! PointerDownEvent) return; 405 | _layoutTextWithConstraints(constraints); 406 | final Offset offset = entry.localPosition; 407 | final TextPosition position = _textPainter.getPositionForOffset(offset); 408 | final TextSpan span = _textPainter.text.getSpanForPosition(position); 409 | span?.recognizer?.addPointer(event); 410 | } 411 | 412 | @override 413 | void performLayout() { 414 | _layoutTextWithConstraints(constraints); 415 | size = constraints.constrain(_textPainter.size); 416 | } 417 | 418 | @override 419 | void paint(PaintingContext context, Offset offset) { 420 | _layoutTextWithConstraints(new BoxConstraints()); 421 | 422 | final Canvas canvas = context.canvas; 423 | canvas.save(); 424 | canvas 425 | .clipRect(Rect.fromLTWH(offset.dx, offset.dy, size.width, size.height)); 426 | 427 | double width = _textPainter.size.width + _gap; 428 | 429 | if (_textPainter.size.width >= size.width) { 430 | double scrollOffsetX = _animation.value * width; 431 | 432 | _textPainter.paint( 433 | canvas, offset.translate(offset.dx - scrollOffsetX, offset.dy)); 434 | 435 | if (width - scrollOffsetX + _gap < size.width) { 436 | _textPainter.paint( 437 | canvas, 438 | new Offset( 439 | offset.dx + (width - scrollOffsetX), 440 | offset.dy, 441 | )); 442 | } 443 | } else { 444 | int count = (size.width / width).ceil(); 445 | 446 | for (int i = 0; i < count + 1; i++) { 447 | _textPainter.paint( 448 | canvas, 449 | new Offset( 450 | offset.dx - _animation.value * width + width * i, offset.dy)); 451 | } 452 | } 453 | canvas.restore(); 454 | } 455 | } 456 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3937EF8A9EC395B785419F4B /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 722A7C9F488B18B2BAA97C28 /* Pods_Runner.framework */; }; 12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 13 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 14 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 15 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 16 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 17 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 18 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 19 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 20 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 21 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXCopyFilesBuildPhase section */ 25 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 26 | isa = PBXCopyFilesBuildPhase; 27 | buildActionMask = 2147483647; 28 | dstPath = ""; 29 | dstSubfolderSpec = 10; 30 | files = ( 31 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 32 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 33 | ); 34 | name = "Embed Frameworks"; 35 | runOnlyForDeploymentPostprocessing = 0; 36 | }; 37 | /* End PBXCopyFilesBuildPhase section */ 38 | 39 | /* Begin PBXFileReference section */ 40 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 41 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 42 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 43 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 44 | 722A7C9F488B18B2BAA97C28 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 46 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 47 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 48 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 49 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 50 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 51 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 52 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 53 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 54 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 55 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 56 | /* End PBXFileReference section */ 57 | 58 | /* Begin PBXFrameworksBuildPhase section */ 59 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 60 | isa = PBXFrameworksBuildPhase; 61 | buildActionMask = 2147483647; 62 | files = ( 63 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 64 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 65 | 3937EF8A9EC395B785419F4B /* Pods_Runner.framework in Frameworks */, 66 | ); 67 | runOnlyForDeploymentPostprocessing = 0; 68 | }; 69 | /* End PBXFrameworksBuildPhase section */ 70 | 71 | /* Begin PBXGroup section */ 72 | 2D95B220814234258ABD0C67 /* Frameworks */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | 722A7C9F488B18B2BAA97C28 /* Pods_Runner.framework */, 76 | ); 77 | name = Frameworks; 78 | sourceTree = ""; 79 | }; 80 | 4282E42A831F6298E06AF422 /* Pods */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | ); 84 | name = Pods; 85 | sourceTree = ""; 86 | }; 87 | 9740EEB11CF90186004384FC /* Flutter */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | 3B80C3931E831B6300D905FE /* App.framework */, 91 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 92 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 93 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 94 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 95 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 96 | ); 97 | name = Flutter; 98 | sourceTree = ""; 99 | }; 100 | 97C146E51CF9000F007C117D = { 101 | isa = PBXGroup; 102 | children = ( 103 | 9740EEB11CF90186004384FC /* Flutter */, 104 | 97C146F01CF9000F007C117D /* Runner */, 105 | 97C146EF1CF9000F007C117D /* Products */, 106 | 4282E42A831F6298E06AF422 /* Pods */, 107 | 2D95B220814234258ABD0C67 /* Frameworks */, 108 | ); 109 | sourceTree = ""; 110 | }; 111 | 97C146EF1CF9000F007C117D /* Products */ = { 112 | isa = PBXGroup; 113 | children = ( 114 | 97C146EE1CF9000F007C117D /* Runner.app */, 115 | ); 116 | name = Products; 117 | sourceTree = ""; 118 | }; 119 | 97C146F01CF9000F007C117D /* Runner */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 123 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 124 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 125 | 97C147021CF9000F007C117D /* Info.plist */, 126 | 97C146F11CF9000F007C117D /* Supporting Files */, 127 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 128 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 129 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 130 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 131 | ); 132 | path = Runner; 133 | sourceTree = ""; 134 | }; 135 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | ); 139 | name = "Supporting Files"; 140 | sourceTree = ""; 141 | }; 142 | /* End PBXGroup section */ 143 | 144 | /* Begin PBXNativeTarget section */ 145 | 97C146ED1CF9000F007C117D /* Runner */ = { 146 | isa = PBXNativeTarget; 147 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 148 | buildPhases = ( 149 | 2E4FE674021CC44DBE681331 /* [CP] Check Pods Manifest.lock */, 150 | 9740EEB61CF901F6004384FC /* Run Script */, 151 | 97C146EA1CF9000F007C117D /* Sources */, 152 | 97C146EB1CF9000F007C117D /* Frameworks */, 153 | 97C146EC1CF9000F007C117D /* Resources */, 154 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 155 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 156 | E121EEB26B7297A34DCAF767 /* [CP] Embed Pods Frameworks */, 157 | ); 158 | buildRules = ( 159 | ); 160 | dependencies = ( 161 | ); 162 | name = Runner; 163 | productName = Runner; 164 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 165 | productType = "com.apple.product-type.application"; 166 | }; 167 | /* End PBXNativeTarget section */ 168 | 169 | /* Begin PBXProject section */ 170 | 97C146E61CF9000F007C117D /* Project object */ = { 171 | isa = PBXProject; 172 | attributes = { 173 | LastUpgradeCheck = 0910; 174 | ORGANIZATIONNAME = "The Chromium Authors"; 175 | TargetAttributes = { 176 | 97C146ED1CF9000F007C117D = { 177 | CreatedOnToolsVersion = 7.3.1; 178 | DevelopmentTeam = 5PWBCM9HAK; 179 | LastSwiftMigration = 0910; 180 | ProvisioningStyle = Automatic; 181 | }; 182 | }; 183 | }; 184 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 185 | compatibilityVersion = "Xcode 3.2"; 186 | developmentRegion = English; 187 | hasScannedForEncodings = 0; 188 | knownRegions = ( 189 | English, 190 | en, 191 | Base, 192 | ); 193 | mainGroup = 97C146E51CF9000F007C117D; 194 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 195 | projectDirPath = ""; 196 | projectRoot = ""; 197 | targets = ( 198 | 97C146ED1CF9000F007C117D /* Runner */, 199 | ); 200 | }; 201 | /* End PBXProject section */ 202 | 203 | /* Begin PBXResourcesBuildPhase section */ 204 | 97C146EC1CF9000F007C117D /* Resources */ = { 205 | isa = PBXResourcesBuildPhase; 206 | buildActionMask = 2147483647; 207 | files = ( 208 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 209 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 210 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 211 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 212 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 213 | ); 214 | runOnlyForDeploymentPostprocessing = 0; 215 | }; 216 | /* End PBXResourcesBuildPhase section */ 217 | 218 | /* Begin PBXShellScriptBuildPhase section */ 219 | 2E4FE674021CC44DBE681331 /* [CP] Check Pods Manifest.lock */ = { 220 | isa = PBXShellScriptBuildPhase; 221 | buildActionMask = 2147483647; 222 | files = ( 223 | ); 224 | inputFileListPaths = ( 225 | ); 226 | inputPaths = ( 227 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 228 | "${PODS_ROOT}/Manifest.lock", 229 | ); 230 | name = "[CP] Check Pods Manifest.lock"; 231 | outputFileListPaths = ( 232 | ); 233 | outputPaths = ( 234 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 235 | ); 236 | runOnlyForDeploymentPostprocessing = 0; 237 | shellPath = /bin/sh; 238 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 239 | showEnvVarsInLog = 0; 240 | }; 241 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 242 | isa = PBXShellScriptBuildPhase; 243 | buildActionMask = 2147483647; 244 | files = ( 245 | ); 246 | inputPaths = ( 247 | ); 248 | name = "Thin Binary"; 249 | outputPaths = ( 250 | ); 251 | runOnlyForDeploymentPostprocessing = 0; 252 | shellPath = /bin/sh; 253 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 254 | }; 255 | 9740EEB61CF901F6004384FC /* Run Script */ = { 256 | isa = PBXShellScriptBuildPhase; 257 | buildActionMask = 2147483647; 258 | files = ( 259 | ); 260 | inputPaths = ( 261 | ); 262 | name = "Run Script"; 263 | outputPaths = ( 264 | ); 265 | runOnlyForDeploymentPostprocessing = 0; 266 | shellPath = /bin/sh; 267 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 268 | }; 269 | E121EEB26B7297A34DCAF767 /* [CP] Embed Pods Frameworks */ = { 270 | isa = PBXShellScriptBuildPhase; 271 | buildActionMask = 2147483647; 272 | files = ( 273 | ); 274 | inputFileListPaths = ( 275 | ); 276 | inputPaths = ( 277 | "${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", 278 | "${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework", 279 | "${BUILT_PRODUCTS_DIR}/shared_preferences/shared_preferences.framework", 280 | ); 281 | name = "[CP] Embed Pods Frameworks"; 282 | outputFileListPaths = ( 283 | ); 284 | outputPaths = ( 285 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework", 286 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences.framework", 287 | ); 288 | runOnlyForDeploymentPostprocessing = 0; 289 | shellPath = /bin/sh; 290 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 291 | showEnvVarsInLog = 0; 292 | }; 293 | /* End PBXShellScriptBuildPhase section */ 294 | 295 | /* Begin PBXSourcesBuildPhase section */ 296 | 97C146EA1CF9000F007C117D /* Sources */ = { 297 | isa = PBXSourcesBuildPhase; 298 | buildActionMask = 2147483647; 299 | files = ( 300 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 301 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 302 | ); 303 | runOnlyForDeploymentPostprocessing = 0; 304 | }; 305 | /* End PBXSourcesBuildPhase section */ 306 | 307 | /* Begin PBXVariantGroup section */ 308 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 309 | isa = PBXVariantGroup; 310 | children = ( 311 | 97C146FB1CF9000F007C117D /* Base */, 312 | ); 313 | name = Main.storyboard; 314 | sourceTree = ""; 315 | }; 316 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 317 | isa = PBXVariantGroup; 318 | children = ( 319 | 97C147001CF9000F007C117D /* Base */, 320 | ); 321 | name = LaunchScreen.storyboard; 322 | sourceTree = ""; 323 | }; 324 | /* End PBXVariantGroup section */ 325 | 326 | /* Begin XCBuildConfiguration section */ 327 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 328 | isa = XCBuildConfiguration; 329 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 330 | buildSettings = { 331 | ALWAYS_SEARCH_USER_PATHS = NO; 332 | CLANG_ANALYZER_NONNULL = YES; 333 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 334 | CLANG_CXX_LIBRARY = "libc++"; 335 | CLANG_ENABLE_MODULES = YES; 336 | CLANG_ENABLE_OBJC_ARC = YES; 337 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 338 | CLANG_WARN_BOOL_CONVERSION = YES; 339 | CLANG_WARN_COMMA = YES; 340 | CLANG_WARN_CONSTANT_CONVERSION = YES; 341 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 342 | CLANG_WARN_EMPTY_BODY = YES; 343 | CLANG_WARN_ENUM_CONVERSION = YES; 344 | CLANG_WARN_INFINITE_RECURSION = YES; 345 | CLANG_WARN_INT_CONVERSION = YES; 346 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 347 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 348 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 349 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 350 | CLANG_WARN_STRICT_PROTOTYPES = YES; 351 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 352 | CLANG_WARN_UNREACHABLE_CODE = YES; 353 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 354 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 355 | COPY_PHASE_STRIP = NO; 356 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 357 | ENABLE_NS_ASSERTIONS = NO; 358 | ENABLE_STRICT_OBJC_MSGSEND = YES; 359 | GCC_C_LANGUAGE_STANDARD = gnu99; 360 | GCC_NO_COMMON_BLOCKS = YES; 361 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 362 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 363 | GCC_WARN_UNDECLARED_SELECTOR = YES; 364 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 365 | GCC_WARN_UNUSED_FUNCTION = YES; 366 | GCC_WARN_UNUSED_VARIABLE = YES; 367 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 368 | MTL_ENABLE_DEBUG_INFO = NO; 369 | SDKROOT = iphoneos; 370 | TARGETED_DEVICE_FAMILY = "1,2"; 371 | VALIDATE_PRODUCT = YES; 372 | }; 373 | name = Profile; 374 | }; 375 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 376 | isa = XCBuildConfiguration; 377 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 378 | buildSettings = { 379 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 380 | CODE_SIGN_IDENTITY = "iPhone Developer"; 381 | CODE_SIGN_STYLE = Automatic; 382 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 383 | DEVELOPMENT_TEAM = 5PWBCM9HAK; 384 | ENABLE_BITCODE = NO; 385 | FRAMEWORK_SEARCH_PATHS = ( 386 | "$(inherited)", 387 | "$(PROJECT_DIR)/Flutter", 388 | ); 389 | INFOPLIST_FILE = Runner/Info.plist; 390 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 391 | LIBRARY_SEARCH_PATHS = ( 392 | "$(inherited)", 393 | "$(PROJECT_DIR)/Flutter", 394 | ); 395 | PRODUCT_BUNDLE_IDENTIFIER = com.uvdream.flutterNeteaseCloudMusicdd; 396 | PRODUCT_NAME = "$(TARGET_NAME)"; 397 | PROVISIONING_PROFILE_SPECIFIER = ""; 398 | SWIFT_VERSION = 4.0; 399 | VERSIONING_SYSTEM = "apple-generic"; 400 | }; 401 | name = Profile; 402 | }; 403 | 97C147031CF9000F007C117D /* Debug */ = { 404 | isa = XCBuildConfiguration; 405 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 406 | buildSettings = { 407 | ALWAYS_SEARCH_USER_PATHS = NO; 408 | CLANG_ANALYZER_NONNULL = YES; 409 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 410 | CLANG_CXX_LIBRARY = "libc++"; 411 | CLANG_ENABLE_MODULES = YES; 412 | CLANG_ENABLE_OBJC_ARC = YES; 413 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 414 | CLANG_WARN_BOOL_CONVERSION = YES; 415 | CLANG_WARN_COMMA = YES; 416 | CLANG_WARN_CONSTANT_CONVERSION = YES; 417 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 418 | CLANG_WARN_EMPTY_BODY = YES; 419 | CLANG_WARN_ENUM_CONVERSION = YES; 420 | CLANG_WARN_INFINITE_RECURSION = YES; 421 | CLANG_WARN_INT_CONVERSION = YES; 422 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 423 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 424 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 425 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 426 | CLANG_WARN_STRICT_PROTOTYPES = YES; 427 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 428 | CLANG_WARN_UNREACHABLE_CODE = YES; 429 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 430 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 431 | COPY_PHASE_STRIP = NO; 432 | DEBUG_INFORMATION_FORMAT = dwarf; 433 | ENABLE_STRICT_OBJC_MSGSEND = YES; 434 | ENABLE_TESTABILITY = YES; 435 | GCC_C_LANGUAGE_STANDARD = gnu99; 436 | GCC_DYNAMIC_NO_PIC = NO; 437 | GCC_NO_COMMON_BLOCKS = YES; 438 | GCC_OPTIMIZATION_LEVEL = 0; 439 | GCC_PREPROCESSOR_DEFINITIONS = ( 440 | "DEBUG=1", 441 | "$(inherited)", 442 | ); 443 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 444 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 445 | GCC_WARN_UNDECLARED_SELECTOR = YES; 446 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 447 | GCC_WARN_UNUSED_FUNCTION = YES; 448 | GCC_WARN_UNUSED_VARIABLE = YES; 449 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 450 | MTL_ENABLE_DEBUG_INFO = YES; 451 | ONLY_ACTIVE_ARCH = YES; 452 | SDKROOT = iphoneos; 453 | TARGETED_DEVICE_FAMILY = "1,2"; 454 | }; 455 | name = Debug; 456 | }; 457 | 97C147041CF9000F007C117D /* Release */ = { 458 | isa = XCBuildConfiguration; 459 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 460 | buildSettings = { 461 | ALWAYS_SEARCH_USER_PATHS = NO; 462 | CLANG_ANALYZER_NONNULL = YES; 463 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 464 | CLANG_CXX_LIBRARY = "libc++"; 465 | CLANG_ENABLE_MODULES = YES; 466 | CLANG_ENABLE_OBJC_ARC = YES; 467 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 468 | CLANG_WARN_BOOL_CONVERSION = YES; 469 | CLANG_WARN_COMMA = YES; 470 | CLANG_WARN_CONSTANT_CONVERSION = YES; 471 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 472 | CLANG_WARN_EMPTY_BODY = YES; 473 | CLANG_WARN_ENUM_CONVERSION = YES; 474 | CLANG_WARN_INFINITE_RECURSION = YES; 475 | CLANG_WARN_INT_CONVERSION = YES; 476 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 477 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 478 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 479 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 480 | CLANG_WARN_STRICT_PROTOTYPES = YES; 481 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 482 | CLANG_WARN_UNREACHABLE_CODE = YES; 483 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 484 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 485 | COPY_PHASE_STRIP = NO; 486 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 487 | ENABLE_NS_ASSERTIONS = NO; 488 | ENABLE_STRICT_OBJC_MSGSEND = YES; 489 | GCC_C_LANGUAGE_STANDARD = gnu99; 490 | GCC_NO_COMMON_BLOCKS = YES; 491 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 492 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 493 | GCC_WARN_UNDECLARED_SELECTOR = YES; 494 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 495 | GCC_WARN_UNUSED_FUNCTION = YES; 496 | GCC_WARN_UNUSED_VARIABLE = YES; 497 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 498 | MTL_ENABLE_DEBUG_INFO = NO; 499 | SDKROOT = iphoneos; 500 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 501 | TARGETED_DEVICE_FAMILY = "1,2"; 502 | VALIDATE_PRODUCT = YES; 503 | }; 504 | name = Release; 505 | }; 506 | 97C147061CF9000F007C117D /* Debug */ = { 507 | isa = XCBuildConfiguration; 508 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 509 | buildSettings = { 510 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 511 | CLANG_ENABLE_MODULES = YES; 512 | CODE_SIGN_IDENTITY = "iPhone Developer"; 513 | CODE_SIGN_STYLE = Automatic; 514 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 515 | DEVELOPMENT_TEAM = 5PWBCM9HAK; 516 | ENABLE_BITCODE = NO; 517 | FRAMEWORK_SEARCH_PATHS = ( 518 | "$(inherited)", 519 | "$(PROJECT_DIR)/Flutter", 520 | ); 521 | INFOPLIST_FILE = Runner/Info.plist; 522 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 523 | LIBRARY_SEARCH_PATHS = ( 524 | "$(inherited)", 525 | "$(PROJECT_DIR)/Flutter", 526 | ); 527 | PRODUCT_BUNDLE_IDENTIFIER = com.uvdream.flutterNeteaseCloudMusicdd; 528 | PRODUCT_NAME = "$(TARGET_NAME)"; 529 | PROVISIONING_PROFILE_SPECIFIER = ""; 530 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 531 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 532 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 533 | SWIFT_VERSION = 4.0; 534 | VERSIONING_SYSTEM = "apple-generic"; 535 | }; 536 | name = Debug; 537 | }; 538 | 97C147071CF9000F007C117D /* Release */ = { 539 | isa = XCBuildConfiguration; 540 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 541 | buildSettings = { 542 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 543 | CLANG_ENABLE_MODULES = YES; 544 | CODE_SIGN_IDENTITY = "iPhone Developer"; 545 | CODE_SIGN_STYLE = Automatic; 546 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 547 | DEVELOPMENT_TEAM = 5PWBCM9HAK; 548 | ENABLE_BITCODE = NO; 549 | FRAMEWORK_SEARCH_PATHS = ( 550 | "$(inherited)", 551 | "$(PROJECT_DIR)/Flutter", 552 | ); 553 | INFOPLIST_FILE = Runner/Info.plist; 554 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 555 | LIBRARY_SEARCH_PATHS = ( 556 | "$(inherited)", 557 | "$(PROJECT_DIR)/Flutter", 558 | ); 559 | PRODUCT_BUNDLE_IDENTIFIER = com.uvdream.flutterNeteaseCloudMusicdd; 560 | PRODUCT_NAME = "$(TARGET_NAME)"; 561 | PROVISIONING_PROFILE_SPECIFIER = ""; 562 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 563 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 564 | SWIFT_VERSION = 4.0; 565 | VERSIONING_SYSTEM = "apple-generic"; 566 | }; 567 | name = Release; 568 | }; 569 | /* End XCBuildConfiguration section */ 570 | 571 | /* Begin XCConfigurationList section */ 572 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 573 | isa = XCConfigurationList; 574 | buildConfigurations = ( 575 | 97C147031CF9000F007C117D /* Debug */, 576 | 97C147041CF9000F007C117D /* Release */, 577 | 249021D3217E4FDB00AE95B9 /* Profile */, 578 | ); 579 | defaultConfigurationIsVisible = 0; 580 | defaultConfigurationName = Release; 581 | }; 582 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 583 | isa = XCConfigurationList; 584 | buildConfigurations = ( 585 | 97C147061CF9000F007C117D /* Debug */, 586 | 97C147071CF9000F007C117D /* Release */, 587 | 249021D4217E4FDB00AE95B9 /* Profile */, 588 | ); 589 | defaultConfigurationIsVisible = 0; 590 | defaultConfigurationName = Release; 591 | }; 592 | /* End XCConfigurationList section */ 593 | }; 594 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 595 | } 596 | --------------------------------------------------------------------------------