75 lines
2.1 KiB
Dart
75 lines
2.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_application_1/core/theme/app_colors.dart';
|
|
|
|
class BrandLogo extends StatelessWidget {
|
|
final double width;
|
|
final bool showSubtitle;
|
|
final bool centered;
|
|
|
|
const BrandLogo({
|
|
super.key,
|
|
this.width = 230,
|
|
this.showSubtitle = true,
|
|
this.centered = true,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final double titleSize = width * 0.19;
|
|
final double subtitleSize = width * 0.04;
|
|
final textAlign = centered ? TextAlign.center : TextAlign.left;
|
|
final crossAxisAlignment =
|
|
centered ? CrossAxisAlignment.center : CrossAxisAlignment.start;
|
|
|
|
return SizedBox(
|
|
width: width,
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
crossAxisAlignment: crossAxisAlignment,
|
|
children: [
|
|
RichText(
|
|
textAlign: textAlign,
|
|
text: TextSpan(
|
|
children: [
|
|
TextSpan(
|
|
text: 'ESP32 ',
|
|
style: TextStyle(
|
|
fontSize: titleSize,
|
|
fontWeight: FontWeight.w900,
|
|
fontStyle: FontStyle.italic,
|
|
color: AppColors.textDark,
|
|
letterSpacing: -1,
|
|
),
|
|
),
|
|
TextSpan(
|
|
text: 'APP',
|
|
style: TextStyle(
|
|
fontSize: titleSize,
|
|
fontWeight: FontWeight.w900,
|
|
fontStyle: FontStyle.italic,
|
|
color: AppColors.primaryBlue,
|
|
letterSpacing: -1,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
if (showSubtitle) ...[
|
|
const SizedBox(height: 6),
|
|
Text(
|
|
'ADVANCED SKATEBOARD CONTROLLER',
|
|
textAlign: textAlign,
|
|
style: TextStyle(
|
|
fontSize: subtitleSize,
|
|
fontWeight: FontWeight.w500,
|
|
color: AppColors.textMuted,
|
|
letterSpacing: 0.6,
|
|
),
|
|
),
|
|
],
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|