Skip to content

Commit b468ace

Browse files
1.更新gradle配置;2.优化焦点管理;3.修复SDK更新造成的兼容问题
1 parent 2f168bd commit b468ace

File tree

8 files changed

+234
-517
lines changed

8 files changed

+234
-517
lines changed

.packages

Lines changed: 30 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,35 @@
1-
# Generated by pub on 2018-03-02 15:57:13.495265.
2-
analyzer:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.30.0+4/lib/
3-
args:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/args-1.3.0/lib/
4-
async:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/async-2.0.4/lib/
5-
barback:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/barback-0.15.2+14/lib/
6-
boolean_selector:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/boolean_selector-1.0.2/lib/
7-
charcode:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/charcode-1.1.1/lib/
8-
cli_util:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/cli_util-0.1.2+1/lib/
9-
collection:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/collection-1.14.5/lib/
10-
convert:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/convert-2.0.1/lib/
11-
crypto:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/crypto-2.0.2+1/lib/
12-
csslib:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/csslib-0.14.1/lib/
13-
cupertino_icons:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/cupertino_icons-0.1.1/lib/
14-
file:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/file-2.3.6/lib/
1+
# Generated by pub on 2019-04-15 16:39:47.794998.
2+
async:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/async-2.0.8/lib/
3+
boolean_selector:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/boolean_selector-1.0.4/lib/
4+
charcode:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/charcode-1.1.2/lib/
5+
collection:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/collection-1.14.11/lib/
6+
convert:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/convert-2.1.1/lib/
7+
crypto:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/crypto-2.0.6/lib/
8+
cupertino_icons:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/cupertino_icons-0.1.2/lib/
9+
file:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/file-5.0.7/lib/
1510
flutter:file:///D:/flutter/packages/flutter/lib/
1611
flutter_driver:file:///D:/flutter/packages/flutter_driver/lib/
1712
flutter_test:file:///D:/flutter/packages/flutter_test/lib/
18-
front_end:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/front_end-0.1.0-alpha.4.1/lib/
19-
glob:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/glob-1.1.5/lib/
20-
html:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/html-0.13.2+2/lib/
21-
http:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/http-0.11.3+16/lib/
22-
http_multi_server:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/http_multi_server-2.0.4/lib/
23-
http_parser:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/http_parser-3.1.1/lib/
24-
intl:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/intl-0.15.2/lib/
25-
io:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/io-0.3.2+1/lib/
26-
isolate:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/isolate-1.1.0/lib/
27-
js:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/js-0.6.1/lib/
28-
json_rpc_2:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/json_rpc_2-2.0.7/lib/
29-
kernel:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/kernel-0.3.0-alpha.1.1/lib/
30-
logging:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/logging-0.11.3+1/lib/
31-
matcher:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/matcher-0.12.1+4/lib/
32-
meta:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/meta-1.1.2/lib/
33-
mime:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/mime-0.9.6/lib/
34-
mockito:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/mockito-2.2.3/lib/
35-
multi_server_socket:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/multi_server_socket-1.0.1/lib/
36-
node_preamble:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/node_preamble-1.4.0/lib/
37-
package_config:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/package_config-1.0.3/lib/
38-
package_resolver:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/package_resolver-1.0.2/lib/
39-
path:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/path-1.5.1/lib/
40-
plugin:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/plugin-0.2.0+2/lib/
41-
pool:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/pool-1.3.4/lib/
42-
pub_semver:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/pub_semver-1.3.2/lib/
43-
quiver:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/quiver-0.28.0/lib/
44-
shelf:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf-0.7.2/lib/
45-
shelf_packages_handler:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf_packages_handler-1.0.3/lib/
46-
shelf_static:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf_static-0.2.7/lib/
47-
shelf_web_socket:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf_web_socket-0.2.2/lib/
13+
fuchsia_remote_debug_protocol:file:///D:/flutter/packages/fuchsia_remote_debug_protocol/lib/
14+
intl:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/intl-0.15.7/lib/
15+
json_rpc_2:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/json_rpc_2-2.0.9/lib/
16+
matcher:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/matcher-0.12.3+1/lib/
17+
meta:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/meta-1.1.6/lib/
18+
path:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/path-1.6.2/lib/
19+
pedantic:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/pedantic-1.4.0/lib/
20+
platform:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/platform-2.2.0/lib/
21+
process:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/process-3.0.9/lib/
22+
pub_semver:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/pub_semver-1.4.2/lib/
23+
quiver:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/quiver-2.0.1/lib/
4824
sky_engine:file:///D:/flutter/bin/cache/pkg/sky_engine/lib/
49-
source_map_stack_trace:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/source_map_stack_trace-1.1.4/lib/
50-
source_maps:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/source_maps-0.10.4/lib/
51-
source_span:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/source_span-1.4.0/lib/
52-
stack_trace:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/stack_trace-1.9.1/lib/
53-
stream_channel:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/stream_channel-1.6.3/lib/
54-
string_scanner:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/string_scanner-1.0.2/lib/
55-
term_glyph:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/term_glyph-1.0.0/lib/
56-
test:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/test-0.12.30+4/lib/
57-
typed_data:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/typed_data-1.1.5/lib/
58-
utf:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/utf-0.9.0+4/lib/
59-
vector_math:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/vector_math-2.0.5/lib/
60-
vm_service_client:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/vm_service_client-0.2.4+1/lib/
61-
watcher:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/watcher-0.9.7+7/lib/
62-
web_socket_channel:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/web_socket_channel-1.0.7/lib/
63-
yaml:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/yaml-2.1.13/lib/
25+
source_span:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/source_span-1.5.4/lib/
26+
stack_trace:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/stack_trace-1.9.3/lib/
27+
stream_channel:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/stream_channel-1.6.8/lib/
28+
string_scanner:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/string_scanner-1.0.4/lib/
29+
term_glyph:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/term_glyph-1.1.0/lib/
30+
test_api:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/test_api-0.2.2/lib/
31+
typed_data:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/typed_data-1.1.6/lib/
32+
vector_math:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/vector_math-2.0.8/lib/
33+
vm_service_client:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/vm_service_client-0.2.6/lib/
34+
web_socket_channel:file:///C:/Users/zhangjun13/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/web_socket_channel-1.0.9/lib/
6435
flutter_tv:lib/

android/app/build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ apply plugin: 'com.android.application'
1515
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
1616

1717
android {
18-
compileSdkVersion 25
19-
buildToolsVersion '25.0.3'
18+
compileSdkVersion 28
2019

2120
lintOptions {
2221
disable 'InvalidPackage'
@@ -25,7 +24,7 @@ android {
2524
defaultConfig {
2625
applicationId "com.tcl.flutter.tv"
2726
minSdkVersion 16
28-
targetSdkVersion 25
27+
targetSdkVersion 28
2928
versionCode 1
3029
versionName "1.0"
3130
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

android/build.gradle

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11
buildscript {
22
repositories {
3+
google()
34
jcenter()
4-
maven {
5-
url "https://maven.google.com"
6-
}
75
}
86

97
dependencies {
10-
classpath 'com.android.tools.build:gradle:2.3.3'
8+
classpath 'com.android.tools.build:gradle:3.2.1'
119
}
1210
}
1311

1412
allprojects {
1513
repositories {
14+
google()
1615
jcenter()
17-
maven {
18-
url "https://maven.google.com"
19-
}
2016
}
2117
}
2218

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Mon Oct 30 19:59:44 CST 2017
1+
#Fri Sep 28 13:57:13 CST 2018
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip

lib/http_request.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import 'dart:io';
33

44
import 'package:flutter/material.dart';
55
import 'package:flutter/services.dart';
6+
67
import 'key_code.dart';
78

89
class HttpDemo extends StatefulWidget {
@@ -26,13 +27,13 @@ class _HttpDemoState extends State<HttpDemo> {
2627
try {
2728
var request = await httpClient.getUrl(Uri.parse(url));
2829
var response = await request.close();
29-
if (response.statusCode == HttpStatus.OK) {
30-
var json = await response.transform(UTF8.decoder).join();
31-
var data = JSON.decode(json);
30+
if (response.statusCode == HttpStatus.ok) {
31+
var jsonStr = await response.transform(utf8.decoder).join();
32+
var data = json.decode(jsonStr);
3233
result = data['origin'];
3334
} else {
3435
result =
35-
'Error getting IP address:\nHttp status ${response.statusCode}';
36+
'Error getting IP address:\nHttp status ${response.statusCode}';
3637
}
3738
} catch (exception) {
3839
result = 'Failed getting IP address';
@@ -105,4 +106,4 @@ class _HttpDemoState extends State<HttpDemo> {
105106
),
106107
);
107108
}
108-
}
109+
}

0 commit comments

Comments
 (0)