fix: Unexpected Ink Splash with Material3 when navigating
This commit is contained in:
@ -45,7 +45,6 @@ class VideoCardV extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await Future.delayed(const Duration(milliseconds: 200));
|
|
||||||
String bvid = videoItem.bvid ?? IdUtils.av2bv(videoItem.aid);
|
String bvid = videoItem.bvid ?? IdUtils.av2bv(videoItem.aid);
|
||||||
Get.toNamed('/video?bvid=$bvid&cid=${videoItem.cid}',
|
Get.toNamed('/video?bvid=$bvid&cid=${videoItem.cid}',
|
||||||
arguments: {'videoItem': videoItem, 'heroTag': heroTag});
|
arguments: {'videoItem': videoItem, 'heroTag': heroTag});
|
||||||
|
|||||||
@ -47,6 +47,13 @@ class MyApp extends StatelessWidget {
|
|||||||
brightness: Brightness.light,
|
brightness: Brightness.light,
|
||||||
),
|
),
|
||||||
useMaterial3: true,
|
useMaterial3: true,
|
||||||
|
pageTransitionsTheme: const PageTransitionsTheme(
|
||||||
|
builders: <TargetPlatform, PageTransitionsBuilder>{
|
||||||
|
TargetPlatform.android: ZoomPageTransitionsBuilder(
|
||||||
|
allowEnterRouteSnapshotting: false,
|
||||||
|
),
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
darkTheme: ThemeData(
|
darkTheme: ThemeData(
|
||||||
fontFamily: 'HarmonyOS',
|
fontFamily: 'HarmonyOS',
|
||||||
|
|||||||
@ -24,7 +24,6 @@ class HistoryItem extends StatelessWidget {
|
|||||||
String heroTag = Utils.makeHeroTag(aid);
|
String heroTag = Utils.makeHeroTag(aid);
|
||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await Future.delayed(const Duration(milliseconds: 200));
|
|
||||||
if (videoItem.history.business.contains('article')) {
|
if (videoItem.history.business.contains('article')) {
|
||||||
int cid = videoItem.history.cid ??
|
int cid = videoItem.history.cid ??
|
||||||
// videoItem.history.oid ??
|
// videoItem.history.oid ??
|
||||||
|
|||||||
@ -42,7 +42,6 @@ class LiveCardV extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await Future.delayed(const Duration(milliseconds: 200));
|
|
||||||
Get.toNamed('/liveRoom?roomid=${liveItem.roomId}',
|
Get.toNamed('/liveRoom?roomid=${liveItem.roomId}',
|
||||||
arguments: {'liveItem': liveItem, 'heroTag': heroTag});
|
arguments: {'liveItem': liveItem, 'heroTag': heroTag});
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user