Skip to content

Gradient looks Darker on Android vs. iOS #11410

@eseidelGoogle

Description

@eseidelGoogle
import 'package:flutter/material.dart';

void main() {
  runApp(new MaterialApp(
    home: new Scaffold(
      appBar: new AppBar(
        title: new Text("Android looks Darker"),
      ),
      body: new SizedBox.expand(
          child: new DecoratedBox(
        decoration: new BoxDecoration(
          gradient: new LinearGradient(
            begin: FractionalOffset.bottomCenter,
            end: FractionalOffset.topCenter,
            stops: <double>[0.2, 0.6, 1.0],
            colors: <Color>[
              new Color(0xCC000000),
              new Color(0x55000000),
              new Color(0x00FFFFFF)
            ],
          ),
        ),
      )),
      // For color comparison:
      floatingActionButton: new FloatingActionButton(
        onPressed: null,
        child: new Icon(Icons.add),
      ),
    ),
  ));
}

This report came in from Posse. @chinmaygarde believes this is due to color correction never triggering on Android devices. @brianosman

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions