mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-27 13:55:54 +08:00
@@ -8,7 +8,8 @@ import 'package:flutter/rendering.dart';
|
||||
class Grid {
|
||||
static double smallCardWidth = GStorage.smallCardWidth;
|
||||
|
||||
static SliverGridDelegateWithExtentAndRatio videoCardHDelegate(context,
|
||||
static SliverGridDelegateWithExtentAndRatio videoCardHDelegate(
|
||||
BuildContext context,
|
||||
{double minHeight = 90}) =>
|
||||
SliverGridDelegateWithExtentAndRatio(
|
||||
mainAxisSpacing: 2,
|
||||
|
||||
@@ -94,24 +94,22 @@ class Utils {
|
||||
return absolutePaths.join(':');
|
||||
}
|
||||
|
||||
static void showCopyTextDialog(text) {
|
||||
Get.dialog(
|
||||
AlertDialog(
|
||||
content: SelectableText('$text'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
static bool isStringNumeric(str) {
|
||||
static bool isStringNumeric(String str) {
|
||||
RegExp numericRegex = RegExp(r'^[\d\.]+$');
|
||||
return numericRegex.hasMatch(str.toString());
|
||||
return numericRegex.hasMatch(str);
|
||||
}
|
||||
|
||||
static bool isDefaultFav(int attr) {
|
||||
static bool isDefaultFav(int? attr) {
|
||||
if (attr == null) {
|
||||
return false;
|
||||
}
|
||||
return (attr & 2) == 0;
|
||||
}
|
||||
|
||||
static String isPublicFavText(int attr) {
|
||||
static String isPublicFavText(int? attr) {
|
||||
if (attr == null) {
|
||||
return '';
|
||||
}
|
||||
return isPublicFav(attr) ? '公开' : '私密';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user