Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[web][iOS] Colors are not applied to images #94740

Open
Bilonik opened this issue Dec 6, 2021 · 2 comments
Open

[web][iOS] Colors are not applied to images #94740

Bilonik opened this issue Dec 6, 2021 · 2 comments
Labels
a: images Loading, displaying, rendering images browser: safari-ios only manifests in Safari on iOS browser: safari-macos only manifests in Safari on macOS e: web_html HTML rendering backend for Web found in release: 2.10 Found to occur in 2.10 found in release: 2.11 Found to occur in 2.11 has reproducible steps The issue has been confirmed reproducible and is ready to work on P2 Important issues not at the top of the work list platform-web Web applications specifically team-web Owned by Web platform team triaged-web Triaged by Web platform team

Comments

@Bilonik
Copy link

Bilonik commented Dec 6, 2021

Steps to Reproduce

1.Open https://fir-quickstart-30f7f.web.app
2.On a Desktop or Android the image is green.
3.On iOS is the real image without the color change (red)

Expected results:
Screen Shot 2021-12-06 at 12 13 16 PM

Actual results:

IMG_DB0E2C13193A-1

Code sample
import 'package:flutter/material.dart';

void main() => runApp(MaterialApp(home: MyApp()));

class MyApp extends StatefulWidget {
  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    //  final wordPair = WordPair.random();

    return MaterialApp(
      title: 'Welcome to Flutter',
      home: Scaffold(
        appBar: AppBar(
          title: Text('Welcome to Flutter'),
        ),
        body: Center(
          child: Image.network(
            "https://i.ibb.co/Xtk9z3T/flechita-Invu.png",
            color: Colors.green,
            width: 100,
            alignment: Alignment.center,
            fit: BoxFit.fitWidth,
            colorBlendMode: BlendMode.srcIn,
          ),
        ),
      ),
    );
  }
}

Latest Master

Flutter (Channel master, 2.6.0-12.0.pre.926, on macOS 12.0.1 21A559 darwin-x64, locale en-US)
    • Flutter version 2.6.0-12.0.pre.926 at /usr/local/Caskroom/flutter/2.2.2/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 1aabe314a9 (74 minutes ago), 2021-12-06 11:04:04 -0500
    • Engine revision 68d320d449
    • Dart version 2.16.0 (build 2.16.0-80.0.dev)
    • DevTools version 2.9.1
@danagbemava-nc danagbemava-nc added the in triage Presently being triaged by the triage team label Dec 7, 2021
@danagbemava-nc danagbemava-nc changed the title [web] In iOS Image.network Color not working Latest Master and Beta [web][iOS] Colors are not applied to images Dec 7, 2021
@danagbemava-nc
Copy link
Member

danagbemava-nc commented Dec 7, 2021

I was able to reproduce this issue with sample provided by OP above.

It doesn't look like it's an issue with either web renderers because even with html, it works fine on desktop chrome and android.

It's possible this is an issue with Safari.

screenshots
stable master & beta
Simulator Screen Shot - iPhone 13 - 2021-12-07 at 12 05 59 Simulator Screen Shot - iPhone 13 - 2021-12-07 at 12 22 42
Screenshot 2021-12-07 at 12 34 06

Safari macOS

Screenshot 2022-03-04 at 10 48 40
flutter doctor -v
[✓] Flutter (Channel stable, 2.10.3, on macOS 12.2.1 21D62 darwin-arm, locale en-GB)
    • Flutter version 2.10.3 at /Users/nexus/dev/sdks/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 7e9793dee1 (2 days ago), 2022-03-02 11:23:12 -0600
    • Engine revision bd539267b4
    • Dart version 2.16.1
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/nexus/Library/Android/sdk
    • Platform android-32, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)

[☠] IntelliJ IDEA Community Edition (the doctor check crashed)
    ✗ Due to an error, the doctor check did not complete. If the error message below is not helpful, please let us know
      about this issue at https://github.com/flutter/flutter/issues.
    ✗ FormatException: Unexpected extension byte (at offset 5)
    • #0      _Utf8Decoder.convertSingle (dart:convert-patch/convert_patch.dart:1789:7)
      #1      Utf8Decoder.convert (dart:convert/utf.dart:351:42)
      #2      InputStream.readString (package:archive/src/util/input_stream.dart:207:30)
      #3      new ZipDirectory.read (package:archive/src/zip/zip_directory.dart:40:30)
      #4      ZipDecoder.decodeBuffer (package:archive/src/zip_decoder.dart:19:30)
      #5      ZipDecoder.decodeBytes (package:archive/src/zip_decoder.dart:14:12)
      #6      IntelliJPlugins._findPluginXml (package:flutter_tools/src/intellij/intellij.dart:130:44)
      #7      IntelliJPlugins._readPackageVersion (package:flutter_tools/src/intellij/intellij.dart:141:40)
      #8      IntelliJPlugins.validatePackage (package:flutter_tools/src/intellij/intellij.dart:63:35)
      #9      IntelliJValidator.validate (package:flutter_tools/src/intellij/intellij_validator.dart:103:15)
      #10     asyncGuard.<anonymous closure> (package:flutter_tools/src/base/async_guard.dart:111:32)
      #11     asyncGuard.<anonymous closure> (package:flutter_tools/src/base/async_guard.dart:109:18)
      #12     _rootRun (dart:async/zone.dart:1426:13)
      #13     _CustomZone.run (dart:async/zone.dart:1328:19)
      #14     _runZoned (dart:async/zone.dart:1861:10)
      #15     runZonedGuarded (dart:async/zone.dart:1849:12)
      #16     runZoned (dart:async/zone.dart:1780:12)
      #17     asyncGuard (package:flutter_tools/src/base/async_guard.dart:109:3)
      #18     Doctor.startValidatorTasks (package:flutter_tools/src/doctor.dart:205:9)
      #19     Doctor.diagnose (package:flutter_tools/src/doctor.dart:309:47)
      #20     DoctorCommand.runCommand (package:flutter_tools/src/commands/doctor.dart:50:48)
      #21     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1320:12)
      <asynchronous suspension>
      #22     FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1161:27)
      <asynchronous suspension>
      #23     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
      <asynchronous suspension>
      #24     CommandRunner.runCommand (package:args/command_runner.dart:209:13)
      <asynchronous suspension>
      #25     FlutterCommandRunner.runCommand.<anonymous closure>
      (package:flutter_tools/src/runner/flutter_command_runner.dart:281:9)
      <asynchronous suspension>
      #26     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
      <asynchronous suspension>
      #27     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:229:5)
      <asynchronous suspension>
      #28     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
      <asynchronous suspension>
      #29     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
      <asynchronous suspension>
      #30     main (package:flutter_tools/executable.dart:94:3)
      <asynchronous suspension>


[✓] VS Code (version 1.64.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.36.0

[✓] Connected device (3 available)
    • M2007J20CG (mobile) • 5dd3be00 • android-arm64  • Android 11 (API 30)
    • macOS (desktop)     • macos    • darwin-arm64   • macOS 12.2.1 21D62 darwin-arm
    • Chrome (web)        • chrome   • web-javascript • Google Chrome 99.0.4844.51

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.
[✓] Flutter (Channel master, 2.11.0-0.0.pre.762, on macOS 12.2.1 21D62 darwin-arm, locale en-GB)
    • Flutter version 2.11.0-0.0.pre.762 at /Users/nexus/dev/sdks/flutters
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ae9a796cfa (8 hours ago), 2022-03-03 19:11:36 -0800
    • Engine revision 33afddeacd
    • Dart version 2.17.0 (build 2.17.0-168.0.dev)
    • DevTools version 2.11.1

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/nexus/Library/Android/sdk
    • Platform android-32, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)

[✓] IntelliJ IDEA Community Edition (version 2021.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin version 213.5744.122

[✓] VS Code (version 1.64.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.36.0

[✓] Connected device (3 available)
    • M2007J20CG (mobile) • 5dd3be00 • android-arm64  • Android 11 (API 30)
    • macOS (desktop)     • macos    • darwin-arm64   • macOS 12.2.1 21D62 darwin-arm
    • Chrome (web)        • chrome   • web-javascript • Google Chrome 99.0.4844.51

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Edit: updating labels and screenshots based on #94740 (comment)

@danagbemava-nc danagbemava-nc added browser: safari-ios only manifests in Safari on iOS found in release: 2.5 Found to occur in 2.5 found in release: 2.6 Found to occur in 2.6 found in release: 2.8 Found to occur in 2.8 has reproducible steps The issue has been confirmed reproducible and is ready to work on platform-web Web applications specifically a: images Loading, displaying, rendering images and removed in triage Presently being triaged by the triage team labels Dec 7, 2021
@yjbanov yjbanov self-assigned this Dec 9, 2021
@yjbanov yjbanov added the assigned for triage issue is assigned to a domain expert for further triage label Dec 9, 2021
@behnamsattar
Copy link

In my tests, I reproduced this on Safari using the HTML renderer on both iOS and macOS.

@danagbemava-nc danagbemava-nc added e: web_html HTML rendering backend for Web browser: safari-macos only manifests in Safari on macOS found in release: 2.10 Found to occur in 2.10 found in release: 2.11 Found to occur in 2.11 and removed found in release: 2.5 Found to occur in 2.5 found in release: 2.6 Found to occur in 2.6 found in release: 2.8 Found to occur in 2.8 labels Mar 4, 2022
@yjbanov yjbanov added the P2 Important issues not at the top of the work list label Apr 1, 2022
@yjbanov yjbanov removed their assignment Apr 1, 2022
@yjbanov yjbanov removed the assigned for triage issue is assigned to a domain expert for further triage label Apr 1, 2022
@flutter-triage-bot flutter-triage-bot bot added team-web Owned by Web platform team triaged-web Triaged by Web platform team labels Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: images Loading, displaying, rendering images browser: safari-ios only manifests in Safari on iOS browser: safari-macos only manifests in Safari on macOS e: web_html HTML rendering backend for Web found in release: 2.10 Found to occur in 2.10 found in release: 2.11 Found to occur in 2.11 has reproducible steps The issue has been confirmed reproducible and is ready to work on P2 Important issues not at the top of the work list platform-web Web applications specifically team-web Owned by Web platform team triaged-web Triaged by Web platform team
Projects
None yet
Development

No branches or pull requests

4 participants