Commit 99bbfa80 authored by jinzhu's avatar jinzhu

update

parent f5a79189
#Wed Jun 05 15:22:33 CST 2019
gradle.version=4.10.2
This diff is collapsed.
package com.example.myflutter.host;
import android.os.Bundle;
import io.flutter.app.FlutterActivity;
import io.flutter.plugins.GeneratedPluginRegistrant;
public class MainActivity extends FlutterActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
GeneratedPluginRegistrant.registerWith(this);
}
}
This diff is collapsed.
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:gmalpha_flutter/macros/ALDevice.dart';
import 'package:flutter/semantics.dart';
class MessageHomePage extends StatefulWidget {
@override
_MessageHomePageState createState() => _MessageHomePageState();
}
class _MessageHomePageState extends State<MessageHomePage> {
List<Map> commentsList=[{'name': 'Burial', 'icon': 'http://alpha-s.gmeiapp.com/2018/12/23/921d3a004e-w', 'time': '1.560856220460315E9', 'content':'卖萌打滚求翻牌'},
{'name': '거짓말 ', 'icon': 'http://alpha-s.gmeiapp.com/2018/12/23/8179d48c63-w', 'time': '1.560856220460315E9', 'content':'小姐姐,作图app是啥'},
{'name': 'blugder ', 'icon': 'http://alpha-s.gmeiapp.com/2018/12/23/8179d48c63-w', 'time': '1.560856220460315E9', 'content':'拍照表情很自然'}
];
GlobalKey<EasyRefreshState> _easyRefreshKey =new GlobalKey<EasyRefreshState>();
GlobalKey<RefreshFooterState> _footerKey = new GlobalKey<RefreshFooterState>();
@override
Widget build(BuildContext context) {
return Scaffold(
// body: ListView(children: _getListData()),
body: FutureBuilder(
builder: (context, snapshot){
// if (snapshot.hasData) {
return EasyRefresh(
refreshFooter: ClassicsFooter(
key: _footerKey,
moreInfo: '加载中',
loadReadyText: '上拉加载',
showMore: true,
),
child: ListView(
children: <Widget>[
_comments(),
],
),
);
// } else {
// return Center(
// child: Text('加载中'),
// );
// }
},
),
);
}
Widget _comments() {
return Container(
child: Column(
children: <Widget>[
_commentList()
],
),
);
}
Widget _commentList() {
List<Widget> listwidget = commentsList.map((val){
var thumbImg = new Container(
width: 42,
height: 42,
decoration: BoxDecoration(
shape: BoxShape.circle,
image: new DecorationImage(
image: new NetworkImage(val['icon']),
)
),
);
var titleRow = new Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
new Row (
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Text(val['name'], style: TextStyle(color: Color(0xff323232), fontWeight: FontWeight.bold, fontSize: 13)),
new Padding (
padding: EdgeInsets.only(left: 8),
child: Text('评论了你', style: TextStyle(color: Color(0xff323232), fontSize: 13)),
)
],
),
new Row(
children: <Widget>[
Text('aaaaaaafff', style: TextStyle(color: Color(0xff323232), fontSize: 13)),
],
)
],
);
var timeRow = new Row(
children: <Widget>[
new Expanded(
child: new Text(val['time']),
)
],
);
var row = new Row(
children: <Widget>[
new Padding(
padding: const EdgeInsets.only(left: 16, top: 20, bottom: 15),
child: new Container(
child: new Center(
child: thumbImg,
),
),
),
new Expanded(
flex: 1,
child: new Padding(
padding: const EdgeInsets.all(10.0),
child: new Column(
children: <Widget>[
titleRow,
new Padding(
padding: const EdgeInsets.fromLTRB(0.0, 8.0, 0.0, 0.0),
child: timeRow,
)
],
),
),
),
],
);
return InkWell(
child: Container(
padding: EdgeInsets.all(5.0),
width: ALDevice.width,
child: row
),
);
}).toList();
return Wrap(
spacing: 2,
children: listwidget,
);
}
}
\ No newline at end of file
......@@ -42,8 +42,6 @@ class CommentSuggestPage extends StatefulWidget {
@override
_CommentSuggestPageState createState() => _CommentSuggestPageState();
}
class _CommentSuggestPageState extends State<CommentSuggestPage> {
......@@ -71,16 +69,16 @@ class _CommentSuggestPageState extends State<CommentSuggestPage> {
FlutterBoost.singleton.closePageForContext(context);
}),
),
floatingActionButton: new FloatingActionButton(
onPressed: () {
print('33333-------');
FlutterBoost.singleton.openPage('second', {});
},
child: new Icon(Icons.add_box),
elevation: 3.0,
highlightElevation: 2.0,
backgroundColor: Colors.red, // 红色
),
// floatingActionButton: new FloatingActionButton(
// onPressed: () {
// print('33333-------');
// FlutterBoost.singleton.openPage('second', {});
// },
// child: new Icon(Icons.add_box),
// elevation: 3.0,
// highlightElevation: 2.0,
// backgroundColor: Colors.red, // 红色
// ),
body: new SingleChildScrollView(
child: Center(
child: Column(
......
import 'package:flutter/material.dart';
import 'package:flutter_boost/flutter_boost.dart';
import 'package:gmalpha_flutter/macros/ALColors.dart';
import 'classes/message/home/message_home.dart';
import 'pages/message/home/message_home.dart';
// import 'simple_page_widgets.dart';
import 'comment_suggest.dart';
......
......@@ -144,6 +144,8 @@ class DioUtil {
/// PKCS12 证书密码.
String _pKCSPwd;
String _proxy = '172.30.9.117:8888';
/// 是否是debug模式.
static bool _isDebug = true;
......@@ -174,6 +176,7 @@ class DioUtil {
_mergeOption(config.options);
_mergeNativeCookie(config);
_pem = config.pem ?? _pem;
if (_dio != null) {
_dio.options = _options;
if (_pem != null) {
......@@ -187,6 +190,9 @@ class DioUtil {
}
return false;
};
client.findProxy = (url) {
return _isDebug ? 'PROXY $_proxy' : 'DIRECT';
};
};
}
......@@ -438,7 +444,8 @@ class DioUtil {
options.connectTimeout = 10 * 1000;
options.receiveTimeout = 20 * 1000;
options.contentType = ContentType.parse('application/x-www-form-urlencoded');
options.baseUrl = 'https://earth.iyanzhi.com/';
// options.baseUrl = 'https://earth.iyanzhi.com/';http://earth.gmapp.env/
options.baseUrl = 'http://earth.gmapp.env/';
Map<String, dynamic> headers = Map<String, dynamic>();
headers['Accept'] = 'application/json';
return options;
......
......@@ -43,6 +43,48 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.4.0"
build_daemon:
dependency: transitive
description:
name: build_daemon
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
build_resolvers:
dependency: transitive
description:
name: build_resolvers
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.5"
build_runner:
dependency: "direct main"
description:
name: build_runner
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.6.1"
build_runner_core:
dependency: transitive
description:
name: build_runner_core
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.6"
built_collection:
dependency: transitive
description:
name: built_collection
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.2.2"
built_value:
dependency: transitive
description:
name: built_value
url: "https://pub.flutter-io.cn"
source: hosted
version: "6.6.0"
charcode:
dependency: transitive
description:
......@@ -50,6 +92,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.2"
code_builder:
dependency: transitive
description:
name: code_builder
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.2.0"
collection:
dependency: transitive
description:
......@@ -106,6 +155,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.7"
fixnum:
dependency: transitive
description:
name: fixnum
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.10.9"
flutter:
dependency: "direct main"
description: flutter
......@@ -146,6 +202,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.7"
graphs:
dependency: transitive
description:
name: graphs
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.2.0"
html:
dependency: transitive
description:
......@@ -153,6 +216,41 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.14.0+2"
http:
dependency: transitive
description:
name: http
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.12.0+2"
http_multi_server:
dependency: transitive
description:
name: http_multi_server
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
http_parser:
dependency: transitive
description:
name: http_parser
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.1.3"
io:
dependency: transitive
description:
name: io
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.3.3"
js:
dependency: transitive
description:
name: js
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.6.1+1"
json_annotation:
dependency: transitive
description:
......@@ -195,6 +293,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.6"
mime:
dependency: transitive
description:
name: mime
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.9.6+3"
native_flutter_transfer_plugin:
dependency: "direct dev"
description:
......@@ -211,6 +316,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.5"
package_resolver:
dependency: transitive
description:
name: package_resolver
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.10"
path:
dependency: transitive
description:
......@@ -225,6 +337,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.5.0"
pool:
dependency: transitive
description:
name: pool
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.4.0"
pub_semver:
dependency: transitive
description:
......@@ -253,6 +372,20 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.22.0"
shelf:
dependency: transitive
description:
name: shelf
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.7.5"
shelf_web_socket:
dependency: transitive
description:
name: shelf_web_socket
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.2.3"
sky_engine:
dependency: transitive
description: flutter
......@@ -286,6 +419,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.0"
stream_transform:
dependency: transitive
description:
name: stream_transform
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.0.19"
string_scanner:
dependency: transitive
description:
......@@ -307,6 +447,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.2.4"
timing:
dependency: transitive
description:
name: timing
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.1+1"
typed_data:
dependency: transitive
description:
......@@ -328,6 +475,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.9.7+10"
web_socket_channel:
dependency: transitive
description:
name: web_socket_channel
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.13"
xservice_kit:
dependency: transitive
description:
......@@ -343,5 +497,5 @@ packages:
source: hosted
version: "2.1.16"
sdks:
dart: ">=2.2.0 <3.0.0"
dart: ">=2.3.0-dev.0.1 <3.0.0"
flutter: ">=0.1.4 <2.0.0"
......@@ -30,7 +30,9 @@ dependencies:
dio: ^2.1.0
rxdart: ^0.22.0 #链式编程
json_serializable: ^3.0.0 #json to model
build_runner: ^1.6.1
flutter_easyrefresh: ^1.2.7 # 上拉下拉刷新组件
dev_dependencies:
flutter_test:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment