reason

update tiktok background

......@@ -26,7 +26,7 @@ class UserVideo {
static List<UserVideo> fetchVideo() {
List<UserVideo> list = videoList
.map((e) => UserVideo(image: '', url: 'https://static.ybhospital.net/$e', desc: 'test_video_desc'))
.map((e) => UserVideo(image: '', url: 'https://static.ybhospital.net/$e', desc: '清晨入古寺,初日照高林。\n竹径通幽处,禅房花木深。'))
.toList();
return list;
}
......
......@@ -4,7 +4,7 @@ import 'package:one_poem/tiktok/style/style.dart';
class SelectText extends StatelessWidget {
const SelectText({
Key? key,
this.isSelect: true,
this.isSelect = true,
this.title,
}) : super(key: key);
......@@ -14,7 +14,7 @@ class SelectText extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.symmetric(vertical: 12),
padding: const EdgeInsets.symmetric(vertical: 12),
color: Colors.black.withOpacity(0),
child: Text(
title ?? '??',
......
......@@ -51,7 +51,7 @@ class _TikTokHeaderState extends State<TikTokHeader> {
padding: const EdgeInsets.all(4),
alignment: Alignment.centerLeft,
child: Icon(
Icons.search,
Icons.star,
color: Colors.white.withOpacity(0.66),
),
),
......@@ -73,7 +73,7 @@ class _TikTokHeaderState extends State<TikTokHeader> {
padding: const EdgeInsets.all(4),
alignment: Alignment.centerRight,
child: Icon(
Icons.tv,
Icons.ios_share,
color: Colors.white.withOpacity(0.66),
),
),
......
......@@ -27,15 +27,15 @@ class TikTokVideoPage extends StatelessWidget {
const TikTokVideoPage({
Key? key,
this.bottomPadding: 16,
this.bottomPadding = 16,
this.tag,
this.rightButtonColumn,
this.userInfoWidget,
this.onAddFavorite,
this.onSingleTap,
this.video,
this.aspectRatio: 9 / 16.0,
this.hidePauseIcon: false,
this.aspectRatio = 9 / 16.0,
this.hidePauseIcon = false,
}) : super(key: key);
@override
Widget build(BuildContext context) {
......@@ -170,21 +170,21 @@ class VideoUserInfo extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
const Text(
'@朱二旦的枯燥生活',
'每日一言',
style: StandardTextStyle.big,
),
Container(height: 6),
Text(
desc ?? '#原创 有钱人的生活就是这么朴实无华,且枯燥 #短视频',
desc ?? '#一言 临境',
style: StandardTextStyle.normal,
),
Container(height: 6),
Row(
children: const <Widget>[
Icon(Icons.music_note, size: 14),
// Icon(Icons.music_note, size: 14),
Expanded(
child: Text(
'朱二旦的枯燥生活创作的原声',
'宜 · 安静/看书/喝茶',
maxLines: 9,
style: StandardTextStyle.normal,
),
......
......@@ -15,7 +15,7 @@ class TikTokButtonColumn extends StatelessWidget {
this.onFavorite,
this.onComment,
this.onShare,
this.isFavorite: false,
this.isFavorite = false,
this.onAvatar,
}) : super(key: key);
......@@ -32,7 +32,7 @@ class TikTokButtonColumn extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
Tapped(
child: TikTokAvatar(),
child: const TikTokAvatar(),
onTap: onAvatar,
),
FavoriteIcon(
......@@ -97,7 +97,7 @@ class TikTokAvatar extends StatelessWidget {
Widget avatar = Container(
width: SysSize.avatar,
height: SysSize.avatar,
margin: EdgeInsets.only(bottom: 10),
margin: const EdgeInsets.only(bottom: 10),
decoration: BoxDecoration(
border: Border.all(
color: Colors.white,
......@@ -120,7 +120,7 @@ class TikTokAvatar extends StatelessWidget {
borderRadius: BorderRadius.circular(10),
color: ColorPlate.orange,
),
child: Icon(
child: const Icon(
Icons.add,
size: 16,
),
......@@ -128,7 +128,7 @@ class TikTokAvatar extends StatelessWidget {
return Container(
width: SysSize.avatar,
height: 66,
margin: EdgeInsets.only(bottom: 6),
margin: const EdgeInsets.only(bottom: 6),
child: Stack(
alignment: Alignment.bottomCenter,
children: <Widget>[avatar, addButton],
......@@ -183,7 +183,7 @@ class _IconButton extends StatelessWidget {
shadows: [
Shadow(
color: Colors.black.withOpacity(0.15),
offset: Offset(0, 1),
offset: const Offset(0, 1),
blurRadius: 1,
),
],
......@@ -197,7 +197,7 @@ class _IconButton extends StatelessWidget {
Container(height: 2),
Text(
text ?? '??',
style: TextStyle(
style: const TextStyle(
fontWeight: FontWeight.normal,
fontSize: SysSize.small,
color: ColorPlate.white,
......@@ -206,7 +206,7 @@ class _IconButton extends StatelessWidget {
],
);
return Container(
padding: EdgeInsets.symmetric(vertical: 10),
padding: const EdgeInsets.symmetric(vertical: 10),
child: DefaultTextStyle(
child: body,
style: shadowStyle,
......
......@@ -23,7 +23,7 @@ class TikTokVideoGesture extends StatefulWidget {
}
class _TikTokVideoGestureState extends State<TikTokVideoGesture> {
GlobalKey _key = GlobalKey();
final GlobalKey _key = GlobalKey();
// 内部转换坐标点
Offset _p(Offset p) {
......@@ -57,7 +57,6 @@ class _TikTokVideoGestureState extends State<TikTokVideoGesture> {
onTapDown: (detail) {
setState(() {
if (canAddFavorite) {
print('添加爱心,当前爱心数量:${icons.length}');
icons.add(_p(detail.globalPosition));
widget.onAddFavorite?.call();
justAddFavorite = true;
......@@ -79,7 +78,7 @@ class _TikTokVideoGestureState extends State<TikTokVideoGesture> {
canAddFavorite = true;
},
onTapCancel: () {
print('onTapCancel');
//
},
child: Stack(
children: <Widget>[
......@@ -100,7 +99,7 @@ class TikTokFavoriteAnimationIcon extends StatefulWidget {
Key? key,
this.onAnimationComplete,
this.position,
this.size: 100,
this.size = 100,
}) : super(key: key);
@override
......@@ -119,7 +118,6 @@ class _TikTokFavoriteAnimationIconState
@override
void didChangeDependencies() {
print('didChangeDependencies');
super.didChangeDependencies();
}
......@@ -128,7 +126,7 @@ class _TikTokFavoriteAnimationIconState
_animationController = AnimationController(
lowerBound: 0,
upperBound: 1,
duration: Duration(milliseconds: 1600),
duration: const Duration(milliseconds: 1600),
vsync: this,
);
......@@ -183,8 +181,8 @@ class _TikTokFavoriteAnimationIconState
child: content,
blendMode: BlendMode.srcATop,
shaderCallback: (Rect bounds) => RadialGradient(
center: Alignment.topLeft.add(Alignment(0.66, 0.66)),
colors: [
center: Alignment.topLeft.add(const Alignment(0.66, 0.66)),
colors: const [
Color(0xffEF6F6F),
Color(0xffF03E3E),
],
......