diff --git a/.github/issue_template.md b/.github/issue_template.md deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/contribute.md b/docs/contribute.md index 6ce5f0a5..78d14868 100644 --- a/docs/contribute.md +++ b/docs/contribute.md @@ -12,56 +12,14 @@ # Issue -PR的第一步就是提交issue,即提交你发现的BUG 或者 想加入的功能, 选择你issue在类型 +pr的第一步是先提交issue,即提交你发现的BUG 或者 想加入的功能, 选择你issue在类型 ![](https://img.alicdn.com/tfs/TB1r3LEbKL2gK0jSZFmXXc7iXXa-858-317.png) -您的 Pull Request 可能包含以下几种 +您的 Issue 可能包含以下几种 -- 当前项目逻辑代码的问题修复或者优化 -- widget 示例的完善 -- widget 文档的完善与更新 - - -# 文档与DEMO的完善 -一个widget的demo实例与文档说明, 由以下目录构成, 我们以**/lib/widgets/components/Tab/Tab**组件举例, 在此文件目录下构建您的demo运行即可看到效果 - -- index.dart -- demo.dart - - - -# 撰写 Pull Request - -为了更好的将 *flutter* 的各种使用方法分享给大家, 我们欢迎第三方提交个人Pull Request(简称为PR)到开源仓库中. 提交的PR需要满足以下规则: - -- PR 的提交名称, 请使用有意义可以理解的词汇, 否则我们请直接关闭它. - - 例如: 增加了XX功能, 优化..., 修复在 XX 状态下对 XX 的异常处理 -- PR 只能被提交合并到 *develop* 分支, 被提交到master的 PR, 我们将会直接关闭. -- PR 的描述区,需要描述本次改动的主要内容, 以及为什么要如此改动. -- 避免超大的 PR 提交 - - 当 PR 的改动 **change** 超过1000行(暂定为1000)时, 请尽量拆分后进行提交. -- 规范化的commit信息 - - commit规范参照[develop规范](https://github.com/alibbaba/flutter-go/blob/master/develop.md#commit-%E6%8F%90%E4%BA%A4%E8%A7%84%E8%8C%83) - - commit列表, 请在提交PR之前做好整理, 避免出现一个功能点的多条commit.[如何整理commit](https://help.github.com/en/articles/using-git-rebase-on-the-command-line) - -# 如何提交PR -* fork项目到自己仓库 -* git clone (您的仓库地址)到本地 -* 建立上游源 - * git remote add upStream git@github.com:alibaba/flutter-go.git - * 创建开发分支(非必须) - * git checkout -b develop -* 修改提交代码 - * git status - * git add . - * git commit -m 'feat: message' - * git push origin develop -* 同步代码 - * git fetch upstream - * git merge upstream/develop - * git push origin develop -* 提交PR - * 到自己github仓库对应fork的项目下new pull request +- bug report (修复逻辑相关bug) +- feature (增加新的功能) +- widget (关于widget示例展示) diff --git a/go-cli/pubspec.yaml b/go-cli/pubspec.yaml index f2725f4a..dfc961c2 100644 --- a/go-cli/pubspec.yaml +++ b/go-cli/pubspec.yaml @@ -17,6 +17,7 @@ dependencies: args: '^1.5.1' dart_inquirer: '^1.0.0' watcher: ^0.9.7+10 + mustache: ^1.1.1 dev_dependencies: diff --git a/go-cli/src/build/build_page_list.dart b/go-cli/src/build/build_page_list.dart index 212acffd..a8757444 100644 --- a/go-cli/src/build/build_page_list.dart +++ b/go-cli/src/build/build_page_list.dart @@ -1,11 +1,23 @@ import 'dart:io'; import 'dart:convert'; +import 'package:mustache/mustache.dart'; import 'package:path/path.dart' as p; import '../../utils/util.dart'; import '../config.dart'; import '../exception/demo.dart'; +String prettyJson(Map json) { + String res = "{"; + json.forEach((k, v) { + res += ( + "\t'$k': '$v'"); + }); + res +='}'; + return res; +} + + Future buildPageListJson() async { List childList = await readeDirChildren(TARGET_PAGE_DIC, false); List pagePathList = []; @@ -55,36 +67,45 @@ Future buildPageListJson() async { } String renderPagesDart(List> data) { - // 自定义前缀 避免出现数字非法字符等 - String pre = "StandardPage"; - String head = ''; - String foot = """ + print('data>>> $data'); + var source = ''' + + {{# pages }} +import '{{ name }}_{{ author }}_{{ id }}/index.dart' as StandardPage_{{ name }}_{{ id }}; + {{/ pages }} class StandardPages { Map standardPages; Map getPages() { return { -"""; - - for (int i = 0; i < data.length; i++) { - Map item = data[i]; - String demoImportName = '${item['name']}_${item['id']}'; - head += "import '${item['name']}_${item['author']}_${item['id']}/index.dart' as ${pre}_$demoImportName;\r\n"; - - foot += "\t\t\t'${item['id']}': ${pre}_${demoImportName}.getMd()"; - - if (i != data.length - 1) { - foot += ',\r\n'; - } - - } - foot += """\r + "0": "0" {{# pages }}, + "{{ id }}" : StandardPage_{{ name }}_{{ id }}.getMd() + {{/ pages }} }; } -} + List> getLocalList() { + return [ + {}{{# pages }}, + { "id": "{{ id }}", "name": "{{ name }}", "email": "{{ email }}", "author": "{{ author }}"} + {{/ pages }} + ]; + } - """; +} + + '''; + var template = new Template(source, name: 'template-filename.html'); + + + // 自定义前缀 避免出现数字非法字符等 + Map formatData = { + "pages": data + }; + + String output = template.renderString(formatData); + + +return output; - return head + foot; } Future checkPage(String path) async { List files = [ diff --git a/go-cli/src/cli_command_runder.dart b/go-cli/src/cli_command_runder.dart index b27b85f7..d9581573 100644 --- a/go-cli/src/cli_command_runder.dart +++ b/go-cli/src/cli_command_runder.dart @@ -6,6 +6,7 @@ import './version.dart'; import './command/create_demo.dart'; import './command/create_page.dart'; import './command/watch_md.dart'; +import './command/build.dart'; @@ -18,6 +19,7 @@ class _CommandRunner extends CommandRunner { addCommand(CreateDemoCommand()); addCommand(CreatePageCommand()); addCommand(WatchCommand()); + addCommand(Build()); } diff --git a/go-cli/src/command/build.dart b/go-cli/src/command/build.dart new file mode 100644 index 00000000..5502cc33 --- /dev/null +++ b/go-cli/src/command/build.dart @@ -0,0 +1,32 @@ +// +// Created with Android Studio. +// User: 三帆 +// Date: 30/07/2019 +// Time: 16:51 +// email: sanfan.hx@alibaba-inc.com +// target: build +// + + +import 'package:args/command_runner.dart'; +import '../build/build_demo_list.dart'; +import '../build/build_page_list.dart'; + + +import 'dart:async'; + + +class Build extends Command { + @override + final name = 'build'; + @override + final description = '生成索引等'; + + + @override + Future run() async { + buildPageListJson(); + buildDemoListJson(); + return 0; + } +} \ No newline at end of file diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig index ae516c8c..e8efba11 100644 --- a/ios/Flutter/Debug.xcconfig +++ b/ios/Flutter/Debug.xcconfig @@ -1,3 +1,2 @@ #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" -#include "../Pods/Target\ Support\ Files/Pods-Runner/Pods-Runner.debug.xcconfig" diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig index 3e14f624..399e9340 100644 --- a/ios/Flutter/Release.xcconfig +++ b/ios/Flutter/Release.xcconfig @@ -1,3 +1,2 @@ #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" -#include "../Pods/Target\ Support\ Files/Pods-Runner/Pods-Runner.release.xcconfig" diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 2b500e72..cc98f703 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -329,7 +329,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin\n"; + shellScript = "/bin/sh \"/Users/nealyang/development/flutter/packages/flutter_tools/bin/xcode_backend.sh\" thin\n"; }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; diff --git a/lib/components/full_screen_code_dialog.dart b/lib/components/full_screen_code_dialog.dart index 76147749..c8f05476 100644 --- a/lib/components/full_screen_code_dialog.dart +++ b/lib/components/full_screen_code_dialog.dart @@ -9,9 +9,10 @@ import 'package:flutter_go/utils/example_code_parser.dart'; import 'package:flutter_go/utils/syntax_highlighter.dart'; class FullScreenCodeDialog extends StatefulWidget { - const FullScreenCodeDialog({this.filePath}); + const FullScreenCodeDialog({this.filePath, this.remoteFilePath}); final String filePath; + final String remoteFilePath; _FullScreenCodeDialogState createState() => _FullScreenCodeDialogState(); } diff --git a/lib/components/loading.dart b/lib/components/loading.dart new file mode 100644 index 00000000..659b2ff8 --- /dev/null +++ b/lib/components/loading.dart @@ -0,0 +1,94 @@ +// +// Created with Android Studio. +// User: 三帆 +// Date: 07/08/2019 +// Time: 08:40 +// email: sanfan.hx@alibaba-inc.com +// tartget: 代码获取自: https://blog.csdn.net/O_time/article/details/86496537 +// +import 'dart:async'; +import 'package:flutter/material.dart'; + +// ignore: must_be_immutable +class NetLoadingDialog extends StatefulWidget { + String loadingText; + bool outsideDismiss; + bool loading; + Function dismissCallback; + Future requestCallBack; + + NetLoadingDialog( + {Key key, + this.loadingText = "loading...", + this.outsideDismiss = true, + this.dismissCallback, + this.loading, + this.requestCallBack}) + : super(key: key); + + @override + State createState() => _LoadingDialog(); +} + +class _LoadingDialog extends State { + _dismissDialog() { + if (widget.dismissCallback != null) { + widget.dismissCallback(); + } + Navigator.of(context).pop(); + } + + @override + void initState() { + super.initState(); + if (widget.requestCallBack != null) { + widget.requestCallBack.then((_) { + Navigator.pop(context); + }); + } + } + + @override + Widget build(BuildContext context) { + if (!widget.loading) { + return Container(); + } + return new GestureDetector( + onTap: widget.outsideDismiss ? _dismissDialog : null, + child: Material( + type: MaterialType.transparency, + child: new Center( + child: new SizedBox( + width: 120.0, + height: 120.0, + child: new Container( + decoration: ShapeDecoration( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all( + Radius.circular(8.0), + ), + ), + ), + child: new Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + new CircularProgressIndicator(), + new Padding( + padding: const EdgeInsets.only( + top: 20.0, + ), + child: new Text( + widget.loadingText, + style: new TextStyle(fontSize: 12.0), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/lib/components/widget_demo.dart b/lib/components/widget_demo.dart index 5c75bb32..8783b18a 100644 --- a/lib/components/widget_demo.dart +++ b/lib/components/widget_demo.dart @@ -25,8 +25,8 @@ class WidgetDemo extends StatefulWidget { {Key key, @required this.title, @required this.contentList, - @required this.codeUrl, - @required this.docUrl, + this.codeUrl, + this.docUrl, this.bottomNaviBar}) : super(key: key); @@ -141,7 +141,38 @@ class _WidgetDemoState extends State { '${Routes.codeView}?filePath=${Uri.encodeComponent(widget.codeUrl)}'); } } - + List> buildPopupMenu() { + List> comps = []; + if (widget.docUrl != null) { + comps.add( + PopupMenuItem( + value: 'doc', + child: ListTile( + leading: Icon( + Icons.library_books, + size: 22.0, + ), + title: Text('查看文档'), + ), + ) + ); + } + if (widget.codeUrl != null) { + comps.add( + PopupMenuItem( + value: 'code', + child: ListTile( + leading: Icon( + Icons.code, + size: 22.0, + ), + title: Text('查看Demo'), + ), + ) + ); + } + return comps; + } @override Widget build(BuildContext context) { if (_hasCollected) { @@ -149,50 +180,34 @@ class _WidgetDemoState extends State { } else { _collectionIcons = Icons.favorite_border; } + List> menus = buildPopupMenu(); + List actions = [ + new IconButton( + tooltip: 'goBack home', + onPressed: () { + Navigator.popUntil(context, ModalRoute.withName('/')); + }, + icon: Icon(Icons.home), + ), + new IconButton( + tooltip: 'collection', + onPressed: _getCollection, + icon: Icon(_collectionIcons), + ), + ]; + if (menus.length > 0) { + actions.add( + PopupMenuButton( + onSelected: _selectValue, + itemBuilder: (BuildContext context) => menus, + ) + ); + } return Scaffold( key: _scaffoldKey, appBar: AppBar( title: Text(widget.title), - actions: [ - new IconButton( - tooltip: 'goBack home', - onPressed: () { - Navigator.popUntil(context, ModalRoute.withName('/')); - }, - icon: Icon(Icons.home), - ), - new IconButton( - tooltip: 'collection', - onPressed: _getCollection, - icon: Icon(_collectionIcons), - ), - PopupMenuButton( - onSelected: _selectValue, - itemBuilder: (BuildContext context) => >[ - const PopupMenuItem( - value: 'doc', - child: ListTile( - leading: Icon( - Icons.library_books, - size: 22.0, - ), - title: Text('查看文档'), - ), - ), - const PopupMenuDivider(), - const PopupMenuItem( - value: 'code', - child: ListTile( - leading: Icon( - Icons.code, - size: 22.0, - ), - title: Text('查看Demo'), - ), - ), - ], - ), - ], + actions: actions, ), body: Container( padding: const EdgeInsets.symmetric(vertical: 10.0, horizontal: 15.0), diff --git a/lib/main.dart b/lib/main.dart index 95c7f3f9..52082f22 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -17,7 +17,7 @@ import 'package:flutter_go/event/event_bus.dart'; import 'package:flutter_go/event/event_model.dart'; import 'package:event_bus/event_bus.dart'; import 'package:flutter_go/model/widget.dart'; - +import 'package:flutter_go/standard_pages/index.dart'; //import 'views/welcome_page/index.dart'; SpUtil sp; @@ -28,7 +28,6 @@ class MyApp extends StatefulWidget { final router = new Router(); Routes.configureRoutes(router); // 这里设置项目环境 - Application.env = ENV.PRODUCTION; Application.router = router; } @@ -189,10 +188,13 @@ void main() async { await provider.init(true); sp = await SpUtil.getInstance(); new SearchHistoryList(sp); + await DataUtils.getWidgetTreeList().then((List json) { - if (json == null) return; - Application.widgetTree = WidgetTree.buildWidgetTree(json); + List data = WidgetTree.insertDevPagesToList(json, StandardPages().getLocalList()); + Application.widgetTree = WidgetTree.buildWidgetTree(data); + print("Application.widgetTree>>>> ${Application.widgetTree}"); }); db = Provider.db; runApp(new MyApp()); } + diff --git a/lib/model/cat.dart b/lib/model/cat.dart index e9ecae7b..5ac493f4 100644 --- a/lib/model/cat.dart +++ b/lib/model/cat.dart @@ -1,107 +1,107 @@ - -import 'dart:async'; - -import 'package:flutter_go/utils/sql.dart'; - -abstract class CatInterface{ - int get id; - //类目名称 - String get name; - //描述 - String get desc; - //第几级类目,默认 1 - int get depth; - //父类目id,没有为 0 - int get parentId; -} - -class Cat implements CatInterface { - int id; - String name; - String desc; - int depth; - int parentId; - - Cat({this.id, this.name, this.desc, this.depth, this.parentId}); - - Cat.fromJSON(Map json) - : id = json['id'], - name = json['name'], - desc = json['desc'], - depth = json['depth'], - parentId = json['parentId']; - - String toString() { - return '(Cat $name)'; - } - - Map toMap() { - return { - 'id': id, - 'name': name, - 'desc': desc, - 'depth': depth, - 'parentId': parentId - }; - } - Map toSqlCondition() { - Map _map = this.toMap(); - Map condition = {}; - _map.forEach((k, value) { - - if (value != null) { - - condition[k] = value; - } - }); - - if (condition.isEmpty) { - return {}; - } - - return condition; - } -} - - -class CatControlModel{ - final String table = 'cat'; - Sql sql; - CatControlModel() { - sql = Sql.setTable(table); - } - - /// 获取一级类目 - Future mainList() async{ - List listJson = await sql.getByCondition(conditions: {'parentId': 0}); - List cats = listJson.map((json) { - return new Cat.fromJSON(json); - }).toList(); - return cats; - } - - // 获取Cat不同深度与parent的列表 - Future> getList([Cat cat]) async{ - - - if (cat == null) { - cat = new Cat(depth: 1, parentId: 0); - } - // print("cat in getList ${cat.toMap()}"); - List listJson = await sql.getByCondition(conditions: cat.toSqlCondition()); - List cats = listJson.map((json) { - return new Cat.fromJSON(json); - }).toList(); - return cats; - } - - // 通过name获取Cat对象信息 - Future getCatByName(String name) async { - List json = await sql.getByCondition(conditions: {'name': name}); - if (json.isEmpty) { - return null; - } - return new Cat.fromJSON(json.first); - } - -} +// +//import 'dart:async'; +// +//import 'package:flutter_go/utils/sql.dart'; +// +//abstract class CatInterface{ +// int get id; +// //类目名称 +// String get name; +// //描述 +// String get desc; +// //第几级类目,默认 1 +// int get depth; +// //父类目id,没有为 0 +// int get parentId; +//} +// +//class Cat implements CatInterface { +// int id; +// String name; +// String desc; +// int depth; +// int parentId; +// +// Cat({this.id, this.name, this.desc, this.depth, this.parentId}); +// +// Cat.fromJSON(Map json) +// : id = json['id'], +// name = json['name'], +// desc = json['desc'], +// depth = json['depth'], +// parentId = json['parentId']; +// +// String toString() { +// return '(Cat $name)'; +// } +// +// Map toMap() { +// return { +// 'id': id, +// 'name': name, +// 'desc': desc, +// 'depth': depth, +// 'parentId': parentId +// }; +// } +// Map toSqlCondition() { +// Map _map = this.toMap(); +// Map condition = {}; +// _map.forEach((k, value) { +// +// if (value != null) { +// +// condition[k] = value; +// } +// }); +// +// if (condition.isEmpty) { +// return {}; +// } +// +// return condition; +// } +//} +// +// +//class CatControlModel{ +// final String table = 'cat'; +// Sql sql; +// CatControlModel() { +// sql = Sql.setTable(table); +// } +// +// /// 获取一级类目 +// Future mainList() async{ +// List listJson = await sql.getByCondition(conditions: {'parentId': 0}); +// List cats = listJson.map((json) { +// return new Cat.fromJSON(json); +// }).toList(); +// return cats; +// } +// +// // 获取Cat不同深度与parent的列表 +// Future> getList([Cat cat]) async{ +// +// +// if (cat == null) { +// cat = new Cat(depth: 1, parentId: 0); +// } +// // print("cat in getList ${cat.toMap()}"); +// List listJson = await sql.getByCondition(conditions: cat.toSqlCondition()); +// List cats = listJson.map((json) { +// return new Cat.fromJSON(json); +// }).toList(); +// return cats; +// } +// +// // 通过name获取Cat对象信息 +// Future getCatByName(String name) async { +// List json = await sql.getByCondition(conditions: {'name': name}); +// if (json.isEmpty) { +// return null; +// } +// return new Cat.fromJSON(json.first); +// } +// +//} diff --git a/lib/model/widget.dart b/lib/model/widget.dart index 7bb199e5..3cc757be 100644 --- a/lib/model/widget.dart +++ b/lib/model/widget.dart @@ -2,7 +2,7 @@ import 'dart:async'; import "package:flutter/material.dart"; - +import "package:flutter_go/routers/application.dart"; import 'package:flutter_go/utils/sql.dart'; enum treeNode { @@ -188,10 +188,12 @@ class CategoryComponent extends CommonItem { @required this.id, @required this.name, @required this.parentId, + this.type = 'categoryw', this.children, this.parent }); CategoryComponent.fromJson(Map json) { + print(json['id'].runtimeType); this.id = json['id']; this.name = json['name']; this.parentId = json['parentId']; @@ -289,6 +291,7 @@ class WidgetLeaf extends CommonItem { } class WidgetTree { + // 构建树型结构 static CategoryComponent buildWidgetTree(List json, [parent]){ CategoryComponent current; if (parent != null) { @@ -297,7 +300,6 @@ class WidgetTree { current = CategoryComponent(id: 0, name: 'root', parentId: null, children: []); } json.forEach((item) { - // 归属分类级别 if (['root', 'category'].indexOf(item['type']) != -1) { CategoryComponent cate = CategoryComponent.fromJson(item); @@ -313,6 +315,41 @@ class WidgetTree { }); return current; } + + static insertDevPagesToList(List list, List devPages) { + List devChildren = []; + int index = 9999999; + if (Application.env == ENV.PRODUCTION) { + return list; + } + devPages.forEach((item) { + index++; + if (item['id'] != null) { + devChildren.add({ + "id": index.toString(), + "name": item['name'], + "parentId": "99999999999", + "type": "widget", + "display": "standard", + "author": item['author'], + "pageId": item['id'] + }); + } + }); + list.forEach((item) { + if (item['name'].toString().toUpperCase() == 'DEVELOPER') { + List children = item['children']; + children.insert(0, { + "id": "99999999999", + "name": "本地代码", + "parentId": item['id'], + "type": "category", + "children": devChildren + }); + } + }); + return list; + } static CategoryComponent getCommonItemById(List path, CategoryComponent root) { print("getCommonItemByPath $path"); print("root $root"); diff --git a/lib/page_demo_package/.demo.json b/lib/page_demo_package/.demo.json index 0e45bee1..1967c339 100644 --- a/lib/page_demo_package/.demo.json +++ b/lib/page_demo_package/.demo.json @@ -1 +1 @@ -[{"name":"demoName","screenShot":"","author":"yourName","email":"yourEmail","desc":"这是一个测试的标准demo","id":"1a29aa8e_32ae_4241_9c8a_5c9e1f92b096"}] \ No newline at end of file +[{"name":"demoName","screenShot":"","author":"yourName","email":"yourEmail","desc":"这是一个测试的标准demo","id":"1a29aa8e_32ae_4241_9c8a_5c9e1f92b096"},{"name":"local","screenShot":"","author":"ab","email":"email","desc":"ags","id":"2c1d57d0_42ae_4241_9c8a_5c9e1f92b096"}] \ No newline at end of file diff --git a/lib/page_demo_package/index.dart b/lib/page_demo_package/index.dart index 3a4a6f72..1e6a4966 100644 --- a/lib/page_demo_package/index.dart +++ b/lib/page_demo_package/index.dart @@ -1,4 +1,6 @@ import 'demoName_yourName_1a29aa8e_32ae_4241_9c8a_5c9e1f92b096/index.dart' as StandardDemo_demoName_1a29aa8e_32ae_4241_9c8a_5c9e1f92b096; +import 'local_ab_2c1d57d0_42ae_4241_9c8a_5c9e1f92b096/index.dart' as StandardDemo_local_2c1d57d0_42ae_4241_9c8a_5c9e1f92b096; var demoObjects = { - '1a29aa8e_32ae_4241_9c8a_5c9e1f92b096': StandardDemo_demoName_1a29aa8e_32ae_4241_9c8a_5c9e1f92b096.demoWidgets + '1a29aa8e_32ae_4241_9c8a_5c9e1f92b096': StandardDemo_demoName_1a29aa8e_32ae_4241_9c8a_5c9e1f92b096.demoWidgets, + '2c1d57d0_42ae_4241_9c8a_5c9e1f92b096': StandardDemo_local_2c1d57d0_42ae_4241_9c8a_5c9e1f92b096.demoWidgets }; \ No newline at end of file diff --git a/lib/page_demo_package/local_ab_2c1d57d0_42ae_4241_9c8a_5c9e1f92b096/.demo.json b/lib/page_demo_package/local_ab_2c1d57d0_42ae_4241_9c8a_5c9e1f92b096/.demo.json new file mode 100644 index 00000000..e6e8114d --- /dev/null +++ b/lib/page_demo_package/local_ab_2c1d57d0_42ae_4241_9c8a_5c9e1f92b096/.demo.json @@ -0,0 +1,9 @@ +{ + "name": "local", + "screenShot": "", + "author":"ab", + "email": "email", + "desc": "ags", + "id": "2c1d57d0_42ae_4241_9c8a_5c9e1f92b096" +} + \ No newline at end of file diff --git a/lib/page_demo_package/local_ab_2c1d57d0_42ae_4241_9c8a_5c9e1f92b096/index.dart b/lib/page_demo_package/local_ab_2c1d57d0_42ae_4241_9c8a_5c9e1f92b096/index.dart new file mode 100644 index 00000000..4e315373 --- /dev/null +++ b/lib/page_demo_package/local_ab_2c1d57d0_42ae_4241_9c8a_5c9e1f92b096/index.dart @@ -0,0 +1,15 @@ +// +// Created with flutter go cli +// User: ab +// Time: 2019-08-06 17:26:02.905889 +// email: email +// desc: ags +// + +import 'src/index.dart'; + +var demoWidgets = [ + new Demo() +]; + + \ No newline at end of file diff --git a/lib/page_demo_package/local_ab_2c1d57d0_42ae_4241_9c8a_5c9e1f92b096/src/index.dart b/lib/page_demo_package/local_ab_2c1d57d0_42ae_4241_9c8a_5c9e1f92b096/src/index.dart new file mode 100644 index 00000000..d0d3921e --- /dev/null +++ b/lib/page_demo_package/local_ab_2c1d57d0_42ae_4241_9c8a_5c9e1f92b096/src/index.dart @@ -0,0 +1,16 @@ +import 'package:flutter/material.dart'; + +class Demo extends StatefulWidget { + @override + _State createState() => _State(); +} + +class _State extends State { + @override + Widget build(BuildContext context) { + return Container( + child: Text("this is flutter go init demo"), + ); + } +} + \ No newline at end of file diff --git a/lib/routers/routers.dart b/lib/routers/routers.dart index dc1183a5..711e2285 100644 --- a/lib/routers/routers.dart +++ b/lib/routers/routers.dart @@ -10,6 +10,7 @@ class Routes { static String home = "/home"; static String widgetDemo = '/widget-demo'; static String codeView = '/code-view'; + static String githubCodeView = '/github-code-view'; static String webViewPage = '/web-view-page'; static String loginPage = '/loginpage'; static String issuesMessage='/issuesMessage'; diff --git a/lib/standard_pages/.pages.json b/lib/standard_pages/.pages.json index e5fdc536..18e4f686 100644 --- a/lib/standard_pages/.pages.json +++ b/lib/standard_pages/.pages.json @@ -1,11 +1 @@ -[ - { - "name": "standard", - "screenShot": "", - "author": "sanfan", - "title": "介绍页", - "email": "hanxu317@qq.com", - "desc": "desc", - "id": "ee4feb8e_32ae_4241_9c8a_5c9e1f92b096" - } -] \ No newline at end of file +[{"name":"local","screenShot":"","author":"hnaxu","title":"本地","email":"hanxu@qq.com","desc":"desc","id":"5d7178d0_42ae_4241_9c8a_5c9e1f92b096"},{"name":"test","screenShot":"","author":"abc","title":"ya","email":"adsf.com","desc":"desc","id":"84f38e00_42ae_4241_9c8a_5c9e1f92b096"},{"name":"standard","screenShot":"","author":"sanfan","title":"介绍页","email":"hanxu317@qq.com","desc":"desc","id":"ee4feb8e_32ae_4241_9c8a_5c9e1f92b096"}] \ No newline at end of file diff --git a/lib/standard_pages/index.dart b/lib/standard_pages/index.dart index 9d537fdd..eb5ac663 100644 --- a/lib/standard_pages/index.dart +++ b/lib/standard_pages/index.dart @@ -1,11 +1,30 @@ + +import 'local_hnaxu_5d7178d0_42ae_4241_9c8a_5c9e1f92b096/index.dart' as StandardPage_local_5d7178d0_42ae_4241_9c8a_5c9e1f92b096; +import 'test_abc_84f38e00_42ae_4241_9c8a_5c9e1f92b096/index.dart' as StandardPage_test_84f38e00_42ae_4241_9c8a_5c9e1f92b096; import 'standard_sanfan_ee4feb8e_32ae_4241_9c8a_5c9e1f92b096/index.dart' as StandardPage_standard_ee4feb8e_32ae_4241_9c8a_5c9e1f92b096; class StandardPages { Map standardPages; Map getPages() { return { - 'ee4feb8e_32ae_4241_9c8a_5c9e1f92b096': StandardPage_standard_ee4feb8e_32ae_4241_9c8a_5c9e1f92b096.getMd() + "0": "0" , + "5d7178d0_42ae_4241_9c8a_5c9e1f92b096" : StandardPage_local_5d7178d0_42ae_4241_9c8a_5c9e1f92b096.getMd() +, + "84f38e00_42ae_4241_9c8a_5c9e1f92b096" : StandardPage_test_84f38e00_42ae_4241_9c8a_5c9e1f92b096.getMd() +, + "ee4feb8e_32ae_4241_9c8a_5c9e1f92b096" : StandardPage_standard_ee4feb8e_32ae_4241_9c8a_5c9e1f92b096.getMd() }; } -} + List> getLocalList() { + return [ + {}, + { "id": "5d7178d0_42ae_4241_9c8a_5c9e1f92b096", "name": "local", "email": "hanxu@qq.com", "author": "hnaxu"} +, + { "id": "84f38e00_42ae_4241_9c8a_5c9e1f92b096", "name": "test", "email": "adsf.com", "author": "abc"} +, + { "id": "ee4feb8e_32ae_4241_9c8a_5c9e1f92b096", "name": "standard", "email": "hanxu317@qq.com", "author": "sanfan"} + ]; + } - \ No newline at end of file +} + + \ No newline at end of file diff --git a/lib/standard_pages/local_hnaxu_5d7178d0_42ae_4241_9c8a_5c9e1f92b096/.page.json b/lib/standard_pages/local_hnaxu_5d7178d0_42ae_4241_9c8a_5c9e1f92b096/.page.json new file mode 100644 index 00000000..d6a9e3d0 --- /dev/null +++ b/lib/standard_pages/local_hnaxu_5d7178d0_42ae_4241_9c8a_5c9e1f92b096/.page.json @@ -0,0 +1,10 @@ +{ + "name": "local", + "screenShot": "", + "author":"hnaxu", + "title":"本地", + "email": "hanxu@qq.com", + "desc": "desc", + "id": "5d7178d0_42ae_4241_9c8a_5c9e1f92b096" +} + \ No newline at end of file diff --git a/lib/standard_pages/local_hnaxu_5d7178d0_42ae_4241_9c8a_5c9e1f92b096/index.dart b/lib/standard_pages/local_hnaxu_5d7178d0_42ae_4241_9c8a_5c9e1f92b096/index.dart new file mode 100644 index 00000000..6e506d10 --- /dev/null +++ b/lib/standard_pages/local_hnaxu_5d7178d0_42ae_4241_9c8a_5c9e1f92b096/index.dart @@ -0,0 +1,52 @@ +String getMd() { + return """ + # 标准的详情页 + +您可以在这个界面中, 编写大多数的markdown文案, 他会在 **goCli watch** 下同步被编译成 **dart** 文件 + +您可以通过goCli创建详情页所需要的demo + +``` +goCLi createDemo +``` + +在flutter go 根文件下通过命令行输入以上命令可以进行以下操作 + +[✓] 请输入新增加的demo名称? demoName + +[✓] 请输入您的姓名(使用英文) yourName + +[✓] 请输入您的github的email地址 yourEmail + +[✓] 请输入您demo的描述 这是一个测试的标准demo + + +在完成以上操作后, 可以得到这样的输出: + + +``` +------------------ +您新增的组件信息如下 +================== +{ + name : demoName + author : yourName + email : yourEmail + desc : 这是一个测试的标准demo +} +================== +[✓] Is this the config you want ? (Y/n) y +{ + 新建的demo文件位于 : /flutter go/lib/page_demo_package/demoName_yourName_1a29aa8e_32ae_4241_9c8a_5c9e1f92b096 + demoId为 : 1a29aa8e_32ae_4241_9c8a_5c9e1f92b096 + markdown中调用方式 : [demo:1a29aa8e_32ae_4241_9c8a_5c9e1f92b096] +} + +``` +您可以在任意详情页中, 通过以下方式调用 + +``` +[demo: 1a29aa8e_32ae_4241_9c8a_5c9e1f92b096] +```"""; + +} diff --git a/lib/standard_pages/local_hnaxu_5d7178d0_42ae_4241_9c8a_5c9e1f92b096/index.md b/lib/standard_pages/local_hnaxu_5d7178d0_42ae_4241_9c8a_5c9e1f92b096/index.md new file mode 100644 index 00000000..61a5f516 --- /dev/null +++ b/lib/standard_pages/local_hnaxu_5d7178d0_42ae_4241_9c8a_5c9e1f92b096/index.md @@ -0,0 +1,48 @@ +# 标准的详情页 + +您可以在这个界面中, 编写大多数的markdown文案, 他会在 **goCli watch** 下同步被编译成 **dart** 文件 + +您可以通过goCli创建详情页所需要的demo + +``` +goCLi createDemo +``` + +在flutter go 根文件下通过命令行输入以上命令可以进行以下操作 + +[✓] 请输入新增加的demo名称? demoName + +[✓] 请输入您的姓名(使用英文) yourName + +[✓] 请输入您的github的email地址 yourEmail + +[✓] 请输入您demo的描述 这是一个测试的标准demo + + +在完成以上操作后, 可以得到这样的输出: + + +``` +------------------ +您新增的组件信息如下 +================== +{ + name : demoName + author : yourName + email : yourEmail + desc : 这是一个测试的标准demo +} +================== +[✓] Is this the config you want ? (Y/n) y +{ + 新建的demo文件位于 : /flutter go/lib/page_demo_package/demoName_yourName_1a29aa8e_32ae_4241_9c8a_5c9e1f92b096 + demoId为 : 1a29aa8e_32ae_4241_9c8a_5c9e1f92b096 + markdown中调用方式 : [demo:1a29aa8e_32ae_4241_9c8a_5c9e1f92b096] +} + +``` +您可以在任意详情页中, 通过以下方式调用 + +``` +[demo: 1a29aa8e_32ae_4241_9c8a_5c9e1f92b096] +``` \ No newline at end of file diff --git a/lib/standard_pages/test_abc_84f38e00_42ae_4241_9c8a_5c9e1f92b096/.page.json b/lib/standard_pages/test_abc_84f38e00_42ae_4241_9c8a_5c9e1f92b096/.page.json new file mode 100644 index 00000000..297b026e --- /dev/null +++ b/lib/standard_pages/test_abc_84f38e00_42ae_4241_9c8a_5c9e1f92b096/.page.json @@ -0,0 +1,10 @@ +{ + "name": "test", + "screenShot": "", + "author":"abc", + "title":"ya", + "email": "adsf.com", + "desc": "desc", + "id": "84f38e00_42ae_4241_9c8a_5c9e1f92b096" +} + \ No newline at end of file diff --git a/lib/standard_pages/test_abc_84f38e00_42ae_4241_9c8a_5c9e1f92b096/index.dart b/lib/standard_pages/test_abc_84f38e00_42ae_4241_9c8a_5c9e1f92b096/index.dart new file mode 100644 index 00000000..6e506d10 --- /dev/null +++ b/lib/standard_pages/test_abc_84f38e00_42ae_4241_9c8a_5c9e1f92b096/index.dart @@ -0,0 +1,52 @@ +String getMd() { + return """ + # 标准的详情页 + +您可以在这个界面中, 编写大多数的markdown文案, 他会在 **goCli watch** 下同步被编译成 **dart** 文件 + +您可以通过goCli创建详情页所需要的demo + +``` +goCLi createDemo +``` + +在flutter go 根文件下通过命令行输入以上命令可以进行以下操作 + +[✓] 请输入新增加的demo名称? demoName + +[✓] 请输入您的姓名(使用英文) yourName + +[✓] 请输入您的github的email地址 yourEmail + +[✓] 请输入您demo的描述 这是一个测试的标准demo + + +在完成以上操作后, 可以得到这样的输出: + + +``` +------------------ +您新增的组件信息如下 +================== +{ + name : demoName + author : yourName + email : yourEmail + desc : 这是一个测试的标准demo +} +================== +[✓] Is this the config you want ? (Y/n) y +{ + 新建的demo文件位于 : /flutter go/lib/page_demo_package/demoName_yourName_1a29aa8e_32ae_4241_9c8a_5c9e1f92b096 + demoId为 : 1a29aa8e_32ae_4241_9c8a_5c9e1f92b096 + markdown中调用方式 : [demo:1a29aa8e_32ae_4241_9c8a_5c9e1f92b096] +} + +``` +您可以在任意详情页中, 通过以下方式调用 + +``` +[demo: 1a29aa8e_32ae_4241_9c8a_5c9e1f92b096] +```"""; + +} diff --git a/lib/standard_pages/test_abc_84f38e00_42ae_4241_9c8a_5c9e1f92b096/index.md b/lib/standard_pages/test_abc_84f38e00_42ae_4241_9c8a_5c9e1f92b096/index.md new file mode 100644 index 00000000..61a5f516 --- /dev/null +++ b/lib/standard_pages/test_abc_84f38e00_42ae_4241_9c8a_5c9e1f92b096/index.md @@ -0,0 +1,48 @@ +# 标准的详情页 + +您可以在这个界面中, 编写大多数的markdown文案, 他会在 **goCli watch** 下同步被编译成 **dart** 文件 + +您可以通过goCli创建详情页所需要的demo + +``` +goCLi createDemo +``` + +在flutter go 根文件下通过命令行输入以上命令可以进行以下操作 + +[✓] 请输入新增加的demo名称? demoName + +[✓] 请输入您的姓名(使用英文) yourName + +[✓] 请输入您的github的email地址 yourEmail + +[✓] 请输入您demo的描述 这是一个测试的标准demo + + +在完成以上操作后, 可以得到这样的输出: + + +``` +------------------ +您新增的组件信息如下 +================== +{ + name : demoName + author : yourName + email : yourEmail + desc : 这是一个测试的标准demo +} +================== +[✓] Is this the config you want ? (Y/n) y +{ + 新建的demo文件位于 : /flutter go/lib/page_demo_package/demoName_yourName_1a29aa8e_32ae_4241_9c8a_5c9e1f92b096 + demoId为 : 1a29aa8e_32ae_4241_9c8a_5c9e1f92b096 + markdown中调用方式 : [demo:1a29aa8e_32ae_4241_9c8a_5c9e1f92b096] +} + +``` +您可以在任意详情页中, 通过以下方式调用 + +``` +[demo: 1a29aa8e_32ae_4241_9c8a_5c9e1f92b096] +``` \ No newline at end of file diff --git a/lib/utils/data_utils.dart b/lib/utils/data_utils.dart index dc0d9036..6d67b865 100644 --- a/lib/utils/data_utils.dart +++ b/lib/utils/data_utils.dart @@ -109,7 +109,7 @@ class DataUtils { static Future getWidgetTreeList() async { try { var response = await NetUtils.get(Api.GET_WIDGET_TREE); - print('组件树:$response'); + print('组件树dddd:$response'); if (response != null && response['success']) { return response['data']; } else { diff --git a/lib/views/standard_demo_page/const.dart b/lib/views/standard_demo_page/const.dart deleted file mode 100644 index d874f270..00000000 --- a/lib/views/standard_demo_page/const.dart +++ /dev/null @@ -1,12 +0,0 @@ -const title = 'titie1'; -Map titleObjs = { - 'title': 'haha33' -}; -class Maps { - Map list; - getList() { - return { - "title": "1111" - }; - } -} \ No newline at end of file diff --git a/lib/views/standard_demo_page/index.dart b/lib/views/standard_demo_page/index.dart index bb1810b2..f3e5fe57 100644 --- a/lib/views/standard_demo_page/index.dart +++ b/lib/views/standard_demo_page/index.dart @@ -15,6 +15,13 @@ import '../../components/flutter_markdown/lib/flutter_markdown.dart'; import '../../standard_pages/index.dart'; import '../../page_demo_package/index.dart'; import 'package:flutter_go/routers/application.dart'; +import 'package:flutter_go/utils/net_utils.dart'; +import 'package:flutter_go/components/loading.dart'; + +const githubUrl = 'https://raw.githubusercontent.com/alibaba/flutter-go/beta/lib/standard_pages/'; +const PagesUrl = 'https://raw.githubusercontent.com/alibaba/flutter-go/beta/lib/standard_pages/.pages.json'; +const DemosUrl = 'https://raw.githubusercontent.com/alibaba/flutter-go/beta/lib/page_demo_package/.demo.json'; + // ONLINE || LOCAL ENV env = Application.env; @@ -28,25 +35,24 @@ class StandardView extends StatefulWidget { } class _StandardView extends State { - String markdownDesc = '# this is header'; - String pageTitle = "XXX"; - + String markdownDesc = ''; + String pageTitle = ''; + bool isLoading = false; String author = ''; String email = ''; StandardPages standardPage = new StandardPages(); @override void initState() { super.initState(); - this.getDetail(); + this.getPageInfo(); } - // 本地调用的获取基本信息 - Future getPagesInfo() async { - String jsonString = await DefaultAssetBundle.of(context) - .loadString('lib/standard_pages/.pages.json'); + /// 本地调用的获取文章属性的基本信息 + Future localGetPagesAttrsInfo() async { + String jsonString = await DefaultAssetBundle.of(context).loadString('lib/standard_pages/.pages.json'); List jsonList = json.decode(jsonString); - Map pageDetail = - jsonList.firstWhere((item) => item['id'] == widget.id); + Map pageDetail = jsonList.firstWhere((item) => item['id'] == widget.id); + if (pageDetail != null) { setState(() { pageTitle = pageDetail['title'] ?? '请加入title'; @@ -56,27 +62,56 @@ class _StandardView extends State { } } - String _getContentFromLocal() { + /// 从本地获取基本文章信息 + String localGetPagesMarkdown() { + String pageId = widget.id; Map pagesList = standardPage.getPages(); return pagesList[pageId]; } + Future getContentOnline() async { - Future _getContentOnline() async { String content = 'online content'; + this.setState(() { + isLoading = true; + }); - return Future(() => content); + List response = jsonDecode(await NetUtils.get(PagesUrl)); + + + + Map targetPage = response.firstWhere((page) => page['id'] == widget.id); + if (targetPage == null) { + setState(() { + isLoading = false; + }); + return Future(() => '未获取界面相当信息'); + } + setState(() { + pageTitle = targetPage['title'] ?? 'xxx'; + author = targetPage['author']; + email = targetPage['email']; + }); + + String pageName = targetPage['name'] + "_" +targetPage['author']+ "_" +targetPage['id']; + String pageContent = await NetUtils.get(githubUrl + pageName + "/index.md"); + setState(() { + isLoading = false; + }); + return Future(() => pageContent); } - - Future getDetail() async { + /// 获取当面界面的相关信息. 需要区分环境 + /// 本地环境下, 从本地获取 standard_pages的目录中互殴 + /// 线上环境. 从github的api中获取 + Future getPageInfo() async { String conent = ''; print("env:::: $env"); if (env == ENV.PRODUCTION) { - conent = await _getContentOnline(); + conent = await getContentOnline(); } else { - getPagesInfo(); - conent = _getContentFromLocal(); + conent = localGetPagesMarkdown(); + localGetPagesAttrsInfo(); } if (this.mounted) { setState(() { @@ -84,19 +119,33 @@ class _StandardView extends State { }); } return Future(() => conent); -// this.rebuild(); + } + Widget buildFootInfo() { + if (!isLoading) { + return Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('创建者: $author'), + Text('邮箱: $email'), + Text('界面id: ${widget.id}') + ], + ), + ); + } + return Container(); } Widget buildMarkdown() { - Map contentList = new StandardPages().getPages(); - if (contentList[widget.id] == null) { - contentList[widget.id] = ''; + + if (markdownDesc == null) { + return null; } return MarkdownBody( - data: contentList[widget.id], - syntaxHighlighter: new mdCopy.HighLight(), + data: markdownDesc, + syntaxHighlighter:new mdCopy.HighLight(), demoBuilder: (Map attrs) { List demo = demoObjects[attrs['id']]; if (demo == null) { @@ -109,20 +158,22 @@ class _StandardView extends State { }); } + @override Widget build(BuildContext context) { return new WidgetDemo( title: pageTitle, - codeUrl: 'elements/Form/Button/DropdownButton/demo.dart', +// codeUrl: 'elements/Form/Button/DropdownButton/demo.dart', contentList: [ + NetLoadingDialog( + loading: isLoading, + outsideDismiss: false, + ), buildMarkdown(), SizedBox(height: 30), - '创建者: $author', - '创建者: $email', - 'id: ${widget.id}', + buildFootInfo(), + SizedBox(height: 30) ], - docUrl: - 'https://docs.flutter.io/flutter/material/DropdownButton-class.html', ); } } diff --git a/lib/views/widget_page/widget_page.dart b/lib/views/widget_page/widget_page.dart index 860d1466..5df042cb 100644 --- a/lib/views/widget_page/widget_page.dart +++ b/lib/views/widget_page/widget_page.dart @@ -53,7 +53,6 @@ class SecondPageState extends State with AutomaticKeepAliveClientMix @override Widget build(BuildContext context) { super.build(context); - print("build in widget page"); return Container( color: Theme.of(context).backgroundColor, child: this.buildGrid(), diff --git a/pubspec.lock b/pubspec.lock index 7cd78d61..4bc7b1b4 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,105 +5,105 @@ packages: dependency: transitive description: name: args - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.5.2" async: dependency: transitive description: name: async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.2.0" bloc: dependency: "direct main" description: name: bloc - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.12.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.4" charcode: dependency: transitive description: name: charcode - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.2" city_pickers: dependency: "direct main" description: name: city_pickers - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.0.4" collection: dependency: transitive description: name: collection - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.14.11" cookie_jar: dependency: "direct main" description: name: cookie_jar - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.1" csslib: dependency: transitive description: name: csslib - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.16.1" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.1.2" dio: dependency: "direct main" description: name: dio - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.13" event_bus: dependency: "direct main" description: name: event_bus - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" firebase_analytics: dependency: "direct main" description: name: firebase_analytics - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0+1" firebase_core: dependency: "direct main" description: name: firebase_core - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.3.4" fluro: dependency: "direct main" description: name: fluro - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.5.1" flutter: @@ -115,28 +115,28 @@ packages: dependency: "direct main" description: name: flutter_bloc - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.11.1" flutter_downloader: dependency: "direct main" description: name: flutter_downloader - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.9" flutter_jpush: dependency: "direct main" description: name: flutter_jpush - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.0.4" flutter_spinkit: dependency: "direct main" description: name: flutter_spinkit - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.1.0" flutter_test: @@ -148,154 +148,154 @@ packages: dependency: "direct main" description: name: flutter_webview_plugin - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.3.5" fluttertoast: dependency: "direct main" description: name: fluttertoast - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.1.0" html: dependency: "direct main" description: name: html - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.14.0+2" image_picker: dependency: "direct main" description: name: image_picker - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.5.4+3" intl: dependency: "direct main" description: name: intl - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.15.7" lpinyin: dependency: transitive description: name: lpinyin - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.7" markdown: dependency: "direct main" description: name: markdown - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.3" matcher: dependency: transitive description: name: matcher - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.12.5" meta: dependency: "direct main" description: name: meta - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.6" notus: dependency: transitive description: name: notus - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.1.3" open_file: dependency: "direct main" description: name: open_file - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.3" package_info: dependency: "direct main" description: name: package_info - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.4.0+6" path: dependency: "direct main" description: name: path - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.6.2" path_provider: dependency: "direct main" description: name: path_provider - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" pedantic: dependency: transitive description: name: pedantic - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.7.0" permission_handler: dependency: "direct main" description: name: permission_handler - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.2.1+1" quill_delta: dependency: transitive description: name: quill_delta - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.0" quiver: dependency: transitive description: name: quiver - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.3" quiver_hashcode: dependency: transitive description: name: quiver_hashcode - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" rxdart: dependency: transitive description: name: rxdart - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.21.0" share: dependency: "direct main" description: name: share - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.6.2+1" shared_preferences: dependency: "direct main" description: name: shared_preferences - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.4.3" sky_engine: @@ -307,77 +307,77 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.5.5" sqflite: dependency: "direct main" description: name: sqflite - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.6+3" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.9.3" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" string_scanner: dependency: "direct main" description: name: string_scanner - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.4" synchronized: dependency: transitive description: name: synchronized - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0+1" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" test_api: dependency: transitive description: name: test_api - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.2.5" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.6" url_launcher: dependency: "direct main" description: name: url_launcher - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "5.1.2" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.8" zefyr: