Giter Club home page Giter Club logo

Comments (14)

lcrocker avatar lcrocker commented on July 18, 2024 4

I'm getting exactly the same...looks like an incompatible XML package.

Apparently, at some point the API for the xml packaged changed: the XmlElement constructor no longer takes "attributes" and "children" as positional arguments, but only as named arguments.

There are 9 invocations of that constructor in bitmap_font.dart. Adding "attributes:" and "children:" to the second and third arguments of each call allows it to compile successfully.

from flutter_launcher_icons.

RameesFazal avatar RameesFazal commented on July 18, 2024 2

I'm getting exactly the same...looks like an incompatible XML package.
Apparently, at some point the API for the xml packaged changed: the XmlElement constructor no longer takes "attributes" and "children" as positional arguments, but only as named arguments.
There are 9 invocations of that constructor in bitmap_font.dart. Adding "attributes:" and "children:" to the second and third arguments of each call allows it to compile successfully.

can u give me some example please?

Hi fachirzalrifadhi
You need to go to the file location mentioned in error(in this case file:///home/malcolm/external_sources/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.0.5/lib/src/bitmap_font.dart) and remove the last two arguments from xml constructor
To be more clear if the constuctor is like below
var node = new XML.XmlElement(new XML.XmlName('char'), attrs, []);
It will become
var node = new XML.XmlElement(new XML.XmlName('char'));
You need to do this process for all the lines which in error list which u got. Then execute the command it will work.

from flutter_launcher_icons.

turbobh avatar turbobh commented on July 18, 2024 2

I have the same issue. I fixed this by remove all the arguments except the first one.
Steps:

  • Open bitmap_font.dart file with any TextEditor
  • Find all the "new XML.XmlElement(" line then remove all the arguments except the first one
  • Save the file
  • Restart your IDE

from flutter_launcher_icons.

finzaiko avatar finzaiko commented on July 18, 2024

Yes, I have same issue

from flutter_launcher_icons.

fachrizalrifahdi avatar fachrizalrifahdi commented on July 18, 2024

I'm getting exactly the same...looks like an incompatible XML package.

Apparently, at some point the API for the xml packaged changed: the XmlElement constructor no longer takes "attributes" and "children" as positional arguments, but only as named arguments.

There are 9 invocations of that constructor in bitmap_font.dart. Adding "attributes:" and "children:" to the second and third arguments of each call allows it to compile successfully.

can u give me some example please?

from flutter_launcher_icons.

fachrizalrifahdi avatar fachrizalrifahdi commented on July 18, 2024

I have the same issue. I fixed this by remove all the arguments except the first one.
Steps:

  • Open bitmap_font.dart file with any TextEditor
  • Find all the "new XML.XmlElement(" line then remove all the arguments except the first one
  • Save the file
  • Restart your IDE

can u give me the example please?

from flutter_launcher_icons.

fachrizalrifahdi avatar fachrizalrifahdi commented on July 18, 2024

I'm getting exactly the same...looks like an incompatible XML package.
Apparently, at some point the API for the xml packaged changed: the XmlElement constructor no longer takes "attributes" and "children" as positional arguments, but only as named arguments.
There are 9 invocations of that constructor in bitmap_font.dart. Adding "attributes:" and "children:" to the second and third arguments of each call allows it to compile successfully.

can u give me some example please?

Hi fachirzalrifadhi
You need to go to the file location mentioned in error(in this case file:///home/malcolm/external_sources/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.0.5/lib/src/bitmap_font.dart) and remove the last two arguments from xml constructor
To be more clear if the constuctor is like below
var node = new XML.XmlElement(new XML.XmlName('char'), attrs, []);
It will become
var node = new XML.XmlElement(new XML.XmlName('char'));
You need to do this process for all the lines which in error list which u got. Then execute the command it will work.

isn't still work

from flutter_launcher_icons.

RameesFazal avatar RameesFazal commented on July 18, 2024

I'm getting exactly the same...looks like an incompatible XML package.
Apparently, at some point the API for the xml packaged changed: the XmlElement constructor no longer takes "attributes" and "children" as positional arguments, but only as named arguments.
There are 9 invocations of that constructor in bitmap_font.dart. Adding "attributes:" and "children:" to the second and third arguments of each call allows it to compile successfully.

can u give me some example please?

Hi fachirzalrifadhi
You need to go to the file location mentioned in error(in this case file:///home/malcolm/external_sources/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.0.5/lib/src/bitmap_font.dart) and remove the last two arguments from xml constructor
To be more clear if the constuctor is like below
var node = new XML.XmlElement(new XML.XmlName('char'), attrs, []);
It will become
var node = new XML.XmlElement(new XML.XmlName('char'));
You need to do this process for all the lines which in error list which u got. Then execute the command it will work.

isn't still work

had same issue for me. IT worked. Have you replaced it in all lines mentioned in your error log? If still not working post the error which you are getting.

from flutter_launcher_icons.

fachrizalrifahdi avatar fachrizalrifahdi commented on July 18, 2024

fixed i've tried delete some args to be like this on bitmap_font.dart

` XML.XmlDocument _parseTextFnt(String content) {
var children = <XML.XmlNode>[];
var pageList = <XML.XmlNode>[];
var charList = <XML.XmlNode>[];
var kerningList = <XML.XmlNode>[];
var charsAttrs;
var kerningsAttrs;

List<String> lines = content.split('\n');

for (String line in lines) {
  if (line.isEmpty) {
    continue;
  }

  List<String> tk = line.split(' ');
  switch (tk[0]) {
    case 'info':
      var attrs = _parseParameters(tk);
      var info = new XML.XmlElement(new XML.XmlName('info'));
      children.add(info);
      break;
    case 'common':
      var attrs = _parseParameters(tk);
      var node = new XML.XmlElement(new XML.XmlName('common'));
      children.add(node);
      break;
    case 'page':
      var attrs = _parseParameters(tk);
      var page = new XML.XmlElement(new XML.XmlName('page'));
      pageList.add(page);
      break;
    case 'chars':
      charsAttrs = _parseParameters(tk);
      break;
    case 'char':
      var attrs = _parseParameters(tk);
      var node = new XML.XmlElement(new XML.XmlName('char'));
      charList.add(node);
      break;
    case 'kernings':
      kerningsAttrs = _parseParameters(tk);
      break;
    case 'kerning':
      var attrs = _parseParameters(tk);
      var node = new XML.XmlElement(new XML.XmlName('kerning'));
      kerningList.add(node);
      break;
  }
}

if (charsAttrs != null || charList.isNotEmpty) {
  var node = new XML.XmlElement(new XML.XmlName('chars'));
  children.add(node);
}

if (kerningsAttrs != null || kerningList.isNotEmpty) {
  var node = new XML.XmlElement(new XML.XmlName('kernings'));
  children.add(node);
}

if (pageList.isNotEmpty) {
  var pages = new XML.XmlElement(new XML.XmlName('pages'));
  children.add(pages);
}

var xml = new XML.XmlElement(new XML.XmlName('font'));
var doc = new XML.XmlDocument([xml]);

return doc;

}`

from flutter_launcher_icons.

safeforge avatar safeforge commented on July 18, 2024

seems to be related to brendan-duncan/image#89

from flutter_launcher_icons.

fayaz07 avatar fayaz07 commented on July 18, 2024

even I faced the same issue, I tried removing the extra arguments but it doesn't work

from flutter_launcher_icons.

MarkOSullivan94 avatar MarkOSullivan94 commented on July 18, 2024

Currently away atm but will be back this weekend and I'll try and investigate this issue then

from flutter_launcher_icons.

matthewhuie avatar matthewhuie commented on July 18, 2024

This has been patched in the master branch of brendan-duncan/image.

You could temporarily point your flutter_launcher_icons package to Github to get the latest patch.

# ~/.pub-cache/hosted/pub.dartlang.org/flutter_launcher_icons-0.7.0/pubspec.yaml

image:
  git:
    url: https://github.com/brendan-duncan/image.git

Perform a pub get and you'll be able to generate launcher icons again.

from flutter_launcher_icons.

MarkOSullivan94 avatar MarkOSullivan94 commented on July 18, 2024

I think this should be working fine now. Looks like the xml package developer published an update which caused a ripple effect causing some issues with packages which depended on it.

I tried switching the image dependency to the commit which merged the PR for the fix in the image package but that no longer seems to be working, so whenever I removed my changes and tested the package, it worked fine for me.

Let me know if anyone is still having issues otherwise I'll close this issue.

from flutter_launcher_icons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.