安卓权限添加
This commit is contained in:
@@ -14,6 +14,11 @@ class CCExpandSlider extends StatefulWidget {
|
||||
final String svgCenter;
|
||||
final String svgEnd;
|
||||
final double iconSize;
|
||||
|
||||
/// 图标额外旋转的 90° 段数。有些素材是按「横向滑块」预先旋过 90° 的
|
||||
/// (如 remote_flame*,外层配合 RotatedBox 使用),竖向摆放时需要传 1 转回正。
|
||||
/// 默认 0,不影响既有横 / 竖两种用法。
|
||||
final int iconQuarterTurns;
|
||||
final double borderRadius;
|
||||
final VoidCallback? onStart;
|
||||
final VoidCallback? onCenter;
|
||||
@@ -28,6 +33,7 @@ class CCExpandSlider extends StatefulWidget {
|
||||
required this.svgEnd,
|
||||
required this.label,
|
||||
this.iconSize = 22.0,
|
||||
this.iconQuarterTurns = 0,
|
||||
this.borderRadius = 12.0,
|
||||
this.onStart,
|
||||
this.onCenter,
|
||||
@@ -292,12 +298,15 @@ class _CCExpandSliderState extends State<CCExpandSlider> {
|
||||
} else {
|
||||
color = Colors.white;
|
||||
}
|
||||
return SvgPicture.asset(
|
||||
assetPath,
|
||||
width: widget.iconSize,
|
||||
height: widget.iconSize,
|
||||
fit: BoxFit.contain,
|
||||
colorFilter: ColorFilter.mode(color, BlendMode.srcIn),
|
||||
return RotatedBox(
|
||||
quarterTurns: widget.iconQuarterTurns,
|
||||
child: SvgPicture.asset(
|
||||
assetPath,
|
||||
width: widget.iconSize,
|
||||
height: widget.iconSize,
|
||||
fit: BoxFit.contain,
|
||||
colorFilter: ColorFilter.mode(color, BlendMode.srcIn),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.maibu.usb_camera_android">
|
||||
<application>
|
||||
<!--
|
||||
USB 权限结果广播接收器(静态注册)。
|
||||
Android 14+ 要求 FLAG_MUTABLE 的 PendingIntent 必须搭配显式 Intent
|
||||
(指定目标 class),因此必须在 manifest 里声明 Receiver。
|
||||
exported=false:只响应本 App 显式广播,禁止其他 App 触发。
|
||||
-->
|
||||
<receiver
|
||||
android:name="com.maibu.usb_camera_android.UsbPermissionReceiver"
|
||||
android:exported="false">
|
||||
<intent-filter>
|
||||
<action android:name="com.maibu.usb_camera_android.USB_PERMISSION" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
</application>
|
||||
</manifest>
|
||||
Reference in New Issue
Block a user