feat:重构模块
This commit is contained in:
@@ -43,8 +43,8 @@ Widget buildToggleSwitch<T extends Enum>({
|
||||
totalSwitches: tabValues.length,
|
||||
labels: labels,
|
||||
activeBgColor: [colors.primary],
|
||||
activeFgColor: Colors.white,
|
||||
inactiveBgColor: colors.surfaceContainer,
|
||||
activeFgColor: colors.surface,
|
||||
inactiveBgColor: colors.surface,
|
||||
inactiveFgColor: colors.onSurface,
|
||||
cornerRadius: 12.0,
|
||||
customTextStyles: [TextStyle(fontSize: 12, fontWeight: FontWeight.w500)],
|
||||
@@ -85,10 +85,10 @@ Widget buildTag(BuildContext context, String title) {
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10, vertical: 4),
|
||||
decoration: BoxDecoration(
|
||||
color: colors.primary.withAlpha(60),
|
||||
color: colors.primary,
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: Text(title, style: TextStyle(color: colors.primary)),
|
||||
child: Text(title, style: TextStyle(color: colors.surface)),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -135,24 +135,10 @@ Widget buildInfoButton({
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
||||
elevation: 0,
|
||||
),
|
||||
child: Text(text, style: TextStyle(color: Colors.white)),
|
||||
child: Text(text),
|
||||
);
|
||||
}
|
||||
|
||||
/// 取消按钮样式
|
||||
ButtonStyle cancelButtonStyle() {
|
||||
return ButtonStyle(
|
||||
backgroundColor: WidgetStateProperty.all(Colors.grey),
|
||||
shape: WidgetStateProperty.all(
|
||||
RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Text buttonText({required String text}) {
|
||||
return Text(text, style: TextStyle(color: Colors.white));
|
||||
}
|
||||
|
||||
/// 图片错误显示
|
||||
Widget errorImageContainer(double height) {
|
||||
return Container(
|
||||
|
||||
Reference in New Issue
Block a user