feat(branding): 更换应用图标与开屏资源

This commit is contained in:
Zhou Weidong committed 2026-11-02 14:44:23 +08:00
1 parent 731638b31b
commit 613147c20c
62 files changed
+17 -73

No files matched your search

+6 -5
View File
@@ -14,7 +14,7 @@ const _launchWidth = 390;
const _launchHeight = 844;
const _androidRoot = 'android/app/src/main/res';
const _iosRoot = 'ios/Runner/Assets.xcassets';
const _red = [245, 48, 59, 255];
const _ink = [0, 0, 0, 255];
void main() {
TestWidgetsFlutterBinding.ensureInitialized();
@@ -32,9 +32,9 @@ void main() {
expect(image.width, _iconSize);
expect(image.height, _iconSize);
final bytes = await image.toByteData();
final pixel = bytes!.buffer.asUint8List().sublist(0, _red.length);
for (var channel = 0; channel < _red.length; channel++) {
expect(pixel[channel], closeTo(_red[channel], 2));
final pixel = bytes!.buffer.asUint8List().sublist(0, _ink.length);
for (var channel = 0; channel < _ink.length; channel++) {
expect(pixel[channel], closeTo(_ink[channel], 2));
}
});
@@ -84,7 +84,8 @@ void main() {
final layers = File(
'$_androidRoot/drawable$qualifier/launch_background.xml',
).readAsStringSync();
expect(layers, contains('<gradient'));
expect(layers, contains('@color/splash_background'));
expect(layers, isNot(contains('<gradient')));
expect(layers, contains('android:gravity="center"'));
expect(layers, contains('@drawable/splash_screen'));
}