fix: Unexpected Ink Splash with Material3 when navigating

This commit is contained in:
guozhigq
2023-08-05 21:32:23 +08:00
parent 4e9f28b60d
commit 6b0adbc3e1
4 changed files with 7 additions and 3 deletions

View File

@ -45,7 +45,6 @@ class VideoCardV extends StatelessWidget {
},
child: InkWell(
onTap: () async {
await Future.delayed(const Duration(milliseconds: 200));
String bvid = videoItem.bvid ?? IdUtils.av2bv(videoItem.aid);
Get.toNamed('/video?bvid=$bvid&cid=${videoItem.cid}',
arguments: {'videoItem': videoItem, 'heroTag': heroTag});

View File

@ -47,6 +47,13 @@ class MyApp extends StatelessWidget {
brightness: Brightness.light,
),
useMaterial3: true,
pageTransitionsTheme: const PageTransitionsTheme(
builders: <TargetPlatform, PageTransitionsBuilder>{
TargetPlatform.android: ZoomPageTransitionsBuilder(
allowEnterRouteSnapshotting: false,
),
},
),
),
darkTheme: ThemeData(
fontFamily: 'HarmonyOS',

View File

@ -24,7 +24,6 @@ class HistoryItem extends StatelessWidget {
String heroTag = Utils.makeHeroTag(aid);
return InkWell(
onTap: () async {
await Future.delayed(const Duration(milliseconds: 200));
if (videoItem.history.business.contains('article')) {
int cid = videoItem.history.cid ??
// videoItem.history.oid ??

View File

@ -42,7 +42,6 @@ class LiveCardV extends StatelessWidget {
},
child: InkWell(
onTap: () async {
await Future.delayed(const Duration(milliseconds: 200));
Get.toNamed('/liveRoom?roomid=${liveItem.roomId}',
arguments: {'liveItem': liveItem, 'heroTag': heroTag});
},