mod: snackBarTheme darkTheme
This commit is contained in:
@ -126,6 +126,12 @@ class MyApp extends StatelessWidget {
|
|||||||
? lightColorScheme
|
? lightColorScheme
|
||||||
: darkColorScheme,
|
: darkColorScheme,
|
||||||
useMaterial3: true,
|
useMaterial3: true,
|
||||||
|
snackBarTheme: const SnackBarThemeData(
|
||||||
|
actionTextColor: Colors.white,
|
||||||
|
backgroundColor: Colors.black,
|
||||||
|
contentTextStyle: TextStyle(color: Colors.white),
|
||||||
|
elevation: 20,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
localizationsDelegates: const [
|
localizationsDelegates: const [
|
||||||
GlobalCupertinoLocalizations.delegate,
|
GlobalCupertinoLocalizations.delegate,
|
||||||
|
|||||||
@ -411,8 +411,12 @@ class VideoIntroController extends GetxController {
|
|||||||
content: Text(currentStatus == 0 ? '关注UP主?' : '取消关注UP主?'),
|
content: Text(currentStatus == 0 ? '关注UP主?' : '取消关注UP主?'),
|
||||||
actions: [
|
actions: [
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () => SmartDialog.dismiss(),
|
onPressed: () => SmartDialog.dismiss(),
|
||||||
child: const Text('点错了')),
|
child: Text(
|
||||||
|
'点错了',
|
||||||
|
style: TextStyle(color: Theme.of(context).colorScheme.outline),
|
||||||
|
),
|
||||||
|
),
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
var result = await VideoHttp.relationMod(
|
var result = await VideoHttp.relationMod(
|
||||||
@ -438,15 +442,8 @@ class VideoIntroController extends GetxController {
|
|||||||
if (context.mounted) {
|
if (context.mounted) {
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text(
|
content: const Text('关注成功'),
|
||||||
'关注成功',
|
|
||||||
style: TextStyle(
|
|
||||||
color:
|
|
||||||
Theme.of(context).colorScheme.onBackground),
|
|
||||||
),
|
|
||||||
duration: const Duration(seconds: 2),
|
duration: const Duration(seconds: 2),
|
||||||
backgroundColor:
|
|
||||||
Theme.of(context).colorScheme.background,
|
|
||||||
action: SnackBarAction(
|
action: SnackBarAction(
|
||||||
label: '设置分组',
|
label: '设置分组',
|
||||||
onPressed: setFollowGroup,
|
onPressed: setFollowGroup,
|
||||||
|
|||||||
Reference in New Issue
Block a user