Browse Source

safety

master
fmk 3 years ago
parent
commit
bb4544afa9
  1. 7
      assets/svg/svg_login.svg
  2. 9
      lib/integral/intergra_view/integral_task.dart
  3. 9
      lib/web/web_page.dart
  4. 2
      pubspec.lock
  5. 2
      pubspec.yaml

7
assets/svg/svg_login.svg

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<g stroke="none" stroke-width="1" fill="#39B54A" fill-rule="nonzero" transform="translate(2.000000, 2.000000)">
<path d="M17.15,19.725 L2.85,19.725 C1.975,19.725 1.25,19.05 1.25,18.225 L1.25,16.1 C1.25,13.7 3.4,11.775 6.025,11.775 L13.975,11.775 C16.6,11.775 18.75,13.725 18.75,16.1 L18.75,18.225 C18.75,19.05 18.025,19.725 17.15,19.725 L17.15,19.725 Z M10,10.225 C7.25,10.225 5.025,8 5.025,5.25 C5.025,2.5 7.25,0.275 10,0.275 C12.75,0.275 14.975,2.5 14.975,5.25 C14.975,8 12.725,10.2 10,10.225 Z" id="形状"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 733 B

9
lib/integral/intergra_view/integral_task.dart

@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:flutter_swiper/flutter_swiper.dart'; import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/sign_info.dart'; import 'package:huixiang/retrofit/data/sign_info.dart';
@ -130,7 +131,13 @@ class _IntegralTask extends State<IntegralTask> {
alignment: Alignment.center, alignment: Alignment.center,
child: Row( child: Row(
children: [ children: [
Image.asset( (task.type == "bill_type_point_login")
? SvgPicture.asset(
"assets/svg/svg_login.svg",
width: 24.w,
height: 24.h,
)
: Image.asset(
taskImg(task.type), taskImg(task.type),
width: 24.w, width: 24.w,
height: 24.h, height: 24.h,

9
lib/web/web_page.dart

@ -287,12 +287,14 @@ class _WebPage extends State<WebPage> with WidgetsBindingObserver {
); );
} }
///
_delCommentTips() { _delCommentTips() {
SmartDialog.show(widget: Tips(() { SmartDialog.show(widget: Tips(() {
delComment(); delComment();
})); }));
} }
///
delComment() async { delComment() async {
BaseData baseData = await apiService.delComment( BaseData baseData = await apiService.delComment(
widget.arguments["activityId"] ?? widget.arguments["articleId"]); widget.arguments["activityId"] ?? widget.arguments["articleId"]);
@ -301,23 +303,22 @@ class _WebPage extends State<WebPage> with WidgetsBindingObserver {
} }
} }
///
_reply(memberComment) { _reply(memberComment) {
FocusScope.of(context).requestFocus(commentFocus); FocusScope.of(context).requestFocus(commentFocus);
parenId = memberComment.id; parenId = memberComment.id;
hintText = S.of(context).huifu_("${memberComment.username}"); hintText = S.of(context).huifu_("${memberComment.username}");
} }
///
_toComment() { _toComment() {
if (commentKey.currentContext == null) return; if (commentKey.currentContext == null) return;
RenderBox firstRenderBox = commentKey.currentContext.findRenderObject(); RenderBox firstRenderBox = commentKey.currentContext.findRenderObject();
Offset first = firstRenderBox.localToGlobal(Offset.zero); Offset first = firstRenderBox.localToGlobal(Offset.zero);
scrollController.animateTo( scrollController.animateTo(first.dy + scrollController.offset -
first.dy +
scrollController.offset -
(kToolbarHeight + MediaQuery.of(context).padding.top), (kToolbarHeight + MediaQuery.of(context).padding.top),
duration: Duration(milliseconds: 1000), duration: Duration(milliseconds: 1000),
curve: Curves.easeIn); curve: Curves.easeIn);
} }
} }

2
pubspec.lock

@ -397,7 +397,7 @@ packages:
source: hosted source: hosted
version: "0.4.0" version: "0.4.0"
flutter_svg: flutter_svg:
dependency: transitive dependency: "direct main"
description: description:
name: flutter_svg name: flutter_svg
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"

2
pubspec.yaml

@ -80,6 +80,7 @@ dependencies:
rive: ^0.6.8 rive: ^0.6.8
flare_flutter: ^3.0.2 flare_flutter: ^3.0.2
flutter_svg: ^0.20.0-nullsafety.3
font_awesome_flutter: ^9.1.0 font_awesome_flutter: ^9.1.0
# flutter_bugly: ^0.3.3 # flutter_bugly: ^0.3.3
@ -97,6 +98,7 @@ flutter:
- assets/image/ - assets/image/
- assets/map_style/ - assets/map_style/
- assets/riv/ - assets/riv/
- assets/svg/
# - assets/fonts/ # - assets/fonts/
# fonts: # fonts:

Loading…
Cancel
Save