modified : add code view

This commit is contained in:
yifeng.yl
2019-01-14 16:15:16 +08:00
parent 2c2b7e7cd7
commit 5da3b4c3e9
8 changed files with 639 additions and 4 deletions

View File

@ -12,6 +12,10 @@ import '../widgets/index.dart';
import 'package:fluttertoast/fluttertoast.dart';
import '../event/event-bus.dart';
import '../event/event-model.dart';
import './full_screen_code_dialog.dart';
import '../routers/application.dart';
import '../routers/routers.dart';
import 'dart:core';
class WidgetDemo extends StatefulWidget {
final List<dynamic> contentList;
@ -141,7 +145,10 @@ class _WidgetDemoState extends State<WidgetDemo> {
if(value == 'doc'){
_launchURL(widget.docUrl);
}else if(value =='code'){
_launchURL(Application.github['widgetsURL'] + widget.codeUrl);
// _launchURL(Application.github['widgetsURL'] + widget.codeUrl);
String targetUrl = 'lib/widgets/${widget.codeUrl}';
Application.router.navigateTo(context, '${Routes.codeView}?filePath=${Uri.encodeComponent(targetUrl)}');
}else{
_getCollection();
}