Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-12-16 14:22:47 +08:00
parent 13818533a7
commit 0baf3fcd36
283 changed files with 803 additions and 1550 deletions

View File

@@ -0,0 +1,15 @@
import 'package:flutter/widgets.dart';
extension ImageExtension on num {
int? cacheSize(BuildContext context) {
if (this == 0) {
return null;
}
return (this * MediaQuery.devicePixelRatioOf(context)).round();
}
}
extension IntExt on int? {
int? operator +(int other) => this == null ? null : this! + other;
int? operator -(int other) => this == null ? null : this! - other;
}