From 52b8cbcd4806250e76f175cf1613cfb068a3ffd3 Mon Sep 17 00:00:00 2001 From: 21pages Date: Thu, 29 Jun 2023 10:02:19 +0800 Subject: [PATCH] mobile material effect Signed-off-by: 21pages --- flutter/lib/common.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flutter/lib/common.dart b/flutter/lib/common.dart index e4d8416d1..67091db7a 100644 --- a/flutter/lib/common.dart +++ b/flutter/lib/common.dart @@ -288,8 +288,8 @@ class MyTheme { tabBarTheme: const TabBarTheme( labelColor: Colors.black87, ), - splashColor: Colors.transparent, - highlightColor: Colors.transparent, + splashColor: isDesktop ? Colors.transparent : null, + highlightColor: isDesktop ? Colors.transparent : null, splashFactory: isDesktop ? NoSplash.splashFactory : null, textButtonTheme: isDesktop ? TextButtonThemeData( @@ -377,8 +377,8 @@ class MyTheme { scrollbarTheme: ScrollbarThemeData( thumbColor: MaterialStateProperty.all(Colors.grey[500]), ), - splashColor: Colors.transparent, - highlightColor: Colors.transparent, + splashColor: isDesktop ? Colors.transparent : null, + highlightColor: isDesktop ? Colors.transparent : null, splashFactory: isDesktop ? NoSplash.splashFactory : null, textButtonTheme: isDesktop ? TextButtonThemeData(