Last active
January 6, 2022 13:12
-
-
Save erickzanardo/cb389df3e2acd3dd6c971b78ab37f6e5 to your computer and use it in GitHub Desktop.
shows how a border color don't get the opacity
This file contains hidden or 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
import 'package:flutter/material.dart'; | |
void main() { | |
final color = Colors.red.withOpacity(0.8); | |
runApp( | |
MaterialApp( | |
home: Scaffold( | |
body: Center( | |
child: Container( | |
width: 100, | |
height: 100, | |
decoration: BoxDecoration( | |
color: color, | |
borderRadius: BorderRadius.circular(4), | |
border: Border.all( | |
width: 20, | |
color: color, | |
), | |
), | |
), | |
), | |
), | |
), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment