案例优化

This commit is contained in:
toly
2022-03-26 18:10:17 +08:00
parent aa2f392419
commit 36b5adbd7b
257 changed files with 1491 additions and 1400 deletions

View File

@@ -2,12 +2,11 @@
/// create by 张风捷特烈 on 2020-04-15
/// contact me by email 1981462002@qq.com
/// 说明:
import 'package:flutter/material.dart';
import 'language/dart_languge.dart';
import 'high_light_code.dart';
import 'highlighter_style.dart';
import 'language/dart_languge.dart';
class CodeWidget extends StatelessWidget {
CodeWidget({Key? key, required this.code,required this.style, this.fontSize = 13,this.fontFamily})
@@ -21,10 +20,7 @@ class CodeWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
Widget body;
if (code == null) {
return Container();
} else {
Widget _codeWidget;
Widget _codeWidget;
try {
_codeWidget = RichText(
text: TextSpan(
@@ -49,7 +45,6 @@ class CodeWidget extends StatelessWidget {
borderRadius: BorderRadius.all(Radius.circular(5.0))),
),
);
}
return body;
}
}