feat: 修改bug
Build Windows / build (push) Has been cancelled
Build Windows / 编译 libcore (Windows) (20.15.1) (push) Has started running

This commit is contained in:
2025-11-20 06:19:05 -08:00
parent 89d13e6237
commit b442289b8a
6 changed files with 27 additions and 19 deletions
@@ -429,7 +429,7 @@ class HIUserInfoView extends GetView<HIUserInfoController> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'设备:${_extractDeviceModel(userAgent)}',
'设备:${_extractDeviceModel(userAgent, deviceType)}',
style: TextStyle(
color: Colors.white,
fontSize: 10.sp, //
@@ -589,12 +589,12 @@ class HIUserInfoView extends GetView<HIUserInfoController> {
);
}
String _extractDeviceModel(String deviceName) {
String _extractDeviceModel(String deviceName, String deviceType) {
// 匹配括号内内容
final RegExp regExp = RegExp(r'\((.*?)\)');
final Match? match = regExp.firstMatch(deviceName);
if (match != null && match.groupCount >= 1) {
if (match != null && match.groupCount >= 1 ) {
// 获取括号内内容
final inside = match.group(1)!; // "Android; google Pixel 9; 15"