flutter_launcher_icons | Dart Packageflutter_launcher_icons
flutter_launcher_icons | Dart Package
flutter pub run flutter_launcher_icons
使用?flutter_gen配置本地静态资源
颜色xml 需要父级包裹
<colors>
<color name="milk_tea">#F5CB84</color>
<color name="cinnamon" type="material">#955E1C</color>
<color name="yellow_ocher" type="material material-accent">#DF9527</color>
</colors>
新增配置
flutter_launcher_icons: # flutter pub run flutter_launcher_icons
android: "launcher_icon"
ios: true
image_path: "assets/icon/icon.png"
min_sdk_android: 21 # android min sdk min:16, default 21
flutter_gen:
output: lib/gen/ # Optional (default: lib/gen/)
line_length: 80 # Optional (default: 80)
# Optional
integrations:
flutter_svg: true
flare_flutter: true
rive: true
lottie: true
colors:
inputs:
- assets/color/colors.xml
注意 flutter 下还需要指明assets的路径
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
assets:
- assets/image/
- assets/icon/
四、不同屏幕之间的尺寸适配
flutter_screenutil | Flutter Package
https://github.com/OpenFlutter/flutter_screenutil/blob/master/README_CN.md
三、权限管理
四、
dart-ping包