Skip to content

Commit 75d836e

Browse files
author
罗国雄
committed
添加说明
1 parent 1857dac commit 75d836e

File tree

15 files changed

+91
-10
lines changed

15 files changed

+91
-10
lines changed

lib/Advertisement/openAd.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* @Description: 广告页
3+
* @Author: luoguoxiong
4+
* @Date: 2019-08-26 17:29:18
5+
*/
16
import 'package:flutter/material.dart';
27

38
class OpenAd extends StatelessWidget {

lib/api/index.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* @Description: API管理
3+
* @Author: luoguoxiong
4+
* @Date: 2019-08-26 17:29:18
5+
*/
16
import 'package:easy_market/utils/http.dart';
27

38
var http = new HttpUtils();

lib/component/linearBar.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* @Description: 滚动渐变的appBar组件
3+
* @Author: luoguoxiong
4+
* @Date: 2019-08-30 14:21:15
5+
*/
16
import 'package:flutter/material.dart';
27
import 'package:easy_market/utils/rem.dart';
38

lib/component/tab.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* @Description: 自定义Tab
3+
* @Author: luoguoxiong
4+
* @Date: 2019-08-15 10:08:01
5+
*/
16
import 'package:flutter/material.dart';
27
import '../utils/rem.dart';
38

lib/component/verticalTab.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* @Description: 垂直切换的Tab
3+
* @Author: luoguoxiong
4+
* @Date: 2019-08-26 17:29:18
5+
*/
16
import 'package:flutter/material.dart';
27

38
const double opWidth = 100.0;

lib/model/index.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* @Description: Provider数据管理
3+
* @Author: luoguoxiong
4+
* @Date: 2019-08-27 15:34:15
5+
*/
16
import 'package:flutter/material.dart';
27

38
class Model with ChangeNotifier {

lib/page/wrapper.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* @Description: page模块状态缓存HOC
3+
* @Author: luoguoxiong
4+
* @Date: 2019-09-02 14:31:53
5+
*/
16
import 'package:flutter/material.dart';
27

38
class WrapKeepState extends StatefulWidget {

lib/router/brand/index.dart

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -230,13 +230,7 @@ class _Brand extends State<Brand> {
230230
buildOneWidget(buildBrandLogo()),
231231
buildOneWidget(buildBrandDes()),
232232
buildBrandGoods(),
233-
SliverList(
234-
delegate: new SliverChildBuilderDelegate(
235-
(BuildContext context, int index) {
236-
return buildMore();
237-
},
238-
childCount: 1,
239-
))
233+
buildOneWidget(buildMore()),
240234
],
241235
),
242236
removePadding: true,

lib/router/catalog/catalogGoods.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ class _CatalogGoods extends State<CatalogGoods>
2727
static int chunk = 2; //没列显示多少个商品
2828

2929
List<dynamic> dataList = ['isLoading'];
30+
3031
@override
3132
void initState() {
3233
super.initState();
3334
_getInitData();
34-
// _getMore();
3535
}
3636

3737
@override

lib/router/index.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* @Description: 路由管理
3+
* @Author: luoguoxiong
4+
* @Date: 2019-08-24 17:29:18
5+
*/
6+
17
import 'package:flutter/material.dart';
28
import './catalog/index.dart';
39
import './brand/index.dart';
@@ -19,6 +25,8 @@ class Router {
1925
'/login': (context) => Login(),
2026
'/brand': (context, {arguments}) => Brand(arguments: arguments),
2127
};
28+
29+
// 路由初始化
2230
static run(RouteSettings settings) {
2331
final Function pageContentBuilder = Router.routes[settings.name];
2432

@@ -39,6 +47,7 @@ class Router {
3947
}
4048
}
4149

50+
// 组件跳转
4251
static link(Widget child, String routeName, BuildContext context,
4352
[Map parmas]) {
4453
return GestureDetector(
@@ -53,6 +62,7 @@ class Router {
5362
);
5463
}
5564

65+
// 方法跳转
5666
static push(String routeName, BuildContext context, [Map parmas]) {
5767
if (parmas != null) {
5868
Navigator.pushNamed(context, routeName, arguments: parmas);

lib/router/tipicDetail/index.dart

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66

77
import 'package:flutter/material.dart';
8+
import 'package:cached_network_image/cached_network_image.dart';
89

910
class TopicDetail extends StatefulWidget {
1011
TopicDetail({this.arguments});
@@ -15,12 +16,34 @@ class TopicDetail extends StatefulWidget {
1516
}
1617
}
1718

19+
List getImgUrl(String str) {
20+
var newString = str.replaceAll('<img src=\"', '');
21+
var list = newString.split('">\n ');
22+
List reList = [];
23+
for (var i = 0; i < list.length; i++) {
24+
if (i == 0) {
25+
reList.add(list[i].replaceAll('"', ''));
26+
} else if (i == list.length - 1) {
27+
reList.add(list[list.length - 1].replaceAll('">"', ''));
28+
} else {
29+
reList.add(list[i]);
30+
}
31+
}
32+
return reList;
33+
}
34+
1835
class _TopicDetail extends State<TopicDetail> {
1936
@override
2037
Widget build(BuildContext context) {
38+
var str =
39+
'"<img src=\"//yanxuan.nosdn.127.net/75c55a13fde5eb2bc2dd6813b4c565cc.jpg\">\n <img src=\"//yanxuan.nosdn.127.net/e27e1de2b271a28a21c10213b9df7e95.jpg\">\n <img src=\"//yanxuan.nosdn.127.net/9d413d1d28f753cb19096b533d53418d.jpg\">\n <img src=\"//yanxuan.nosdn.127.net/64b0f2f350969e9818a3b6c43c217325.jpg\">\n <img src=\"//yanxuan.nosdn.127.net/a668e6ae7f1fa45565c1eac221787570.jpg\">\n <img src=\"//yanxuan.nosdn.127.net/0d4004e19728f2707f08f4be79bbc774.jpg\">\n <img src=\"//yanxuan.nosdn.127.net/79ee021bbe97de7ecda691de6787241f.jpg\">"';
40+
var a = getImgUrl(str);
41+
print(a);
2142
return Material(
2243
child: Center(
23-
child: Text('当前id是${widget.arguments['id']},\n当前页面尚未开发,请耐心等候!'),
44+
child: CachedNetworkImage(
45+
imageUrl: 'http:${a[a.length - 1]}',
46+
),
2447
),
2548
);
2649
}

lib/utils/cache.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
/*
2+
* @Description: 本地存储工具
3+
* @Author: luoguoxiong
4+
* @Date: 2019-08-26 17:29:18
5+
*/
16
import 'dart:async';
2-
37
import 'package:shared_preferences/shared_preferences.dart';
48

59
/// 用来做shared_preferences的存储

lib/utils/help.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* @Description: 常用的一些方法
3+
* @Author: luoguoxiong
4+
* @Date: 2019-08-29 17:25:44
5+
*/
16
// 数组分组
27
List listToSort({List toSort, int chunk}) {
38
var newList = [];

lib/utils/http.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* @Description: Dio的封装
3+
* @Author: luoguoxiong
4+
* @Date: 2019-08-26 17:29:18
5+
*/
16
import 'package:dio/dio.dart';
27

38
class HttpUtils {

lib/utils/rem.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* @Description: Rem适配
3+
* @Author: luoguoxiong
4+
* @Date: 2019-08-26 17:29:18
5+
*/
16
import 'dart:ui' as ui;
27
import 'package:flutter/material.dart';
38

0 commit comments

Comments
 (0)