Skip to content

Commit 06c3eef

Browse files
committed
fix: deprecation
1 parent 439747f commit 06c3eef

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

lib/helpers/hover.dart

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919

2020
import 'package:flutter/material.dart';
21+
import 'package:vector_math/vector_math_64.dart' as vm;
2122

2223
class Hover extends StatefulWidget {
2324
final Widget Function(bool isHovered) builder;
@@ -38,7 +39,13 @@ class HoverState extends State<Hover> {
3839
@override
3940
Widget build(BuildContext context) {
4041
final hovered = Matrix4.identity()
41-
..translateByDouble(0, widget.isRaceHubSession ? 0 : -10, 0, 0);
42+
..translateByVector3(
43+
vm.Vector3(
44+
0,
45+
widget.isRaceHubSession ? 0 : -10,
46+
0,
47+
),
48+
);
4249
final transform = isHovered ? hovered : Matrix4.identity();
4350

4451
return MouseRegion(

lib/helpers/news.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,8 @@ class NewsItem extends StatelessWidget {
393393
),
394394
child: CachedNetworkImage(
395395
imageUrl: imageUrl,
396+
disablePlaceholderOnCacheHit:
397+
false,
396398
placeholder: (context, url) =>
397399
SizedBox(
398400
height: (width > 500)
@@ -407,7 +409,7 @@ class NewsItem extends StatelessWidget {
407409
replaceImage: true,
408410
fullBorderRadius: false,
409411
height: (width > 500)
410-
? null
412+
? 500
411413
: (showSmallDescription ??
412414
false)
413415
? height /
@@ -443,7 +445,7 @@ class NewsItem extends StatelessWidget {
443445
const Duration(days: 5),
444446
),
445447
memCacheHeight: (width > 500)
446-
? 600
448+
? null
447449
: ((showSmallDescription ??
448450
false)
449451
? height / (16 / 9)

0 commit comments

Comments
 (0)