reason

fix style

...@@ -29,7 +29,7 @@ class PoemDetailPage extends StatefulWidget { ...@@ -29,7 +29,7 @@ class PoemDetailPage extends StatefulWidget {
29 }) : super(key: key); 29 }) : super(key: key);
30 30
31 final int poemId; 31 final int poemId;
32 - final int poemPanelHeight; 32 + final double poemPanelHeight;
33 final Function? onPop; 33 final Function? onPop;
34 34
35 @override 35 @override
......
...@@ -15,6 +15,8 @@ import 'package:video_player/video_player.dart'; ...@@ -15,6 +15,8 @@ import 'package:video_player/video_player.dart';
15 15
16 import 'poem_detail.dart'; 16 import 'poem_detail.dart';
17 17
18 +import 'package:one_poem/extension/int_extension.dart';
19 +
18 class PoemPage extends StatefulWidget { 20 class PoemPage extends StatefulWidget {
19 const PoemPage({Key? key}) : super(key: key); 21 const PoemPage({Key? key}) : super(key: key);
20 22
...@@ -97,7 +99,7 @@ class _PoemPageState extends State<PoemPage> with WidgetsBindingObserver { ...@@ -97,7 +99,7 @@ class _PoemPageState extends State<PoemPage> with WidgetsBindingObserver {
97 tkController.animateToMiddle(); 99 tkController.animateToMiddle();
98 }, 100 },
99 poemId: 1, 101 poemId: 1,
100 - poemPanelHeight: 60, 102 + poemPanelHeight: 60.px,
101 ); 103 );
102 var searchPage = SearchPage( 104 var searchPage = SearchPage(
103 onPop: tkController.animateToMiddle, 105 onPop: tkController.animateToMiddle,
...@@ -163,7 +165,7 @@ class _PoemPageState extends State<PoemPage> with WidgetsBindingObserver { ...@@ -163,7 +165,7 @@ class _PoemPageState extends State<PoemPage> with WidgetsBindingObserver {
163 aspectRatio: 9 / 16.0, 165 aspectRatio: 9 / 16.0,
164 key: Key(data.url + '$i'), 166 key: Key(data.url + '$i'),
165 tag: data.url, 167 tag: data.url,
166 - bottomPadding: hasBottomPadding ? 16.0 : 16.0, 168 + bottomPadding: hasBottomPadding ? 16.px : 16.px,
167 onSingleTap: () async { 169 onSingleTap: () async {
168 if (player.controller.value.isPlaying) { 170 if (player.controller.value.isPlaying) {
169 await player.pause(); 171 await player.pause();
......
...@@ -13,7 +13,7 @@ class PoemUserAudio extends StatelessWidget { ...@@ -13,7 +13,7 @@ class PoemUserAudio extends StatelessWidget {
13 13
14 final List<Map<String, String>>? audio; 14 final List<Map<String, String>>? audio;
15 final String? desc; 15 final String? desc;
16 - final int poemPanelHeight; 16 + final double poemPanelHeight;
17 @override 17 @override
18 Widget build(BuildContext context) { 18 Widget build(BuildContext context) {
19 return Container( 19 return Container(
......
...@@ -3,6 +3,8 @@ import 'dart:ui'; ...@@ -3,6 +3,8 @@ import 'dart:ui';
3 import 'package:flutter/material.dart'; 3 import 'package:flutter/material.dart';
4 import 'package:one_poem/res/resources.dart'; 4 import 'package:one_poem/res/resources.dart';
5 5
6 +import 'package:one_poem/extension/int_extension.dart';
7 +
6 class TikTokTopInfoColumn extends StatelessWidget { 8 class TikTokTopInfoColumn extends StatelessWidget {
7 final double? bottomPadding; 9 final double? bottomPadding;
8 final String? info; 10 final String? info;
...@@ -16,8 +18,8 @@ class TikTokTopInfoColumn extends StatelessWidget { ...@@ -16,8 +18,8 @@ class TikTokTopInfoColumn extends StatelessWidget {
16 Widget build(BuildContext context) { 18 Widget build(BuildContext context) {
17 return SafeArea( 19 return SafeArea(
18 child: Container( 20 child: Container(
19 - margin: const EdgeInsets.symmetric(vertical: 40.0, horizontal: 25.0), 21 + margin: EdgeInsets.symmetric(vertical: 40.px, horizontal: 25.px),
20 - height: 90.0, 22 + height: 92.px,
21 width: double.infinity, 23 width: double.infinity,
22 decoration: BoxDecoration( 24 decoration: BoxDecoration(
23 color: Colors.grey.shade200.withOpacity(0.1), 25 color: Colors.grey.shade200.withOpacity(0.1),
...@@ -36,15 +38,15 @@ class TikTokTopInfoColumn extends StatelessWidget { ...@@ -36,15 +38,15 @@ class TikTokTopInfoColumn extends StatelessWidget {
36 color: Colors.grey.shade200.withOpacity(0.1), 38 color: Colors.grey.shade200.withOpacity(0.1),
37 ), 39 ),
38 child: Padding( 40 child: Padding(
39 - padding: const EdgeInsets.all(5.0), 41 + padding: EdgeInsets.all(5.px),
40 child: Column( 42 child: Column(
41 children: [ 43 children: [
42 - const SizedBox( 44 + SizedBox(
43 width: double.infinity, 45 width: double.infinity,
44 child: Text( 46 child: Text(
45 '辛丑牛年 庚子月 乙卯日 辰时', 47 '辛丑牛年 庚子月 乙卯日 辰时',
46 style: TextStyle( 48 style: TextStyle(
47 - fontSize: 16.0, 49 + fontSize: 16.px,
48 color: Colors.white, 50 color: Colors.white,
49 ), 51 ),
50 ), 52 ),
...@@ -53,18 +55,18 @@ class TikTokTopInfoColumn extends StatelessWidget { ...@@ -53,18 +55,18 @@ class TikTokTopInfoColumn extends StatelessWidget {
53 SizedBox( 55 SizedBox(
54 width: double.infinity, 56 width: double.infinity,
55 child: Stack( 57 child: Stack(
56 - children: const [ 58 + children: [
57 Text( 59 Text(
58 '早安', 60 '早安',
59 style: TextStyle( 61 style: TextStyle(
60 - fontSize: 48.0, 62 + fontSize: 48.px,
61 color: Colors.white, 63 color: Colors.white,
62 fontFamily: "ZhiMangXing", 64 fontFamily: "ZhiMangXing",
63 ), 65 ),
64 ), 66 ),
65 Positioned( 67 Positioned(
66 - right: 10.0, 68 + right: 10.px,
67 - child: Text( 69 + child: const Text(
68 "02日\n2022年01月", 70 "02日\n2022年01月",
69 style: TextStyle(color: Colors.white), 71 style: TextStyle(color: Colors.white),
70 ), 72 ),
......
...@@ -29,7 +29,7 @@ class TikTokVidePoem extends StatelessWidget { ...@@ -29,7 +29,7 @@ class TikTokVidePoem extends StatelessWidget {
29 border: Border.all(color: Colors.grey, width: 0.1), // 边色与边宽度 29 border: Border.all(color: Colors.grey, width: 0.1), // 边色与边宽度
30 // borderRadius: BorderRadius.circular(2.0), 30 // borderRadius: BorderRadius.circular(2.0),
31 ), 31 ),
32 - height: 180.px, 32 + height: 190.px,
33 width: double.infinity, 33 width: double.infinity,
34 margin: EdgeInsets.symmetric(vertical: 10.px, horizontal: 25.px), 34 margin: EdgeInsets.symmetric(vertical: 10.px, horizontal: 25.px),
35 child: InkWell( 35 child: InkWell(
......