mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-05-20 22:36:34 +08:00
modified : add code view
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user