Browse Source

更改

master
w-R 3 years ago
parent
commit
afec80d208
  1. 7
      lib/web/web_page.dart
  2. 27
      lib/web/web_view/comment_list.dart
  3. 1
      lib/web/web_view/web_content.dart
  4. 9
      lib/web/web_view/web_header.dart
  5. 10
      pubspec.lock

7
lib/web/web_page.dart

@ -43,9 +43,9 @@ class _WebPage extends State<WebPage> with WidgetsBindingObserver {
String hintText = S.current.liuxianinjingcaidepinglunba;
var commentFocus = FocusNode();
String parenId = "0";
Activity activity;
Article article;
final double fontSize = 16.sp;
final GlobalKey commentKey = GlobalKey();
final GlobalKey inputKey = GlobalKey();
final ScrollController scrollController = ScrollController();
@ -226,7 +226,7 @@ class _WebPage extends State<WebPage> with WidgetsBindingObserver {
: article != null
? article.mainTitle
: "",
titleSize: 18.sp,
titleSize:fontSize,
titleColor: Colors.black,
),
body: Container(
@ -246,7 +246,7 @@ class _WebPage extends State<WebPage> with WidgetsBindingObserver {
child: Column(
children: [
///
WebHeader(widget.arguments, activity, article),
WebHeader(widget.arguments, activity, article,16),
///
WebContent(activity, article),
@ -260,6 +260,7 @@ class _WebPage extends State<WebPage> with WidgetsBindingObserver {
isKeyBoardShow,
_reply,
_delCommentTips,
12
),
],
),

27
lib/web/web_view/comment_list.dart

@ -22,6 +22,7 @@ class CommentList extends StatefulWidget {
final bool isKeyBoardShow;
final Function reply;
final Function delCommentTips;
final double fontSize;
CommentList(
Key key,
@ -31,6 +32,7 @@ class CommentList extends StatefulWidget {
this.isKeyBoardShow,
this.reply,
this.delCommentTips,
this.fontSize
) : super(key: key);
@override
@ -100,7 +102,7 @@ class _CommentList extends State<CommentList> {
Text(
S.of(context).pinglun_(commentTotal.toString()),
style: TextStyle(
fontSize: 16.sp,
fontSize:widget.fontSize+4,
fontWeight: FontWeight.bold,
color: Color(0xff1A1A1A),
),
@ -112,7 +114,7 @@ class _CommentList extends State<CommentList> {
S.of(context).xihuan_(
"${widget.article?.likes ?? widget.activity?.likes ?? "0"}"),
style: TextStyle(
fontSize: 16.sp,
fontSize:widget.fontSize+4,
fontWeight: FontWeight.bold,
color: Color(0xff1A1A1A),
),
@ -158,7 +160,7 @@ class _CommentList extends State<CommentList> {
child: Text(
S.of(context).yixiansquanbupinglun,
style: TextStyle(
fontSize: 14.sp,
fontSize:widget.fontSize+2,
color: Color(0xff353535),
),
),
@ -171,7 +173,7 @@ class _CommentList extends State<CommentList> {
child: Text(
S.of(context).zanwupinglun,
style: TextStyle(
fontSize: 14.sp,
fontSize:widget.fontSize+2,
fontWeight: FontWeight.bold,
color: Color(0xFFA0A0A0),
),
@ -276,7 +278,7 @@ class _CommentList extends State<CommentList> {
),
Expanded(
child: Container(
height: 60.h,
// height: 60.h,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start,
@ -288,7 +290,7 @@ class _CommentList extends State<CommentList> {
text: memberList.username,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 14.sp,
fontSize:widget.fontSize+2,
color: Colors.black,
),
),
@ -296,12 +298,15 @@ class _CommentList extends State<CommentList> {
),
textDirection: TextDirection.ltr,
),
SizedBox(
height: 3.h,
),
Text(
memberList.createTime,
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 12.sp,
fontSize:widget.fontSize,
color: Color(0xff808080),
),
),
@ -352,7 +357,7 @@ class _CommentList extends State<CommentList> {
text,
style: TextStyle(
color: Color(0xFF1A1A1A),
fontSize: 12.sp,
fontSize:widget.fontSize,
),
);
},
@ -374,7 +379,7 @@ class _CommentList extends State<CommentList> {
child: Text(
memberList.content,
style: TextStyle(
fontSize: 14.sp,
fontSize:widget.fontSize+2,
color: Color(0xff1A1A1A),
),
),
@ -399,7 +404,7 @@ class _CommentList extends State<CommentList> {
Text(
"${memberList.parentUserName}:" ?? "",
style: TextStyle(
fontSize: 12.sp,
fontSize: widget.fontSize,
color: Color(0xff808080),
),
),
@ -408,7 +413,7 @@ class _CommentList extends State<CommentList> {
child: Text(
memberList.parentContent ?? "",
style: TextStyle(
fontSize: 12.sp,
fontSize:widget.fontSize,
color: Color(0xff808080),
),
),

1
lib/web/web_view/web_content.dart

@ -27,6 +27,7 @@ class WebContent extends StatefulWidget {
class _WebContent extends State<WebContent> {
@override
Widget build(BuildContext context) {
return Html(

9
lib/web/web_view/web_header.dart

@ -9,8 +9,9 @@ class WebHeader extends StatefulWidget {
final Map arguments;
final Activity activity;
final Article article;
final double fontSize;
WebHeader(this.arguments, this.activity, this.article);
WebHeader(this.arguments, this.activity, this.article,this.fontSize);
@override
State<StatefulWidget> createState() {
@ -35,7 +36,7 @@ class _WebHeader extends State<WebHeader> {
? widget.article.mainTitle
: "",
style: TextStyle(
fontSize: 16.sp,
fontSize: widget.fontSize,
fontWeight: FontWeight.bold,
color: Color(0xFF353535),
),
@ -50,7 +51,7 @@ class _WebHeader extends State<WebHeader> {
"${widget.activity != null ? (widget.activity.storeName ?? "") : (widget.article != null && widget.article.author != null) ? (widget.article.author.name ?? "") : ""}",
style: TextStyle(
fontWeight: FontWeight.normal,
fontSize: 14.sp,
fontSize:widget.fontSize-2,
color: Colors.blue,
),
),
@ -83,7 +84,7 @@ class _WebHeader extends State<WebHeader> {
: "",
style: TextStyle(
fontWeight: FontWeight.normal,
fontSize: 12.sp,
fontSize: widget.fontSize-4,
color: Colors.grey,
),
),

10
pubspec.lock

@ -28,7 +28,7 @@ packages:
name: args
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.2.0"
version: "2.3.0"
async:
dependency: transitive
description:
@ -433,7 +433,7 @@ packages:
name: fluwx
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.6.1+1"
version: "3.6.1+2"
font_awesome_flutter:
dependency: "direct main"
description:
@ -580,7 +580,7 @@ packages:
name: logging
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.1"
version: "1.0.2"
matcher:
dependency: transitive
description:
@ -650,7 +650,7 @@ packages:
name: path_provider_linux
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.2"
version: "2.1.0"
path_provider_platform_interface:
dependency: transitive
description:
@ -734,7 +734,7 @@ packages:
name: pub_semver
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.0"
version: "2.1.0"
pubspec_parse:
dependency: transitive
description:

Loading…
Cancel
Save