coherenceMeter function
Implementation
Widget coherenceMeter(NeomFrequencyPainterEngine engine) {
final c = engine.hemisphericCoherence;
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(GeneratorTranslationConstants.hemisfericCoherence.tr.toUpperCase(),
style: TextStyle(
color: Colors.white54,
fontSize: 10,
letterSpacing: 1.5,
),
),
const SizedBox(width: 6),
Tooltip(
message: GeneratorTranslationConstants.coherenceDisclaimer.tr,
preferBelow: true,
child: Icon(Icons.info_outline, size: 12, color: Colors.white24),
),
],
),
const SizedBox(height: 6),
ClipRRect(
borderRadius: BorderRadius.circular(4),
child: LinearProgressIndicator(
value: c,
minHeight: 6,
backgroundColor: Colors.white10,
valueColor: AlwaysStoppedAnimation<Color>(
Color.lerp(
Colors.redAccent,
Colors.greenAccent,
c,
)!,
),
),
),
const SizedBox(height: 4),
Text(
"${(c * 100).toStringAsFixed(1)} %",
style: const TextStyle(
fontFamily: 'Courier',
fontSize: 12,
color: Colors.white,
),
)
],
);
}