增加英文悬浮图表
This commit is contained in:
BIN
assets/images/ai0_hd_en.png
Normal file
BIN
assets/images/ai0_hd_en.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 53 KiB |
BIN
assets/images/ai1_hd_en.png
Normal file
BIN
assets/images/ai1_hd_en.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 53 KiB |
@@ -5,6 +5,7 @@ import '../screens/full_screen.dart';
|
||||
import '../screens/part_screen.dart';
|
||||
import 'floating_icon_with_wave.dart';
|
||||
import 'dart:async'; // 添加此行
|
||||
import 'package:basic_intl/intl.dart';
|
||||
|
||||
class FloatingIcon extends StatefulWidget {
|
||||
const FloatingIcon({super.key});
|
||||
@@ -27,6 +28,11 @@ class _FloatingIconState extends State<FloatingIcon>
|
||||
'assets/images/ai1_hd.png',
|
||||
'assets/images/ai0_hd.png',
|
||||
];
|
||||
|
||||
late final List<String> _iconImagesEn = [
|
||||
'assets/images/ai1_hd_en.png',
|
||||
'assets/images/ai0_hd_en.png',
|
||||
];
|
||||
Timer? _imageTimer; // 用于定时切换图片
|
||||
|
||||
@override
|
||||
@@ -130,7 +136,8 @@ class _FloatingIconState extends State<FloatingIcon>
|
||||
waveColor: Colors.white,
|
||||
)
|
||||
: Image.asset(
|
||||
_iconImages[_imageIndex],
|
||||
Intl.getCurrentLocale().startsWith('zh')
|
||||
? _iconImages[_imageIndex]:_iconImagesEn[_imageIndex],
|
||||
width: iconSize,
|
||||
height: iconSize,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user