Fix class structure, thicker custom-painted 'i' logo

This commit is contained in:
Johan Jongsma 2026-02-01 09:04:47 +00:00
parent 28b73b8c0d
commit 101cb0e301
1 changed files with 35 additions and 36 deletions

View File

@ -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<LoginScreen> {
),
);
}
}
/// 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;
}