in packages/diagrams/lib/src/blend_mode.dart [58:143]
Widget build(BuildContext context) {
return ConstrainedBox(
key: UniqueKey(),
constraints: BoxConstraints.tight(const Size.square(400.0)),
child: DecoratedBox(
decoration: ShapeDecoration(
shape: Border.all(width: 1.0, color: Colors.white) +
Border.all(width: 1.0, color: Colors.black),
image: const DecorationImage(
image: gridImageProvider,
repeat: ImageRepeat.repeat,
),
),
child: AspectRatio(
aspectRatio: 1.0,
child: CustomPaint(
key: key,
painter: BlendModePainter(mode),
child: Stack(
children: <Widget>[
Align(
alignment: Alignment.topLeft,
child: Container(
padding: const EdgeInsets.symmetric(
horizontal: 1.0, vertical: 3.0),
color: Colors.white,
child: Text(
'$mode',
style: const TextStyle(
inherit: false,
fontFamily: kMonospaceFont,
color: Colors.black,
fontSize: 10.0,
fontWeight: FontWeight.w900,
),
),
),
),
Align(
alignment: Alignment.bottomCenter,
child: Container(
margin: const EdgeInsets.all(1.0),
padding: const EdgeInsets.symmetric(
horizontal: 1.0, vertical: 1.0),
color: Colors.white,
child: const Text(
'⟵ destination ⟶',
style: TextStyle(
inherit: false,
fontFamily: kMonospaceFont,
color: Colors.black,
fontSize: 8.0,
fontWeight: FontWeight.bold,
),
),
),
),
RotatedBox(
quarterTurns: 3,
child: Align(
alignment: Alignment.bottomCenter,
child: Container(
margin: const EdgeInsets.all(1.0),
padding: const EdgeInsets.symmetric(
horizontal: 1.0, vertical: 1.0),
color: Colors.white,
child: const Text(
'⟵ source ⟶',
style: TextStyle(
inherit: false,
fontFamily: kMonospaceFont,
color: Colors.black,
fontSize: 8.0,
fontWeight: FontWeight.bold,
),
),
),
),
),
],
),
),
),
),
);
}