解决安卓端广角无法读取问题
This commit is contained in:
@@ -56,7 +56,6 @@ class RecordingHudWidget extends StatelessWidget {
|
||||
static double get _recordButtonBottom => 63.r;
|
||||
static double get _overlayInfoLeft => 13.r;
|
||||
static double get _overlayInfoBottom => 10.r;
|
||||
static const List<double> _zoomPresets = [0.6, 1.0];
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -150,7 +149,7 @@ class RecordingHudWidget extends StatelessWidget {
|
||||
zoomRatio: zoomRatio,
|
||||
minZoomRatio: minZoomRatio,
|
||||
maxZoomRatio: maxZoomRatio,
|
||||
presets: _zoomPresets,
|
||||
presets: _zoomPresetsForRange(minZoomRatio),
|
||||
onSelected: onZoomSelected,
|
||||
),
|
||||
),
|
||||
@@ -191,6 +190,13 @@ class RecordingHudWidget extends StatelessWidget {
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
List<double> _zoomPresetsForRange(double minZoomRatio) {
|
||||
return [
|
||||
if (minZoomRatio < 1.0) minZoomRatio,
|
||||
1.0,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
class _ZoomPresetControl extends StatelessWidget {
|
||||
@@ -215,7 +221,6 @@ class _ZoomPresetControl extends StatelessWidget {
|
||||
final availablePresets = presets
|
||||
.where(_isPresetAvailable)
|
||||
.toList(growable: false);
|
||||
|
||||
if (availablePresets.isEmpty) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user