android library

Classes

AndroidIconTemplate

Properties

adaptiveForegroundIcons → List<AndroidIconTemplate>
final
androidIcons ↔ List<AndroidIconTemplate>
read / write

Functions

createAdaptiveBackgrounds(Map<String, dynamic> yamlConfig, String adaptiveIconBackgroundImagePath) → void
creates adaptive background using png image
createAdaptiveIconMipmapXmlFile(Map<String, dynamic> flutterLauncherIconsConfig) → void
Creates the xml file required for the adaptive launcher icon FILE LOCATED HERE: res/mipmap-anydpi/{icon-name-from-yaml-config}.xml
createAdaptiveIcons(Map<String, dynamic> flutterLauncherIconsConfig) → void
createDefaultIcons(Map<String, dynamic> flutterLauncherIconsConfig) → void
createNewColorsFile(String backgroundColor) → void
Creates a colors.xml file if it was missing from android/app/src/main/res/values/colors.xml
getAndroidIconPath(Map<String, dynamic> config) → String
Method for the retrieval of the Android icon path If image_path_android is found, this will be prioritised over the image_path value.
getNewIconName(Map<String, dynamic> config) → String
return the new launcher icon file name
isAdaptiveIconConfigPngFile(String backgroundFile) → bool
Returns true if the adaptive icon configuration is a PNG image
isAndroidIconNameCorrectFormat(String iconName) → bool
Ensures that the Android icon name is in the correct format
isCorrectMipmapDirectoryForAdaptiveIcon(String path) → bool
(NOTE THIS IS JUST USED FOR UNIT TEST) Ensures the correct path is used for generating adaptive icons "Next you must create alternative drawable resources in your app for use with Android 8.0 (API level 26) in res/mipmap-anydpi/ic_launcher.xml" Source: https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive
isCustomAndroidFile(Map<String, dynamic> config) → bool
Check to see if specified Android config is a string or bool String - Generate new launcher icon with the string specified bool - override the default flutter project icon
minSdk() → int
Retrieves the minSdk value from the Android build.gradle file
overwriteAndroidManifestWithNewLauncherIcon(String iconName) → Future<void>
Updates the line which specifies the launcher icon within the AndroidManifest.xml with the new icon name (only if it has changed) [...]
overwriteExistingIcons(AndroidIconTemplate template, Image image, String filename) → void
Overrides the existing launcher icons in the project Note: Do not change interpolation unless you end up with better results (see issue for result when using cubic interpolation) https://github.com/fluttercommunity/flutter_launcher_icons/issues/101#issuecomment-495528733
saveNewImages(AndroidIconTemplate template, Image image, String iconFilePath) → void
Saves new launcher icons to the project, keeping the old launcher icons. Note: Do not change interpolation unless you end up with better results https://github.com/fluttercommunity/flutter_launcher_icons/issues/101#issuecomment-495528733
updateColorsFile(File colorsFile, String backgroundColor) → void
Updates the colors.xml with the new adaptive launcher icon color
updateColorsXmlFile(String backgroundConfig) → void
Retrieves the colors.xml file for the project. [...]