├── 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 │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ └── project.pbxproj ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── .gitignore ├── Podfile.lock └── Podfile ├── login.png ├── loading.png ├── preview.png ├── images ├── ic_home_baby.png ├── ic_home_step.png ├── ic_arrow_grey.png ├── ic_home_habit.png ├── ic_home_sleep.png ├── ic_home_sport.png ├── ic_home_weight.png ├── ic_search_grey.png ├── ic_dietician_logo.png ├── ic_home_calorie.png ├── ic_home_dietician.png ├── ic_home_food_plan.png ├── ic_jetlinks_logo.png ├── ic_message_grey.png ├── ic_message_white.png ├── ic_search_white.png ├── ic_home_tabbar_plus.png ├── ic_shop_cart_white.png ├── ic_tab_bar_me_green.png ├── ic_tab_bar_me_grey.png ├── ic_arrow_light_yellow.png ├── ic_home_circumference.png ├── ic_home_menstruation.png ├── ic_tab_bar_home_green.png ├── ic_tab_bar_home_grey.png ├── ic_tab_bar_shop_green.png ├── ic_tab_bar_shop_grey.png ├── ic_tab_bar_partner_green.png ├── ic_tab_bar_partner_grey.png └── ic_home_default_wallpaper.webp ├── lib ├── route │ ├── application.dart │ ├── route_handlers.dart │ ├── routes.dart │ └── navigator.dart ├── main.dart ├── utils │ ├── toast.dart │ ├── utils.dart │ ├── respository.dart │ ├── account.dart │ ├── base64.dart │ └── browser_url.dart ├── views │ ├── mine_page.dart │ ├── device_page.dart │ ├── discover_page.dart │ ├── route_component.dart │ ├── common │ │ ├── wallpaper.dart │ │ └── browser_page.dart │ ├── main_page.dart │ ├── login │ │ └── login_page.dart │ └── home_page.dart ├── common │ ├── colors.dart │ ├── constant.dart │ └── styles.dart ├── model │ ├── splash_ad.g.dart │ ├── splash_ad.dart │ ├── login_user.dart │ ├── login_user.g.dart │ ├── home_tools.dart │ ├── home_wall_paper.dart │ ├── home_tools.g.dart │ └── home_wall_paper.g.dart ├── widget │ ├── card_view.dart │ ├── round_button.dart │ ├── home_common_card.dart │ ├── header │ │ └── home_wallpaper_header.dart │ ├── commom_search_bar.dart │ └── main │ │ └── main_widgets.dart └── splash_page.dart ├── android ├── gradle.properties ├── .gitignore ├── 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 │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ └── values │ │ │ │ │ └── styles.xml │ │ │ ├── kotlin │ │ │ │ └── org │ │ │ │ │ └── jetlinks │ │ │ │ │ └── jetlinks_app │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── settings.gradle └── build.gradle ├── assets └── json │ ├── user │ └── login_user.json │ ├── common │ └── splash_ad.json │ └── home │ ├── home_health_tools.json │ └── home_wallpaper.json ├── README.md ├── .metadata ├── .gitignore ├── test └── widget_test.dart ├── pubspec.yaml └── pubspec.lock /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/login.png -------------------------------------------------------------------------------- /loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/loading.png -------------------------------------------------------------------------------- /preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/preview.png -------------------------------------------------------------------------------- /images/ic_home_baby.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_home_baby.png -------------------------------------------------------------------------------- /images/ic_home_step.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_home_step.png -------------------------------------------------------------------------------- /images/ic_arrow_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_arrow_grey.png -------------------------------------------------------------------------------- /images/ic_home_habit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_home_habit.png -------------------------------------------------------------------------------- /images/ic_home_sleep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_home_sleep.png -------------------------------------------------------------------------------- /images/ic_home_sport.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_home_sport.png -------------------------------------------------------------------------------- /images/ic_home_weight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_home_weight.png -------------------------------------------------------------------------------- /images/ic_search_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_search_grey.png -------------------------------------------------------------------------------- /images/ic_dietician_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_dietician_logo.png -------------------------------------------------------------------------------- /images/ic_home_calorie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_home_calorie.png -------------------------------------------------------------------------------- /images/ic_home_dietician.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_home_dietician.png -------------------------------------------------------------------------------- /images/ic_home_food_plan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_home_food_plan.png -------------------------------------------------------------------------------- /images/ic_jetlinks_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_jetlinks_logo.png -------------------------------------------------------------------------------- /images/ic_message_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_message_grey.png -------------------------------------------------------------------------------- /images/ic_message_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_message_white.png -------------------------------------------------------------------------------- /images/ic_search_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_search_white.png -------------------------------------------------------------------------------- /images/ic_home_tabbar_plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_home_tabbar_plus.png -------------------------------------------------------------------------------- /images/ic_shop_cart_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_shop_cart_white.png -------------------------------------------------------------------------------- /images/ic_tab_bar_me_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_tab_bar_me_green.png -------------------------------------------------------------------------------- /images/ic_tab_bar_me_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_tab_bar_me_grey.png -------------------------------------------------------------------------------- /images/ic_arrow_light_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_arrow_light_yellow.png -------------------------------------------------------------------------------- /images/ic_home_circumference.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_home_circumference.png -------------------------------------------------------------------------------- /images/ic_home_menstruation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_home_menstruation.png -------------------------------------------------------------------------------- /images/ic_tab_bar_home_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_tab_bar_home_green.png -------------------------------------------------------------------------------- /images/ic_tab_bar_home_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_tab_bar_home_grey.png -------------------------------------------------------------------------------- /images/ic_tab_bar_shop_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_tab_bar_shop_green.png -------------------------------------------------------------------------------- /images/ic_tab_bar_shop_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_tab_bar_shop_grey.png -------------------------------------------------------------------------------- /lib/route/application.dart: -------------------------------------------------------------------------------- 1 | import 'package:fluro/fluro.dart'; 2 | 3 | class Application{ 4 | static Router router; 5 | } -------------------------------------------------------------------------------- /images/ic_tab_bar_partner_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_tab_bar_partner_green.png -------------------------------------------------------------------------------- /images/ic_tab_bar_partner_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_tab_bar_partner_grey.png -------------------------------------------------------------------------------- /images/ic_home_default_wallpaper.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/images/ic_home_default_wallpaper.webp -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/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/jetlinks/jetlinks_app/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/jetlinks/jetlinks_app/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/jetlinks/jetlinks_app/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/jetlinks/jetlinks_app/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:jetlinks_app/views/route_component.dart'; 3 | 4 | void main() { 5 | runApp(RouteComponent()); 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/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/jetlinks/jetlinks_app/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/jetlinks/jetlinks_app/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/jetlinks/jetlinks_app/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/jetlinks/jetlinks_app/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/jetlinks/jetlinks_app/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/jetlinks/jetlinks_app/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/jetlinks/jetlinks_app/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/jetlinks/jetlinks_app/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/jetlinks/jetlinks_app/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/jetlinks/jetlinks_app/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/jetlinks/jetlinks_app/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/jetlinks/jetlinks_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /assets/json/user/login_user.json: -------------------------------------------------------------------------------- 1 | { 2 | "user":{ 3 | "id":"1199596756811550720", 4 | "username":"admin", 5 | "name":"超级管理员", 6 | "type":"user" 7 | }, 8 | "token":"234xxxs234" 9 | } -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetlinks/jetlinks_app/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/jetlinks/jetlinks_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /android/app/src/main/kotlin/org/jetlinks/jetlinks_app/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package org.jetlinks.jetlinks_app 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # jetlinks_app 2 | 3 | Jetlinks APP 4 | 5 | ## 预览 6 | 7 | ### 启动页 8 | ![avatar](./loading.png) 9 | 10 | ### 登录页 11 | ![avatar](./login.png) 12 | 13 | ## 预览页 14 | ![avatar](./preview.png) 15 | 支持IOS、Android平台 -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/utils/toast.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:toast/toast.dart'; 3 | 4 | class ToastUtils{ 5 | static void showToast(BuildContext context,String msg,{int duration,int gravity}){ 6 | Toast.show(msg, context,duration: duration,gravity: gravity); 7 | } 8 | } -------------------------------------------------------------------------------- /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-5.6.2-all.zip 7 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/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 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 8af6b2f038c1172e61d418869363a28dffec3cb4 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /lib/views/mine_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | 3 | class MinePage extends StatefulWidget { 4 | @override 5 | _MinePageState createState() => _MinePageState(); 6 | } 7 | 8 | class _MinePageState extends State { 9 | @override 10 | Widget build(BuildContext context) { 11 | return Container(child: Text('我的'),); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/views/device_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | 3 | class DevicePage extends StatefulWidget { 4 | @override 5 | _DevicePageState createState() => _DevicePageState(); 6 | } 7 | 8 | class _DevicePageState extends State { 9 | @override 10 | Widget build(BuildContext context) { 11 | return Container(child: Text('设备管理'),); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /lib/views/discover_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | 3 | class DiscoverPage extends StatefulWidget { 4 | @override 5 | _DiscoverPageState createState() => _DiscoverPageState(); 6 | } 7 | 8 | class _DiscoverPageState extends State { 9 | @override 10 | Widget build(BuildContext context) { 11 | return Container(child: Text('发现'),); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/common/colors.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | Color mainColor = const Color(0xFF31D1AD); 4 | Color color373D52 = const Color(0xFF373D52); 5 | Color colorA8ACBC = const Color(0xFFA8ACBC); 6 | Color colorFF6C65 = const Color(0xFFFF6C65); 7 | Color color00CDA2 = const Color(0xFF00CDA2); 8 | Color colorEEEFF3 = const Color(0xFFEEEFF3); 9 | Color color0EB794 = const Color(0xFF0EB794); 10 | Color colorFEBB07 = const Color(0xFFFEBB07); 11 | -------------------------------------------------------------------------------- /lib/utils/utils.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:flutter/cupertino.dart'; 4 | 5 | class Utils{ 6 | static String getImgPath(String name,{String format:'png'}){ 7 | return 'images/$name.$format'; 8 | } 9 | 10 | static Color nameToColor(String name){ 11 | final int hash = name.hashCode&0xffff; 12 | final double hue = (360.0*hash/(1<<15))%360.0; 13 | return HSVColor.fromAHSV(1.0, hue, 0.4, 0.90).toColor(); 14 | } 15 | } -------------------------------------------------------------------------------- /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: [UIApplication.LaunchOptionsKey: 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 | -------------------------------------------------------------------------------- /lib/utils/respository.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:math'; 3 | 4 | import 'package:flutter/services.dart'; 5 | 6 | class Repository{ 7 | static Future loadAsset(String fileName,{String fileDir:'common'}) async{ 8 | return await rootBundle.loadString('assets/json/$fileDir/$fileName.json'); 9 | } 10 | 11 | static Map toMap(String json)=>jsonDecode(json); 12 | 13 | static Map toMapForList(String json){ 14 | List mLists = jsonDecode(json); 15 | return mLists[Random().nextInt(mLists.length)]; 16 | } 17 | } -------------------------------------------------------------------------------- /lib/utils/account.dart: -------------------------------------------------------------------------------- 1 | import 'package:flustars/flustars.dart'; 2 | import 'package:jetlinks_app/common/constant.dart'; 3 | import 'package:jetlinks_app/model/login_user.dart'; 4 | 5 | class AccountUtils{ 6 | static User mUser; 7 | static bool isLogin(){ 8 | String token = SpUtil.getString(Constant.token,defValue: ""); 9 | return token.isNotEmpty; 10 | } 11 | 12 | static void saveUser(LoginUser user){ 13 | SpUtil.putObject(Constant.login_user, user); 14 | } 15 | 16 | static User getUser(){ 17 | if(mUser==null){ 18 | mUser=SpUtil.getObj(Constant.login_user, (v) => LoginUser.fromJson(v)).user; 19 | } 20 | return mUser; 21 | } 22 | } -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | include ':app' 6 | 7 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 8 | def properties = new Properties() 9 | 10 | assert localPropertiesFile.exists() 11 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 12 | 13 | def flutterSdkPath = properties.getProperty("flutter.sdk") 14 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 15 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 16 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.5.0' 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 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | 33 | # Web related 34 | lib/generated_plugin_registrant.dart 35 | 36 | # Symbolication related 37 | app.*.symbols 38 | 39 | # Obfuscation related 40 | app.*.map.json 41 | 42 | # Exceptions to above rules. 43 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 44 | -------------------------------------------------------------------------------- /lib/model/splash_ad.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'splash_ad.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | SplashAd _$SplashAdFromJson(Map json) { 10 | return SplashAd( 11 | json['id'] as int, 12 | json['start_up_url'] as String, 13 | json['is_ad'] as bool, 14 | json['text'] as String, 15 | json['link'] as String, 16 | json['pop_ads'] as List, 17 | ); 18 | } 19 | 20 | Map _$SplashAdToJson(SplashAd instance) => { 21 | 'id': instance.id, 22 | 'start_up_url': instance.startUpUrl, 23 | 'is_ad': instance.isAd, 24 | 'text': instance.text, 25 | 'link': instance.link, 26 | 'pop_ads': instance.popAds, 27 | }; 28 | -------------------------------------------------------------------------------- /lib/widget/card_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | /// 全局Card,统一Card样式便于全局修改 5 | class CardView extends StatelessWidget { 6 | final EdgeInsetsGeometry margin; 7 | final Widget child; 8 | final double elevation; 9 | final double radius; 10 | final Function onPressed; 11 | 12 | CardView( 13 | {Key key, 14 | this.margin, 15 | this.child, 16 | this.onPressed, 17 | this.elevation: 1, 18 | this.radius: 12}) 19 | : super(key: key); 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return Card( 24 | shape: // 圆角 25 | RoundedRectangleBorder(borderRadius: BorderRadius.circular(radius)), 26 | margin: margin, 27 | elevation: elevation, 28 | child: InkWell( 29 | onTap: onPressed, 30 | child: child, 31 | ), 32 | ); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 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/views/route_component.dart: -------------------------------------------------------------------------------- 1 | import 'package:fluro/fluro.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:jetlinks_app/route/application.dart'; 5 | import 'package:jetlinks_app/route/routes.dart'; 6 | import 'package:jetlinks_app/splash_page.dart'; 7 | 8 | class RouteComponent extends StatefulWidget { 9 | @override 10 | _RouteComponentState createState() => _RouteComponentState(); 11 | } 12 | 13 | class _RouteComponentState extends State { 14 | _RouteComponentState(){ 15 | final router = new Router(); 16 | Routes.configureRoutes(router); 17 | Application.router=router; 18 | } 19 | @override 20 | Widget build(BuildContext context) { 21 | return MaterialApp( 22 | theme: ThemeData( 23 | primaryColor: Colors.blue,scaffoldBackgroundColor: Colors.white 24 | ), 25 | home:SplashPage(), 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /assets/json/common/splash_ad.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": 236, 4 | "start_up_url": "http://img4.imgtn.bdimg.com/it/u=3630224677,3892138201&fm=26&gp=0.jpg", 5 | "is_ad": true, 6 | "text": "Jetlinks 物联网", 7 | "link": "http://img4.imgtn.bdimg.com/it/u=3630224677,3892138201&fm=26&gp=0.jpg", 8 | "pop_ads": [] 9 | }, 10 | { 11 | "id": 237, 12 | "start_up_url": "http://imgsrc.baidu.com/forum/w=580/sign=0fc63818f9f2b211e42e8546fa816511/0c5a1e385343fbf2adeff848b27eca8064388fa4.jpg", 13 | "is_ad": true, 14 | "text": "Jetlinks 物联网", 15 | "link": "http://imgsrc.baidu.com/forum/w=580/sign=0fc63818f9f2b211e42e8546fa816511/0c5a1e385343fbf2adeff848b27eca8064388fa4.jpg", 16 | "pop_ads": [] 17 | }, 18 | { 19 | "id": 3, 20 | "start_up_url": "http://5b0988e595225.cdn.sohucs.com/images/20171028/3cefb60abc4948639f271761ee78c9a7.jpeg", 21 | "is_ad": false, 22 | "text": "Jetlinks 物联网", 23 | "link": "", 24 | "pop_ads": [] 25 | } 26 | ] -------------------------------------------------------------------------------- /lib/model/splash_ad.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'splash_ad.g.dart'; 4 | 5 | 6 | List getSplashAdList(List list){ 7 | List result = []; 8 | list.forEach((item){ 9 | result.add(SplashAd.fromJson(item)); 10 | }); 11 | return result; 12 | } 13 | @JsonSerializable() 14 | class SplashAd extends Object { 15 | 16 | @JsonKey(name: 'id') 17 | int id; 18 | 19 | @JsonKey(name: 'start_up_url') 20 | String startUpUrl; 21 | 22 | @JsonKey(name: 'is_ad') 23 | bool isAd; 24 | 25 | @JsonKey(name: 'text') 26 | String text; 27 | 28 | @JsonKey(name: 'link') 29 | String link; 30 | 31 | @JsonKey(name: 'pop_ads') 32 | List popAds; 33 | 34 | SplashAd(this.id,this.startUpUrl,this.isAd,this.text,this.link,this.popAds,); 35 | 36 | factory SplashAd.fromJson(Map srcJson) => _$SplashAdFromJson(srcJson); 37 | 38 | Map toJson() => _$SplashAdToJson(this); 39 | 40 | } 41 | 42 | -------------------------------------------------------------------------------- /lib/route/route_handlers.dart: -------------------------------------------------------------------------------- 1 | import 'package:fluro/fluro.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:jetlinks_app/views/common/browser_page.dart'; 4 | import 'package:jetlinks_app/views/common/wallpaper.dart'; 5 | import 'package:jetlinks_app/views/login/login_page.dart'; 6 | import 'package:jetlinks_app/views/main_page.dart'; 7 | 8 | var rootHandler = new Handler( 9 | handlerFunc: (BuildContext context,Map> params)=>new MainPage() 10 | ); 11 | 12 | var loginHandler = new Handler( 13 | handlerFunc: (BuildContext context,Map> params)=>new LoginPage() 14 | ); 15 | 16 | var webViewHandler = new Handler( 17 | handlerFunc: (BuildContext context,Map> params)=>new BrowserPage( 18 | webViewUrl: params['web_url']?.first, 19 | ) 20 | ); 21 | 22 | var wallPaperHandler = new Handler( 23 | handlerFunc: (BuildContext context,Map> params)=>new WallPagerPage( 24 | wallpaperImageUrl: params['image_url']?.first) 25 | ); -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /lib/model/login_user.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'login_user.g.dart'; 4 | 5 | 6 | @JsonSerializable() 7 | class LoginUser extends Object { 8 | 9 | @JsonKey(name: 'user') 10 | User user; 11 | 12 | @JsonKey(name: 'token') 13 | String token; 14 | 15 | LoginUser(this.user,this.token,); 16 | 17 | factory LoginUser.fromJson(Map srcJson) => _$LoginUserFromJson(srcJson); 18 | 19 | Map toJson() => _$LoginUserToJson(this); 20 | 21 | } 22 | 23 | 24 | @JsonSerializable() 25 | class User extends Object { 26 | 27 | @JsonKey(name: 'id') 28 | String id; 29 | 30 | @JsonKey(name: 'username') 31 | String username; 32 | 33 | @JsonKey(name: 'name') 34 | String name; 35 | 36 | @JsonKey(name: 'type') 37 | String type; 38 | 39 | User(this.id,this.username,this.name,this.type,); 40 | 41 | factory User.fromJson(Map srcJson) => _$UserFromJson(srcJson); 42 | 43 | Map toJson() => _$UserToJson(this); 44 | 45 | } 46 | 47 | 48 | -------------------------------------------------------------------------------- /lib/utils/base64.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:crypto/crypto.dart'; 4 | 5 | class Base64 { 6 | static const String HMAC_SHA1 = "HmacSHA1"; 7 | 8 | /* 9 | * Base64加密 10 | */ 11 | static String encodeBase64(String data) { 12 | var content = utf8.encode(data); 13 | var digest = base64Encode(content); 14 | return digest; 15 | } 16 | 17 | /* 18 | * Base64加密 19 | */ 20 | static String encodeBase64ForBytes(List data) { 21 | var digest = base64Encode(data); 22 | return digest; 23 | } 24 | 25 | /* 26 | * Base64解密 27 | */ 28 | static String decodeBase64(String data) { 29 | return String.fromCharCodes(base64Decode(data)); 30 | } 31 | 32 | /* 33 | * HMAC加密 34 | */ 35 | static String encryptHMAC(String data, String key) { 36 | var _key = utf8.encode(key); 37 | var bytes = utf8.encode(data); 38 | 39 | var hmacSha256 = new Hmac(sha1, _key); // HMAC-SHA256 40 | var digest = hmacSha256.convert(bytes); 41 | String content = encodeBase64ForBytes(digest.bytes); 42 | return content; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /lib/route/routes.dart: -------------------------------------------------------------------------------- 1 | import 'package:fluro/fluro.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:jetlinks_app/route/route_handlers.dart'; 4 | 5 | class Routes{ 6 | static String root ='/home'; 7 | 8 | static String login = '/login'; 9 | 10 | static String webView = '/browserweb'; 11 | 12 | static String wallPaper = '/wallPaper'; 13 | 14 | static void configureRoutes(Router router){ 15 | router.define(root, handler: rootHandler); 16 | router.define(login, handler: loginHandler); 17 | router.define(webView, handler: webViewHandler); 18 | router.define(wallPaper, handler: wallPaperHandler); 19 | } 20 | 21 | static RouteTransitionsBuilder transitionTopToBottom(){ 22 | return (BuildContext context,Animation animation, 23 | Animation secondaryAnimation,Widget child){ 24 | const Offset begin = const Offset(0.0, -1.0); 25 | const Offset end = const Offset(0.0, 0.0); 26 | 27 | return SlideTransition( 28 | position: Tween( 29 | begin: begin, 30 | end: end, 31 | ).animate(animation), 32 | child: child, 33 | ); 34 | }; 35 | } 36 | } -------------------------------------------------------------------------------- /lib/model/login_user.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'login_user.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | LoginUser _$LoginUserFromJson(Map json) { 10 | return LoginUser( 11 | json['user'] == null 12 | ? null 13 | : User.fromJson(json['user'] as Map), 14 | json['token'] as String, 15 | ); 16 | } 17 | 18 | Map _$LoginUserToJson(LoginUser instance) => { 19 | 'user': instance.user, 20 | 'token': instance.token, 21 | }; 22 | 23 | User _$UserFromJson(Map json) { 24 | return User( 25 | json['id'] as String, 26 | json['username'] as String, 27 | json['name'] as String, 28 | json['type'] as String, 29 | ); 30 | } 31 | 32 | Map _$UserToJson(User instance) => { 33 | 'id': instance.id, 34 | 'username': instance.username, 35 | 'name': instance.name, 36 | 'type': instance.type, 37 | }; 38 | -------------------------------------------------------------------------------- /lib/model/home_tools.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'home_tools.g.dart'; 4 | 5 | 6 | @JsonSerializable() 7 | class HomeTools extends Object { 8 | 9 | @JsonKey(name: 'success') 10 | bool success; 11 | 12 | @JsonKey(name: 'msg') 13 | String msg; 14 | 15 | @JsonKey(name: 'data') 16 | List data; 17 | 18 | HomeTools(this.success,this.msg,this.data,); 19 | 20 | factory HomeTools.fromJson(Map srcJson) => _$HomeToolsFromJson(srcJson); 21 | 22 | Map toJson() => _$HomeToolsToJson(this); 23 | 24 | } 25 | 26 | 27 | @JsonSerializable() 28 | class Data extends Object { 29 | 30 | @JsonKey(name: 'id') 31 | int id; 32 | 33 | @JsonKey(name: 'name') 34 | String name; 35 | 36 | @JsonKey(name: 'code') 37 | String code; 38 | 39 | @JsonKey(name: 'visible') 40 | bool visible; 41 | 42 | @JsonKey(name: 'editable') 43 | bool editable; 44 | 45 | Data(this.id,this.name,this.code,this.visible,this.editable,); 46 | 47 | factory Data.fromJson(Map srcJson) => _$DataFromJson(srcJson); 48 | 49 | Map toJson() => _$DataToJson(this); 50 | 51 | } 52 | 53 | 54 | -------------------------------------------------------------------------------- /lib/common/constant.dart: -------------------------------------------------------------------------------- 1 | class Constant{ 2 | static const String login_user='login_user'; 3 | static const String token ='token'; 4 | static const String user_key = 'user_key'; 5 | static const String y_mo_d_v2 = 'yyyy/MM/dd'; 6 | } 7 | 8 | 9 | class HomeCard { 10 | // 产品信息 11 | static const String HEALTH_WEIGHT = "产品信息"; 12 | 13 | // 设备记录 14 | static const String DIET_SPORT_RECORD = "diet_exercise_record"; 15 | 16 | // 实例详情 17 | static const String WEIGHT_RECORD = "weight_record"; 18 | 19 | // 链接管理 20 | static const String WISDOM = "wisdom"; 21 | 22 | // 故障处理 23 | static const String HEALTH_HABITS = "health_habits"; 24 | 25 | // 固件升级 26 | static const String STEPS_RECORD = "steps_record"; 27 | 28 | // 设备分组 29 | static const String PERIODS_RECORD = "periods_record"; 30 | 31 | // 证书管理 32 | static const String SLEEP_RECORD = "sleep_record"; 33 | 34 | // 网络组件 35 | static const String BABY = "baby"; 36 | 37 | // 协议管理 38 | static const String DIET_PLAN = "diet_plan"; 39 | 40 | // 通知记录 41 | static const String EXERCISE = "exercise"; 42 | 43 | // 日志记录 44 | static const String MEASURE_RECORD = "measure_record"; 45 | 46 | // 操作记录 47 | static const String SMART_CARD = "SMART_CARD"; 48 | } 49 | -------------------------------------------------------------------------------- /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:jetlinks_app/main.dart'; 12 | import 'package:jetlinks_app/views/route_component.dart'; 13 | 14 | void main() { 15 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 16 | // Build our app and trigger a frame. 17 | await tester.pumpWidget(RouteComponent()); 18 | 19 | // Verify that our counter starts at 0. 20 | expect(find.text('0'), findsOneWidget); 21 | expect(find.text('1'), findsNothing); 22 | 23 | // Tap the '+' icon and trigger a frame. 24 | await tester.tap(find.byIcon(Icons.add)); 25 | await tester.pump(); 26 | 27 | // Verify that our counter has incremented. 28 | expect(find.text('0'), findsNothing); 29 | expect(find.text('1'), findsOneWidget); 30 | }); 31 | } 32 | -------------------------------------------------------------------------------- /lib/model/home_wall_paper.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'home_wall_paper.g.dart'; 4 | 5 | 6 | @JsonSerializable() 7 | class HomeWallPaper extends Object { 8 | 9 | @JsonKey(name: 'welcome_img') 10 | Welcome_img welcomeImg; 11 | 12 | HomeWallPaper(this.welcomeImg,); 13 | 14 | factory HomeWallPaper.fromJson(Map srcJson) => _$HomeWallPaperFromJson(srcJson); 15 | 16 | Map toJson() => _$HomeWallPaperToJson(this); 17 | 18 | } 19 | 20 | 21 | @JsonSerializable() 22 | class Welcome_img extends Object { 23 | 24 | @JsonKey(name: 'hello_text') 25 | String helloText; 26 | 27 | @JsonKey(name: 'back_img') 28 | String backImg; 29 | 30 | @JsonKey(name: 'back_img_small') 31 | String backImgSmall; 32 | 33 | @JsonKey(name: 'back_img_x') 34 | String backImgX; 35 | 36 | @JsonKey(name: 'video_url') 37 | String videoUrl; 38 | 39 | @JsonKey(name: 'link') 40 | String link; 41 | 42 | @JsonKey(name: 'date') 43 | String date; 44 | 45 | Welcome_img(this.helloText,this.backImg,this.backImgSmall,this.backImgX,this.videoUrl,this.link,this.date,); 46 | 47 | factory Welcome_img.fromJson(Map srcJson) => _$Welcome_imgFromJson(srcJson); 48 | 49 | Map toJson() => _$Welcome_imgToJson(this); 50 | 51 | } 52 | 53 | 54 | -------------------------------------------------------------------------------- /lib/model/home_tools.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'home_tools.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | HomeTools _$HomeToolsFromJson(Map json) { 10 | return HomeTools( 11 | json['success'] as bool, 12 | json['msg'] as String, 13 | (json['data'] as List) 14 | ?.map( 15 | (e) => e == null ? null : Data.fromJson(e as Map)) 16 | ?.toList(), 17 | ); 18 | } 19 | 20 | Map _$HomeToolsToJson(HomeTools instance) => { 21 | 'success': instance.success, 22 | 'msg': instance.msg, 23 | 'data': instance.data, 24 | }; 25 | 26 | Data _$DataFromJson(Map json) { 27 | return Data( 28 | json['id'] as int, 29 | json['name'] as String, 30 | json['code'] as String, 31 | json['visible'] as bool, 32 | json['editable'] as bool, 33 | ); 34 | } 35 | 36 | Map _$DataToJson(Data instance) => { 37 | 'id': instance.id, 38 | 'name': instance.name, 39 | 'code': instance.code, 40 | 'visible': instance.visible, 41 | 'editable': instance.editable, 42 | }; 43 | -------------------------------------------------------------------------------- /lib/widget/round_button.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:flutter/cupertino.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:jetlinks_app/common/colors.dart'; 6 | 7 | class RoundButton extends StatelessWidget { 8 | final Color backgroundColor; 9 | final Text buttonText; 10 | final Function onPressed; 11 | final String text; 12 | final EdgeInsetsGeometry padding; 13 | final double radius; 14 | 15 | RoundButton( 16 | {this.backgroundColor, 17 | this.buttonText, 18 | this.onPressed, 19 | this.padding, 20 | this.radius: 20, 21 | this.text}); 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return ButtonTheme( 26 | materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, 27 | padding: EdgeInsets.all(0), 28 | height: 1, 29 | minWidth: 1, 30 | child: FlatButton( 31 | padding: 32 | padding ?? EdgeInsets.only(left: 7, right: 7, top: 4, bottom: 4), 33 | shape: new RoundedRectangleBorder( 34 | borderRadius: new BorderRadius.circular(radius)), 35 | color: this.backgroundColor ?? color00CDA2, 36 | child: buttonText ?? 37 | Text( 38 | text, 39 | style: TextStyle(fontSize: 10, color: Colors.white), 40 | ), 41 | onPressed: onPressed ?? () {}, 42 | ), 43 | ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /lib/model/home_wall_paper.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'home_wall_paper.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | HomeWallPaper _$HomeWallPaperFromJson(Map json) { 10 | return HomeWallPaper( 11 | json['welcome_img'] == null 12 | ? null 13 | : Welcome_img.fromJson(json['welcome_img'] as Map), 14 | ); 15 | } 16 | 17 | Map _$HomeWallPaperToJson(HomeWallPaper instance) => 18 | { 19 | 'welcome_img': instance.welcomeImg, 20 | }; 21 | 22 | Welcome_img _$Welcome_imgFromJson(Map json) { 23 | return Welcome_img( 24 | json['hello_text'] as String, 25 | json['back_img'] as String, 26 | json['back_img_small'] as String, 27 | json['back_img_x'] as String, 28 | json['video_url'] as String, 29 | json['link'] as String, 30 | json['date'] as String, 31 | ); 32 | } 33 | 34 | Map _$Welcome_imgToJson(Welcome_img instance) => 35 | { 36 | 'hello_text': instance.helloText, 37 | 'back_img': instance.backImg, 38 | 'back_img_small': instance.backImgSmall, 39 | 'back_img_x': instance.backImgX, 40 | 'video_url': instance.videoUrl, 41 | 'link': instance.link, 42 | 'date': instance.date, 43 | }; 44 | -------------------------------------------------------------------------------- /lib/views/common/wallpaper.dart: -------------------------------------------------------------------------------- 1 | import 'package:extended_image/extended_image.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:jetlinks_app/utils/base64.dart'; 5 | 6 | class WallPagerPage extends StatefulWidget { 7 | final String wallpaperImageUrl; 8 | WallPagerPage({this.wallpaperImageUrl}); 9 | @override 10 | _WallPagerPageState createState() => _WallPagerPageState(wallpaperImageUrl); 11 | } 12 | 13 | class _WallPagerPageState extends State { 14 | 15 | String wallPaperImageUrl; 16 | 17 | _WallPagerPageState(String wallPaperImageUrl){ 18 | this.wallPaperImageUrl=Base64.decodeBase64(wallPaperImageUrl.replaceAll("/", '/')); 19 | } 20 | 21 | double _top; 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return Scaffold( 26 | body: Container( 27 | color: Colors.black, 28 | height: double.infinity, 29 | width: double.infinity, 30 | child: GestureDetector( 31 | child: ExtendedImage.network(wallPaperImageUrl,cache: true,fit: BoxFit.cover,), 32 | onVerticalDragUpdate: (DragUpdateDetails details){ 33 | _top+=details.delta.dy; 34 | }, 35 | onVerticalDragDown: (DragDownDetails details){ 36 | _top=0; 37 | }, 38 | onVerticalDragEnd: (DragEndDetails details){ 39 | if(details.velocity.pixelsPerSecond.dy<0&&_top<=-150){ 40 | // NavigatorU 41 | } 42 | }, 43 | ), 44 | ), 45 | ); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /lib/utils/browser_url.dart: -------------------------------------------------------------------------------- 1 | import 'package:flustars/flustars.dart'; 2 | import 'package:jetlinks_app/common/constant.dart'; 3 | 4 | class BrowserUrlManager { 5 | static const String URL_BASE = "https://demo.jetlinks.cn/"; 6 | 7 | 8 | /// 首页 9 | static const String URL_PAY_SMART_ANALYSIS = URL_BASE + "recipe-detail?date="; 10 | 11 | /// 设备信息 12 | static const String URL_CALORY = "https://demo.jetlinks.cn/"; 13 | 14 | static String getSmartAnalysisUrl() { 15 | return URL_PAY_SMART_ANALYSIS + 16 | DateUtil.formatDate(DateTime.now(), format: Constant.y_mo_d_v2); 17 | } 18 | 19 | static Future handleUrl(String url) async { 20 | await SpUtil.getInstance(); 21 | if (url.isEmpty) { 22 | return null; 23 | } 24 | url = appendBaseParams(url); 25 | url = appendToken(url); 26 | return url; 27 | } 28 | 29 | /// 为所有url添加基本参数 30 | static String appendBaseParams(String url) { 31 | if (url.contains("?")) { 32 | url += "&app_device=Android"; 33 | } else { 34 | url += "?app_device=Android"; 35 | } 36 | url += "&channel=" + "boohee"; 37 | url += "&app_key=" + "one"; 38 | return url; 39 | } 40 | 41 | /// 来自Jetlinks的url会加上token 42 | static String appendToken(String url) { 43 | if (url.contains("jetlinks.cn") || 44 | url.contains("jetlinks.org")) { 45 | if (url.contains("?")) { 46 | url += "&token="; 47 | } else { 48 | url += "?token="; 49 | } 50 | url += SpUtil.getString(Constant.token, defValue: ""); 51 | } 52 | return url; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | jetlinks_app 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 | -------------------------------------------------------------------------------- /assets/json/home/home_health_tools.json: -------------------------------------------------------------------------------- 1 | { 2 | "success": true, 3 | "msg": "", 4 | "data": [ 5 | { 6 | "id": 1, 7 | "name": "产品信息", 8 | "code": "diet_exercise_record", 9 | "visible": true, 10 | "editable": true 11 | }, 12 | { 13 | "id": 3, 14 | "name": "实例信息", 15 | "code": "wisdom", 16 | "visible": true, 17 | "editable": true 18 | }, 19 | { 20 | "id": 2, 21 | "name": "链接管理", 22 | "code": "weight_record", 23 | "visible": true, 24 | "editable": true 25 | }, 26 | { 27 | "id": 4, 28 | "name": "网关设备", 29 | "code": "health_habits", 30 | "visible": true, 31 | "editable": true 32 | }, 33 | { 34 | "id": 5, 35 | "name": "固件升级", 36 | "code": "exercise", 37 | "visible": true, 38 | "editable": true 39 | }, 40 | { 41 | "id": 6, 42 | "name": "设备分组", 43 | "code": "measure_record", 44 | "visible": true, 45 | "editable": true 46 | }, 47 | { 48 | "id": 7, 49 | "name": "证书管理", 50 | "code": "periods_record", 51 | "visible": true, 52 | "editable": true 53 | }, 54 | { 55 | "id": 9, 56 | "name": "网络组件", 57 | "code": "steps_record", 58 | "visible": true, 59 | "editable": true 60 | }, 61 | { 62 | "id": 10, 63 | "name": "协议管理", 64 | "code": "sleep_record", 65 | "visible": true, 66 | "editable": true 67 | }, 68 | { 69 | "id": 11, 70 | "name": "通知记录", 71 | "code": "baby", 72 | "visible": true, 73 | "editable": true 74 | } 75 | ], 76 | "extra": { 77 | "wisdom": { 78 | "bought": true, 79 | "show": true, 80 | "name": "日志管理" 81 | } 82 | } 83 | } -------------------------------------------------------------------------------- /lib/widget/home_common_card.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:jetlinks_app/common/styles.dart'; 5 | import 'package:jetlinks_app/utils/utils.dart'; 6 | 7 | /// 首页通用卡片样式 8 | class CommonCard extends StatelessWidget { 9 | final String iconUrl; 10 | final String title; 11 | final Widget subWidget; 12 | final Function onPressed; 13 | 14 | CommonCard({ 15 | this.iconUrl, 16 | this.title, 17 | this.subWidget, 18 | this.onPressed, 19 | }); 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return InkWell( 24 | onTap: onPressed, 25 | child: Container( 26 | margin: EdgeInsets.only(top: 19, bottom: 19), 27 | padding: EdgeInsets.only(left: 15, right: 15), 28 | child: Row( 29 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 30 | children: [ 31 | Row( 32 | children: [ 33 | Image.asset( 34 | Utils.getImgPath(iconUrl), 35 | height: 18, 36 | width: 18, 37 | ), 38 | PaddingStyles.getPadding(6), 39 | Text( 40 | title, 41 | style: TextStyles.get14TextBold_373D52(), 42 | ) 43 | ], 44 | ), 45 | Row( 46 | children: [ 47 | subWidget == null ? Text("") : subWidget, 48 | Image.asset( 49 | Utils.getImgPath( 50 | "ic_arrow_grey", 51 | ), 52 | height: 18, 53 | width: 18, 54 | ) 55 | ], 56 | ) 57 | ], 58 | ), 59 | ), 60 | ); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /lib/route/navigator.dart: -------------------------------------------------------------------------------- 1 | import 'package:fluro/fluro.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:jetlinks_app/route/application.dart'; 4 | import 'package:jetlinks_app/route/routes.dart'; 5 | import 'package:jetlinks_app/utils/base64.dart'; 6 | 7 | class NavigatorUtils{ 8 | static push(BuildContext context ,String path,{bool replace=false,bool clearStack =false}){ 9 | Application.router.navigateTo(context, path, 10 | replace: replace, 11 | clearStack: clearStack, 12 | transition: TransitionType.native); 13 | } 14 | 15 | static pushResult(BuildContext context,String path,Function(Object) function, 16 | {bool replace=false,bool clearStack =false}){ 17 | Application.router.navigateTo(context, path, 18 | replace: replace, 19 | clearStack: clearStack, 20 | transition: TransitionType.native).then((value) { 21 | if(value==null){ 22 | return; 23 | } 24 | function(value); 25 | }).catchError((error){ 26 | print("$error"); 27 | }); 28 | } 29 | 30 | static void goBack(BuildContext context)=>Navigator.pop(context); 31 | 32 | static void goBrowserPage(BuildContext context,String url){ 33 | url =Base64.encodeBase64(url).replaceAll("/", "/"); 34 | Application.router.navigateTo(context, '${Routes.webView}?web_url=$url', 35 | replace: false, 36 | clearStack: false, 37 | transition: TransitionType.inFromBottom); 38 | } 39 | 40 | static void goWallPaper(BuildContext context,String imageUrl){ 41 | /// 这里使用替换/主要是路由不支持链接中带有/和&,否则会出错 42 | imageUrl = Base64.encodeBase64(imageUrl).replaceAll("/", "jetlinks"); 43 | Application.router.navigateTo(context, '${Routes.wallPaper}?image_url=$imageUrl', 44 | replace: false, 45 | clearStack: false, 46 | transition: TransitionType.custom, 47 | transitionBuilder: Routes.transitionTopToBottom()); 48 | } 49 | 50 | static void goBackWithParams(BuildContext context,result)=>Navigator.pop(context,result); 51 | } -------------------------------------------------------------------------------- /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 | 28 | android { 29 | compileSdkVersion 28 30 | 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/kotlin' 33 | } 34 | 35 | lintOptions { 36 | disable 'InvalidPackage' 37 | } 38 | 39 | defaultConfig { 40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 41 | applicationId "org.jetlinks.jetlinks_app" 42 | minSdkVersion 16 43 | targetSdkVersion 28 44 | versionCode flutterVersionCode.toInteger() 45 | versionName flutterVersionName 46 | } 47 | 48 | buildTypes { 49 | release { 50 | // TODO: Add your own signing config for the release build. 51 | // Signing with the debug keys for now, so `flutter run --release` works. 52 | signingConfig signingConfigs.debug 53 | } 54 | } 55 | } 56 | 57 | flutter { 58 | source '../..' 59 | } 60 | 61 | dependencies { 62 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 63 | } 64 | -------------------------------------------------------------------------------- /lib/common/styles.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:flutter/cupertino.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | import 'colors.dart'; 7 | 8 | class TextStyles { 9 | static TextStyle get11Text_00CDA2() { 10 | return TextStyle(fontSize: 11, color: color00CDA2); 11 | } 12 | 13 | static TextStyle get11TextA8ACBC() { 14 | return TextStyle(fontSize: 11, color: colorA8ACBC); 15 | } 16 | 17 | static TextStyle get14TextBold_373D52() { 18 | return TextStyle( 19 | fontSize: 14, color: color373D52, fontWeight: FontWeight.w700); 20 | } 21 | 22 | static TextStyle get15Text_373D52() { 23 | return TextStyle(fontSize: 15, color: color373D52); 24 | } 25 | 26 | static TextStyle get15TextBold_373D52() { 27 | return TextStyle( 28 | fontSize: 15, color: color373D52, fontWeight: FontWeight.w700); 29 | } 30 | 31 | static TextStyle get14Text_373D52() { 32 | return TextStyle(fontSize: 14, color: color373D52); 33 | } 34 | 35 | static TextStyle get14TextA8ACBC() { 36 | return TextStyle(fontSize: 14, color: colorA8ACBC); 37 | } 38 | 39 | static TextStyle get12TextA8ACBC() { 40 | return TextStyle(fontSize: 12, color: colorA8ACBC); 41 | } 42 | 43 | static TextStyle get12Text_373D52() { 44 | return TextStyle(fontSize: 12, color: color373D52); 45 | } 46 | 47 | static TextStyle get10TextA8ACBC() { 48 | return TextStyle(fontSize: 10, color: colorA8ACBC); 49 | } 50 | 51 | static TextStyle get15White() { 52 | return TextStyle(fontSize: 15, color: Colors.white); 53 | } 54 | } 55 | 56 | class PaddingStyles { 57 | static Padding getPadding(double padding) { 58 | return Padding( 59 | padding: EdgeInsets.only( 60 | top: 0, left: padding / 2, right: padding / 2, bottom: 0)); 61 | } 62 | } 63 | 64 | class SizeBoxFactory { 65 | /// 垂直间距 66 | static SizedBox getVerticalSizeBox(double height) { 67 | return SizedBox(height: height); 68 | } 69 | 70 | /// 水平间隔 71 | static SizedBox getHorizontalSizeBox(double width) { 72 | return SizedBox(width: width); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /lib/views/common/browser_page.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/cupertino.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:jetlinks_app/utils/base64.dart'; 6 | import 'package:jetlinks_app/common/colors.dart'; 7 | import 'package:webview_flutter/webview_flutter.dart'; 8 | 9 | class BrowserPage extends StatefulWidget { 10 | 11 | final String webViewUrl; 12 | 13 | BrowserPage({this.webViewUrl}); 14 | 15 | @override 16 | _BrowserPageState createState() => _BrowserPageState(webViewUrl); 17 | } 18 | 19 | class _BrowserPageState extends State { 20 | final Completer _controller = Completer(); 21 | 22 | String webViewUrl; 23 | String title; 24 | 25 | _BrowserPageState(String url){ 26 | webViewUrl =Base64.decodeBase64(url.replaceAll('/', "/")); 27 | } 28 | 29 | @override 30 | Widget build(BuildContext context) { 31 | return WillPopScope( 32 | child: Scaffold( 33 | appBar: AppBar( 34 | backgroundColor: mainColor, 35 | title: Text(title??'Jetlinks'), 36 | ), 37 | body: WebView( 38 | initialUrl: webViewUrl, 39 | javascriptMode: JavascriptMode.unrestricted, 40 | onWebViewCreated: (WebViewController webViewController){ 41 | _controller.complete(webViewController); 42 | }, 43 | javascriptChannels: [ 44 | _toasterJavascriptChannel(context), 45 | ].toSet(), 46 | onPageFinished: (String url){}, 47 | ), 48 | ), 49 | onWillPop: () async { 50 | var controller =await _controller.future; 51 | if(await controller.canGoBack()){ 52 | // 是否可以回退到上一步 53 | controller.goBack(); 54 | return false; 55 | }else { 56 | return true; 57 | } 58 | }); 59 | } 60 | JavascriptChannel _toasterJavascriptChannel(BuildContext context)=>JavascriptChannel( 61 | name: 'Toaster', 62 | onMessageReceived: (JavascriptMessage message){ 63 | Scaffold.of(context).showSnackBar(SnackBar(content: Text(message.message)),); 64 | } 65 | ); 66 | } 67 | -------------------------------------------------------------------------------- /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/widget/header/home_wallpaper_header.dart: -------------------------------------------------------------------------------- 1 | import 'package:extended_image/extended_image.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:flutter/src/painting/basic_types.dart'; 4 | import 'package:flutter/src/widgets/framework.dart'; 5 | import 'package:flutter_easyrefresh/easy_refresh.dart'; 6 | 7 | class WallPaperHeader extends Header { 8 | final Key key; 9 | final String wallPaperUrl; 10 | 11 | final LinkHeaderNotifier linkNotifier = LinkHeaderNotifier(); 12 | 13 | WallPaperHeader({ 14 | this.key, 15 | this.wallPaperUrl, 16 | bool enableHapticFeedback = false, 17 | }) : super( 18 | extent: 120, 19 | triggerDistance: 120, 20 | float: false, 21 | enableHapticFeedback: enableHapticFeedback, 22 | enableInfiniteRefresh: false, 23 | ); 24 | 25 | @override 26 | Widget contentBuilder( 27 | BuildContext context, 28 | RefreshMode refreshState, 29 | double pulledExtent, 30 | double refreshTriggerPullDistance, 31 | double refreshIndicatorExtent, 32 | AxisDirection axisDirection, 33 | bool float, 34 | Duration completeDuration, 35 | bool enableInfiniteRefresh, 36 | bool success, 37 | bool noMore) { 38 | linkNotifier.contentBuilder( 39 | context, 40 | refreshState, 41 | pulledExtent, 42 | refreshTriggerPullDistance, 43 | refreshIndicatorExtent, 44 | axisDirection, 45 | float, 46 | completeDuration, 47 | enableInfiniteRefresh, 48 | success, 49 | noMore); 50 | 51 | return WallPaperHeaderPage( 52 | wallPaperUrl: wallPaperUrl, 53 | linkNotifier: linkNotifier, 54 | key: key, 55 | ); 56 | } 57 | } 58 | 59 | class WallPaperHeaderPage extends StatefulWidget { 60 | final String wallPaperUrl; 61 | final LinkHeaderNotifier linkNotifier; 62 | 63 | WallPaperHeaderPage({this.wallPaperUrl, Key key, this.linkNotifier}) 64 | : super(key: key); 65 | 66 | @override 67 | _WallPaperHeaderPageState createState() => _WallPaperHeaderPageState(); 68 | } 69 | 70 | class _WallPaperHeaderPageState extends State { 71 | RefreshMode get _refreshState => widget.linkNotifier.refreshState; 72 | 73 | double get _pulledExtent => widget.linkNotifier.pulledExtent; 74 | 75 | double get _indicatorExtent => widget.linkNotifier.refreshIndicatorExtent; 76 | 77 | @override 78 | Widget build(BuildContext context) { 79 | return ExtendedImage.network( 80 | widget.wallPaperUrl, 81 | cache: true, 82 | fit: BoxFit.fitWidth, 83 | ); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | - path_provider (0.0.1): 4 | - Flutter 5 | - path_provider_linux (0.0.1): 6 | - Flutter 7 | - path_provider_macos (0.0.1): 8 | - Flutter 9 | - shared_preferences (0.0.1): 10 | - Flutter 11 | - shared_preferences_linux (0.0.1): 12 | - Flutter 13 | - shared_preferences_macos (0.0.1): 14 | - Flutter 15 | - shared_preferences_web (0.0.1): 16 | - Flutter 17 | - webview_flutter (0.0.1): 18 | - Flutter 19 | 20 | DEPENDENCIES: 21 | - Flutter (from `Flutter`) 22 | - path_provider (from `.symlinks/plugins/path_provider/ios`) 23 | - path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`) 24 | - path_provider_macos (from `.symlinks/plugins/path_provider_macos/ios`) 25 | - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) 26 | - shared_preferences_linux (from `.symlinks/plugins/shared_preferences_linux/ios`) 27 | - shared_preferences_macos (from `.symlinks/plugins/shared_preferences_macos/ios`) 28 | - shared_preferences_web (from `.symlinks/plugins/shared_preferences_web/ios`) 29 | - webview_flutter (from `.symlinks/plugins/webview_flutter/ios`) 30 | 31 | EXTERNAL SOURCES: 32 | Flutter: 33 | :path: Flutter 34 | path_provider: 35 | :path: ".symlinks/plugins/path_provider/ios" 36 | path_provider_linux: 37 | :path: ".symlinks/plugins/path_provider_linux/ios" 38 | path_provider_macos: 39 | :path: ".symlinks/plugins/path_provider_macos/ios" 40 | shared_preferences: 41 | :path: ".symlinks/plugins/shared_preferences/ios" 42 | shared_preferences_linux: 43 | :path: ".symlinks/plugins/shared_preferences_linux/ios" 44 | shared_preferences_macos: 45 | :path: ".symlinks/plugins/shared_preferences_macos/ios" 46 | shared_preferences_web: 47 | :path: ".symlinks/plugins/shared_preferences_web/ios" 48 | webview_flutter: 49 | :path: ".symlinks/plugins/webview_flutter/ios" 50 | 51 | SPEC CHECKSUMS: 52 | Flutter: 0e3d915762c693b495b44d77113d4970485de6ec 53 | path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c 54 | path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4 55 | path_provider_macos: f760a3c5b04357c380e2fddb6f9db6f3015897e0 56 | shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d 57 | shared_preferences_linux: afefbfe8d921e207f01ede8b60373d9e3b566b78 58 | shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087 59 | shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9 60 | webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96 61 | 62 | PODFILE CHECKSUM: c34e2287a9ccaa606aeceab922830efb9a6ff69a 63 | 64 | COCOAPODS: 1.9.3 65 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 12 | 19 | 23 | 27 | 32 | 36 | 37 | 38 | 39 | 40 | 41 | 43 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /assets/json/home/home_wallpaper.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "welcome_img": { 4 | "hello_text": "我的目标就在下个路口 现在要做的就是加点油门", 5 | "back_img": "http://img4.imgtn.bdimg.com/it/u=3630224677,3892138201&fm=26&gp=0.jpg", 6 | "back_img_small": "http://img4.imgtn.bdimg.com/it/u=3630224677,3892138201&fm=26&gp=0.jpg", 7 | "back_img_x": "http://img4.imgtn.bdimg.com/it/u=3630224677,3892138201&fm=26&gp=0.jpg", 8 | "video_url": "", 9 | "link": "", 10 | "date": "2019-08-17" 11 | } 12 | }, 13 | { 14 | "welcome_img": { 15 | "hello_text": "我的目标就在下个路口 现在要做的就是加点油门", 16 | "back_img": "http://bpic.588ku.com/back_pic/04/16/46/70582539ad199c3.jpg", 17 | "back_img_small": "http://bpic.588ku.com/back_pic/04/16/46/70582539ad199c3.jpg", 18 | "back_img_x": "http://bpic.588ku.com/back_pic/04/16/46/70582539ad199c3.jpg", 19 | "video_url": "", 20 | "link": "", 21 | "date": "2019-08-17" 22 | } 23 | }, 24 | { 25 | "welcome_img": { 26 | "hello_text": "我的目标就在下个路口 现在要做的就是加点油门", 27 | "back_img": "http://i0.hdslb.com/bfs/article/656bdacd46a9d36f2ee9bb1e90742ad7aa115675.jpg", 28 | "back_img_small": "http://i0.hdslb.com/bfs/article/656bdacd46a9d36f2ee9bb1e90742ad7aa115675.jpg", 29 | "back_img_x": "http://i0.hdslb.com/bfs/article/656bdacd46a9d36f2ee9bb1e90742ad7aa115675.jpg", 30 | "video_url": "", 31 | "link": "", 32 | "date": "2019-08-17" 33 | } 34 | }, 35 | { 36 | "welcome_img": { 37 | "hello_text": "我的目标就在下个路口 现在要做的就是加点油门", 38 | "back_img": "http://i0.hdslb.com/bfs/article/ecf365c2788d37a1624f64d4ed5215048c7a651d.jpg", 39 | "back_img_small": "http://i0.hdslb.com/bfs/article/ecf365c2788d37a1624f64d4ed5215048c7a651d.jpg", 40 | "back_img_x": "http://i0.hdslb.com/bfs/article/ecf365c2788d37a1624f64d4ed5215048c7a651d.jpg", 41 | "video_url": "", 42 | "link": "", 43 | "date": "2019-08-17" 44 | } 45 | }, 46 | { 47 | "welcome_img": { 48 | "hello_text": "我的目标就在下个路口 现在要做的就是加点油门", 49 | "back_img": "http://i0.hdslb.com/bfs/article/f876c0ee67f0b2429db1e961c868f4502e75b82f.jpg", 50 | "back_img_small": "http://i0.hdslb.com/bfs/article/f876c0ee67f0b2429db1e961c868f4502e75b82f.jpg", 51 | "back_img_x": "http://i0.hdslb.com/bfs/article/f876c0ee67f0b2429db1e961c868f4502e75b82f.jpg", 52 | "video_url": "", 53 | "link": "", 54 | "date": "2019-08-17" 55 | } 56 | }, 57 | { 58 | "welcome_img": { 59 | "hello_text": "我的目标就在下个路口 现在要做的就是加点油门", 60 | "back_img": "http://static.oneplus.cn/data/attachment/forum/201901/07/011459uauejga217p4uz4a.jpg", 61 | "back_img_small": "http://static.oneplus.cn/data/attachment/forum/201901/07/011459uauejga217p4uz4a.jpg", 62 | "back_img_x": "http://static.oneplus.cn/data/attachment/forum/201901/07/011459uauejga217p4uz4a.jpg", 63 | "video_url": "", 64 | "link": "", 65 | "date": "2019-08-17" 66 | } 67 | }, 68 | { 69 | "welcome_img": { 70 | "hello_text": "我的目标就在下个路口 现在要做的就是加点油门", 71 | "back_img": "http://pic.soutu123.com/back_pic/04/30/92/1758417d5f23ee1.jpg%21/fw/700/quality/90/unsharp/true/compress/true", 72 | "back_img_small": "http://pic.soutu123.com/back_pic/04/30/92/1758417d5f23ee1.jpg%21/fw/700/quality/90/unsharp/true/compress/true", 73 | "back_img_x": "http://pic.soutu123.com/back_pic/04/30/92/1758417d5f23ee1.jpg%21/fw/700/quality/90/unsharp/true/compress/true", 74 | "video_url": "", 75 | "link": "", 76 | "date": "2019-08-17" 77 | } 78 | } 79 | ] -------------------------------------------------------------------------------- /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 | generated_key_values = {} 19 | skip_line_start_symbols = ["#", "/"] 20 | File.foreach(file_abs_path) do |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 | generated_key_values[podname] = podpath 28 | else 29 | puts "Invalid plugin specification: #{line}" 30 | end 31 | end 32 | generated_key_values 33 | end 34 | 35 | target 'Runner' do 36 | use_frameworks! 37 | use_modular_headers! 38 | 39 | # Flutter Pod 40 | 41 | copied_flutter_dir = File.join(__dir__, 'Flutter') 42 | copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework') 43 | copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec') 44 | unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path) 45 | # Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet. 46 | # That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration. 47 | # CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist. 48 | 49 | generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig') 50 | unless File.exist?(generated_xcode_build_settings_path) 51 | raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first" 52 | end 53 | generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path) 54 | cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR']; 55 | 56 | unless File.exist?(copied_framework_path) 57 | FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir) 58 | end 59 | unless File.exist?(copied_podspec_path) 60 | FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir) 61 | end 62 | end 63 | 64 | # Keep pod path relative so it can be checked into Podfile.lock. 65 | pod 'Flutter', :path => 'Flutter' 66 | 67 | # Plugin Pods 68 | 69 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock 70 | # referring to absolute paths on developers' machines. 71 | system('rm -rf .symlinks') 72 | system('mkdir -p .symlinks/plugins') 73 | plugin_pods = parse_KV_file('../.flutter-plugins') 74 | plugin_pods.each do |name, path| 75 | symlink = File.join('.symlinks', 'plugins', name) 76 | File.symlink(path, symlink) 77 | pod name, :path => File.join(symlink, 'ios') 78 | end 79 | end 80 | 81 | post_install do |installer| 82 | installer.pods_project.targets.each do |target| 83 | target.build_configurations.each do |config| 84 | config.build_settings['ENABLE_BITCODE'] = 'NO' 85 | end 86 | end 87 | end 88 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /lib/views/main_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:jetlinks_app/common/colors.dart'; 4 | import 'package:jetlinks_app/utils/toast.dart'; 5 | import 'package:jetlinks_app/views/device_page.dart'; 6 | import 'package:jetlinks_app/views/discover_page.dart'; 7 | import 'package:jetlinks_app/views/home_page.dart'; 8 | import 'package:jetlinks_app/views/mine_page.dart'; 9 | 10 | class MainPage extends StatefulWidget { 11 | @override 12 | _MainPageState createState() => _MainPageState(); 13 | } 14 | 15 | class _MainPageState extends State with SingleTickerProviderStateMixin { 16 | DateTime _lastPressedAt; 17 | int _selectedIndex=0; 18 | List _list=List(); 19 | List _selectIcon=[ 20 | Image.asset( 21 | "images/ic_tab_bar_home_green.png", 22 | width: 22, 23 | height: 22, 24 | ), 25 | Image.asset( 26 | "images/ic_tab_bar_partner_green.png", 27 | width: 22, 28 | height: 22, 29 | ), 30 | Image.asset( 31 | "images/ic_home_tabbar_plus.png", 32 | width: 36, 33 | height: 36, 34 | ), 35 | Image.asset( 36 | "images/ic_tab_bar_shop_green.png", 37 | width: 22, 38 | height: 22, 39 | ), 40 | Image.asset( 41 | "images/ic_tab_bar_me_green.png", 42 | width: 22, 43 | height: 22, 44 | ), 45 | ]; 46 | List _unselectIcon=[ 47 | Image.asset( 48 | "images/ic_tab_bar_home_grey.png", 49 | width: 22, 50 | height: 22, 51 | ), 52 | Image.asset( 53 | "images/ic_tab_bar_partner_grey.png", 54 | width: 22, 55 | height: 22, 56 | ), 57 | Image.asset( 58 | "images/ic_home_tabbar_plus.png", 59 | width: 36, 60 | height: 36, 61 | ), 62 | Image.asset( 63 | "images/ic_tab_bar_shop_grey.png", 64 | width: 22, 65 | height: 22, 66 | ), 67 | Image.asset( 68 | "images/ic_tab_bar_me_grey.png", 69 | width: 22, 70 | height: 22, 71 | ), 72 | ]; 73 | static List tabData=[ 74 | '首页', 75 | '设备', 76 | '', 77 | '协议', 78 | '我' 79 | ]; 80 | List _myTabs=[]; 81 | 82 | @override 83 | void initState() { 84 | super.initState(); 85 | for(int i=0;i2?_selectedIndex-1:_selectedIndex, 122 | children: _list, 123 | ), 124 | bottomNavigationBar: BottomNavigationBar( 125 | selectedFontSize: 10, 126 | unselectedFontSize: 10, 127 | backgroundColor: Colors.white, 128 | items: _myTabs, 129 | currentIndex: _selectedIndex, 130 | onTap: _onItemTapped, 131 | type: BottomNavigationBarType.fixed, 132 | fixedColor: mainColor, 133 | ), 134 | ), 135 | onWillPop: () async{ 136 | if(_lastPressedAt==null||DateTime.now().difference(_lastPressedAt)>Duration(seconds: 2)){ 137 | _lastPressedAt=DateTime.now(); 138 | ToastUtils.showToast(context, '再按一次返回退出APP'); 139 | return false; 140 | } 141 | return true; 142 | }); 143 | } 144 | 145 | } 146 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: jetlinks_app 2 | description: Jetlinks APP 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.7.0 <3.0.0" 22 | 23 | dependencies: 24 | flutter: 25 | sdk: flutter 26 | 27 | 28 | # The following adds the Cupertino Icons font to your application. 29 | # Use with the CupertinoIcons class for iOS style icons. 30 | cupertino_icons: ^0.1.3 31 | json_annotation: ^3.0.1 32 | flustars: ^0.3.2 33 | fluro: ^1.6.3 34 | webview_flutter: ^0.3.22+1 35 | toast: ^0.1.5 36 | extended_image: ^0.9.0 37 | flutter_easyrefresh: ^2.1.1 38 | fl_chart: ^0.2.2 39 | percent_indicator: ^2.1.5 40 | 41 | dev_dependencies: 42 | flutter_test: 43 | sdk: flutter 44 | build_runner: ^1.7.0 45 | json_serializable: ^3.3.0 46 | rxdart: ^0.22.2 47 | # For information on the generic Dart part of this file, see the 48 | # following page: https://dart.dev/tools/pub/pubspec 49 | 50 | # The following section is specific to Flutter. 51 | flutter: 52 | 53 | # The following line ensures that the Material Icons font is 54 | # included with your application, so that you can use the icons in 55 | # the material Icons class. 56 | uses-material-design: true 57 | 58 | # To add assets to your application, add an assets section, like this: 59 | assets: 60 | - assets/json/common/splash_ad.json 61 | - assets/json/user/login_user.json 62 | - assets/json/home/home_health_tools.json 63 | - assets/json/home/home_wallpaper.json 64 | - images/ic_jetlinks_logo.png 65 | - images/ic_tab_bar_home_grey.png 66 | - images/ic_tab_bar_me_grey.png 67 | - images/ic_tab_bar_partner_grey.png 68 | - images/ic_tab_bar_shop_grey.png 69 | - images/ic_tab_bar_home_green.png 70 | - images/ic_tab_bar_me_green.png 71 | - images/ic_tab_bar_partner_green.png 72 | - images/ic_tab_bar_shop_green.png 73 | - images/ic_home_tabbar_plus.png 74 | - images/ic_message_grey.png 75 | - images/ic_message_white.png 76 | - images/ic_search_grey.png 77 | - images/ic_search_white.png 78 | - images/ic_home_habit.png 79 | - images/ic_home_menstruation.png 80 | - images/ic_home_sport.png 81 | - images/ic_home_circumference.png 82 | - images/ic_home_step.png 83 | - images/ic_home_baby.png 84 | - images/ic_home_food_plan.png 85 | - images/ic_home_sleep.png 86 | - images/ic_shop_cart_white.png 87 | - images/ic_home_calorie.png 88 | - images/ic_dietician_logo.png 89 | - images/ic_home_dietician.png 90 | - images/ic_home_weight.png 91 | - images/ic_arrow_grey.png 92 | - images/ic_arrow_light_yellow.png 93 | 94 | # An image asset can refer to one or more resolution-specific "variants", see 95 | # https://flutter.dev/assets-and-images/#resolution-aware. 96 | 97 | # For details regarding adding assets from package dependencies, see 98 | # https://flutter.dev/assets-and-images/#from-packages 99 | 100 | # To add custom fonts to your application, add a fonts section here, 101 | # in this "flutter" section. Each entry in this list should have a 102 | # "family" key with the font family name, and a "fonts" key with a 103 | # list giving the asset and other descriptors for the font. For 104 | # example: 105 | # fonts: 106 | # - family: Schyler 107 | # fonts: 108 | # - asset: fonts/Schyler-Regular.ttf 109 | # - asset: fonts/Schyler-Italic.ttf 110 | # style: italic 111 | # - family: Trajan Pro 112 | # fonts: 113 | # - asset: fonts/TrajanPro.ttf 114 | # - asset: fonts/TrajanPro_Bold.ttf 115 | # weight: 700 116 | # 117 | # For details regarding fonts from package dependencies, 118 | # see https://flutter.dev/custom-fonts/#from-packages 119 | -------------------------------------------------------------------------------- /lib/widget/commom_search_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flustars/flustars.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:jetlinks_app/common/colors.dart'; 5 | import 'package:jetlinks_app/common/styles.dart'; 6 | import 'package:jetlinks_app/utils/utils.dart'; 7 | 8 | class SearchBar extends StatefulWidget implements PreferredSizeWidget{ 9 | final Key key; 10 | final Function onPressed; 11 | final String text; 12 | final bool isShowCartIcon; 13 | final SearchBarController controller; 14 | 15 | SearchBar( 16 | {this.onPressed, 17 | this.controller, 18 | this.key, 19 | this.isShowCartIcon:false, 20 | @required this.text} 21 | ):super(key:key); 22 | 23 | @override 24 | SearchBarState createState() => SearchBarState(); 25 | 26 | @override 27 | Size get preferredSize => Size.fromHeight(200); 28 | } 29 | 30 | class SearchBarState extends State { 31 | 32 | SearchBarController _controller; 33 | 34 | @override 35 | Widget build(BuildContext context) { 36 | if(widget.controller==null){ 37 | _controller=new SearchBarController(); 38 | _controller.value.alpha=255; 39 | _controller.value.searchBarBg=color0EB794; 40 | _controller.value.appbarTitleColor=Colors.white; 41 | _controller.value.appbarLeftIcon='ic_search_white'; 42 | _controller.value.appbarRightIcon='ic_message_white'; 43 | }else{ 44 | _controller=widget.controller; 45 | } 46 | return Container( 47 | color: Color.fromARGB(_controller.value.alpha, 0, 205, 162), 48 | padding: EdgeInsets.only( 49 | left: 17, 50 | right: 17, 51 | top: ScreenUtil.getStatusBarH(context)+17, 52 | bottom: 17 53 | ), 54 | child: Row( 55 | children: [ 56 | Expanded( 57 | child: Container( 58 | child: DecoratedBox( 59 | decoration: BoxDecoration( 60 | color: _controller.value.searchBarBg, 61 | borderRadius: BorderRadius.circular(100), 62 | ), 63 | child: Padding( 64 | padding: EdgeInsets.only(top: 7,bottom: 7), 65 | child: Row( 66 | children: [ 67 | PaddingStyles.getPadding(14), 68 | Image.asset( 69 | Utils.getImgPath(_controller.value.appbarLeftIcon), 70 | width: 24, 71 | height: 24, 72 | ), 73 | PaddingStyles.getPadding(7), 74 | Text( 75 | widget.text, 76 | style: TextStyle( 77 | fontSize: 14, 78 | color: _controller.value.appbarTitleColor 79 | ), 80 | ) 81 | ], 82 | ), 83 | ), 84 | ), 85 | ), 86 | ), 87 | Offstage( 88 | child: SizeBoxFactory.getHorizontalSizeBox(14), 89 | offstage: !widget.isShowCartIcon, 90 | ), 91 | Offstage( 92 | offstage: !widget.isShowCartIcon, 93 | child: Image.asset( 94 | Utils.getImgPath('ic_shop_cart_white'), 95 | width: 24, 96 | height: 24, 97 | ), 98 | ), 99 | SizeBoxFactory.getHorizontalSizeBox(14), 100 | Image.asset( 101 | Utils.getImgPath(_controller.value.appbarRightIcon), 102 | width: 24, 103 | height: 24, 104 | ) 105 | ], 106 | ), 107 | ); 108 | } 109 | 110 | } 111 | 112 | class SearchBarController extends ValueNotifier{ 113 | int alpha; 114 | Color searchBarBg; 115 | Color appbarTitleColor; 116 | String appbarLeftIcon; 117 | String appbarRightIcon; 118 | 119 | SearchBarController({ 120 | this.alpha, 121 | this.searchBarBg, 122 | this.appbarTitleColor, 123 | this.appbarLeftIcon, 124 | this.appbarRightIcon 125 | }):super(new SearchBarAlphaValue( 126 | alpha: alpha, 127 | searchBarBg: searchBarBg, 128 | appbarTitleColor: appbarTitleColor, 129 | appbarLeftIcon: appbarLeftIcon, 130 | appbarRightIcon: appbarRightIcon 131 | )); 132 | } 133 | 134 | class SearchBarAlphaValue{ 135 | int alpha; 136 | Color searchBarBg; 137 | Color appbarTitleColor; 138 | String appbarLeftIcon; 139 | String appbarRightIcon; 140 | 141 | SearchBarAlphaValue({ 142 | this.alpha, 143 | this.searchBarBg, 144 | this.appbarTitleColor, 145 | this.appbarLeftIcon, 146 | this.appbarRightIcon, 147 | }); 148 | } -------------------------------------------------------------------------------- /lib/views/login/login_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flustars/flustars.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:jetlinks_app/common/colors.dart'; 5 | import 'package:jetlinks_app/common/constant.dart'; 6 | import 'package:jetlinks_app/common/styles.dart'; 7 | import 'package:jetlinks_app/model/login_user.dart'; 8 | import 'package:jetlinks_app/route/navigator.dart'; 9 | import 'package:jetlinks_app/route/routes.dart'; 10 | import 'package:jetlinks_app/utils/account.dart'; 11 | import 'package:jetlinks_app/utils/respository.dart'; 12 | import 'package:jetlinks_app/utils/toast.dart'; 13 | import 'package:jetlinks_app/utils/utils.dart'; 14 | 15 | class LoginPage extends StatefulWidget { 16 | @override 17 | _LoginPageState createState() => _LoginPageState(); 18 | } 19 | 20 | class _LoginPageState extends State { 21 | var leftRightPadding = 30.0; 22 | var topBottomPadding = 4.0; 23 | 24 | var _userPassController = new TextEditingController(); 25 | var _userNameController = new TextEditingController(); 26 | 27 | @override 28 | Widget build(BuildContext context) { 29 | return new Scaffold( 30 | backgroundColor: Colors.white, 31 | appBar: new AppBar( 32 | backgroundColor: mainColor, 33 | title: Text('用户登录'), 34 | ), 35 | body: SingleChildScrollView( 36 | child: new Column( 37 | mainAxisSize: MainAxisSize.max, 38 | mainAxisAlignment: MainAxisAlignment.start, 39 | children: [ 40 | Padding( 41 | padding: EdgeInsets.only(top: 80), 42 | child: Row( 43 | mainAxisAlignment: MainAxisAlignment.center, 44 | children: [ 45 | Image.asset( 46 | Utils.getImgPath('ic_jetlinks_logo'), 47 | height: 35, 48 | width: 35, 49 | ), 50 | SizeBoxFactory.getHorizontalSizeBox(20), 51 | Text( 52 | 'Jetlinks', 53 | style: TextStyle( 54 | color: color373D52, 55 | fontSize: 23, 56 | fontWeight: FontWeight.w600 57 | ), 58 | ) 59 | ], 60 | ), 61 | ), 62 | new Padding( 63 | padding: new EdgeInsets.fromLTRB(leftRightPadding, 50.0, leftRightPadding, topBottomPadding), 64 | child: new TextField( 65 | style: new TextStyle(fontSize: 16.0,color: color373D52), 66 | controller: _userNameController, 67 | decoration: new InputDecoration( 68 | hintText: '用户名', 69 | hintStyle: TextStyle(fontSize: 16,color: colorA8ACBC) 70 | ), 71 | ), 72 | ), 73 | new Padding(padding: new EdgeInsets.fromLTRB(leftRightPadding, 30.0, leftRightPadding, topBottomPadding), 74 | child: new TextField( 75 | style: TextStyle(fontSize: 16.0,color: color373D52), 76 | controller: _userPassController, 77 | decoration: new InputDecoration( 78 | hintText: '密码', 79 | hintStyle: TextStyle(fontSize: 16,color: colorA8ACBC), 80 | ), 81 | obscureText: true, 82 | ), 83 | ), 84 | new Container( 85 | width: 360.0, 86 | margin: new EdgeInsets.fromLTRB(10.0, 80, 10.0, 0.0), 87 | padding: new EdgeInsets.fromLTRB(leftRightPadding, topBottomPadding, leftRightPadding, topBottomPadding), 88 | child: new Card( 89 | color: mainColor, 90 | elevation: 6.0, 91 | child: new FlatButton( 92 | onPressed: (){ 93 | login(); 94 | }, 95 | child: new Padding(padding: new EdgeInsets.all(10.0), 96 | child: new Text( 97 | '登录', 98 | style: new TextStyle( 99 | color: Colors.white,fontSize: 16.0 100 | ), 101 | ), 102 | ), 103 | ), 104 | ), 105 | ) 106 | ], 107 | ), 108 | ), 109 | ); 110 | } 111 | 112 | void login() async{ 113 | if(_userNameController.text.isEmpty||_userPassController.text.isEmpty){ 114 | ToastUtils.showToast(context, '用户名或密码不能为空'); 115 | return; 116 | } 117 | Repository.loadAsset('login_user',fileDir: 'user').then((json) async{ 118 | LoginUser loginUser = LoginUser.fromJson(Repository.toMap(json)); 119 | await SpUtil.getInstance(); 120 | AccountUtils.saveUser(loginUser); 121 | SpUtil.putString(Constant.token, loginUser.token); 122 | SpUtil.putString(Constant.user_key, loginUser.user.id); 123 | if(loginUser!=null && loginUser.token.isNotEmpty){ 124 | NavigatorUtils.push(context, Routes.root,replace: true); 125 | } 126 | }); 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /lib/splash_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:extended_image/extended_image.dart'; 2 | import 'package:fluro/fluro.dart'; 3 | import 'package:flustars/flustars.dart'; 4 | import 'package:flutter/cupertino.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:jetlinks_app/common/colors.dart'; 7 | import 'package:jetlinks_app/common/constant.dart'; 8 | import 'package:jetlinks_app/common/styles.dart'; 9 | import 'package:jetlinks_app/route/application.dart'; 10 | import 'package:jetlinks_app/route/navigator.dart'; 11 | import 'package:jetlinks_app/route/routes.dart'; 12 | import 'package:jetlinks_app/utils/respository.dart'; 13 | import 'package:jetlinks_app/utils/utils.dart'; 14 | import 'package:jetlinks_app/widget/round_button.dart'; 15 | 16 | import 'model/splash_ad.dart'; 17 | 18 | class SplashPage extends StatefulWidget { 19 | @override 20 | _SplashPageState createState() => _SplashPageState(); 21 | } 22 | 23 | class _SplashPageState extends State { 24 | 25 | _SplashPageState(){ 26 | final router = new Router(); 27 | Routes.configureRoutes(router); 28 | Application.router=router; 29 | } 30 | bool isLogin = false; 31 | 32 | bool inVisible = true; 33 | SplashAd splashAd; 34 | TimerUtil _timerUtil; 35 | int countdownTime = 3*1000; 36 | int currentTime =3; 37 | 38 | @override 39 | void initState() { 40 | super.initState(); 41 | _loadLoginStatus(); 42 | } 43 | 44 | void _loadLoginStatus() async{ 45 | await SpUtil.getInstance(); 46 | if(!mounted)return; 47 | _loadLocale(); 48 | _loadSplashAd(); 49 | } 50 | 51 | void _loadLocale(){ 52 | setState(() { 53 | String token = SpUtil.getString(Constant.token,defValue: ''); 54 | if(token.isNotEmpty){ 55 | isLogin=true; 56 | } 57 | }); 58 | } 59 | 60 | void _loadSplashAd(){ 61 | Repository.loadAsset('splash_ad').then((value) { 62 | splashAd= SplashAd.fromJson(Repository.toMapForList(value)); 63 | inVisible = !splashAd.isAd; 64 | if(inVisible){ 65 | countdownTime=1*1000; 66 | } 67 | initCountDown(countdownTime); 68 | //开始倒计时 69 | _timerUtil.startCountDown(); 70 | setState((){}); 71 | }); 72 | } 73 | 74 | @override 75 | void dispose() { 76 | super.dispose(); 77 | if(_timerUtil!=null)_timerUtil.cancel(); 78 | } 79 | 80 | void goHome(){ 81 | if(isLogin){ 82 | NavigatorUtils.push(context, Routes.root,replace: true); 83 | }else{ 84 | NavigatorUtils.push(context, Routes.login,replace: true); 85 | } 86 | } 87 | 88 | void initCountDown(int countdownTime){ 89 | _timerUtil = new TimerUtil(mTotalTime: countdownTime); 90 | _timerUtil.setOnTimerTickCallback((int tick) { 91 | double _tick = tick/1000; 92 | setState(() { 93 | currentTime =_tick.toInt(); 94 | }); 95 | if(_tick==0){ 96 | goHome(); 97 | } 98 | }); 99 | } 100 | @override 101 | Widget build(BuildContext context) { 102 | return MaterialApp( 103 | home: Scaffold( 104 | body: Container( 105 | height: double.infinity, 106 | child: Column( 107 | children: [ 108 | Expanded( 109 | child: Stack( 110 | alignment: Alignment.bottomCenter, 111 | children: [ 112 | ExtendedImage.network( 113 | splashAd==null?"":splashAd.startUpUrl, 114 | width: double.infinity, 115 | height: double.infinity, 116 | fit: BoxFit.cover, 117 | cache: true, 118 | enableLoadState: false, 119 | ), 120 | Offstage( 121 | offstage: inVisible, 122 | child: Container( 123 | height: 50, 124 | width: double.infinity, 125 | color: Colors.black38, 126 | child: Center( 127 | child: Text( 128 | splashAd==null?"":splashAd.text, 129 | style: TextStyle(color: Colors.white,fontSize: 15), 130 | ), 131 | ), 132 | ), 133 | ) 134 | ], 135 | ), 136 | ), 137 | Stack( 138 | alignment: Alignment.center, 139 | children: [ 140 | Container( 141 | height: 105, 142 | width: double.infinity, 143 | child: Row( 144 | mainAxisAlignment: MainAxisAlignment.center, 145 | children: [ 146 | Image.asset( 147 | Utils.getImgPath('ic_jetlinks_logo'), 148 | height: 35, 149 | width: 35, 150 | ), 151 | PaddingStyles.getPadding(10), 152 | Text( 153 | 'Jetlinks', 154 | style: TextStyle( 155 | color: color373D52, 156 | fontSize: 18, 157 | fontWeight: FontWeight.w600 158 | ), 159 | ) 160 | ], 161 | ), 162 | ), 163 | Padding( 164 | padding: EdgeInsets.only(right: 10), 165 | child: Align( 166 | alignment: Alignment.centerRight, 167 | child: Offstage( 168 | offstage: inVisible, 169 | child: RoundButton( 170 | padding: EdgeInsets.only( 171 | left: 5,right: 5,top: 2,bottom: 2 172 | ), 173 | backgroundColor: Colors.black45, 174 | radius: 2, 175 | buttonText: Text( 176 | '跳过$currentTime', 177 | style: TextStyle(fontSize: 12,color: Colors.white),), 178 | onPressed: (){ 179 | _timerUtil.cancel(); 180 | goHome(); 181 | }, 182 | ), 183 | ), 184 | ), 185 | ) 186 | ], 187 | ) 188 | ], 189 | ), 190 | ), 191 | ), 192 | ); 193 | } 194 | } 195 | -------------------------------------------------------------------------------- /lib/views/home_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_easyrefresh/easy_refresh.dart'; 4 | import 'package:jetlinks_app/common/colors.dart'; 5 | import 'package:jetlinks_app/common/constant.dart'; 6 | import 'package:jetlinks_app/common/styles.dart'; 7 | import 'package:jetlinks_app/model/home_tools.dart'; 8 | import 'package:jetlinks_app/model/home_wall_paper.dart'; 9 | import 'package:jetlinks_app/route/navigator.dart'; 10 | import 'package:jetlinks_app/utils/respository.dart'; 11 | import 'package:jetlinks_app/utils/toast.dart'; 12 | import 'package:jetlinks_app/widget/card_view.dart'; 13 | import 'package:jetlinks_app/widget/commom_search_bar.dart'; 14 | import 'package:jetlinks_app/widget/header/home_wallpaper_header.dart'; 15 | import 'package:jetlinks_app/widget/home_common_card.dart'; 16 | import 'package:jetlinks_app/widget/main/main_widgets.dart'; 17 | import 'package:rxdart/rxdart.dart'; 18 | 19 | 20 | class HomePage extends StatefulWidget { 21 | @override 22 | _HomePageState createState() => _HomePageState(); 23 | } 24 | 25 | class _HomePageState extends State { 26 | SearchBarController _searchBarController = new SearchBarController( 27 | alpha: 0, 28 | searchBarBg: Color(0x1FFFFFFF), 29 | appbarTitleColor: colorA8ACBC, 30 | appbarLeftIcon: 'ic_search_grey', 31 | appbarRightIcon: 'ic_message_grey' 32 | ); 33 | 34 | bool _isNeedSetAlpha =false; 35 | 36 | GlobalKey _mTitleKey = new GlobalKey(); 37 | 38 | 39 | List topCards = List(); 40 | List bottomCards =List(); 41 | List topCardItems =[ 42 | HomeCard.DIET_SPORT_RECORD, 43 | HomeCard.WISDOM, 44 | HomeCard.HEALTH_HABITS, 45 | HomeCard.WEIGHT_RECORD, 46 | ]; 47 | 48 | ScrollController _controller = new ScrollController(); 49 | 50 | HomeWallPaper wallPaper; 51 | 52 | double percent =0.0; 53 | 54 | @override 55 | void initState() { 56 | super.initState(); 57 | loadData(); 58 | //监听滚动事件,打印滚动位置 59 | _searchBarController.value.alpha = 0; 60 | _controller.addListener(() { 61 | if (_controller.offset < 0) { 62 | return; 63 | } 64 | if (_controller.offset < 100) { 65 | // 变化头部颜色 66 | _isNeedSetAlpha = true; 67 | double alpha = _controller.offset / 100; 68 | _searchBarController.value.alpha = (255 * alpha).toInt(); 69 | _searchBarController.value.appbarTitleColor = colorA8ACBC; 70 | _searchBarController.value.searchBarBg = Color(0x1FFFFFFF); 71 | _searchBarController.value.appbarLeftIcon = "ic_search_grey"; 72 | _searchBarController.value.appbarRightIcon = "ic_message_grey"; 73 | _mTitleKey.currentState.setState(() {}); // 刷新单个控件的状态,防止卡顿 74 | } else { 75 | /// 防止多次渲染 76 | if (_isNeedSetAlpha) { 77 | _searchBarController.value.appbarLeftIcon = "ic_search_white"; 78 | _searchBarController.value.appbarRightIcon = "ic_message_white"; 79 | _searchBarController.value.appbarTitleColor = Colors.white; 80 | _searchBarController.value.searchBarBg = color0EB794; 81 | _searchBarController.value.alpha = 255; 82 | _mTitleKey.currentState.setState(() {}); 83 | _isNeedSetAlpha = false; 84 | } 85 | } 86 | }); 87 | } 88 | 89 | /// 壁纸、底部定制tab数据 90 | void loadData() { 91 | Repository.loadAsset("home_health_tools", fileDir: "home").then((json) { 92 | HomeTools homeTools = HomeTools.fromJson(Repository.toMap(json)); 93 | topCards = homeTools.data 94 | .where((item) => item.visible && topCardItems.contains(item.code)) 95 | .toList(); 96 | bottomCards = homeTools.data 97 | .where((item) => item.visible && !topCardItems.contains(item.code)) 98 | .toList(); 99 | setState(() {}); 100 | }); 101 | Repository.loadAsset("home_wallpaper", fileDir: "home").then((json) { 102 | wallPaper = HomeWallPaper.fromJson(Repository.toMapForList(json)); 103 | setState(() {}); 104 | }); 105 | // 体重记录圆环动画 106 | Observable.just(3).delay(new Duration(milliseconds: 3 * 1000)).listen((_) { 107 | percent = 0.8; 108 | setState(() {}); 109 | }); 110 | } 111 | 112 | Widget createToolsCards(){ 113 | return SliverToBoxAdapter( 114 | child: Container( 115 | margin: EdgeInsets.only(top: 13,bottom: 30), 116 | child: CardView( 117 | margin: EdgeInsets.only( 118 | left: 17, 119 | right: 17 120 | ), 121 | child: ListView.separated( 122 | shrinkWrap: true, 123 | separatorBuilder: (BuildContext context,int index){ 124 | return Container( 125 | height: 0.0, 126 | margin: EdgeInsetsDirectional.only(start: 16,end: 16), 127 | decoration: BoxDecoration( 128 | border: Border( 129 | bottom: Divider.createBorderSide(context,color: colorEEEFF3), 130 | ) 131 | ), 132 | ); 133 | }, 134 | padding: EdgeInsets.only(top: 0), 135 | physics: NeverScrollableScrollPhysics(), 136 | itemBuilder: (BuildContext context,int index){ 137 | Widget widget; 138 | if(bottomCards[index].code==HomeCard.EXERCISE){ 139 | // 运动训练 140 | widget=CommonCard( 141 | onPressed: (){ 142 | ToastUtils.showToast(context, bottomCards[index].name); 143 | }, 144 | title: bottomCards[index].name, 145 | iconUrl: 'ic_home_sport', 146 | subWidget: RichText( 147 | text: TextSpan(children: [ 148 | TextSpan( 149 | text: '35',style: TextStyles.get11Text_00CDA2() 150 | ), 151 | TextSpan( 152 | text:'M',style: TextStyles.get11TextA8ACBC() 153 | ), 154 | ]), 155 | ), 156 | ); 157 | } else if (bottomCards[index].code == HomeCard.MEASURE_RECORD) { 158 | // 围度记录 159 | widget = CommonCard( 160 | onPressed: () { 161 | ToastUtils.showToast(context, bottomCards[index].name); 162 | }, 163 | iconUrl: "ic_home_circumference", 164 | title: bottomCards[index].name); 165 | } else if (bottomCards[index].code == HomeCard.STEPS_RECORD) { 166 | // 步数记录 167 | widget = CommonCard( 168 | onPressed: () { 169 | ToastUtils.showToast(context, bottomCards[index].name); 170 | }, 171 | iconUrl: "ic_home_step", 172 | title: bottomCards[index].name); 173 | } else if (bottomCards[index].code == HomeCard.BABY) { 174 | // 宝宝记录 175 | widget = CommonCard( 176 | onPressed: () { 177 | ToastUtils.showToast(context, bottomCards[index].name); 178 | }, 179 | iconUrl: "ic_home_baby", 180 | title: bottomCards[index].name); 181 | } else if (bottomCards[index].code == HomeCard.DIET_PLAN) { 182 | // 饮食计划 183 | widget = CommonCard( 184 | onPressed: () { 185 | ToastUtils.showToast(context, bottomCards[index].name); 186 | }, 187 | iconUrl: "ic_home_food_plan", 188 | title: bottomCards[index].name); 189 | } else if (bottomCards[index].code == HomeCard.SLEEP_RECORD) { 190 | // 睡眠记录 191 | widget = CommonCard( 192 | onPressed: () { 193 | ToastUtils.showToast(context, bottomCards[index].name); 194 | }, 195 | iconUrl: "ic_home_sleep", 196 | title: bottomCards[index].name); 197 | } else if (bottomCards[index].code == HomeCard.PERIODS_RECORD) { 198 | // 经期记录 199 | widget = CommonCard( 200 | onPressed: () { 201 | ToastUtils.showToast(context, bottomCards[index].name); 202 | }, 203 | iconUrl: "ic_home_menstruation", 204 | title: bottomCards[index].name); 205 | } 206 | return widget; 207 | }, 208 | itemCount: bottomCards.length, 209 | ), 210 | ), 211 | ), 212 | ); 213 | } 214 | 215 | @override 216 | void dispose() { 217 | _controller.dispose(); 218 | _searchBarController.dispose(); 219 | super.dispose(); 220 | } 221 | 222 | @override 223 | Widget build(BuildContext context) { 224 | return Stack( 225 | children: [ 226 | EasyRefresh.custom( 227 | header: WallPaperHeader( 228 | wallPaperUrl: 229 | wallPaper != null ? wallPaper.welcomeImg.backImg : ""), 230 | scrollController: _controller, 231 | onRefresh: () async { 232 | NavigatorUtils.goWallPaper( 233 | context, wallPaper != null ? wallPaper.welcomeImg.backImg : ""); 234 | }, 235 | slivers: [ 236 | SliverToBoxAdapter( 237 | child: HomeHeaderWidget( 238 | /// 壁纸+减肥进度条Widget 239 | wallImg: 240 | wallPaper != null ? wallPaper.welcomeImg.backImgSmall : "", 241 | progressPercent: percent, 242 | )), 243 | SliverList( 244 | delegate: SliverChildBuilderDelegate( 245 | (BuildContext context, int index) { 246 | Widget widget; 247 | if (topCards[index].code == HomeCard.DIET_SPORT_RECORD) { 248 | /// 饮食运动记录 249 | widget = DietSportRecordWidget( 250 | topCard: topCards[index], 251 | ); 252 | } else if (topCards[index].code == HomeCard.WISDOM) { 253 | /// 智慧营养师 254 | widget = WisdomWidget( 255 | topCard: topCards[index], 256 | ); 257 | } else if (topCards[index].code == HomeCard.WEIGHT_RECORD) { 258 | /// 体重记录 259 | widget = WeightRecordWidget( 260 | topCard: topCards[index], 261 | ); 262 | } else if (topCards[index].code == HomeCard.HEALTH_HABITS) { 263 | widget = HealthHabitsWidget( 264 | iconUrl: "ic_home_habit", 265 | title: "故障处理", 266 | ); 267 | } 268 | return widget; 269 | }, childCount: topCards.length)), 270 | createToolsCards() 271 | ], 272 | ), 273 | SearchBar( 274 | text: "搜索设备和协议", 275 | controller: _searchBarController, 276 | key: _mTitleKey, 277 | ) 278 | ], 279 | ); 280 | } 281 | } 282 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | _fe_analyzer_shared: 5 | dependency: transitive 6 | description: 7 | name: _fe_analyzer_shared 8 | url: "https://pub.flutter-io.cn" 9 | source: hosted 10 | version: "5.0.0" 11 | analyzer: 12 | dependency: transitive 13 | description: 14 | name: analyzer 15 | url: "https://pub.flutter-io.cn" 16 | source: hosted 17 | version: "0.39.13" 18 | archive: 19 | dependency: transitive 20 | description: 21 | name: archive 22 | url: "https://pub.flutter-io.cn" 23 | source: hosted 24 | version: "2.0.13" 25 | args: 26 | dependency: transitive 27 | description: 28 | name: args 29 | url: "https://pub.flutter-io.cn" 30 | source: hosted 31 | version: "1.6.0" 32 | async: 33 | dependency: transitive 34 | description: 35 | name: async 36 | url: "https://pub.flutter-io.cn" 37 | source: hosted 38 | version: "2.4.1" 39 | boolean_selector: 40 | dependency: transitive 41 | description: 42 | name: boolean_selector 43 | url: "https://pub.flutter-io.cn" 44 | source: hosted 45 | version: "2.0.0" 46 | build: 47 | dependency: transitive 48 | description: 49 | name: build 50 | url: "https://pub.flutter-io.cn" 51 | source: hosted 52 | version: "1.3.0" 53 | build_config: 54 | dependency: transitive 55 | description: 56 | name: build_config 57 | url: "https://pub.flutter-io.cn" 58 | source: hosted 59 | version: "0.4.2" 60 | build_daemon: 61 | dependency: transitive 62 | description: 63 | name: build_daemon 64 | url: "https://pub.flutter-io.cn" 65 | source: hosted 66 | version: "2.1.4" 67 | build_resolvers: 68 | dependency: transitive 69 | description: 70 | name: build_resolvers 71 | url: "https://pub.flutter-io.cn" 72 | source: hosted 73 | version: "1.3.10" 74 | build_runner: 75 | dependency: "direct dev" 76 | description: 77 | name: build_runner 78 | url: "https://pub.flutter-io.cn" 79 | source: hosted 80 | version: "1.10.0" 81 | build_runner_core: 82 | dependency: transitive 83 | description: 84 | name: build_runner_core 85 | url: "https://pub.flutter-io.cn" 86 | source: hosted 87 | version: "5.2.0" 88 | built_collection: 89 | dependency: transitive 90 | description: 91 | name: built_collection 92 | url: "https://pub.flutter-io.cn" 93 | source: hosted 94 | version: "4.3.2" 95 | built_value: 96 | dependency: transitive 97 | description: 98 | name: built_value 99 | url: "https://pub.flutter-io.cn" 100 | source: hosted 101 | version: "7.1.0" 102 | charcode: 103 | dependency: transitive 104 | description: 105 | name: charcode 106 | url: "https://pub.flutter-io.cn" 107 | source: hosted 108 | version: "1.1.3" 109 | checked_yaml: 110 | dependency: transitive 111 | description: 112 | name: checked_yaml 113 | url: "https://pub.flutter-io.cn" 114 | source: hosted 115 | version: "1.0.2" 116 | code_builder: 117 | dependency: transitive 118 | description: 119 | name: code_builder 120 | url: "https://pub.flutter-io.cn" 121 | source: hosted 122 | version: "3.4.0" 123 | collection: 124 | dependency: transitive 125 | description: 126 | name: collection 127 | url: "https://pub.flutter-io.cn" 128 | source: hosted 129 | version: "1.14.12" 130 | common_utils: 131 | dependency: transitive 132 | description: 133 | name: common_utils 134 | url: "https://pub.flutter-io.cn" 135 | source: hosted 136 | version: "1.2.1" 137 | convert: 138 | dependency: transitive 139 | description: 140 | name: convert 141 | url: "https://pub.flutter-io.cn" 142 | source: hosted 143 | version: "2.1.1" 144 | crypto: 145 | dependency: transitive 146 | description: 147 | name: crypto 148 | url: "https://pub.flutter-io.cn" 149 | source: hosted 150 | version: "2.1.4" 151 | csslib: 152 | dependency: transitive 153 | description: 154 | name: csslib 155 | url: "https://pub.flutter-io.cn" 156 | source: hosted 157 | version: "0.16.1" 158 | cupertino_icons: 159 | dependency: "direct main" 160 | description: 161 | name: cupertino_icons 162 | url: "https://pub.flutter-io.cn" 163 | source: hosted 164 | version: "0.1.3" 165 | dart_style: 166 | dependency: transitive 167 | description: 168 | name: dart_style 169 | url: "https://pub.flutter-io.cn" 170 | source: hosted 171 | version: "1.3.6" 172 | decimal: 173 | dependency: transitive 174 | description: 175 | name: decimal 176 | url: "https://pub.flutter-io.cn" 177 | source: hosted 178 | version: "0.3.5" 179 | extended_image: 180 | dependency: "direct main" 181 | description: 182 | name: extended_image 183 | url: "https://pub.flutter-io.cn" 184 | source: hosted 185 | version: "0.9.0" 186 | extended_image_library: 187 | dependency: transitive 188 | description: 189 | name: extended_image_library 190 | url: "https://pub.flutter-io.cn" 191 | source: hosted 192 | version: "0.2.3" 193 | file: 194 | dependency: transitive 195 | description: 196 | name: file 197 | url: "https://pub.flutter-io.cn" 198 | source: hosted 199 | version: "5.2.1" 200 | fixnum: 201 | dependency: transitive 202 | description: 203 | name: fixnum 204 | url: "https://pub.flutter-io.cn" 205 | source: hosted 206 | version: "0.10.11" 207 | fl_chart: 208 | dependency: "direct main" 209 | description: 210 | name: fl_chart 211 | url: "https://pub.flutter-io.cn" 212 | source: hosted 213 | version: "0.2.2" 214 | fluro: 215 | dependency: "direct main" 216 | description: 217 | name: fluro 218 | url: "https://pub.flutter-io.cn" 219 | source: hosted 220 | version: "1.6.3" 221 | flustars: 222 | dependency: "direct main" 223 | description: 224 | name: flustars 225 | url: "https://pub.flutter-io.cn" 226 | source: hosted 227 | version: "0.3.2" 228 | flutter: 229 | dependency: "direct main" 230 | description: flutter 231 | source: sdk 232 | version: "0.0.0" 233 | flutter_easyrefresh: 234 | dependency: "direct main" 235 | description: 236 | name: flutter_easyrefresh 237 | url: "https://pub.flutter-io.cn" 238 | source: hosted 239 | version: "2.1.1" 240 | flutter_test: 241 | dependency: "direct dev" 242 | description: flutter 243 | source: sdk 244 | version: "0.0.0" 245 | flutter_web_plugins: 246 | dependency: transitive 247 | description: flutter 248 | source: sdk 249 | version: "0.0.0" 250 | glob: 251 | dependency: transitive 252 | description: 253 | name: glob 254 | url: "https://pub.flutter-io.cn" 255 | source: hosted 256 | version: "1.2.0" 257 | graphs: 258 | dependency: transitive 259 | description: 260 | name: graphs 261 | url: "https://pub.flutter-io.cn" 262 | source: hosted 263 | version: "0.2.0" 264 | html: 265 | dependency: transitive 266 | description: 267 | name: html 268 | url: "https://pub.flutter-io.cn" 269 | source: hosted 270 | version: "0.14.0+3" 271 | http: 272 | dependency: transitive 273 | description: 274 | name: http 275 | url: "https://pub.flutter-io.cn" 276 | source: hosted 277 | version: "0.12.1" 278 | http_client_helper: 279 | dependency: transitive 280 | description: 281 | name: http_client_helper 282 | url: "https://pub.flutter-io.cn" 283 | source: hosted 284 | version: "0.2.1" 285 | http_multi_server: 286 | dependency: transitive 287 | description: 288 | name: http_multi_server 289 | url: "https://pub.flutter-io.cn" 290 | source: hosted 291 | version: "2.2.0" 292 | http_parser: 293 | dependency: transitive 294 | description: 295 | name: http_parser 296 | url: "https://pub.flutter-io.cn" 297 | source: hosted 298 | version: "3.1.4" 299 | image: 300 | dependency: transitive 301 | description: 302 | name: image 303 | url: "https://pub.flutter-io.cn" 304 | source: hosted 305 | version: "2.1.12" 306 | intl: 307 | dependency: transitive 308 | description: 309 | name: intl 310 | url: "https://pub.flutter-io.cn" 311 | source: hosted 312 | version: "0.16.1" 313 | io: 314 | dependency: transitive 315 | description: 316 | name: io 317 | url: "https://pub.flutter-io.cn" 318 | source: hosted 319 | version: "0.3.4" 320 | js: 321 | dependency: transitive 322 | description: 323 | name: js 324 | url: "https://pub.flutter-io.cn" 325 | source: hosted 326 | version: "0.6.2" 327 | json_annotation: 328 | dependency: "direct main" 329 | description: 330 | name: json_annotation 331 | url: "https://pub.flutter-io.cn" 332 | source: hosted 333 | version: "3.0.1" 334 | json_serializable: 335 | dependency: "direct dev" 336 | description: 337 | name: json_serializable 338 | url: "https://pub.flutter-io.cn" 339 | source: hosted 340 | version: "3.3.0" 341 | logging: 342 | dependency: transitive 343 | description: 344 | name: logging 345 | url: "https://pub.flutter-io.cn" 346 | source: hosted 347 | version: "0.11.4" 348 | matcher: 349 | dependency: transitive 350 | description: 351 | name: matcher 352 | url: "https://pub.flutter-io.cn" 353 | source: hosted 354 | version: "0.12.6" 355 | meta: 356 | dependency: transitive 357 | description: 358 | name: meta 359 | url: "https://pub.flutter-io.cn" 360 | source: hosted 361 | version: "1.1.8" 362 | mime: 363 | dependency: transitive 364 | description: 365 | name: mime 366 | url: "https://pub.flutter-io.cn" 367 | source: hosted 368 | version: "0.9.6+3" 369 | node_interop: 370 | dependency: transitive 371 | description: 372 | name: node_interop 373 | url: "https://pub.flutter-io.cn" 374 | source: hosted 375 | version: "1.1.1" 376 | node_io: 377 | dependency: transitive 378 | description: 379 | name: node_io 380 | url: "https://pub.flutter-io.cn" 381 | source: hosted 382 | version: "1.1.1" 383 | package_config: 384 | dependency: transitive 385 | description: 386 | name: package_config 387 | url: "https://pub.flutter-io.cn" 388 | source: hosted 389 | version: "1.9.3" 390 | path: 391 | dependency: transitive 392 | description: 393 | name: path 394 | url: "https://pub.flutter-io.cn" 395 | source: hosted 396 | version: "1.6.4" 397 | path_provider: 398 | dependency: transitive 399 | description: 400 | name: path_provider 401 | url: "https://pub.flutter-io.cn" 402 | source: hosted 403 | version: "1.6.11" 404 | path_provider_linux: 405 | dependency: transitive 406 | description: 407 | name: path_provider_linux 408 | url: "https://pub.flutter-io.cn" 409 | source: hosted 410 | version: "0.0.1+2" 411 | path_provider_macos: 412 | dependency: transitive 413 | description: 414 | name: path_provider_macos 415 | url: "https://pub.flutter-io.cn" 416 | source: hosted 417 | version: "0.0.4+3" 418 | path_provider_platform_interface: 419 | dependency: transitive 420 | description: 421 | name: path_provider_platform_interface 422 | url: "https://pub.flutter-io.cn" 423 | source: hosted 424 | version: "1.0.2" 425 | pedantic: 426 | dependency: transitive 427 | description: 428 | name: pedantic 429 | url: "https://pub.flutter-io.cn" 430 | source: hosted 431 | version: "1.9.0" 432 | percent_indicator: 433 | dependency: "direct main" 434 | description: 435 | name: percent_indicator 436 | url: "https://pub.flutter-io.cn" 437 | source: hosted 438 | version: "2.1.5" 439 | petitparser: 440 | dependency: transitive 441 | description: 442 | name: petitparser 443 | url: "https://pub.flutter-io.cn" 444 | source: hosted 445 | version: "2.4.0" 446 | platform: 447 | dependency: transitive 448 | description: 449 | name: platform 450 | url: "https://pub.flutter-io.cn" 451 | source: hosted 452 | version: "2.2.1" 453 | plugin_platform_interface: 454 | dependency: transitive 455 | description: 456 | name: plugin_platform_interface 457 | url: "https://pub.flutter-io.cn" 458 | source: hosted 459 | version: "1.0.2" 460 | pool: 461 | dependency: transitive 462 | description: 463 | name: pool 464 | url: "https://pub.flutter-io.cn" 465 | source: hosted 466 | version: "1.4.0" 467 | process: 468 | dependency: transitive 469 | description: 470 | name: process 471 | url: "https://pub.flutter-io.cn" 472 | source: hosted 473 | version: "3.0.13" 474 | pub_semver: 475 | dependency: transitive 476 | description: 477 | name: pub_semver 478 | url: "https://pub.flutter-io.cn" 479 | source: hosted 480 | version: "1.4.4" 481 | pubspec_parse: 482 | dependency: transitive 483 | description: 484 | name: pubspec_parse 485 | url: "https://pub.flutter-io.cn" 486 | source: hosted 487 | version: "0.1.5" 488 | quiver: 489 | dependency: transitive 490 | description: 491 | name: quiver 492 | url: "https://pub.flutter-io.cn" 493 | source: hosted 494 | version: "2.1.3" 495 | rational: 496 | dependency: transitive 497 | description: 498 | name: rational 499 | url: "https://pub.flutter-io.cn" 500 | source: hosted 501 | version: "0.3.8" 502 | rxdart: 503 | dependency: "direct dev" 504 | description: 505 | name: rxdart 506 | url: "https://pub.flutter-io.cn" 507 | source: hosted 508 | version: "0.22.6" 509 | shared_preferences: 510 | dependency: transitive 511 | description: 512 | name: shared_preferences 513 | url: "https://pub.flutter-io.cn" 514 | source: hosted 515 | version: "0.5.8" 516 | shared_preferences_linux: 517 | dependency: transitive 518 | description: 519 | name: shared_preferences_linux 520 | url: "https://pub.flutter-io.cn" 521 | source: hosted 522 | version: "0.0.2+1" 523 | shared_preferences_macos: 524 | dependency: transitive 525 | description: 526 | name: shared_preferences_macos 527 | url: "https://pub.flutter-io.cn" 528 | source: hosted 529 | version: "0.0.1+10" 530 | shared_preferences_platform_interface: 531 | dependency: transitive 532 | description: 533 | name: shared_preferences_platform_interface 534 | url: "https://pub.flutter-io.cn" 535 | source: hosted 536 | version: "1.0.4" 537 | shared_preferences_web: 538 | dependency: transitive 539 | description: 540 | name: shared_preferences_web 541 | url: "https://pub.flutter-io.cn" 542 | source: hosted 543 | version: "0.1.2+7" 544 | shelf: 545 | dependency: transitive 546 | description: 547 | name: shelf 548 | url: "https://pub.flutter-io.cn" 549 | source: hosted 550 | version: "0.7.7" 551 | shelf_web_socket: 552 | dependency: transitive 553 | description: 554 | name: shelf_web_socket 555 | url: "https://pub.flutter-io.cn" 556 | source: hosted 557 | version: "0.2.3" 558 | sky_engine: 559 | dependency: transitive 560 | description: flutter 561 | source: sdk 562 | version: "0.0.99" 563 | source_gen: 564 | dependency: transitive 565 | description: 566 | name: source_gen 567 | url: "https://pub.flutter-io.cn" 568 | source: hosted 569 | version: "0.9.6" 570 | source_span: 571 | dependency: transitive 572 | description: 573 | name: source_span 574 | url: "https://pub.flutter-io.cn" 575 | source: hosted 576 | version: "1.7.0" 577 | stack_trace: 578 | dependency: transitive 579 | description: 580 | name: stack_trace 581 | url: "https://pub.flutter-io.cn" 582 | source: hosted 583 | version: "1.9.3" 584 | stream_channel: 585 | dependency: transitive 586 | description: 587 | name: stream_channel 588 | url: "https://pub.flutter-io.cn" 589 | source: hosted 590 | version: "2.0.0" 591 | stream_transform: 592 | dependency: transitive 593 | description: 594 | name: stream_transform 595 | url: "https://pub.flutter-io.cn" 596 | source: hosted 597 | version: "1.2.0" 598 | string_scanner: 599 | dependency: transitive 600 | description: 601 | name: string_scanner 602 | url: "https://pub.flutter-io.cn" 603 | source: hosted 604 | version: "1.0.5" 605 | synchronized: 606 | dependency: transitive 607 | description: 608 | name: synchronized 609 | url: "https://pub.flutter-io.cn" 610 | source: hosted 611 | version: "2.2.0+1" 612 | term_glyph: 613 | dependency: transitive 614 | description: 615 | name: term_glyph 616 | url: "https://pub.flutter-io.cn" 617 | source: hosted 618 | version: "1.1.0" 619 | test_api: 620 | dependency: transitive 621 | description: 622 | name: test_api 623 | url: "https://pub.flutter-io.cn" 624 | source: hosted 625 | version: "0.2.15" 626 | timing: 627 | dependency: transitive 628 | description: 629 | name: timing 630 | url: "https://pub.flutter-io.cn" 631 | source: hosted 632 | version: "0.1.1+2" 633 | toast: 634 | dependency: "direct main" 635 | description: 636 | name: toast 637 | url: "https://pub.flutter-io.cn" 638 | source: hosted 639 | version: "0.1.5" 640 | typed_data: 641 | dependency: transitive 642 | description: 643 | name: typed_data 644 | url: "https://pub.flutter-io.cn" 645 | source: hosted 646 | version: "1.1.6" 647 | vector_math: 648 | dependency: transitive 649 | description: 650 | name: vector_math 651 | url: "https://pub.flutter-io.cn" 652 | source: hosted 653 | version: "2.0.8" 654 | watcher: 655 | dependency: transitive 656 | description: 657 | name: watcher 658 | url: "https://pub.flutter-io.cn" 659 | source: hosted 660 | version: "0.9.7+15" 661 | web_socket_channel: 662 | dependency: transitive 663 | description: 664 | name: web_socket_channel 665 | url: "https://pub.flutter-io.cn" 666 | source: hosted 667 | version: "1.1.0" 668 | webview_flutter: 669 | dependency: "direct main" 670 | description: 671 | name: webview_flutter 672 | url: "https://pub.flutter-io.cn" 673 | source: hosted 674 | version: "0.3.22+1" 675 | xdg_directories: 676 | dependency: transitive 677 | description: 678 | name: xdg_directories 679 | url: "https://pub.flutter-io.cn" 680 | source: hosted 681 | version: "0.1.0" 682 | xml: 683 | dependency: transitive 684 | description: 685 | name: xml 686 | url: "https://pub.flutter-io.cn" 687 | source: hosted 688 | version: "3.6.1" 689 | yaml: 690 | dependency: transitive 691 | description: 692 | name: yaml 693 | url: "https://pub.flutter-io.cn" 694 | source: hosted 695 | version: "2.2.1" 696 | sdks: 697 | dart: ">=2.8.0 <3.0.0" 698 | flutter: ">=1.12.13+hotfix.5 <2.0.0" 699 | -------------------------------------------------------------------------------- /lib/widget/main/main_widgets.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | 4 | import 'package:extended_image/extended_image.dart'; 5 | import 'package:fl_chart/fl_chart.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:jetlinks_app/common/colors.dart'; 8 | import 'package:jetlinks_app/common/styles.dart'; 9 | import 'package:jetlinks_app/model/home_tools.dart'; 10 | import 'package:jetlinks_app/route/navigator.dart'; 11 | import 'package:jetlinks_app/utils/browser_url.dart'; 12 | import 'package:jetlinks_app/utils/toast.dart'; 13 | import 'package:jetlinks_app/utils/utils.dart'; 14 | import 'package:percent_indicator/circular_percent_indicator.dart'; 15 | 16 | import '../card_view.dart'; 17 | import '../round_button.dart'; 18 | 19 | /// 壁纸+CPU进度条Widget 20 | class HomeHeaderWidget extends StatelessWidget { 21 | final String wallImg; 22 | final double progressPercent; 23 | 24 | HomeHeaderWidget({ 25 | this.wallImg, 26 | this.progressPercent: 0, 27 | }); 28 | 29 | @override 30 | Widget build(BuildContext context) { 31 | return Stack(children: [ 32 | ExtendedImage.network( 33 | wallImg, 34 | height: 181, 35 | width: double.infinity, 36 | fit: BoxFit.fitWidth, 37 | cache: true, 38 | enableLoadState: false, 39 | ), 40 | ClipRect( 41 | child: BackdropFilter( 42 | filter: ImageFilter.blur( 43 | sigmaX: 1.0, 44 | sigmaY: 1.0, 45 | ), 46 | child: Container( 47 | color: Colors.transparent, 48 | alignment: Alignment.center, 49 | width: double.infinity, 50 | height: 181, 51 | ), 52 | ), 53 | ), 54 | CardView( 55 | margin: EdgeInsets.only(left: 17, right: 17, top: 104), 56 | child: Container( 57 | width: double.infinity, 58 | height: 156, 59 | child: Stack( 60 | alignment: Alignment.center, 61 | children: [ 62 | Row( 63 | mainAxisAlignment: MainAxisAlignment.center, 64 | children: [ 65 | Column( 66 | mainAxisAlignment: MainAxisAlignment.center, 67 | crossAxisAlignment: CrossAxisAlignment.center, 68 | children: [ 69 | Padding( 70 | padding: EdgeInsets.only( 71 | top: 2, bottom: 2, right: 4, left: 4), 72 | child: Text( 73 | "在线设备", 74 | style: TextStyles.get10TextA8ACBC(), 75 | ), 76 | ), 77 | Text( 78 | "585", 79 | style: TextStyle( 80 | fontFamily: "Montserrat", 81 | fontSize: 23, 82 | color: color373D52), 83 | ), 84 | ], 85 | ), 86 | PaddingStyles.getPadding(30), 87 | CircularPercentIndicator( 88 | animation: true, 89 | radius: 95.0, 90 | lineWidth: 8.0, 91 | percent: progressPercent, 92 | animationDuration: 800, 93 | circularStrokeCap: CircularStrokeCap.round, 94 | backgroundColor: Color(0xFFF5F6FA), 95 | center: Column( 96 | mainAxisAlignment: MainAxisAlignment.center, 97 | crossAxisAlignment: CrossAxisAlignment.center, 98 | children: [ 99 | Text( 100 | "CPU使用率", 101 | style: TextStyles.get10TextA8ACBC(), 102 | ), 103 | Text( 104 | "70%", 105 | style: TextStyle( 106 | fontSize: 28, 107 | fontFamily: "Montserrat", 108 | color: color373D52), 109 | ), 110 | ], 111 | ), 112 | progressColor: color00CDA2, 113 | ), 114 | PaddingStyles.getPadding(30), 115 | Column( 116 | mainAxisAlignment: MainAxisAlignment.center, 117 | crossAxisAlignment: CrossAxisAlignment.center, 118 | children: [ 119 | Container( 120 | child: DecoratedBox( 121 | decoration: BoxDecoration( 122 | color: Color(0x2100cda2), 123 | borderRadius: BorderRadius.circular(9), 124 | ), 125 | child: Padding( 126 | padding: EdgeInsets.only( 127 | top: 2, bottom: 2, right: 4, left: 4), 128 | child: Text( 129 | "离线设备", 130 | style: 131 | TextStyle(fontSize: 10, color: color00CDA2), 132 | ), 133 | ), 134 | ), 135 | ), 136 | Text( 137 | "125", 138 | style: TextStyle( 139 | fontSize: 23, 140 | fontFamily: "Montserrat", 141 | color: color00CDA2), 142 | ), 143 | ], 144 | ), 145 | ], 146 | ), 147 | Positioned( 148 | child: RoundButton( 149 | padding: 150 | EdgeInsets.only(left: 12, right: 12, top: 4, bottom: 4), 151 | text: "详情", 152 | onPressed: () {}, 153 | ), 154 | right: 16, 155 | bottom: 17, 156 | ) 157 | ], 158 | ), 159 | ), 160 | ) 161 | ]); 162 | } 163 | } 164 | 165 | /// 产品信息 166 | class DietSportRecordWidget extends StatelessWidget { 167 | final Data topCard; 168 | 169 | DietSportRecordWidget({this.topCard}); 170 | 171 | @override 172 | Widget build(BuildContext context) { 173 | return CardView( 174 | onPressed: () { 175 | // 产品记录 176 | BrowserUrlManager.handleUrl(BrowserUrlManager.URL_CALORY).then((url) { 177 | NavigatorUtils.goBrowserPage(context, url); 178 | }); 179 | }, 180 | margin: EdgeInsets.only(left: 17, right: 17, top: 13), 181 | child: Container( 182 | padding: EdgeInsets.only(top: 19, left: 15, right: 15, bottom: 19), 183 | child: Column( 184 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 185 | children: [ 186 | Row( 187 | children: [ 188 | Image.asset( 189 | Utils.getImgPath("ic_home_calorie"), 190 | height: 18, 191 | width: 18, 192 | ), 193 | PaddingStyles.getPadding(6), 194 | Text( 195 | topCard.name, 196 | style: TextStyles.get14TextBold_373D52(), 197 | ) 198 | ], 199 | ), 200 | Row( 201 | crossAxisAlignment: CrossAxisAlignment.end, 202 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 203 | children: [ 204 | Row( 205 | children: [ 206 | PaddingStyles.getPadding(24), 207 | RichText( 208 | text: TextSpan(children: [ 209 | TextSpan( 210 | text: "共链接 ", style: TextStyles.get12TextA8ACBC()), 211 | TextSpan( 212 | text: "230", 213 | style: TextStyles.get15TextBold_373D52()), 214 | TextSpan( 215 | text: " 设备", style: TextStyles.get12TextA8ACBC()), 216 | ]), 217 | ) 218 | ], 219 | ), 220 | Padding( 221 | padding: EdgeInsets.only(top: 8, right: 30), 222 | child: Container( 223 | width: 93, 224 | height: 60, 225 | child: FlChart( 226 | chart: BarChart(BarChartData( 227 | barTouchData: BarTouchData(enabled: false), 228 | titlesData: FlTitlesData( 229 | show: true, 230 | bottomTitles: SideTitles( 231 | showTitles: true, 232 | textStyle:TextStyle(color: colorA8ACBC,fontSize: 10), 233 | getTitles: (double value) { 234 | switch (value.toInt()) { 235 | case 0: 236 | return '1'; 237 | case 1: 238 | return '2'; 239 | case 2: 240 | return '3'; 241 | case 3: 242 | return '4'; 243 | case 4: 244 | return '5'; 245 | default: 246 | return '0'; 247 | } 248 | }), 249 | leftTitles: SideTitles( 250 | showTitles: false, 251 | ), 252 | ), 253 | borderData: FlBorderData( 254 | show: false, 255 | ), 256 | barGroups: [ 257 | BarChartGroupData(x: 0, barRods: [ 258 | BarChartRodData( 259 | y: 10, 260 | color: color00CDA2, 261 | width: 3, 262 | isRound: true, 263 | backDrawRodData: BackgroundBarChartRodData( 264 | show: true, 265 | y: 20, 266 | color: Color(0xFFF5F6FA), 267 | ), 268 | ), 269 | ]), 270 | BarChartGroupData(x: 1, barRods: [ 271 | BarChartRodData( 272 | y: 12, 273 | color: color00CDA2, 274 | width: 3, 275 | isRound: true, 276 | backDrawRodData: BackgroundBarChartRodData( 277 | show: true, 278 | y: 20, 279 | color: Color(0xFFF5F6FA), 280 | ), 281 | ), 282 | ]), 283 | BarChartGroupData(x: 2, barRods: [ 284 | BarChartRodData( 285 | y: 15, 286 | color: color00CDA2, 287 | width: 3, 288 | isRound: true, 289 | backDrawRodData: BackgroundBarChartRodData( 290 | show: true, 291 | y: 20, 292 | color: Color(0xFFF5F6FA), 293 | ), 294 | ), 295 | ]), 296 | BarChartGroupData(x: 3, barRods: [ 297 | BarChartRodData( 298 | y: 20, 299 | color: Color(0xfffe8d60), 300 | width: 3, 301 | isRound: true, 302 | backDrawRodData: BackgroundBarChartRodData( 303 | show: true, 304 | y: 20, 305 | color: Color(0xFFF5F6FA), 306 | ), 307 | ), 308 | ]), 309 | BarChartGroupData(x: 4, barRods: [ 310 | BarChartRodData( 311 | y: 10, 312 | color: color00CDA2, 313 | width: 3, 314 | isRound: true, 315 | backDrawRodData: BackgroundBarChartRodData( 316 | show: true, 317 | y: 20, 318 | color: Color(0xFFF5F6FA), 319 | ), 320 | ), 321 | ]) 322 | ], 323 | )), 324 | ), 325 | ), 326 | ) 327 | ], 328 | ) 329 | ], 330 | ), 331 | ), 332 | ); 333 | } 334 | } 335 | 336 | /// 产品信息 337 | class WisdomWidget extends StatelessWidget { 338 | final Data topCard; 339 | 340 | WisdomWidget({this.topCard}); 341 | 342 | @override 343 | Widget build(BuildContext context) { 344 | return CardView( 345 | onPressed: () { 346 | BrowserUrlManager.handleUrl(BrowserUrlManager.getSmartAnalysisUrl()) 347 | .then((url) { 348 | NavigatorUtils.goBrowserPage(context, url); 349 | }); 350 | }, 351 | margin: EdgeInsets.only(left: 17, right: 17, top: 13), 352 | child: Container( 353 | padding: EdgeInsets.only( 354 | top: 19, 355 | ), 356 | child: Column( 357 | crossAxisAlignment: CrossAxisAlignment.start, 358 | children: [ 359 | Padding( 360 | padding: EdgeInsets.only(left: 15, right: 15), 361 | child: Row( 362 | children: [ 363 | Image.asset( 364 | Utils.getImgPath("ic_home_dietician"), 365 | height: 18, 366 | width: 18, 367 | ), 368 | PaddingStyles.getPadding(6), 369 | Text( 370 | "设备实例", 371 | style: TextStyles.get14TextBold_373D52(), 372 | ) 373 | ], 374 | ), 375 | ), 376 | SizeBoxFactory.getVerticalSizeBox(22), 377 | Padding( 378 | padding: EdgeInsets.only(left: 39), 379 | child: RichText( 380 | text: TextSpan(children: [ 381 | TextSpan(text: "设备: ", style: TextStyles.get12Text_373D52()), 382 | TextSpan( 383 | text: "网关、路灯、测试", 384 | style: TextStyles.get12TextA8ACBC()), 385 | ]), 386 | ), 387 | ), 388 | SizeBoxFactory.getVerticalSizeBox(22), 389 | Container( 390 | width: double.infinity, 391 | height: 39, 392 | child: DecoratedBox( 393 | decoration: BoxDecoration( 394 | color: Color(0x33FEC407), 395 | borderRadius: BorderRadius.only( 396 | bottomLeft: Radius.circular(12.0), 397 | bottomRight: Radius.circular(12.0)), 398 | ), 399 | child: Row( 400 | mainAxisAlignment: MainAxisAlignment.center, 401 | children: [ 402 | Image.asset( 403 | Utils.getImgPath("ic_dietician_logo"), 404 | width: 20, 405 | height: 20, 406 | ), 407 | SizeBoxFactory.getHorizontalSizeBox(4), 408 | Text( 409 | "实例详情", 410 | style: TextStyle( 411 | fontSize: 14, 412 | color: colorFEBB07, 413 | ), 414 | ), 415 | Image.asset( 416 | Utils.getImgPath("ic_arrow_light_yellow"), 417 | width: 20, 418 | height: 20, 419 | ), 420 | ], 421 | ), 422 | ), 423 | ) 424 | ], 425 | ), 426 | ), 427 | ); 428 | } 429 | } 430 | 431 | /// 链接管理 432 | class WeightRecordWidget extends StatelessWidget { 433 | final Data topCard; 434 | 435 | WeightRecordWidget({this.topCard}); 436 | 437 | @override 438 | Widget build(BuildContext context) { 439 | return CardView( 440 | onPressed: () { 441 | ToastUtils.showToast(context, topCard.name); 442 | }, 443 | margin: EdgeInsets.only(left: 17, right: 17, top: 13), 444 | child: Container( 445 | padding: EdgeInsets.only(top: 19, left: 15, right: 15, bottom: 19), 446 | child: Column( 447 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 448 | children: [ 449 | Row( 450 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 451 | children: [ 452 | Row( 453 | children: [ 454 | Image.asset( 455 | Utils.getImgPath("ic_home_weight"), 456 | height: 18, 457 | width: 18, 458 | ), 459 | SizeBoxFactory.getHorizontalSizeBox(6), 460 | Text( 461 | topCard.name, 462 | style: TextStyles.get14TextBold_373D52(), 463 | ) 464 | ], 465 | ), 466 | RoundButton( 467 | text: "在线数量", 468 | onPressed: () { 469 | ToastUtils.showToast(context, "在线数"); 470 | }, 471 | ), 472 | ], 473 | ), 474 | Padding( 475 | padding: EdgeInsets.only(top: 7, right: 30), 476 | child: Row( 477 | crossAxisAlignment: CrossAxisAlignment.end, 478 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 479 | children: [ 480 | Row( 481 | children: [ 482 | PaddingStyles.getPadding(24), 483 | RichText( 484 | text: TextSpan(children: [ 485 | TextSpan( 486 | text: "589 ", 487 | style: TextStyles.get15TextBold_373D52()), 488 | TextSpan( 489 | text: "台设备", style: TextStyles.get12TextA8ACBC()), 490 | ]), 491 | ) 492 | ], 493 | ), 494 | Container( 495 | width: 93, 496 | height: 41, 497 | child: FlChart( 498 | chart: LineChart(LineChartData( 499 | lineTouchData: LineTouchData(enabled: false), 500 | minY: 58.5, 501 | maxY: 70, 502 | titlesData: FlTitlesData( 503 | show: false, 504 | leftTitles: SideTitles(showTitles: false), 505 | bottomTitles: SideTitles(showTitles: false), 506 | rightTitles: SideTitles(showTitles: false), 507 | topTitles: SideTitles(showTitles: false)), 508 | borderData: FlBorderData(show: false), 509 | gridData: FlGridData( 510 | show: false, 511 | ), 512 | lineBarsData: [ 513 | LineChartBarData( 514 | preventCurveOverShooting: true, 515 | colors: [Color(0x5700CDA2)], 516 | isCurved: true, 517 | barWidth: 2, 518 | isStrokeCapRound: true, 519 | dotData: FlDotData( 520 | show: true, 521 | dotColor: color00CDA2, 522 | dotSize: 2), 523 | belowBarData: BelowBarData( 524 | show: false, 525 | ), 526 | spots: [ 527 | FlSpot(1, 65), 528 | FlSpot(2, 66), 529 | FlSpot(3, 65), 530 | FlSpot(4, 64), 531 | FlSpot(5, 62), 532 | FlSpot(6, 68), 533 | FlSpot(7, 60), 534 | ]) 535 | ], 536 | backgroundColor: Colors.transparent))), 537 | ) 538 | ], 539 | ), 540 | ) 541 | ], 542 | ), 543 | ), 544 | ); 545 | } 546 | } 547 | 548 | /// 故障处理 549 | class HealthHabitsWidget extends StatelessWidget { 550 | final String iconUrl; 551 | final String title; 552 | 553 | HealthHabitsWidget({this.iconUrl, this.title}); 554 | 555 | @override 556 | Widget build(BuildContext context) { 557 | return CardView( 558 | onPressed: () { 559 | ToastUtils.showToast(context, title); 560 | }, 561 | margin: EdgeInsets.only(left: 17, right: 17, top: 13), 562 | child: Container( 563 | margin: EdgeInsets.only(top: 20, bottom: 20), 564 | padding: EdgeInsets.only(left: 15, right: 15), 565 | child: Row( 566 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 567 | children: [ 568 | Row( 569 | children: [ 570 | Image.asset( 571 | Utils.getImgPath(iconUrl), 572 | height: 18, 573 | width: 18, 574 | ), 575 | SizeBoxFactory.getHorizontalSizeBox(6), 576 | Text( 577 | title, 578 | style: TextStyles.get14TextBold_373D52(), 579 | ) 580 | ], 581 | ), 582 | Row( 583 | children: [ 584 | RichText( 585 | text: TextSpan(children: [ 586 | TextSpan( 587 | text: "今日完成: ", style: TextStyles.get11TextA8ACBC()), 588 | TextSpan(text: "57%", style: TextStyles.get11Text_00CDA2()), 589 | ]), 590 | ), 591 | Image.asset( 592 | Utils.getImgPath("ic_arrow_grey"), 593 | height: 18, 594 | width: 18, 595 | ) 596 | ], 597 | ) 598 | ], 599 | ), 600 | ), 601 | ); 602 | } 603 | } 604 | -------------------------------------------------------------------------------- /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 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 55C318D4D737C4E2513918E6 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20E4035E57702FDD88E11E0A /* Pods_Runner.framework */; }; 13 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 14 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 15 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 16 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXCopyFilesBuildPhase section */ 20 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 21 | isa = PBXCopyFilesBuildPhase; 22 | buildActionMask = 2147483647; 23 | dstPath = ""; 24 | dstSubfolderSpec = 10; 25 | files = ( 26 | ); 27 | name = "Embed Frameworks"; 28 | runOnlyForDeploymentPostprocessing = 0; 29 | }; 30 | /* End PBXCopyFilesBuildPhase section */ 31 | 32 | /* Begin PBXFileReference section */ 33 | 010F87FC1F442CDA0321C798 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 34 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 35 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 36 | 20E4035E57702FDD88E11E0A /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 37 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 38 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 39 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 40 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 41 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 42 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 43 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 45 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 46 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 47 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 48 | D223E22E5B6ABD48A741711A /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 49 | FC310063F691A9090F67DA17 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 50 | /* End PBXFileReference section */ 51 | 52 | /* Begin PBXFrameworksBuildPhase section */ 53 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 54 | isa = PBXFrameworksBuildPhase; 55 | buildActionMask = 2147483647; 56 | files = ( 57 | 55C318D4D737C4E2513918E6 /* Pods_Runner.framework in Frameworks */, 58 | ); 59 | runOnlyForDeploymentPostprocessing = 0; 60 | }; 61 | /* End PBXFrameworksBuildPhase section */ 62 | 63 | /* Begin PBXGroup section */ 64 | 322BC98589305AA0A3E93E5F /* Frameworks */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | 20E4035E57702FDD88E11E0A /* Pods_Runner.framework */, 68 | ); 69 | name = Frameworks; 70 | sourceTree = ""; 71 | }; 72 | 9740EEB11CF90186004384FC /* Flutter */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 76 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 77 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 78 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 79 | ); 80 | name = Flutter; 81 | sourceTree = ""; 82 | }; 83 | 97C146E51CF9000F007C117D = { 84 | isa = PBXGroup; 85 | children = ( 86 | 9740EEB11CF90186004384FC /* Flutter */, 87 | 97C146F01CF9000F007C117D /* Runner */, 88 | 97C146EF1CF9000F007C117D /* Products */, 89 | B89211CF6203EFFFE7625D08 /* Pods */, 90 | 322BC98589305AA0A3E93E5F /* Frameworks */, 91 | ); 92 | sourceTree = ""; 93 | }; 94 | 97C146EF1CF9000F007C117D /* Products */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 97C146EE1CF9000F007C117D /* Runner.app */, 98 | ); 99 | name = Products; 100 | sourceTree = ""; 101 | }; 102 | 97C146F01CF9000F007C117D /* Runner */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 106 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 107 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 108 | 97C147021CF9000F007C117D /* Info.plist */, 109 | 97C146F11CF9000F007C117D /* Supporting Files */, 110 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 111 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 112 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 113 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 114 | ); 115 | path = Runner; 116 | sourceTree = ""; 117 | }; 118 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | ); 122 | name = "Supporting Files"; 123 | sourceTree = ""; 124 | }; 125 | B89211CF6203EFFFE7625D08 /* Pods */ = { 126 | isa = PBXGroup; 127 | children = ( 128 | FC310063F691A9090F67DA17 /* Pods-Runner.debug.xcconfig */, 129 | D223E22E5B6ABD48A741711A /* Pods-Runner.release.xcconfig */, 130 | 010F87FC1F442CDA0321C798 /* Pods-Runner.profile.xcconfig */, 131 | ); 132 | name = Pods; 133 | path = Pods; 134 | sourceTree = ""; 135 | }; 136 | /* End PBXGroup section */ 137 | 138 | /* Begin PBXNativeTarget section */ 139 | 97C146ED1CF9000F007C117D /* Runner */ = { 140 | isa = PBXNativeTarget; 141 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 142 | buildPhases = ( 143 | 55E633AC9248B83D1ED7F456 /* [CP] Check Pods Manifest.lock */, 144 | 9740EEB61CF901F6004384FC /* Run Script */, 145 | 97C146EA1CF9000F007C117D /* Sources */, 146 | 97C146EB1CF9000F007C117D /* Frameworks */, 147 | 97C146EC1CF9000F007C117D /* Resources */, 148 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 149 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 150 | 26BB41C1E7D02C6CA85B67A2 /* [CP] Embed Pods Frameworks */, 151 | ); 152 | buildRules = ( 153 | ); 154 | dependencies = ( 155 | ); 156 | name = Runner; 157 | productName = Runner; 158 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 159 | productType = "com.apple.product-type.application"; 160 | }; 161 | /* End PBXNativeTarget section */ 162 | 163 | /* Begin PBXProject section */ 164 | 97C146E61CF9000F007C117D /* Project object */ = { 165 | isa = PBXProject; 166 | attributes = { 167 | LastUpgradeCheck = 1020; 168 | ORGANIZATIONNAME = ""; 169 | TargetAttributes = { 170 | 97C146ED1CF9000F007C117D = { 171 | CreatedOnToolsVersion = 7.3.1; 172 | LastSwiftMigration = 1100; 173 | }; 174 | }; 175 | }; 176 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 177 | compatibilityVersion = "Xcode 9.3"; 178 | developmentRegion = en; 179 | hasScannedForEncodings = 0; 180 | knownRegions = ( 181 | en, 182 | Base, 183 | ); 184 | mainGroup = 97C146E51CF9000F007C117D; 185 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 186 | projectDirPath = ""; 187 | projectRoot = ""; 188 | targets = ( 189 | 97C146ED1CF9000F007C117D /* Runner */, 190 | ); 191 | }; 192 | /* End PBXProject section */ 193 | 194 | /* Begin PBXResourcesBuildPhase section */ 195 | 97C146EC1CF9000F007C117D /* Resources */ = { 196 | isa = PBXResourcesBuildPhase; 197 | buildActionMask = 2147483647; 198 | files = ( 199 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 200 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 201 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 202 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 203 | ); 204 | runOnlyForDeploymentPostprocessing = 0; 205 | }; 206 | /* End PBXResourcesBuildPhase section */ 207 | 208 | /* Begin PBXShellScriptBuildPhase section */ 209 | 26BB41C1E7D02C6CA85B67A2 /* [CP] Embed Pods Frameworks */ = { 210 | isa = PBXShellScriptBuildPhase; 211 | buildActionMask = 2147483647; 212 | files = ( 213 | ); 214 | inputPaths = ( 215 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", 216 | "${PODS_ROOT}/../Flutter/Flutter.framework", 217 | "${BUILT_PRODUCTS_DIR}/path_provider/path_provider.framework", 218 | "${BUILT_PRODUCTS_DIR}/shared_preferences/shared_preferences.framework", 219 | "${BUILT_PRODUCTS_DIR}/webview_flutter/webview_flutter.framework", 220 | ); 221 | name = "[CP] Embed Pods Frameworks"; 222 | outputPaths = ( 223 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework", 224 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider.framework", 225 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences.framework", 226 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/webview_flutter.framework", 227 | ); 228 | runOnlyForDeploymentPostprocessing = 0; 229 | shellPath = /bin/sh; 230 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 231 | showEnvVarsInLog = 0; 232 | }; 233 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 234 | isa = PBXShellScriptBuildPhase; 235 | buildActionMask = 2147483647; 236 | files = ( 237 | ); 238 | inputPaths = ( 239 | ); 240 | name = "Thin Binary"; 241 | outputPaths = ( 242 | ); 243 | runOnlyForDeploymentPostprocessing = 0; 244 | shellPath = /bin/sh; 245 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 246 | }; 247 | 55E633AC9248B83D1ED7F456 /* [CP] Check Pods Manifest.lock */ = { 248 | isa = PBXShellScriptBuildPhase; 249 | buildActionMask = 2147483647; 250 | files = ( 251 | ); 252 | inputFileListPaths = ( 253 | ); 254 | inputPaths = ( 255 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 256 | "${PODS_ROOT}/Manifest.lock", 257 | ); 258 | name = "[CP] Check Pods Manifest.lock"; 259 | outputFileListPaths = ( 260 | ); 261 | outputPaths = ( 262 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 263 | ); 264 | runOnlyForDeploymentPostprocessing = 0; 265 | shellPath = /bin/sh; 266 | 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"; 267 | showEnvVarsInLog = 0; 268 | }; 269 | 9740EEB61CF901F6004384FC /* Run Script */ = { 270 | isa = PBXShellScriptBuildPhase; 271 | buildActionMask = 2147483647; 272 | files = ( 273 | ); 274 | inputPaths = ( 275 | ); 276 | name = "Run Script"; 277 | outputPaths = ( 278 | ); 279 | runOnlyForDeploymentPostprocessing = 0; 280 | shellPath = /bin/sh; 281 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 282 | }; 283 | /* End PBXShellScriptBuildPhase section */ 284 | 285 | /* Begin PBXSourcesBuildPhase section */ 286 | 97C146EA1CF9000F007C117D /* Sources */ = { 287 | isa = PBXSourcesBuildPhase; 288 | buildActionMask = 2147483647; 289 | files = ( 290 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 291 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 292 | ); 293 | runOnlyForDeploymentPostprocessing = 0; 294 | }; 295 | /* End PBXSourcesBuildPhase section */ 296 | 297 | /* Begin PBXVariantGroup section */ 298 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 299 | isa = PBXVariantGroup; 300 | children = ( 301 | 97C146FB1CF9000F007C117D /* Base */, 302 | ); 303 | name = Main.storyboard; 304 | sourceTree = ""; 305 | }; 306 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 307 | isa = PBXVariantGroup; 308 | children = ( 309 | 97C147001CF9000F007C117D /* Base */, 310 | ); 311 | name = LaunchScreen.storyboard; 312 | sourceTree = ""; 313 | }; 314 | /* End PBXVariantGroup section */ 315 | 316 | /* Begin XCBuildConfiguration section */ 317 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 318 | isa = XCBuildConfiguration; 319 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 320 | buildSettings = { 321 | ALWAYS_SEARCH_USER_PATHS = NO; 322 | CLANG_ANALYZER_NONNULL = YES; 323 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 324 | CLANG_CXX_LIBRARY = "libc++"; 325 | CLANG_ENABLE_MODULES = YES; 326 | CLANG_ENABLE_OBJC_ARC = YES; 327 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 328 | CLANG_WARN_BOOL_CONVERSION = YES; 329 | CLANG_WARN_COMMA = YES; 330 | CLANG_WARN_CONSTANT_CONVERSION = YES; 331 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 332 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 333 | CLANG_WARN_EMPTY_BODY = YES; 334 | CLANG_WARN_ENUM_CONVERSION = YES; 335 | CLANG_WARN_INFINITE_RECURSION = YES; 336 | CLANG_WARN_INT_CONVERSION = YES; 337 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 338 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 339 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 340 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 341 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 342 | CLANG_WARN_STRICT_PROTOTYPES = YES; 343 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 344 | CLANG_WARN_UNREACHABLE_CODE = YES; 345 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 346 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 347 | COPY_PHASE_STRIP = NO; 348 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 349 | ENABLE_NS_ASSERTIONS = NO; 350 | ENABLE_STRICT_OBJC_MSGSEND = YES; 351 | GCC_C_LANGUAGE_STANDARD = gnu99; 352 | GCC_NO_COMMON_BLOCKS = YES; 353 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 354 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 355 | GCC_WARN_UNDECLARED_SELECTOR = YES; 356 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 357 | GCC_WARN_UNUSED_FUNCTION = YES; 358 | GCC_WARN_UNUSED_VARIABLE = YES; 359 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 360 | MTL_ENABLE_DEBUG_INFO = NO; 361 | SDKROOT = iphoneos; 362 | SUPPORTED_PLATFORMS = iphoneos; 363 | TARGETED_DEVICE_FAMILY = "1,2"; 364 | VALIDATE_PRODUCT = YES; 365 | }; 366 | name = Profile; 367 | }; 368 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 369 | isa = XCBuildConfiguration; 370 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 371 | buildSettings = { 372 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 373 | CLANG_ENABLE_MODULES = YES; 374 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 375 | ENABLE_BITCODE = NO; 376 | FRAMEWORK_SEARCH_PATHS = ( 377 | "$(inherited)", 378 | "$(PROJECT_DIR)/Flutter", 379 | ); 380 | INFOPLIST_FILE = Runner/Info.plist; 381 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 382 | LIBRARY_SEARCH_PATHS = ( 383 | "$(inherited)", 384 | "$(PROJECT_DIR)/Flutter", 385 | ); 386 | PRODUCT_BUNDLE_IDENTIFIER = org.jetlinks.jetlinksApp; 387 | PRODUCT_NAME = "$(TARGET_NAME)"; 388 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 389 | SWIFT_VERSION = 5.0; 390 | VERSIONING_SYSTEM = "apple-generic"; 391 | }; 392 | name = Profile; 393 | }; 394 | 97C147031CF9000F007C117D /* Debug */ = { 395 | isa = XCBuildConfiguration; 396 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 397 | buildSettings = { 398 | ALWAYS_SEARCH_USER_PATHS = NO; 399 | CLANG_ANALYZER_NONNULL = YES; 400 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 401 | CLANG_CXX_LIBRARY = "libc++"; 402 | CLANG_ENABLE_MODULES = YES; 403 | CLANG_ENABLE_OBJC_ARC = YES; 404 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 405 | CLANG_WARN_BOOL_CONVERSION = YES; 406 | CLANG_WARN_COMMA = YES; 407 | CLANG_WARN_CONSTANT_CONVERSION = YES; 408 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 409 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 410 | CLANG_WARN_EMPTY_BODY = YES; 411 | CLANG_WARN_ENUM_CONVERSION = YES; 412 | CLANG_WARN_INFINITE_RECURSION = YES; 413 | CLANG_WARN_INT_CONVERSION = YES; 414 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 415 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 416 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 417 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 418 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 419 | CLANG_WARN_STRICT_PROTOTYPES = YES; 420 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 421 | CLANG_WARN_UNREACHABLE_CODE = YES; 422 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 423 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 424 | COPY_PHASE_STRIP = NO; 425 | DEBUG_INFORMATION_FORMAT = dwarf; 426 | ENABLE_STRICT_OBJC_MSGSEND = YES; 427 | ENABLE_TESTABILITY = YES; 428 | GCC_C_LANGUAGE_STANDARD = gnu99; 429 | GCC_DYNAMIC_NO_PIC = NO; 430 | GCC_NO_COMMON_BLOCKS = YES; 431 | GCC_OPTIMIZATION_LEVEL = 0; 432 | GCC_PREPROCESSOR_DEFINITIONS = ( 433 | "DEBUG=1", 434 | "$(inherited)", 435 | ); 436 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 437 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 438 | GCC_WARN_UNDECLARED_SELECTOR = YES; 439 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 440 | GCC_WARN_UNUSED_FUNCTION = YES; 441 | GCC_WARN_UNUSED_VARIABLE = YES; 442 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 443 | MTL_ENABLE_DEBUG_INFO = YES; 444 | ONLY_ACTIVE_ARCH = YES; 445 | SDKROOT = iphoneos; 446 | TARGETED_DEVICE_FAMILY = "1,2"; 447 | }; 448 | name = Debug; 449 | }; 450 | 97C147041CF9000F007C117D /* Release */ = { 451 | isa = XCBuildConfiguration; 452 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 453 | buildSettings = { 454 | ALWAYS_SEARCH_USER_PATHS = NO; 455 | CLANG_ANALYZER_NONNULL = YES; 456 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 457 | CLANG_CXX_LIBRARY = "libc++"; 458 | CLANG_ENABLE_MODULES = YES; 459 | CLANG_ENABLE_OBJC_ARC = YES; 460 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 461 | CLANG_WARN_BOOL_CONVERSION = YES; 462 | CLANG_WARN_COMMA = YES; 463 | CLANG_WARN_CONSTANT_CONVERSION = YES; 464 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 465 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 466 | CLANG_WARN_EMPTY_BODY = YES; 467 | CLANG_WARN_ENUM_CONVERSION = YES; 468 | CLANG_WARN_INFINITE_RECURSION = YES; 469 | CLANG_WARN_INT_CONVERSION = YES; 470 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 471 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 472 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 473 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 474 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 475 | CLANG_WARN_STRICT_PROTOTYPES = YES; 476 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 477 | CLANG_WARN_UNREACHABLE_CODE = YES; 478 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 479 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 480 | COPY_PHASE_STRIP = NO; 481 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 482 | ENABLE_NS_ASSERTIONS = NO; 483 | ENABLE_STRICT_OBJC_MSGSEND = YES; 484 | GCC_C_LANGUAGE_STANDARD = gnu99; 485 | GCC_NO_COMMON_BLOCKS = YES; 486 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 487 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 488 | GCC_WARN_UNDECLARED_SELECTOR = YES; 489 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 490 | GCC_WARN_UNUSED_FUNCTION = YES; 491 | GCC_WARN_UNUSED_VARIABLE = YES; 492 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 493 | MTL_ENABLE_DEBUG_INFO = NO; 494 | SDKROOT = iphoneos; 495 | SUPPORTED_PLATFORMS = iphoneos; 496 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 497 | TARGETED_DEVICE_FAMILY = "1,2"; 498 | VALIDATE_PRODUCT = YES; 499 | }; 500 | name = Release; 501 | }; 502 | 97C147061CF9000F007C117D /* Debug */ = { 503 | isa = XCBuildConfiguration; 504 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 505 | buildSettings = { 506 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 507 | CLANG_ENABLE_MODULES = YES; 508 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 509 | ENABLE_BITCODE = NO; 510 | FRAMEWORK_SEARCH_PATHS = ( 511 | "$(inherited)", 512 | "$(PROJECT_DIR)/Flutter", 513 | ); 514 | INFOPLIST_FILE = Runner/Info.plist; 515 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 516 | LIBRARY_SEARCH_PATHS = ( 517 | "$(inherited)", 518 | "$(PROJECT_DIR)/Flutter", 519 | ); 520 | PRODUCT_BUNDLE_IDENTIFIER = org.jetlinks.jetlinksApp; 521 | PRODUCT_NAME = "$(TARGET_NAME)"; 522 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 523 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 524 | SWIFT_VERSION = 5.0; 525 | VERSIONING_SYSTEM = "apple-generic"; 526 | }; 527 | name = Debug; 528 | }; 529 | 97C147071CF9000F007C117D /* Release */ = { 530 | isa = XCBuildConfiguration; 531 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 532 | buildSettings = { 533 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 534 | CLANG_ENABLE_MODULES = YES; 535 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 536 | ENABLE_BITCODE = NO; 537 | FRAMEWORK_SEARCH_PATHS = ( 538 | "$(inherited)", 539 | "$(PROJECT_DIR)/Flutter", 540 | ); 541 | INFOPLIST_FILE = Runner/Info.plist; 542 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 543 | LIBRARY_SEARCH_PATHS = ( 544 | "$(inherited)", 545 | "$(PROJECT_DIR)/Flutter", 546 | ); 547 | PRODUCT_BUNDLE_IDENTIFIER = org.jetlinks.jetlinksApp; 548 | PRODUCT_NAME = "$(TARGET_NAME)"; 549 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 550 | SWIFT_VERSION = 5.0; 551 | VERSIONING_SYSTEM = "apple-generic"; 552 | }; 553 | name = Release; 554 | }; 555 | /* End XCBuildConfiguration section */ 556 | 557 | /* Begin XCConfigurationList section */ 558 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 559 | isa = XCConfigurationList; 560 | buildConfigurations = ( 561 | 97C147031CF9000F007C117D /* Debug */, 562 | 97C147041CF9000F007C117D /* Release */, 563 | 249021D3217E4FDB00AE95B9 /* Profile */, 564 | ); 565 | defaultConfigurationIsVisible = 0; 566 | defaultConfigurationName = Release; 567 | }; 568 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 569 | isa = XCConfigurationList; 570 | buildConfigurations = ( 571 | 97C147061CF9000F007C117D /* Debug */, 572 | 97C147071CF9000F007C117D /* Release */, 573 | 249021D4217E4FDB00AE95B9 /* Profile */, 574 | ); 575 | defaultConfigurationIsVisible = 0; 576 | defaultConfigurationName = Release; 577 | }; 578 | /* End XCConfigurationList section */ 579 | }; 580 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 581 | } 582 | --------------------------------------------------------------------------------