Modfiy: 改造业内资讯页面
@ -25,8 +25,15 @@ apply plugin: 'com.android.application'
|
|||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
|
def keystoreProperties = new Properties()
|
||||||
|
def keystorePropertiesFile = rootProject.file('key.properties')
|
||||||
|
if (keystorePropertiesFile.exists()) {
|
||||||
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 27
|
compileSdkVersion 28
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main.java.srcDirs += 'src/main/kotlin'
|
main.java.srcDirs += 'src/main/kotlin'
|
||||||
@ -38,21 +45,28 @@ android {
|
|||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
applicationId "com.ali.fluttergo"
|
applicationId "com.alibaba.fluttergo"
|
||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 27
|
targetSdkVersion 28
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
// TODO: Add your own signing config for the release build.
|
keyAlias keystoreProperties['keyAlias']
|
||||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
keyPassword keystoreProperties['keyPassword']
|
||||||
signingConfig signingConfigs.debug
|
storeFile file(keystoreProperties['storeFile'])
|
||||||
|
storePassword keystoreProperties['storePassword']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
signingConfig signingConfigs.release
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
flutter {
|
flutter {
|
||||||
@ -62,8 +76,8 @@ flutter {
|
|||||||
dependencies {
|
dependencies {
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||||
testImplementation 'junit:junit:4.12'
|
testImplementation 'junit:junit:4.12'
|
||||||
androidTestImplementation 'com.android.support.test:runner:1.0.2'
|
androidTestImplementation 'androidx.test:runner:1.1.1'
|
||||||
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
|
||||||
//firebase
|
//firebase
|
||||||
implementation 'com.google.firebase:firebase-core:16.0.8'
|
implementation 'com.google.firebase:firebase-core:16.0.8'
|
||||||
//Crashlytics SDK
|
//Crashlytics SDK
|
||||||
|
@ -1,42 +1,35 @@
|
|||||||
{
|
{
|
||||||
"project_info": {
|
"project_info": {
|
||||||
"project_number": "1002138254102",
|
"project_number": "611157827052",
|
||||||
//"firebase_url": "https://ali-flutter-go.firebaseio.com",
|
"firebase_url": "https://alibaba-flutter-go.firebaseio.com",
|
||||||
"project_id": "ali-flutter-go",
|
"project_id": "alibaba-flutter-go",
|
||||||
"storage_bucket": "ali-flutter-go.appspot.com"
|
"storage_bucket": "alibaba-flutter-go.appspot.com"
|
||||||
},
|
},
|
||||||
"client": [
|
"client": [
|
||||||
{
|
{
|
||||||
"client_info": {
|
"client_info": {
|
||||||
"mobilesdk_app_id": "1:1002138254102:android:00e8533fa0274183",
|
"mobilesdk_app_id": "1:611157827052:android:c6129e5eff2f125d",
|
||||||
"android_client_info": {
|
"android_client_info": {
|
||||||
"package_name": "com.ali.fluttergo"
|
"package_name": "com.alibaba.fluttergo"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"oauth_client": [
|
"oauth_client": [
|
||||||
{
|
{
|
||||||
"client_id": "1002138254102-2r4hs0mm1avp4p1qielecihnbugan693.apps.googleusercontent.com",
|
"client_id": "611157827052-iiuevj8qu56alpqh47v37j9sd4e40di7.apps.googleusercontent.com",
|
||||||
"client_type": 3
|
"client_type": 3
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"api_key": [
|
"api_key": [
|
||||||
{
|
{
|
||||||
"current_key": "AIzaSyDFdL3GSwVDfejIq44pyOpiEBZ32dTGMVA"
|
"current_key": "AIzaSyA9chxDIuds7gmPQTJPpDpoXyN9rDTdvhU"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"services": {
|
"services": {
|
||||||
"appinvite_service": {
|
"appinvite_service": {
|
||||||
"other_platform_oauth_client": [
|
"other_platform_oauth_client": [
|
||||||
{
|
{
|
||||||
"client_id": "1002138254102-2r4hs0mm1avp4p1qielecihnbugan693.apps.googleusercontent.com",
|
"client_id": "611157827052-iiuevj8qu56alpqh47v37j9sd4e40di7.apps.googleusercontent.com",
|
||||||
"client_type": 3
|
"client_type": 3
|
||||||
},
|
|
||||||
{
|
|
||||||
"client_id": "1002138254102-qo9jp8c3lc69p9lclu0rtp5dmt1kulv7.apps.googleusercontent.com",
|
|
||||||
"client_type": 2,
|
|
||||||
"ios_info": {
|
|
||||||
"bundle_id": "com.ali.fluttergo"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -44,4 +37,4 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"configuration_version": "1"
|
"configuration_version": "1"
|
||||||
}
|
}
|
||||||
|
1
android/app/release/output.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"0.0.5","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
|
@ -1,5 +1,5 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.ali.fluttergo">
|
package="com.alibaba.fluttergo">
|
||||||
<!-- Flutter needs it to communicate with the running application
|
<!-- Flutter needs it to communicate with the running application
|
||||||
to allow setting breakpoints, to provide hot reload, etc.
|
to allow setting breakpoints, to provide hot reload, etc.
|
||||||
-->
|
-->
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.ali.fluttergo">
|
package="com.alibaba.fluttergo">
|
||||||
|
|
||||||
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
|
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
|
||||||
calls FlutterMain.startInitialization(this); in its onCreate method.
|
calls FlutterMain.startInitialization(this); in its onCreate method.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.ali.fluttergo
|
package com.alibaba.fluttergo
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
<!-- You can insert your own image assets here -->
|
<!-- You can insert your own image assets here -->
|
||||||
<item>
|
<item>
|
||||||
<bitmap
|
<bitmap
|
||||||
android:gravity="center"
|
android:src="@drawable/splash" />
|
||||||
android:src="@mipmap/splash" />
|
|
||||||
</item>
|
</item>
|
||||||
</layer-list>
|
</layer-list>
|
||||||
|
Before Width: | Height: | Size: 197 KiB |
BIN
android/app/src/main/res/mipmap-xxxhdpi/spalsh.png
Normal file
After Width: | Height: | Size: 1.0 MiB |
@ -1,5 +1,5 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.ali.fluttergo">
|
package="com.alibaba.fluttergo">
|
||||||
<!-- Flutter needs it to communicate with the running application
|
<!-- Flutter needs it to communicate with the running application
|
||||||
to allow setting breakpoints, to provide hot reload, etc.
|
to allow setting breakpoints, to provide hot reload, etc.
|
||||||
-->
|
-->
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.2.71'
|
ext.kotlin_version = '1.3.0'
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
@ -10,7 +10,7 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.2.0'
|
classpath 'com.android.tools.build:gradle:3.3.0'
|
||||||
//firebase
|
//firebase
|
||||||
classpath 'com.google.gms:google-services:4.2.0'
|
classpath 'com.google.gms:google-services:4.2.0'
|
||||||
//Crashlytics SDK
|
//Crashlytics SDK
|
||||||
|
@ -1 +1,3 @@
|
|||||||
org.gradle.jvmargs=-Xmx1536M
|
org.gradle.jvmargs=-Xmx1536M
|
||||||
|
android.enableJetifier=true
|
||||||
|
android.useAndroidX=true
|
4
android/key.properties
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
storePassword=fluttergo123
|
||||||
|
keyPassword=fluttergo123
|
||||||
|
keyAlias=key
|
||||||
|
storeFile=/Users/xj.deng/key.jks
|
@ -243,7 +243,8 @@
|
|||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
97C146ED1CF9000F007C117D = {
|
97C146ED1CF9000F007C117D = {
|
||||||
CreatedOnToolsVersion = 7.3.1;
|
CreatedOnToolsVersion = 7.3.1;
|
||||||
DevelopmentTeam = RDJKXT446D;
|
DevelopmentTeam = 4WLT68XRNA;
|
||||||
|
ProvisioningStyle = Manual;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -252,6 +253,7 @@
|
|||||||
developmentRegion = English;
|
developmentRegion = English;
|
||||||
hasScannedForEncodings = 0;
|
hasScannedForEncodings = 0;
|
||||||
knownRegions = (
|
knownRegions = (
|
||||||
|
English,
|
||||||
en,
|
en,
|
||||||
Base,
|
Base,
|
||||||
);
|
);
|
||||||
@ -350,8 +352,8 @@
|
|||||||
files = (
|
files = (
|
||||||
);
|
);
|
||||||
inputPaths = (
|
inputPaths = (
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
|
"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
|
||||||
"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
|
"${PODS_ROOT}/../.symlinks/flutter/ios-release/Flutter.framework",
|
||||||
);
|
);
|
||||||
name = "[CP] Embed Pods Frameworks";
|
name = "[CP] Embed Pods Frameworks";
|
||||||
outputPaths = (
|
outputPaths = (
|
||||||
@ -359,7 +361,7 @@
|
|||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
||||||
showEnvVarsInLog = 0;
|
showEnvVarsInLog = 0;
|
||||||
};
|
};
|
||||||
/* End PBXShellScriptBuildPhase section */
|
/* End PBXShellScriptBuildPhase section */
|
||||||
@ -509,8 +511,9 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = Launch2;
|
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = Launch2;
|
||||||
|
CODE_SIGN_STYLE = Manual;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
DEVELOPMENT_TEAM = RDJKXT446D;
|
DEVELOPMENT_TEAM = 4WLT68XRNA;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
@ -522,8 +525,9 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)/Flutter",
|
"$(PROJECT_DIR)/Flutter",
|
||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.ali.fluttergo;
|
PRODUCT_BUNDLE_IDENTIFIER = com.alibaba.fluttergo;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
PROVISIONING_PROFILE_SPECIFIER = "FlutterGO-alibaba-develop";
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
@ -534,8 +538,10 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = Launch2;
|
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = Launch2;
|
||||||
|
CODE_SIGN_IDENTITY = "iPhone Distribution";
|
||||||
|
CODE_SIGN_STYLE = Manual;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
DEVELOPMENT_TEAM = RDJKXT446D;
|
DEVELOPMENT_TEAM = 4WLT68XRNA;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
@ -547,8 +553,9 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)/Flutter",
|
"$(PROJECT_DIR)/Flutter",
|
||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.ali.fluttergo;
|
PRODUCT_BUNDLE_IDENTIFIER = com.alibaba.fluttergo;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
PROVISIONING_PROFILE_SPECIFIER = FlutterGO_alibaba_distribution_ad_hoc;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
</AdditionalOptions>
|
</AdditionalOptions>
|
||||||
</TestAction>
|
</TestAction>
|
||||||
<LaunchAction
|
<LaunchAction
|
||||||
buildConfiguration = "Debug"
|
buildConfiguration = "Release"
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
launchStyle = "0"
|
launchStyle = "0"
|
||||||
|
BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/1024*1024@as.png
Normal file
After Width: | Height: | Size: 112 KiB |
BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/120*120@2x-1.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/120*120@2x.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/152*152.png
Normal file
After Width: | Height: | Size: 6.7 KiB |
BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/167*167.png
Normal file
After Width: | Height: | Size: 7.7 KiB |
BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/180*180@3x.png
Normal file
After Width: | Height: | Size: 8.7 KiB |
BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/20*20.png
Normal file
After Width: | Height: | Size: 725 B |
BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/29*29@1x-2.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/29*29@1x.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/40*40@1x-1.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/40*40@1x-2.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/40*40@1x.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/58*58@2x-1.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/58*58@2x.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/60*60@3x.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/76*76.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/80*80@2x-1.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/80*80@2x.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/87*87.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
@ -3,115 +3,115 @@
|
|||||||
{
|
{
|
||||||
"size" : "20x20",
|
"size" : "20x20",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "Icon-App-20x20@2x.png",
|
"filename" : "40*40@1x.png",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "20x20",
|
"size" : "20x20",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "Icon-App-20x20@3x.png",
|
"filename" : "60*60@3x.png",
|
||||||
"scale" : "3x"
|
"scale" : "3x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "29x29",
|
"size" : "29x29",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "Icon-App-29x29@1x.png",
|
"filename" : "29*29@1x.png",
|
||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "29x29",
|
"size" : "29x29",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "Icon-App-29x29@2x.png",
|
"filename" : "58*58@2x.png",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "29x29",
|
"size" : "29x29",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "Icon-App-29x29@3x.png",
|
"filename" : "87*87.png",
|
||||||
"scale" : "3x"
|
"scale" : "3x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "40x40",
|
"size" : "40x40",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "Icon-App-40x40@2x.png",
|
"filename" : "80*80@2x.png",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "40x40",
|
"size" : "40x40",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "Icon-App-40x40@3x.png",
|
"filename" : "120*120@2x.png",
|
||||||
"scale" : "3x"
|
"scale" : "3x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "60x60",
|
"size" : "60x60",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "Icon-App-60x60@2x.png",
|
"filename" : "120*120@2x-1.png",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "60x60",
|
"size" : "60x60",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "Icon-App-60x60@3x.png",
|
"filename" : "180*180@3x.png",
|
||||||
"scale" : "3x"
|
"scale" : "3x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "20x20",
|
"size" : "20x20",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"filename" : "Icon-App-20x20@1x.png",
|
"filename" : "20*20.png",
|
||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "20x20",
|
"size" : "20x20",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"filename" : "Icon-App-20x20@2x.png",
|
"filename" : "40*40@1x-2.png",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "29x29",
|
"size" : "29x29",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"filename" : "Icon-App-29x29@1x.png",
|
"filename" : "29*29@1x-2.png",
|
||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "29x29",
|
"size" : "29x29",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"filename" : "Icon-App-29x29@2x.png",
|
"filename" : "58*58@2x-1.png",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "40x40",
|
"size" : "40x40",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"filename" : "Icon-App-40x40@1x.png",
|
"filename" : "40*40@1x-1.png",
|
||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "40x40",
|
"size" : "40x40",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"filename" : "Icon-App-40x40@2x.png",
|
"filename" : "80*80@2x-1.png",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "76x76",
|
"size" : "76x76",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"filename" : "Icon-App-76x76@1x.png",
|
"filename" : "76*76.png",
|
||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "76x76",
|
"size" : "76x76",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"filename" : "Icon-App-76x76@2x.png",
|
"filename" : "152*152.png",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "83.5x83.5",
|
"size" : "83.5x83.5",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
"filename" : "167*167.png",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "1024x1024",
|
"size" : "1024x1024",
|
||||||
"idiom" : "ios-marketing",
|
"idiom" : "ios-marketing",
|
||||||
"filename" : "Icon-App-1024x1024@1x.png",
|
"filename" : "1024*1024@as.png",
|
||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -119,4 +119,4 @@
|
|||||||
"version" : 1,
|
"version" : 1,
|
||||||
"author" : "xcode"
|
"author" : "xcode"
|
||||||
}
|
}
|
||||||
}
|
}
|
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 564 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 3.5 KiB |
@ -3,21 +3,21 @@
|
|||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>CLIENT_ID</key>
|
<key>CLIENT_ID</key>
|
||||||
<string>1002138254102-qo9jp8c3lc69p9lclu0rtp5dmt1kulv7.apps.googleusercontent.com</string>
|
<string>611157827052-0n777p43lrtr2dpo7gco5o3lffu7a7r4.apps.googleusercontent.com</string>
|
||||||
<key>REVERSED_CLIENT_ID</key>
|
<key>REVERSED_CLIENT_ID</key>
|
||||||
<string>com.googleusercontent.apps.1002138254102-qo9jp8c3lc69p9lclu0rtp5dmt1kulv7</string>
|
<string>com.googleusercontent.apps.611157827052-0n777p43lrtr2dpo7gco5o3lffu7a7r4</string>
|
||||||
<key>API_KEY</key>
|
<key>API_KEY</key>
|
||||||
<string>AIzaSyD01jR14RevQibnzkg4tBUbFzc7UjKESFQ</string>
|
<string>AIzaSyDztt5Q9D7plAc8VqNtHumAci6BaoOiTg4</string>
|
||||||
<key>GCM_SENDER_ID</key>
|
<key>GCM_SENDER_ID</key>
|
||||||
<string>1002138254102</string>
|
<string>611157827052</string>
|
||||||
<key>PLIST_VERSION</key>
|
<key>PLIST_VERSION</key>
|
||||||
<string>1</string>
|
<string>1</string>
|
||||||
<key>BUNDLE_ID</key>
|
<key>BUNDLE_ID</key>
|
||||||
<string>com.ali.fluttergo</string>
|
<string>com.alibaba.fluttergo</string>
|
||||||
<key>PROJECT_ID</key>
|
<key>PROJECT_ID</key>
|
||||||
<string>ali-flutter-go</string>
|
<string>alibaba-flutter-go</string>
|
||||||
<key>STORAGE_BUCKET</key>
|
<key>STORAGE_BUCKET</key>
|
||||||
<string>ali-flutter-go.appspot.com</string>
|
<string>alibaba-flutter-go.appspot.com</string>
|
||||||
<key>IS_ADS_ENABLED</key>
|
<key>IS_ADS_ENABLED</key>
|
||||||
<false></false>
|
<false></false>
|
||||||
<key>IS_ANALYTICS_ENABLED</key>
|
<key>IS_ANALYTICS_ENABLED</key>
|
||||||
@ -29,8 +29,8 @@
|
|||||||
<key>IS_SIGNIN_ENABLED</key>
|
<key>IS_SIGNIN_ENABLED</key>
|
||||||
<true></true>
|
<true></true>
|
||||||
<key>GOOGLE_APP_ID</key>
|
<key>GOOGLE_APP_ID</key>
|
||||||
<string>1:1002138254102:ios:00e8533fa0274183</string>
|
<string>1:611157827052:ios:c6129e5eff2f125d</string>
|
||||||
<key>DATABASE_URL</key>
|
<key>DATABASE_URL</key>
|
||||||
<string>https://ali-flutter-go.firebaseio.com</string>
|
<string>https://alibaba-flutter-go.firebaseio.com</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
@ -3,43 +3,30 @@
|
|||||||
{
|
{
|
||||||
"orientation" : "portrait",
|
"orientation" : "portrait",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"minimum-system-version" : "7.0",
|
|
||||||
"extent" : "full-screen",
|
"extent" : "full-screen",
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"orientation" : "landscape",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"minimum-system-version" : "7.0",
|
"minimum-system-version" : "7.0",
|
||||||
"extent" : "full-screen",
|
|
||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"orientation" : "landscape",
|
"orientation" : "landscape",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"minimum-system-version" : "7.0",
|
|
||||||
"extent" : "full-screen",
|
"extent" : "full-screen",
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"orientation" : "portrait",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"minimum-system-version" : "7.0",
|
"minimum-system-version" : "7.0",
|
||||||
"scale" : "2x"
|
"scale" : "1x"
|
||||||
},
|
|
||||||
{
|
|
||||||
"orientation" : "portrait",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"minimum-system-version" : "7.0",
|
|
||||||
"subtype" : "retina4",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"orientation" : "portrait",
|
"orientation" : "portrait",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"minimum-system-version" : "7.0",
|
|
||||||
"extent" : "full-screen",
|
"extent" : "full-screen",
|
||||||
"scale" : "1x"
|
"minimum-system-version" : "7.0",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "landscape",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"minimum-system-version" : "7.0",
|
||||||
|
"scale" : "2x"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"info" : {
|
"info" : {
|
||||||
|
14
lib/blocs/bak/search_result.dart
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
/**
|
||||||
|
* Created with Android Studio.
|
||||||
|
* User: 一晟
|
||||||
|
* Date: 2019/4/28
|
||||||
|
* Time: 7:11 PM
|
||||||
|
* email: zhu.yan@alibaba-inc.com
|
||||||
|
* tartget:
|
||||||
|
*/
|
||||||
|
class SearchResult {
|
||||||
|
String title;
|
||||||
|
String source;
|
||||||
|
|
||||||
|
SearchResult({this.title, this.source});
|
||||||
|
}
|
@ -14,47 +14,45 @@ import './industry_model.dart';
|
|||||||
import './search_result.dart';
|
import './search_result.dart';
|
||||||
|
|
||||||
var dio = new Dio();
|
var dio = new Dio();
|
||||||
class Api2 {
|
//class Api2 {
|
||||||
/// 关键字提示(起点)
|
// /// 关键字提示(起点)
|
||||||
Future<List<String>> suggestion(String query) async {
|
// Future<List<String>> suggestion(String query) async {
|
||||||
// http.Response response = await http.get(
|
//// http.Response response = await http.get(
|
||||||
// "https://www.qidian.com/ajax/Search/AutoComplete?siteid=1&query=$query");
|
//// "https://www.qidian.com/ajax/Search/AutoComplete?siteid=1&query=$query");
|
||||||
var response = await dio.get("https://www.qidian.com/ajax/Search/AutoComplete?siteid=1&query=$query", data: {});
|
// var response = await dio.get("https://www.qidian.com/ajax/Search/AutoComplete?siteid=1&query=$query", data: {});
|
||||||
//var response = await dio.get("https://www.so.com/s?ie=utf-8&q=$query");
|
// //var response = await dio.get("https://www.so.com/s?ie=utf-8&q=$query");
|
||||||
print('1=====>${query}');
|
// print('1=====>${query}');
|
||||||
print('2=====>${response.data}');
|
// print('2=====>${response.data}');
|
||||||
//var data = Suggestion.fromJson(json.decode(response.body));
|
// //var data = Suggestion.fromJson(json.decode(response.body));
|
||||||
//var data = Suggestion.fromJson(json.decode(response.data));
|
// //var data = Suggestion.fromJson(json.decode(response.data));
|
||||||
var data = Suggestion.fromJson(json.decode(response.data));
|
// var data = Suggestion.fromJson(json.decode(response.data));
|
||||||
List<String> suggestion = [];
|
// List<String> suggestion = [];
|
||||||
data.suggestions.forEach((k) {
|
// data.suggestions.forEach((k) {
|
||||||
//print('=====>${k.value}');
|
// //print('=====>${k.value}');
|
||||||
suggestion.add(k.value);
|
// suggestion.add(k.value);
|
||||||
});
|
// });
|
||||||
|
//
|
||||||
return Future.delayed(Duration(seconds:2), () {
|
// return Future.delayed(Duration(seconds:2), () {
|
||||||
return suggestion;
|
// return suggestion;
|
||||||
});
|
// });
|
||||||
//return suggestion;
|
// //return suggestion;
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
class Api {
|
class Api {
|
||||||
/// 关键字提示(起点)
|
/// 关键字提示(起点)
|
||||||
Future<List<SearchResult>> suggestion(String query) async {
|
Future<List<SearchResult>> suggestion(String query) async {
|
||||||
// http.Response response = await http.get(
|
// http.Response response = await http.get(
|
||||||
// "https://www.qidian.com/ajax/Search/AutoComplete?siteid=1&query=$query");
|
// "https://www.qidian.com/ajax/Search/AutoComplete?siteid=1&query=$query");
|
||||||
/// var response = await dio.get("https://www.qidian.com/ajax/Search/AutoComplete?siteid=1&query=$query", data: {});
|
/// var response = await dio.get("https://www.qidian.com/ajax/Search/AutoComplete?siteid=1&query=$query", data: {});
|
||||||
var response = await dio.get("https://www.so.com/s?ie=utf-8&q=$query");
|
var response = await dio.get("https://www.so.com/s?ie=utf-8&q=$query flutter");
|
||||||
var document = parse(response.data);
|
var document = parse(response.data);
|
||||||
var app = document.querySelectorAll('.res-title a');
|
var app = document.querySelectorAll('.res-title a');
|
||||||
print('1=====>${query}');
|
///print('1=====>${query}');
|
||||||
print('2=====>${response.data}');
|
///print('2=====>${response.data}');
|
||||||
print('3=====>${app}');
|
////print('3=====>${app}');
|
||||||
//var data = Suggestion.fromJson(json.decode(response.body));
|
|
||||||
//var data = Suggestion.fromJson(json.decode(response.data));
|
|
||||||
List<SearchResult> res = [];
|
List<SearchResult> res = [];
|
||||||
app.forEach((f) {
|
app.forEach((f) {
|
||||||
print('f==>${f}');
|
///print('f==>${f}');
|
||||||
res.add(
|
res.add(
|
||||||
SearchResult(
|
SearchResult(
|
||||||
title: f.text,
|
title: f.text,
|
||||||
|
@ -15,19 +15,27 @@ import './industry_state.dart';
|
|||||||
class SuggestionBloc extends Bloc<SuggestionEvent, SuggestionState> {
|
class SuggestionBloc extends Bloc<SuggestionEvent, SuggestionState> {
|
||||||
@override
|
@override
|
||||||
SuggestionState get initialState => SuggestionUninitialized();
|
SuggestionState get initialState => SuggestionUninitialized();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Stream<SuggestionState> mapEventToState(SuggestionEvent event)async* {
|
Stream<SuggestionState> mapEventToState(SuggestionEvent event)async* {
|
||||||
//Stream<SuggestionState> mapEventToState(SuggestionState currentState, SuggestionEvent event,) async* {
|
//Stream<SuggestionState> mapEventToState(SuggestionState currentState, SuggestionEvent event,) async* {
|
||||||
if (event is SuggestionFetch) {
|
if (event is SuggestionFetch) {
|
||||||
print('event==>${event.query}');
|
//print('event==>${event}');
|
||||||
try {
|
try {
|
||||||
yield SuggestionLoading();
|
yield SuggestionLoading();
|
||||||
final res = await api.suggestion(event.query);
|
final res = await api.suggestion(event.query);
|
||||||
|
print('res====>${res}');
|
||||||
yield SuggestionLoaded(res: res);
|
yield SuggestionLoaded(res: res);
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
yield SuggestionError();
|
yield SuggestionError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (event is SuggestionClearFetch) {
|
||||||
|
//print('event==>${event}');
|
||||||
|
try {
|
||||||
|
yield SuggestionUninitialized();
|
||||||
|
} catch (_) {
|
||||||
|
yield SuggestionError();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,4 +14,13 @@ class SuggestionFetch extends SuggestionEvent {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'SuggestionFetch:获取关键字提示事件';
|
String toString() => 'SuggestionFetch:获取关键字提示事件';
|
||||||
|
}
|
||||||
|
|
||||||
|
class SuggestionClearFetch extends SuggestionEvent {
|
||||||
|
final String query;
|
||||||
|
|
||||||
|
SuggestionClearFetch({this.query});
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => 'SuggestionClearFetch:清空界面';
|
||||||
}
|
}
|
@ -6,52 +6,40 @@
|
|||||||
* email: zhu.yan@alibaba-inc.com
|
* email: zhu.yan@alibaba-inc.com
|
||||||
*/
|
*/
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
//import 'package:bloc/bloc.dart';
|
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import './industry_bloc.dart';
|
import './industry_bloc.dart';
|
||||||
import './industry_event.dart';
|
import './industry_event.dart';
|
||||||
import './industry_state.dart';
|
import './industry_state.dart';
|
||||||
|
|
||||||
//class Industry extends StatelessWidget {
|
final SuggestionBloc suggestion = SuggestionBloc();
|
||||||
// @override
|
|
||||||
// Widget build(BuildContext context) {
|
|
||||||
// return MaterialApp(
|
|
||||||
// title: '关键字提示',
|
|
||||||
// home: Scaffold(
|
|
||||||
// appBar: AppBar(
|
|
||||||
// title: Text('关键字提示'),
|
|
||||||
// ),
|
|
||||||
// body: AppHome(),
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
class IndustryPage extends StatefulWidget {
|
class IndustryPage extends StatefulWidget {
|
||||||
|
final Function itemTitle;
|
||||||
|
IndustryPage({Key key,this.itemTitle}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_IndustryState createState() => _IndustryState();
|
_IndustryState createState() => _IndustryState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _IndustryState extends State<IndustryPage> {
|
class _IndustryState extends State<IndustryPage> {
|
||||||
final SuggestionBloc _suggestion = SuggestionBloc();
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Material(
|
return Material(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
TextField(
|
// TextField(
|
||||||
autofocus: true,
|
// autofocus: true,
|
||||||
textAlign: TextAlign.center,
|
// textAlign: TextAlign.center,
|
||||||
onSubmitted: (text) {
|
// onSubmitted: (text) {
|
||||||
_suggestion.dispatch(SuggestionFetch(query: text));
|
// print('onSubmitted:${text}');
|
||||||
},
|
// suggestion.dispatch(SuggestionFetch(query: text));
|
||||||
),
|
// },
|
||||||
|
// ),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: BlocBuilder(
|
child: BlocBuilder(
|
||||||
bloc: _suggestion,
|
bloc: suggestion,
|
||||||
builder: (BuildContext context, SuggestionState state) {
|
builder: (BuildContext context, SuggestionState state) {
|
||||||
print('-------${state}');
|
print('BlocBuilder----${state}');
|
||||||
if (state is SuggestionUninitialized) {
|
if (state is SuggestionUninitialized) {
|
||||||
return Center(
|
return Center(
|
||||||
child: Text('暂无内容'),
|
child: Text('暂无内容'),
|
||||||
@ -65,34 +53,15 @@ class _IndustryState extends State<IndustryPage> {
|
|||||||
child: Text('出现错误'),
|
child: Text('出现错误'),
|
||||||
);
|
);
|
||||||
} else if (state is SuggestionLoaded) {
|
} else if (state is SuggestionLoaded) {
|
||||||
// return ListView.builder(
|
if (state.res.length == 0) {
|
||||||
// itemBuilder: (BuildContext context, int index) {
|
return Center(
|
||||||
// //return ListTile(title: Text(state.res[index]));
|
child: Text('没有适合的结果,更换查询条件试试'),
|
||||||
// return null;
|
);
|
||||||
// },
|
}else {
|
||||||
// itemCount: state.res.length,
|
if (widget.itemTitle is Function) {
|
||||||
// );
|
return widget.itemTitle(state);
|
||||||
return ListView.builder(
|
}
|
||||||
itemBuilder: (BuildContext context, int index) {
|
}
|
||||||
return ListTile(
|
|
||||||
dense: true,
|
|
||||||
leading: Icon(
|
|
||||||
Icons.bookmark_border,
|
|
||||||
size: 32,
|
|
||||||
),
|
|
||||||
title: Text(
|
|
||||||
state.res[index].title,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
),
|
|
||||||
subtitle: Text(state.res[index].source),
|
|
||||||
onTap: () {
|
|
||||||
// 在这里对选中的结果进行解析,因为我目前是用golang实现的,所以就没贴代码了。
|
|
||||||
print(state.res[index].source);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
},
|
|
||||||
itemCount: state.res.length,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -104,7 +73,7 @@ class _IndustryState extends State<IndustryPage> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_suggestion.dispose();
|
//suggestion.dispose();//添加这个第二次进入会失灵
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -31,4 +31,4 @@ class SuggestionLoaded extends SuggestionState {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'SuggestionLoaded:加载完毕';
|
String toString() => 'SuggestionLoaded:加载完毕';
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,18 @@ class _BannerState extends State<HomeBanner> {
|
|||||||
timer.cancel();
|
timer.cancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// pagination 的计数器
|
||||||
|
Widget _numberIndicator(BuildContext context, int index, int itemCount) {
|
||||||
|
return Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.black45, borderRadius: BorderRadius.circular(20.0)),
|
||||||
|
margin: EdgeInsets.only(top: 10.0, right: 5.0),
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 6.0, vertical: 2.0),
|
||||||
|
child: Text("${++index}/$itemCount",
|
||||||
|
style: TextStyle( color: Colors.white70, fontSize: 12.0, fontWeight:FontWeight.bold )),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
@ -54,6 +66,11 @@ class _BannerState extends State<HomeBanner> {
|
|||||||
onPageChanged: _onPageChanged,
|
onPageChanged: _onPageChanged,
|
||||||
children: _buildItems(),),
|
children: _buildItems(),),
|
||||||
_buildIndicator(), // 下面的小点
|
_buildIndicator(), // 下面的小点
|
||||||
|
Positioned(//方法二
|
||||||
|
top: 0.0,
|
||||||
|
right: 0.0,
|
||||||
|
child: _numberIndicator(context,virtualIndex,widget.bannerStories.length),
|
||||||
|
)
|
||||||
]),
|
]),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ import 'routers/application.dart';
|
|||||||
|
|
||||||
import 'package:flutter_go/utils/provider.dart';
|
import 'package:flutter_go/utils/provider.dart';
|
||||||
import 'package:flutter_go/utils/shared_preferences.dart';
|
import 'package:flutter_go/utils/shared_preferences.dart';
|
||||||
import 'package:flutter_go/views/first_page/home.dart';
|
import 'package:flutter_go/views/home.dart';
|
||||||
import 'package:flutter_go/model/search_history.dart';
|
import 'package:flutter_go/model/search_history.dart';
|
||||||
import 'package:flutter_go/utils/analytics.dart' as Analytics;
|
import 'package:flutter_go/utils/analytics.dart' as Analytics;
|
||||||
//import 'views/welcome_page/index.dart';
|
//import 'views/welcome_page/index.dart';
|
||||||
@ -53,6 +53,7 @@ class MyApp extends StatelessWidget {
|
|||||||
home: new Scaffold(
|
home: new Scaffold(
|
||||||
body: showWelcomePage()
|
body: showWelcomePage()
|
||||||
),
|
),
|
||||||
|
debugShowCheckedModeBanner: false,
|
||||||
onGenerateRoute: Application.router.generator,
|
onGenerateRoute: Application.router.generator,
|
||||||
navigatorObservers: <NavigatorObserver>[Analytics.observer],
|
navigatorObservers: <NavigatorObserver>[Analytics.observer],
|
||||||
);
|
);
|
||||||
|
@ -5,7 +5,7 @@ import 'package:flutter_go/components/category.dart';
|
|||||||
import '../widgets/404.dart';
|
import '../widgets/404.dart';
|
||||||
import 'package:flutter_go/components/full_screen_code_dialog.dart';
|
import 'package:flutter_go/components/full_screen_code_dialog.dart';
|
||||||
import 'package:flutter_go/views/web_page/web_view_page.dart';
|
import 'package:flutter_go/views/web_page/web_view_page.dart';
|
||||||
import 'package:flutter_go/views/first_page/home.dart';
|
import 'package:flutter_go/views/home.dart';
|
||||||
|
|
||||||
// app的首页
|
// app的首页
|
||||||
var homeHandler = new Handler(
|
var homeHandler = new Handler(
|
||||||
|
@ -40,8 +40,8 @@ class FirstPageState extends State<FirstPage> with AutomaticKeepAliveClientMixin
|
|||||||
/// 判断是否需要弹出免责声明,已经勾选过不在显示,就不会主动弹
|
/// 判断是否需要弹出免责声明,已经勾选过不在显示,就不会主动弹
|
||||||
_unKnow.then((bool value) {
|
_unKnow.then((bool value) {
|
||||||
new Future.delayed(const Duration(seconds: 1),(){
|
new Future.delayed(const Duration(seconds: 1),(){
|
||||||
if (!value) {
|
if (!value && key.currentState is DisclaimerMsgState && key.currentState.showAlertDialog is Function) {
|
||||||
key.currentState.showAlertDialog(context);
|
key.currentState.showAlertDialog(context);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -80,8 +80,8 @@ class FirstPageState extends State<FirstPage> with AutomaticKeepAliveClientMixin
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 每个item的样式
|
||||||
Widget makeCard(index,item){
|
Widget makeCard(index,item){
|
||||||
|
|
||||||
var myTitle = '${item.title}';
|
var myTitle = '${item.title}';
|
||||||
var myUsername = '${'👲'}: ${item.username} ';
|
var myUsername = '${'👲'}: ${item.username} ';
|
||||||
var codeUrl = '${item.detailUrl}';
|
var codeUrl = '${item.detailUrl}';
|
||||||
@ -92,18 +92,18 @@ class FirstPageState extends State<FirstPage> with AutomaticKeepAliveClientMixin
|
|||||||
return
|
return
|
||||||
Column(
|
Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Stack(
|
Stack(
|
||||||
//alignment: const FractionalOffset(0.9, 0.1),//方法一
|
//alignment: const FractionalOffset(0.9, 0.1),//方法一
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Pagination(),
|
Pagination(),
|
||||||
Positioned(//方法二
|
Positioned(//方法二
|
||||||
top: 10.0,
|
top: 10.0,
|
||||||
left: 0.0,
|
left: 0.0,
|
||||||
child: DisclaimerMsg(key:key,pWidget:this)
|
child: DisclaimerMsg(key:key,pWidget:this)
|
||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
SizedBox(height: 1, child:Container(color: Theme.of(context).primaryColor)),
|
SizedBox(height: 1, child:Container(color: Theme.of(context).primaryColor)),
|
||||||
SizedBox(height: 10),
|
SizedBox(height: 10),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
//import 'package:flutter_wanandroid/common/component_index.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
//import 'package:flutter_wanandroid/ui/pages/main_left_page.dart';
|
import './first_page.dart';
|
||||||
//import 'package:flutter_wanandroid/ui/pages/page_index.dart';
|
import './sub_page.dart';
|
||||||
|
|
||||||
import './main_app_bar.dart';
|
import './main_app_bar.dart';
|
||||||
|
import './search_page.dart';
|
||||||
|
|
||||||
class _Page {
|
class _Page {
|
||||||
final String labelId;
|
final String labelId;
|
||||||
@ -12,10 +12,10 @@ class _Page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final List<_Page> _allPages = <_Page>[
|
final List<_Page> _allPages = <_Page>[
|
||||||
_Page('titleHome'),
|
_Page('项目1'),
|
||||||
_Page('titleHome'),
|
_Page('项目2'),
|
||||||
_Page('titleHome'),
|
_Page('项目3'),
|
||||||
_Page('titleHome'),
|
_Page('项目4'),
|
||||||
];
|
];
|
||||||
|
|
||||||
class MainPage extends StatelessWidget {
|
class MainPage extends StatelessWidget {
|
||||||
@ -40,10 +40,7 @@ class MainPage extends StatelessWidget {
|
|||||||
IconButton(
|
IconButton(
|
||||||
icon: Icon(Icons.search),
|
icon: Icon(Icons.search),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
/// NavigatorUtil.pushPage(context, SearchPage(),
|
pushPage(context, SearchPage(), pageName: "SearchPage");
|
||||||
///pageName: "SearchPage");
|
|
||||||
// NavigatorUtil.pushPage(context, TestPage());
|
|
||||||
// NavigatorUtil.pushPage(context, DemoApp());
|
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -55,12 +52,18 @@ class MainPage extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void pushPage(BuildContext context, Widget page, {String pageName}) {
|
||||||
|
if (context == null || page == null) return;
|
||||||
|
Navigator.push(context, CupertinoPageRoute<void>(builder: (ctx) => page));
|
||||||
|
}
|
||||||
|
|
||||||
class TabLayout extends StatelessWidget {
|
class TabLayout extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return TabBar(
|
return TabBar(
|
||||||
isScrollable: true,
|
isScrollable: true,
|
||||||
labelPadding: EdgeInsets.all(12.0),
|
//labelPadding: EdgeInsets.all(12.0),
|
||||||
|
labelPadding: EdgeInsets.only(top: 12.0,left: 12.0,right:12.0),
|
||||||
indicatorSize: TabBarIndicatorSize.label,
|
indicatorSize: TabBarIndicatorSize.label,
|
||||||
tabs: _allPages
|
tabs: _allPages
|
||||||
.map((_Page page) =>
|
.map((_Page page) =>
|
||||||
@ -73,38 +76,29 @@ class TabLayout extends StatelessWidget {
|
|||||||
class TabBarViewLayout extends StatelessWidget {
|
class TabBarViewLayout extends StatelessWidget {
|
||||||
Widget buildTabView(BuildContext context, _Page page) {
|
Widget buildTabView(BuildContext context, _Page page) {
|
||||||
String labelId = page.labelId;
|
String labelId = page.labelId;
|
||||||
// switch (labelId) {
|
switch (labelId) {
|
||||||
// case Ids.titleHome:
|
case '项目1':
|
||||||
// //return HomePage(labelId: labelId);
|
return FirstPage();
|
||||||
// return ReposPage(labelId: labelId);
|
break;
|
||||||
// break;
|
case '项目2':
|
||||||
// case Ids.titleRepos:
|
return SubPage();
|
||||||
// return ReposPage(labelId: labelId);
|
break;
|
||||||
// break;
|
case '项目3':
|
||||||
// case Ids.titleEvents:
|
return SubPage();
|
||||||
// return EventsPage(labelId: labelId);
|
break;
|
||||||
// break;
|
case '项目4':
|
||||||
// case Ids.titleSystem:
|
return SubPage();
|
||||||
// return SystemPage(labelId: labelId);
|
break;
|
||||||
// break;
|
default:
|
||||||
// default:
|
return Container();
|
||||||
// return Container();
|
break;
|
||||||
// break;
|
}
|
||||||
// }
|
|
||||||
return Container(
|
|
||||||
child: new ClipOval(
|
|
||||||
child: Image.network(
|
|
||||||
'https://hbimg.huabanimg.com/9bfa0fad3b1284d652d370fa0a8155e1222c62c0bf9d-YjG0Vt_fw658',
|
|
||||||
scale: 5.0,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
print("TabBarViewLayout build.......");
|
print("TabBarViewLayout build.......");
|
||||||
return TabBarView(
|
return TabBarView(
|
||||||
children: _allPages.map((_Page page) {
|
children: _allPages.map((_Page page) {
|
||||||
return buildTabView(context, page);
|
return buildTabView(context, page);
|
||||||
}).toList());
|
}).toList());
|
||||||
|
189
lib/views/first_page/search_page.dart
Normal file
@ -0,0 +1,189 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/widgets.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'dart:ui';
|
||||||
|
import 'dart:async';
|
||||||
|
import 'package:flutter_go/blocs/industry_main.dart' as Industry;
|
||||||
|
import 'package:flutter_go/blocs/industry_event.dart';
|
||||||
|
import 'package:flutter_go/routers/application.dart';
|
||||||
|
import 'package:flutter_go/routers/routers.dart';
|
||||||
|
|
||||||
|
final _industryPage = Industry.IndustryPage(itemTitle: (state){
|
||||||
|
return ListView.builder(
|
||||||
|
itemBuilder: (BuildContext context, int index) {
|
||||||
|
return ListTile(
|
||||||
|
dense: true,
|
||||||
|
leading: Icon(
|
||||||
|
Icons.bookmark_border,
|
||||||
|
size: 32,
|
||||||
|
),
|
||||||
|
title: Text(
|
||||||
|
state.res[index].title,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
subtitle: Text(state.res[index].source),
|
||||||
|
onTap: () {
|
||||||
|
// 在这里对选中的结果进行解析,因为我目前是用golang实现的,所以就没贴代码了。
|
||||||
|
print(state.res[index].source);
|
||||||
|
final itemTitle = state.res[index].title;
|
||||||
|
final itemUrl = state.res[index].source;
|
||||||
|
Application.router.navigateTo(context, '${Routes.webViewPage}?title=${Uri.encodeComponent(itemTitle)}&url=${Uri.encodeComponent(itemUrl)}');
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
itemCount: state.res.length,
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
final suggestion = Industry.suggestion;
|
||||||
|
final searchBarPage = SearchBarPage();
|
||||||
|
|
||||||
|
class SearchPage extends StatelessWidget {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
/// print('suggestion::${Industry.suggestion}');
|
||||||
|
return Scaffold(
|
||||||
|
appBar: PreferredSize(
|
||||||
|
preferredSize: Size(double.infinity, 52), // 44 is the height
|
||||||
|
child: AppBar(title: searchBarPage)
|
||||||
|
),
|
||||||
|
//body: ProgressView(),
|
||||||
|
body: _industryPage,
|
||||||
|
floatingActionButton: FloatingActionButton(
|
||||||
|
child: const Icon(Icons.search),
|
||||||
|
onPressed: () {
|
||||||
|
//print('searchBarPage=====>${controller.text}');
|
||||||
|
//print('searchBarPage=====>${that.getResultsDebounced}');
|
||||||
|
if(that is _SearchBarPageState && that.getResultsDebounced is Function && controller.text is String ) {
|
||||||
|
that.getResultsDebounced(controller.text);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 加载loading
|
||||||
|
class ProgressView extends StatelessWidget {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Center(
|
||||||
|
child: SizedBox(
|
||||||
|
width: 24.0,
|
||||||
|
height: 24.0,
|
||||||
|
child: CircularProgressIndicator(
|
||||||
|
strokeWidth: 2.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class SearchBarPage extends StatefulWidget{
|
||||||
|
@override
|
||||||
|
State<StatefulWidget> createState() => _SearchBarPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
final TextEditingController controller = TextEditingController();
|
||||||
|
var that;
|
||||||
|
class _SearchBarPageState extends State<SearchBarPage> {
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
that = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
Timer _resultsTimer;
|
||||||
|
bool _loading = false;
|
||||||
|
String oldKey;
|
||||||
|
/// 防抖函数
|
||||||
|
Future getResultsDebounced(String text) async {
|
||||||
|
if(oldKey == text){
|
||||||
|
print('请求内容重复');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (text == '' || !mounted) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_loading = true;
|
||||||
|
if (_resultsTimer != null && _resultsTimer.isActive) {
|
||||||
|
_resultsTimer.cancel();
|
||||||
|
}
|
||||||
|
_resultsTimer = new Timer(new Duration(milliseconds: 400), () async {
|
||||||
|
_loading = true;
|
||||||
|
if(mounted){
|
||||||
|
suggestion.dispatch(SuggestionFetch(query: text));
|
||||||
|
}
|
||||||
|
oldKey = text;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void onSearchTextChanged(String text){
|
||||||
|
print('onSearchTextChanged:${text}');
|
||||||
|
//suggestion.dispatch(SuggestionFetch(query: text));
|
||||||
|
getResultsDebounced(text);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
print('dispose');
|
||||||
|
suggestion.dispatch(SuggestionClearFetch());
|
||||||
|
controller.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
color: Theme.of(context).primaryColor,
|
||||||
|
//color: Colors.amber,
|
||||||
|
child: Padding(
|
||||||
|
//padding: EdgeInsets.only(top: MediaQueryData.fromWindow(window).padding.top,),
|
||||||
|
padding: EdgeInsets.all(0.0),
|
||||||
|
child: Container(
|
||||||
|
//height: 162.0,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(6.0),
|
||||||
|
child: Card(
|
||||||
|
child: Container(
|
||||||
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: <Widget>[
|
||||||
|
SizedBox(width: 5.0,),
|
||||||
|
Icon(Icons.search, color: Colors.grey,size: 18.0,),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: TextField(
|
||||||
|
controller: controller,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
contentPadding: EdgeInsets.only(top: 0.0),
|
||||||
|
hintText: '搜索全局flutter知识库',
|
||||||
|
hintStyle:TextStyle(fontSize: 12.0),
|
||||||
|
border: InputBorder.none
|
||||||
|
),
|
||||||
|
onChanged: onSearchTextChanged,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
IconButton(
|
||||||
|
icon: Icon(Icons.cancel),
|
||||||
|
color: Colors.grey,
|
||||||
|
iconSize: 18.0,
|
||||||
|
onPressed: () {
|
||||||
|
controller.clear();
|
||||||
|
// onSearchTextChanged('');
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
125
lib/views/first_page/sub_page.dart
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
|
||||||
|
import 'package:flutter_go/components/list_view_item.dart';
|
||||||
|
import 'package:flutter_go/components/list_refresh.dart' as listComp;
|
||||||
|
import 'package:flutter_go/components/pagination.dart';
|
||||||
|
import 'package:flutter_go/views/first_page/first_page_item.dart';
|
||||||
|
import 'package:flutter_go/components/disclaimer_msg.dart';
|
||||||
|
import 'package:flutter_go/utils/net_utils.dart';
|
||||||
|
|
||||||
|
// ValueKey<String> key;
|
||||||
|
|
||||||
|
class SubPage extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
SubPageState createState() => SubPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class SubPageState extends State<SubPage> with AutomaticKeepAliveClientMixin{
|
||||||
|
Future<SharedPreferences> _prefs = SharedPreferences.getInstance();
|
||||||
|
Future<bool> _unKnow;
|
||||||
|
GlobalKey<DisclaimerMsgState> key;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool get wantKeepAlive => true;
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
if (key == null) {
|
||||||
|
key = GlobalKey<DisclaimerMsgState>();
|
||||||
|
// key = const Key('__RIKEY1__');
|
||||||
|
//获取sharePre
|
||||||
|
_unKnow = _prefs.then((SharedPreferences prefs) {
|
||||||
|
return (prefs.getBool('disclaimer::Boolean') ?? false);
|
||||||
|
});
|
||||||
|
|
||||||
|
/// 判断是否需要弹出免责声明,已经勾选过不在显示,就不会主动弹
|
||||||
|
_unKnow.then((bool value) {
|
||||||
|
new Future.delayed(const Duration(seconds: 1),(){
|
||||||
|
if (!value && key.currentState is DisclaimerMsgState && key.currentState.showAlertDialog is Function) {
|
||||||
|
key.currentState.showAlertDialog(context);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Future<Map> getIndexListData([Map<String, dynamic> params]) async {
|
||||||
|
const juejin_flutter = 'https://timeline-merger-ms.juejin.im/v1/get_tag_entry?src=web&tagId=5a96291f6fb9a0535b535438';
|
||||||
|
var pageIndex = (params is Map) ? params['pageIndex'] : 0;
|
||||||
|
final _param = {'page':pageIndex,'pageSize':20,'sort':'rankIndex'};
|
||||||
|
var responseList = [];
|
||||||
|
var pageTotal = 0;
|
||||||
|
|
||||||
|
try{
|
||||||
|
var response = await NetUtils.get(juejin_flutter, params: _param);
|
||||||
|
responseList = response['d']['entrylist'];
|
||||||
|
pageTotal = response['d']['total'];
|
||||||
|
if (!(pageTotal is int) || pageTotal <= 0) {
|
||||||
|
pageTotal = 0;
|
||||||
|
}
|
||||||
|
}catch(e){
|
||||||
|
|
||||||
|
}
|
||||||
|
pageIndex += 1;
|
||||||
|
List resultList = new List();
|
||||||
|
for (int i = 0; i < responseList.length; i++) {
|
||||||
|
try {
|
||||||
|
FirstPageItem cellData = new FirstPageItem.fromJson(responseList[i]);
|
||||||
|
resultList.add(cellData);
|
||||||
|
} catch (e) {
|
||||||
|
// No specified type, handles all
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Map<String, dynamic> result = {"list":resultList, 'total':pageTotal, 'pageIndex':pageIndex};
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget makeCard(index,item){
|
||||||
|
|
||||||
|
var myTitle = '${item.title}';
|
||||||
|
var myUsername = '${'👲'}: ${item.username} ';
|
||||||
|
var codeUrl = '${item.detailUrl}';
|
||||||
|
return new ListViewItem(itemUrl:codeUrl,itemTitle: myTitle,data: myUsername,);
|
||||||
|
}
|
||||||
|
|
||||||
|
headerView(){
|
||||||
|
return
|
||||||
|
Column(
|
||||||
|
children: <Widget>[
|
||||||
|
Stack(
|
||||||
|
//alignment: const FractionalOffset(0.9, 0.1),//方法一
|
||||||
|
children: <Widget>[
|
||||||
|
Pagination(),
|
||||||
|
Positioned(//方法二
|
||||||
|
top: 10.0,
|
||||||
|
left: 0.0,
|
||||||
|
child: DisclaimerMsg(key:key,pWidget:this)
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
SizedBox(height: 1, child:Container(color: Theme.of(context).primaryColor)),
|
||||||
|
SizedBox(height: 10),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
super.build(context);
|
||||||
|
return new Column(
|
||||||
|
children: <Widget>[
|
||||||
|
new Expanded(
|
||||||
|
child: listComp.ListRefresh(getIndexListData,makeCard)
|
||||||
|
)
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -22,10 +22,7 @@ import 'package:flutter_go/components/search_input.dart';
|
|||||||
import 'package:flutter_go/model/search_history.dart';
|
import 'package:flutter_go/model/search_history.dart';
|
||||||
import 'package:flutter_go/resources/widget_name_to_icon.dart';
|
import 'package:flutter_go/resources/widget_name_to_icon.dart';
|
||||||
|
|
||||||
import 'package:flutter_go/blocs/industry_main.dart';
|
import './first_page/main_page.dart';
|
||||||
//import 'package:flutter_go/blocs/search_widget.dart';
|
|
||||||
|
|
||||||
import 'main_page.dart';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -99,12 +96,14 @@ class _MyHomePageState extends State<AppPage>
|
|||||||
});
|
});
|
||||||
searchHistoryList
|
searchHistoryList
|
||||||
.add(SearchHistory(name: targetName, targetRouter: targetRouter));
|
.add(SearchHistory(name: targetName, targetRouter: targetRouter));
|
||||||
print("searchHistoryList ${searchHistoryList.toString()}");
|
print("searchHistoryList1 ${searchHistoryList.toString()}");
|
||||||
|
print("searchHistoryList2 ${targetRouter}");
|
||||||
|
print("searchHistoryList3 ${widgetPoint.name}");
|
||||||
Application.router.navigateTo(context, "$targetRouter");
|
Application.router.navigateTo(context, "$targetRouter");
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget buildSearchInput(BuildContext context) {
|
Widget buildSearchInput(BuildContext context) {
|
||||||
return new SearchInput((value) async {
|
return new SearchInput((value) async {
|
||||||
if (value != '') {
|
if (value != '') {
|
||||||
List<WidgetPoint> list = await widgetControl.search(value);
|
List<WidgetPoint> list = await widgetControl.search(value);
|
||||||
|
|
||||||
@ -114,7 +113,7 @@ class _MyHomePageState extends State<AppPage>
|
|||||||
icon: WidgetName2Icon.icons[item.name] ?? null,
|
icon: WidgetName2Icon.icons[item.name] ?? null,
|
||||||
text: 'widget',
|
text: 'widget',
|
||||||
onTap: () {
|
onTap: () {
|
||||||
onWidgetTap(item, context);
|
onWidgetTap(item, context);
|
||||||
},
|
},
|
||||||
))
|
))
|
||||||
.toList();
|
.toList();
|
||||||
@ -140,8 +139,6 @@ class _MyHomePageState extends State<AppPage>
|
|||||||
appBar: renderAppBar(context,widget),
|
appBar: renderAppBar(context,widget),
|
||||||
body: new TabBarView(controller: controller, children: <Widget>[
|
body: new TabBarView(controller: controller, children: <Widget>[
|
||||||
//new FirstPage(),
|
//new FirstPage(),
|
||||||
//new IndustryPage(),
|
|
||||||
//new SearchWidget(),
|
|
||||||
MainPage(),
|
MainPage(),
|
||||||
WidgetPage(db),
|
WidgetPage(db),
|
||||||
CollectionPage(),
|
CollectionPage(),
|
@ -20,8 +20,8 @@ class _FlexibleSpaceBarFullDefault extends State {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return FlexibleSpaceBar(
|
return FlexibleSpaceBar(
|
||||||
// ... // 如果没有,就是不需要有状态的 StatefulWidget
|
// ... // 如果没有,就是不需要有状态的 StatefulWidget
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,8 +30,7 @@ class FlexibleSpaceBarLessDefault extends StatelessWidget {
|
|||||||
final widget;
|
final widget;
|
||||||
final parent;
|
final parent;
|
||||||
|
|
||||||
const FlexibleSpaceBarLessDefault([this.widget, this.parent])
|
const FlexibleSpaceBarLessDefault([this.widget, this.parent]) : super();
|
||||||
: super();
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -39,7 +38,8 @@ class FlexibleSpaceBarLessDefault extends StatelessWidget {
|
|||||||
height: 300.0,
|
height: 300.0,
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
body: NestedScrollView(
|
body: NestedScrollView(
|
||||||
headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
|
headerSliverBuilder:
|
||||||
|
(BuildContext context, bool innerBoxIsScrolled) {
|
||||||
return <Widget>[
|
return <Widget>[
|
||||||
SliverAppBar(
|
SliverAppBar(
|
||||||
expandedHeight: 150.0,
|
expandedHeight: 150.0,
|
||||||
@ -55,6 +55,13 @@ class FlexibleSpaceBarLessDefault extends StatelessWidget {
|
|||||||
background: Image.network(
|
background: Image.network(
|
||||||
"https://images.pexels.com/photos/396547/pexels-photo-396547.jpeg?auto=compress&cs=tinysrgb&h=350",
|
"https://images.pexels.com/photos/396547/pexels-photo-396547.jpeg?auto=compress&cs=tinysrgb&h=350",
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
|
|
||||||
|
/// 色彩叠加 UI可以理解为两个色彩涂层,在图片混合一个色层
|
||||||
|
// color: Colors.redAccent, //混合的颜色
|
||||||
|
// colorBlendMode: BlendMode.darken, //混合方式
|
||||||
|
|
||||||
|
///图片重复填充容器
|
||||||
|
// repeat: ImageRepeat.repeat,
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
@ -63,6 +70,6 @@ class FlexibleSpaceBarLessDefault extends StatelessWidget {
|
|||||||
child: Text("向上提拉 ⬆ 查看效果..."),
|
child: Text("向上提拉 ⬆ 查看效果..."),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
));
|
||||||
);
|
}
|
||||||
}}
|
}
|
||||||
|
@ -13,7 +13,6 @@ class GridTileDemo extends StatefulWidget {
|
|||||||
|
|
||||||
class _Demo extends State<GridTileDemo> {
|
class _Demo extends State<GridTileDemo> {
|
||||||
|
|
||||||
|
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
height: 400,
|
height: 400,
|
||||||
@ -55,3 +54,34 @@ class _Demo extends State<GridTileDemo> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class GridViewDemo extends StatelessWidget {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
height: 200,
|
||||||
|
color: Color(0xffc91b3a),
|
||||||
|
child: GridView(
|
||||||
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
|
///列数
|
||||||
|
crossAxisCount: 3,
|
||||||
|
///列间距
|
||||||
|
mainAxisSpacing: 10.0,
|
||||||
|
///横轴距离
|
||||||
|
crossAxisSpacing: 4.0,
|
||||||
|
///缩放比例
|
||||||
|
childAspectRatio: 1.3,),
|
||||||
|
padding: const EdgeInsets.only(left: 10,right: 10,top: 10),
|
||||||
|
children: <Widget>[
|
||||||
|
Image.network('https://flutter.io/assets/homepage/news-2-599aefd56e8aa903ded69500ef4102cdd8f988dab8d9e4d570de18bdb702ffd4.png', scale: 1, fit: BoxFit.cover),
|
||||||
|
Image.network('https://flutter.io/assets/homepage/news-2-599aefd56e8aa903ded69500ef4102cdd8f988dab8d9e4d570de18bdb702ffd4.png', scale: 1, fit: BoxFit.cover),
|
||||||
|
Image.network('https://flutter.io/assets/homepage/news-2-599aefd56e8aa903ded69500ef4102cdd8f988dab8d9e4d570de18bdb702ffd4.png', scale: 1, fit: BoxFit.cover),
|
||||||
|
Image.network('https://flutter.io/assets/homepage/news-2-599aefd56e8aa903ded69500ef4102cdd8f988dab8d9e4d570de18bdb702ffd4.png', scale: 1, fit: BoxFit.cover),
|
||||||
|
Image.network('https://flutter.io/assets/homepage/news-2-599aefd56e8aa903ded69500ef4102cdd8f988dab8d9e4d570de18bdb702ffd4.png', scale: 1, fit: BoxFit.cover),
|
||||||
|
Image.network('https://flutter.io/assets/homepage/news-2-599aefd56e8aa903ded69500ef4102cdd8f988dab8d9e4d570de18bdb702ffd4.png', scale: 1, fit: BoxFit.cover),
|
||||||
|
],),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -49,6 +49,13 @@ const String _Text0 = """
|
|||||||
- GridView.extent
|
- GridView.extent
|
||||||
""";
|
""";
|
||||||
|
|
||||||
|
const Text1="""
|
||||||
|
###
|
||||||
|
> SliverGridDelegateWithFixedCrossAxisCount
|
||||||
|
|
||||||
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount,实现网格
|
||||||
|
""";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Demo extends StatefulWidget {
|
class Demo extends StatefulWidget {
|
||||||
@ -68,8 +75,10 @@ class _DemoState extends State<Demo> {
|
|||||||
_Text0,
|
_Text0,
|
||||||
GridTileDemo(),
|
GridTileDemo(),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 100.0,
|
height: 10.0,
|
||||||
)
|
),
|
||||||
|
Text1,
|
||||||
|
GridViewDemo(),
|
||||||
],
|
],
|
||||||
docUrl: 'https://docs.flutter.io/flutter/material/GridView-class.html',
|
docUrl: 'https://docs.flutter.io/flutter/material/GridView-class.html',
|
||||||
);
|
);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/// Author: xiaojia.dxj
|
/// Author: xiaojia.dxj
|
||||||
/// Date: 2018/11/22
|
/// Date: 2018/11/22
|
||||||
/// Email: xiaojia.dxj@alibaba-inc.com
|
/// Email: xiaojia.dxj@alibaba-inc.com
|
||||||
/// LastUpdateTime: 2018/11/22
|
/// LastUpdateTime: 2018/11/22
|
||||||
/// LastUpdateBy: xj.deng
|
/// LastUpdateBy: xj.deng
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
@ -19,8 +19,10 @@ class DecoratedBoxCreate extends StatelessWidget {
|
|||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: const Color(0xff7c94b6),
|
color: const Color(0xff7c94b6),
|
||||||
//设置图片内容
|
//设置图片内容
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
fit: BoxFit.cover,
|
///fix:BoxFit.contain: 保持图片的比例,最大程度填充容器 BoxFit.fill:容器被图片完全填充,不在意图片比例,只填充整个容器
|
||||||
|
///fix:BoxFit.fitWidth:图片以宽被完全填充 BoxFit.fix:fixHigth:图片以高度完全填充
|
||||||
|
fit: BoxFit.cover, //图片填充整个容器,按比例放大,多余部分被裁切
|
||||||
image: ExactAssetImage('assets/images/food01.jpeg')),
|
image: ExactAssetImage('assets/images/food01.jpeg')),
|
||||||
//外宽边框,可以不设置
|
//外宽边框,可以不设置
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
@ -44,7 +46,7 @@ class DecoratedBoxCreateTwo extends StatelessWidget {
|
|||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: const Color(0xff7c94b6),
|
color: const Color(0xff7c94b6),
|
||||||
//设置图片内容
|
//设置图片内容
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
image: ExactAssetImage('assets/images/food01.jpeg')),
|
image: ExactAssetImage('assets/images/food01.jpeg')),
|
||||||
//根据传入的不同大小,呈现图片效弧度不同,
|
//根据传入的不同大小,呈现图片效弧度不同,
|
||||||
@ -65,7 +67,7 @@ class DecoratedBoxCreateShape extends StatelessWidget {
|
|||||||
position: DecorationPosition.background,
|
position: DecorationPosition.background,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: const Color(0xff7c94b6),
|
color: const Color(0xff7c94b6),
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
image: ExactAssetImage('assets/images/food01.jpeg')),
|
image: ExactAssetImage('assets/images/food01.jpeg')),
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
@ -77,3 +79,27 @@ class DecoratedBoxCreateShape extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class DecoratedBoxCreateShapes extends StatelessWidget {
|
||||||
|
DecoratedBoxCreateShapes({
|
||||||
|
Key key,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return DecoratedBox(
|
||||||
|
position: DecorationPosition.background,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
gradient: const LinearGradient(
|
||||||
|
//渐变效果 线性渐变
|
||||||
|
colors: [Colors.red, Colors.yellowAccent, Colors.lightGreenAccent]),
|
||||||
|
// color: const Color(0xff7c94b6),
|
||||||
|
border: Border.all(
|
||||||
|
color: Colors.blue.shade50,
|
||||||
|
width: 5.0,
|
||||||
|
),
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///Author: xiaojia.dxj
|
///Author: xiaojia.dxj
|
||||||
///Date: 2019-01-08 15:56:49
|
///Date: 2019-01-08 15:56:49
|
||||||
///Last Modified by: xiaojia.dxj
|
///Last Modified by: xiaojia.dxj
|
||||||
///Last Modified time: 2019-01-08 15:56:49
|
///Last Modified time: 2019-01-08 15:56:49
|
||||||
///email: xiaojia.dxj@alibaba-inc.com
|
///email: xiaojia.dxj@alibaba-inc.com
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@ -46,7 +46,7 @@ class _DemoState extends State<Demo> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Column _decoratedBoxCreate() {
|
Column _decoratedBoxCreate() {
|
||||||
return Column(
|
return Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Container(
|
Container(
|
||||||
height: 100.0,
|
height: 100.0,
|
||||||
@ -68,6 +68,14 @@ class _DemoState extends State<Demo> {
|
|||||||
height: 100.0,
|
height: 100.0,
|
||||||
width: 100.0,
|
width: 100.0,
|
||||||
child: DecoratedBoxCreateShape(),
|
child: DecoratedBoxCreateShape(),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10.0,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 100.0,
|
||||||
|
width: 100.0,
|
||||||
|
child: DecoratedBoxCreateShapes(),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
/// Author: xiaojia.dxj
|
import 'package:flutter/material.dart';
|
||||||
|
/// Author: xiaojia.dxj
|
||||||
/// Date: 2018/11/22
|
/// Date: 2018/11/22
|
||||||
/// Email: xiaojia.dxj@alibaba-inc.com
|
/// Email: xiaojia.dxj@alibaba-inc.com
|
||||||
/// LastUpdateTime: 2018/11/22
|
/// LastUpdateTime: 2018/11/22
|
||||||
@ -92,3 +93,34 @@ class RowLayoutCreate extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class RowExpanded extends StatelessWidget{
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
|
return Row(
|
||||||
|
children: <Widget>[
|
||||||
|
////填充数据
|
||||||
|
Expanded(child: new RaisedButton(
|
||||||
|
onPressed: (){
|
||||||
|
},
|
||||||
|
color: Color(0xfffce4ec),
|
||||||
|
child:new Text('flutter',style: TextStyle(color: Colors.white),)
|
||||||
|
),),
|
||||||
|
Expanded(child: new RaisedButton(
|
||||||
|
onPressed: (){
|
||||||
|
},
|
||||||
|
color: Color(0xfff8bbd0),
|
||||||
|
child:new Text('Expanded',style: TextStyle(color: Colors.white),)
|
||||||
|
),),
|
||||||
|
Expanded(child: new RaisedButton(
|
||||||
|
onPressed: (){
|
||||||
|
},
|
||||||
|
color: Color(0xfff48fb1),
|
||||||
|
child:new Text('flutter',style: TextStyle(color: Colors.white),)
|
||||||
|
),),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -60,6 +60,8 @@ class _DemoState extends State<Demo> {
|
|||||||
return Column(
|
return Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
RowLayoutCreate(),
|
RowLayoutCreate(),
|
||||||
|
SizedBox(height: 10.0,),
|
||||||
|
RowExpanded(),
|
||||||
Row(
|
Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
|
135
pubspec.lock
@ -5,105 +5,91 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: args
|
name: args
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.5.1"
|
version: "1.5.1"
|
||||||
async:
|
async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: async
|
name: async
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.8"
|
version: "2.2.0"
|
||||||
bloc:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: bloc
|
|
||||||
url: "https://pub.flutter-io.cn"
|
|
||||||
source: hosted
|
|
||||||
version: "0.12.0"
|
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: boolean_selector
|
name: boolean_selector
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.4"
|
version: "1.0.4"
|
||||||
charcode:
|
charcode:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: charcode
|
name: charcode
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.2"
|
version: "1.1.2"
|
||||||
city_pickers:
|
city_pickers:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: city_pickers
|
name: city_pickers
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.16"
|
version: "0.0.4"
|
||||||
collection:
|
collection:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: collection
|
name: collection
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.14.11"
|
version: "1.14.11"
|
||||||
cookie_jar:
|
cookie_jar:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: cookie_jar
|
name: cookie_jar
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.0.8"
|
version: "0.0.8"
|
||||||
csslib:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: csslib
|
|
||||||
url: "https://pub.flutter-io.cn"
|
|
||||||
source: hosted
|
|
||||||
version: "0.16.0"
|
|
||||||
cupertino_icons:
|
cupertino_icons:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: cupertino_icons
|
name: cupertino_icons
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.2"
|
version: "0.1.2"
|
||||||
dio:
|
dio:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: dio
|
name: dio
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.17"
|
version: "1.0.17"
|
||||||
event_bus:
|
event_bus:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: event_bus
|
name: event_bus
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.0"
|
||||||
firebase_analytics:
|
firebase_analytics:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: firebase_analytics
|
name: firebase_analytics
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.1+3"
|
version: "1.2.0+1"
|
||||||
firebase_core:
|
firebase_core:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: firebase_core
|
name: firebase_core
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.4"
|
version: "0.3.4"
|
||||||
fluro:
|
fluro:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: fluro
|
name: fluro
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.4.0"
|
version: "1.4.0"
|
||||||
flutter:
|
flutter:
|
||||||
@ -111,18 +97,11 @@ packages:
|
|||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.0"
|
version: "0.0.0"
|
||||||
flutter_bloc:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: flutter_bloc
|
|
||||||
url: "https://pub.flutter-io.cn"
|
|
||||||
source: hosted
|
|
||||||
version: "0.11.1"
|
|
||||||
flutter_markdown:
|
flutter_markdown:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: flutter_markdown
|
name: flutter_markdown
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.0"
|
version: "0.2.0"
|
||||||
flutter_test:
|
flutter_test:
|
||||||
@ -134,91 +113,77 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: flutter_webview_plugin
|
name: flutter_webview_plugin
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.4"
|
version: "0.3.4"
|
||||||
html:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: html
|
|
||||||
url: "https://pub.flutter-io.cn"
|
|
||||||
source: hosted
|
|
||||||
version: "0.14.0+2"
|
|
||||||
image_picker:
|
image_picker:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: image_picker
|
name: image_picker
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.4.12+1"
|
version: "0.6.0+1"
|
||||||
intl:
|
intl:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: intl
|
name: intl
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.15.7"
|
version: "0.15.7"
|
||||||
lpinyin:
|
lpinyin:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: lpinyin
|
name: lpinyin
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.7"
|
version: "1.0.7"
|
||||||
markdown:
|
markdown:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: markdown
|
name: markdown
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.3"
|
version: "2.0.3"
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: matcher
|
name: matcher
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.3+1"
|
version: "0.12.5"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.6"
|
version: "1.1.6"
|
||||||
path:
|
path:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path
|
name: path
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.6.2"
|
version: "1.6.2"
|
||||||
pedantic:
|
pedantic:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: pedantic
|
name: pedantic
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.4.0"
|
version: "1.5.0"
|
||||||
quiver:
|
quiver:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: quiver
|
name: quiver
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "2.0.3"
|
||||||
rxdart:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: rxdart
|
|
||||||
url: "https://pub.flutter-io.cn"
|
|
||||||
source: hosted
|
|
||||||
version: "0.21.0"
|
|
||||||
shared_preferences:
|
shared_preferences:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: shared_preferences
|
name: shared_preferences
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.4.3"
|
version: "0.4.3"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
@ -230,79 +195,79 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: source_span
|
name: source_span
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.5.4"
|
version: "1.5.5"
|
||||||
sqflite:
|
sqflite:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: sqflite
|
name: sqflite
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.2+1"
|
version: "1.1.5"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stack_trace
|
name: stack_trace
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.9.3"
|
version: "1.9.3"
|
||||||
stream_channel:
|
stream_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stream_channel
|
name: stream_channel
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.6.8"
|
version: "2.0.0"
|
||||||
string_scanner:
|
string_scanner:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: string_scanner
|
name: string_scanner
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.4"
|
version: "1.0.4"
|
||||||
synchronized:
|
synchronized:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: synchronized
|
name: synchronized
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "2.1.0"
|
||||||
term_glyph:
|
term_glyph:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: term_glyph
|
name: term_glyph
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.0"
|
||||||
test_api:
|
test_api:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.2"
|
version: "0.2.5"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: typed_data
|
name: typed_data
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.6"
|
version: "1.1.6"
|
||||||
url_launcher:
|
url_launcher:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: url_launcher
|
name: url_launcher
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.2.0+3"
|
version: "5.0.2"
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vector_math
|
name: vector_math
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.8"
|
version: "2.0.8"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.1.0 <3.0.0"
|
dart: ">=2.2.0 <3.0.0"
|
||||||
flutter: ">=0.5.6 <2.0.0"
|
flutter: ">=1.2.1 <2.0.0"
|
||||||
|
17
pubspec.yaml
@ -21,23 +21,20 @@ dependencies:
|
|||||||
cupertino_icons: ^0.1.2
|
cupertino_icons: ^0.1.2
|
||||||
event_bus: ^1.0.1
|
event_bus: ^1.0.1
|
||||||
fluro: ^1.3.4
|
fluro: ^1.3.4
|
||||||
image_picker: ^0.4.10
|
image_picker: ^0.6.0+1
|
||||||
sqflite: ^0.12.1
|
sqflite: ^1.1.5
|
||||||
flutter_markdown: ^0.2.0
|
flutter_markdown: ^0.2.0
|
||||||
url_launcher: ^4.0.1
|
url_launcher: ^5.0.2
|
||||||
# 本地存储、收藏功能
|
# 本地存储、收藏功能
|
||||||
shared_preferences: ^0.4.3
|
shared_preferences: ^0.4.3
|
||||||
dio: ^1.0.6
|
dio: ^1.0.6
|
||||||
flutter_webview_plugin: ^0.3.0+2
|
flutter_webview_plugin: ^0.3.4
|
||||||
# 日期格式化
|
# 日期格式化
|
||||||
intl: 0.15.7
|
intl: 0.15.7
|
||||||
city_pickers: ^0.1.0
|
city_pickers: ^0.0.1
|
||||||
firebase_analytics: ^2.0.2+1
|
firebase_analytics: ^1.1.0
|
||||||
#firebase_auth: ^0.8.3 #auth
|
#firebase_auth: ^0.8.3 #auth
|
||||||
firebase_core: ^0.3.0 # add dependency for Firebase Core
|
firebase_core: ^0.3.4 # add dependency for Firebase Core
|
||||||
flutter_bloc: ^0.11.1
|
|
||||||
bloc: ^0.12.0
|
|
||||||
html: ^0.14.0+2
|
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|