From 101cb0e3013688ba7ec339d9669b07d3715c7232 Mon Sep 17 00:00:00 2001 From: Johan Jongsma Date: Sun, 1 Feb 2026 09:04:47 +0000 Subject: [PATCH] Fix class structure, thicker custom-painted 'i' logo --- lib/features/auth/login_screen.dart | 71 ++++++++++++++--------------- 1 file changed, 35 insertions(+), 36 deletions(-) diff --git a/lib/features/auth/login_screen.dart b/lib/features/auth/login_screen.dart index 1ffa428..c892f83 100644 --- a/lib/features/auth/login_screen.dart +++ b/lib/features/auth/login_screen.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:google_fonts/google_fonts.dart'; import '../../core/theme.dart'; import '../../services/auth_service.dart'; import '../../services/biometric_service.dart'; @@ -361,41 +360,6 @@ class _LoginScreenState extends State { ), ); } -} - -/// Custom painter for bold "i" logo -class _LogoPainter extends CustomPainter { - @override - void paint(Canvas canvas, Size size) { - final paint = Paint() - ..color = Colors.white - ..style = PaintingStyle.fill; - - final centerX = size.width / 2; - - // Dot (circle at top) - const dotRadius = 6.0; - final dotY = size.height * 0.26; - canvas.drawCircle(Offset(centerX, dotY), dotRadius, paint); - - // Stem (rounded rectangle) - const stemWidth = 10.0; - final stemTop = size.height * 0.38; - final stemBottom = size.height * 0.78; - final stemRect = RRect.fromRectAndRadius( - Rect.fromLTRB( - centerX - stemWidth / 2, - stemTop, - centerX + stemWidth / 2, - stemBottom, - ), - const Radius.circular(5), - ); - canvas.drawRRect(stemRect, paint); - } - - @override - bool shouldRepaint(covariant CustomPainter oldDelegate) => false; Widget _buildErrorBanner() { return Container( @@ -474,3 +438,38 @@ class _LogoPainter extends CustomPainter { ); } } + +/// Custom painter for bold "i" logo +class _LogoPainter extends CustomPainter { + @override + void paint(Canvas canvas, Size size) { + final paint = Paint() + ..color = Colors.white + ..style = PaintingStyle.fill; + + final centerX = size.width / 2; + + // Dot (circle at top) + const dotRadius = 7.0; + final dotY = size.height * 0.25; + canvas.drawCircle(Offset(centerX, dotY), dotRadius, paint); + + // Stem (rounded rectangle) + const stemWidth = 12.0; + final stemTop = size.height * 0.38; + final stemBottom = size.height * 0.78; + final stemRect = RRect.fromRectAndRadius( + Rect.fromLTRB( + centerX - stemWidth / 2, + stemTop, + centerX + stemWidth / 2, + stemBottom, + ), + const Radius.circular(6), + ); + canvas.drawRRect(stemRect, paint); + } + + @override + bool shouldRepaint(covariant CustomPainter oldDelegate) => false; +}