Created
August 16, 2020 07:30
-
-
Save stephaniefash/7fce6cd59a443ab0d9fbbbc6b7426db8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class _MyHomePageState extends State<MyHomePage> { | |
final String myImageUrl = | |
"https://images.unsplash.com/photo-1485841890310-6a055c88698a?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80"; // <- defines the url path of our image | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
backgroundColor: Colors.black, | |
body: Container( | |
color: Colors.red, | |
child: ColorFiltered( // <- wrap yor image with a Color Filtered widget | |
colorFilter: ColorFilter.mode(Colors.grey, BlendMode.saturation), <- // Our grey filter | |
child: Center( | |
child: Image.network(myImageUrl), | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment