mod: 自定义toast样式、详情页样式修改
This commit is contained in:
23
lib/common/widgets/custom_toast.dart
Normal file
23
lib/common/widgets/custom_toast.dart
Normal file
@ -0,0 +1,23 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CustomToast extends StatelessWidget {
|
||||
final String msg;
|
||||
const CustomToast({Key? key, required this.msg}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(bottom: MediaQuery.of(context).padding.bottom),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 17, vertical: 10),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.primaryContainer.withOpacity(0.8),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
),
|
||||
child: Text(msg,
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.labelMedium!
|
||||
.copyWith(color: Theme.of(context).colorScheme.primary)),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -24,7 +24,7 @@ class StatDanMu extends StatelessWidget {
|
||||
size: 14,
|
||||
color: color,
|
||||
),
|
||||
const SizedBox(width: 3),
|
||||
const SizedBox(width: 2),
|
||||
Text(
|
||||
Utils.numFormat(danmu!),
|
||||
style: TextStyle(
|
||||
|
||||
@ -24,7 +24,7 @@ class StatView extends StatelessWidget {
|
||||
size: 13,
|
||||
color: color,
|
||||
),
|
||||
const SizedBox(width: 3),
|
||||
const SizedBox(width: 2),
|
||||
Text(
|
||||
Utils.numFormat(view!),
|
||||
style: TextStyle(
|
||||
|
||||
Reference in New Issue
Block a user