Saturday, November 21, 2026
HomeiOS DevelopmentFlutter obtain flie in stream for progress management for iOS gadgets

Flutter obtain flie in stream for progress management for iOS gadgets

[ad_1]

This code work nicely at Android and at Android Studio framework, in identical time if code deployed to iOS gadgets i obtain error

I reciving
OS (Exhausted heap house, attempting to allocate 1073741840 bytes.
[VERBOSE-2:ui_dart_state.cc(198)] Unhandled Exception: Out of )

  await response.stream.pay attention(
      (Record<int> newBytes) {
        bytes.addAll(newBytes);
        remaining downloadedLength = bytes.size;
        _progress = (downloadedLength / contentLength!) / 2 * 100;
        if(bytes.size>96607667)
          {
            print (bytes.size);
          }
        if(newBytes.size>96607667)
        {
          print (newBytes.size);
        }
        fileInfo.progress = _progress;
      },
  cancelOnError: true
).asFuture();

dimension of file is 96607667
i am unable to perceive – what i do flawed?

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments