Skip to content

Instantly share code, notes, and snippets.

@erickzanardo
Last active January 6, 2022 13:12
Show Gist options
  • Save erickzanardo/cb389df3e2acd3dd6c971b78ab37f6e5 to your computer and use it in GitHub Desktop.
Save erickzanardo/cb389df3e2acd3dd6c971b78ab37f6e5 to your computer and use it in GitHub Desktop.
shows how a border color don't get the opacity
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