setIcon method

  1. @override
Future<String> setIcon({
  1. required String icon,
  2. String oldIcon = '',
  3. String appleTouchIcon = '',
})
override

Sets favicon of webpage to icon.

If appleTouchIcon is provided, sets it to a link[rel=apple-touch-icon].

Implementation

@override
Future<String> setIcon({
  required String icon,
  String oldIcon = '',
  String appleTouchIcon = '',
}) async {
  if (appleTouchIcon != '') {
    _getLinkWithRel('apple-touch-icon').href = appleTouchIcon;
  }
  _getLinkWithRel('icon').href = icon;
  return icon;
}