624214d0
liangchengyou
feat:看题选字/选图UI和部分逻辑
|
1
2
|
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
07b173c9
吴启风
feat:练习页上方进度信息改成进...
|
3
|
import 'package:percent_indicator/linear_percent_indicator.dart';
|
624214d0
liangchengyou
feat:看题选字/选图UI和部分逻辑
|
4
5
6
|
import 'package:wow_english/common/extension/string_extension.dart';
class PracticeHeaderWidget extends StatelessWidget {
|
07b173c9
吴启风
feat:练习页上方进度信息改成进...
|
7
8
9
10
11
12
|
const PracticeHeaderWidget(
{super.key,
required this.onTap,
this.color,
required this.total,
this.progress = 0});
|
624214d0
liangchengyou
feat:看题选字/选图UI和部分逻辑
|
13
14
15
|
final Function() onTap;
|
07b173c9
吴启风
feat:练习页上方进度信息改成进...
|
16
17
18
19
20
21
22
23
|
///进度条颜色(阶段颜色)
final Color? color;
///进度条总长度
final int total;
///进度条当前长度
final int progress;
|
624214d0
liangchengyou
feat:看题选字/选图UI和部分逻辑
|
24
25
26
27
|
@override
Widget build(BuildContext context) {
return Container(
|
82c8633c
biao
音频添加 页面优化
|
28
|
color: Colors.transparent,
|
f29687b2
biao
修复iOS偶现按钮消失问题,练习页...
|
29
|
height: kToolbarHeight + 3.h,
|
5b923179
吴启风
feat:导航栏优化
|
30
|
child: AppBar(
|
82c8633c
biao
音频添加 页面优化
|
31
|
backgroundColor: Colors.transparent,
|
f29687b2
biao
修复iOS偶现按钮消失问题,练习页...
|
32
33
|
leading: GestureDetector(
child: Image.asset(
|
5b923179
吴启风
feat:导航栏优化
|
34
|
'back_around'.assetPng,
|
f29687b2
biao
修复iOS偶现按钮消失问题,练习页...
|
35
36
|
width: 40.w,
height: 40.h,
|
5b923179
吴启风
feat:导航栏优化
|
37
|
),
|
f29687b2
biao
修复iOS偶现按钮消失问题,练习页...
|
38
|
onTap: () => {onTap()},
|
624214d0
liangchengyou
feat:看题选字/选图UI和部分逻辑
|
39
|
),
|
5b923179
吴启风
feat:导航栏优化
|
40
41
|
centerTitle: true,
title: Container(
|
07b173c9
吴启风
feat:练习页上方进度信息改成进...
|
42
43
|
height: 10.h,
width: 150.w, // 容器宽度
|
f29687b2
biao
修复iOS偶现按钮消失问题,练习页...
|
44
45
|
// padding: EdgeInsets.symmetric(horizontal: 27.w, vertical: 10.h),
alignment: Alignment.center,
|
07b173c9
吴启风
feat:练习页上方进度信息改成进...
|
46
47
48
49
50
51
52
53
54
|
child: LinearPercentIndicator(
animation: true,
lineHeight: 10.h,
animationDuration: 250,
animateFromLastPercent: true,
percent: total > 0 ? progress / total : 0,
// center: Text('$progress/$total}'),
barRadius: const Radius.circular(5),
progressColor: color,
|
f29687b2
biao
修复iOS偶现按钮消失问题,练习页...
|
55
56
|
),
),
|
5b923179
吴启风
feat:导航栏优化
|
57
|
));
|
624214d0
liangchengyou
feat:看题选字/选图UI和部分逻辑
|
58
|
}
|
5b923179
吴启风
feat:导航栏优化
|
59
|
}
|