import 'package:flutter/material.dart'; import '../../../../core/theme/app_typography.dart'; import 'login_colors.dart'; /// BCPL wordmark with blue and green swooshes, matching the login design. class BcplLogo extends StatelessWidget { const BcplLogo({super.key, this.height = 48}); final double height; @override Widget build(BuildContext context) { final colors = LoginColors.of(context); return SizedBox( height: height, child: CustomPaint( painter: _BcplLogoPainter( primaryBlue: colors.primaryAction, accentGreen: colors.colorScheme.secondary, ), child: Align( alignment: Alignment.topCenter, child: Padding( padding: EdgeInsets.only(top: height * 0.08), child: Text( 'BCPL', style: TextStyle( fontFamily: AppTypography.fontFamily, fontSize: height * 0.58, fontWeight: AppTypography.bold, fontStyle: FontStyle.italic, letterSpacing: -0.5, color: colors.headingColor, height: 1, ), ), ), ), ), ); } } class _BcplLogoPainter extends CustomPainter { _BcplLogoPainter({ required this.primaryBlue, required this.accentGreen, }); final Color primaryBlue; final Color accentGreen; @override void paint(Canvas canvas, Size size) { final bluePaint = Paint() ..color = primaryBlue ..style = PaintingStyle.stroke ..strokeWidth = size.height * 0.055 ..strokeCap = StrokeCap.round; final greenPaint = Paint() ..color = accentGreen ..style = PaintingStyle.stroke ..strokeWidth = size.height * 0.045 ..strokeCap = StrokeCap.round; final centerX = size.width / 2; final baseY = size.height * 0.82; final bluePath = Path() ..moveTo(centerX - size.width * 0.28, baseY) ..quadraticBezierTo( centerX - size.width * 0.05, baseY + size.height * 0.08, centerX + size.width * 0.3, baseY - size.height * 0.02, ); canvas.drawPath(bluePath, bluePaint); final greenPath = Path() ..moveTo(centerX - size.width * 0.22, baseY + size.height * 0.06) ..quadraticBezierTo( centerX, baseY + size.height * 0.14, centerX + size.width * 0.24, baseY + size.height * 0.04, ); canvas.drawPath(greenPath, greenPaint); } @override bool shouldRepaint(covariant _BcplLogoPainter oldDelegate) { return oldDelegate.primaryBlue != primaryBlue || oldDelegate.accentGreen != accentGreen; } }