重构通道名称,在Android和iOS实现中使用统一的命名空间‘app.record_tool’。相应地更新相关的常量和方法通道。增强在录制HUD中的缩放比例显示格式。
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
abstract final class RecordingChannelNames {
|
||||
static const packageName = 'com.run.sportsx';
|
||||
static const method = '$packageName/recording';
|
||||
static const events = '$packageName/recording_events';
|
||||
static const namespace = 'app.record_tool';
|
||||
static const method = '$namespace/recording';
|
||||
static const events = '$namespace/recording_events';
|
||||
}
|
||||
|
||||
@@ -308,7 +308,7 @@ class _ZoomPresetButton extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
child: Text(
|
||||
'${_formatZoomRatio(displayRatio)}x',
|
||||
_formatZoomRatio(displayRatio),
|
||||
style: TextStyle(
|
||||
fontSize: 13.sp,
|
||||
fontWeight: FontWeight.w700,
|
||||
@@ -320,9 +320,12 @@ class _ZoomPresetButton extends StatelessWidget {
|
||||
}
|
||||
|
||||
String _formatZoomRatio(double ratio) {
|
||||
if (ratio == ratio.roundToDouble()) {
|
||||
return ratio.toStringAsFixed(0);
|
||||
if (ratio < 1.0) {
|
||||
return '广角';
|
||||
}
|
||||
return ratio.toStringAsFixed(1);
|
||||
if (ratio == ratio.roundToDouble()) {
|
||||
return '${ratio.toStringAsFixed(0)}x';
|
||||
}
|
||||
return '${ratio.toStringAsFixed(1)}x';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user