Skip to content

Commit

Permalink
fix(Android): show blank icon if no adaptive icon set (#601)
Browse files Browse the repository at this point in the history
  • Loading branch information
chungxon authored Jan 17, 2025
1 parent 7e467bc commit 50b058c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/android.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import 'dart:io';

import 'package:flutter_launcher_icons/config/config.dart';
import 'package:flutter_launcher_icons/constants.dart';
import 'package:flutter_launcher_icons/constants.dart' as constants;
import 'package:flutter_launcher_icons/constants.dart';
import 'package:flutter_launcher_icons/custom_exceptions.dart';
import 'package:flutter_launcher_icons/utils.dart' as utils;
import 'package:flutter_launcher_icons/xml_templates.dart' as xml_template;
Expand Down Expand Up @@ -158,6 +158,15 @@ void createMipmapXmlFile(
Config config,
String? flavor,
) {
// Note: Adaptive Icons will only be used when both
// `adaptive_icon_background` and `adaptive_icon_foreground` or
// `adaptive_icon_monochrome` are specified (The `image_path` is not
// automatically taken as foreground)
if (!config.hasAndroidAdaptiveConfig &&
!config.hasAndroidAdaptiveMonochromeConfig) {
return;
}

utils.printStatus('Creating mipmap xml file Android');

String xmlContent = '';
Expand Down

0 comments on commit 50b058c

Please sign in to comment.