mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-10 06:07:57 -06:00
42 lines
1.2 KiB
Dart
42 lines
1.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
import 'package:paperless_mobile/generated/assets.gen.dart';
|
|
|
|
class PaperlessLogo extends StatelessWidget {
|
|
static const _paperlessGreen = Color(0xFF18541F);
|
|
final double? height;
|
|
final double? width;
|
|
final Color _color;
|
|
|
|
const PaperlessLogo.white({
|
|
super.key,
|
|
this.height,
|
|
this.width,
|
|
}) : _color = Colors.white;
|
|
|
|
const PaperlessLogo.green({super.key, this.height, this.width})
|
|
: _color = _paperlessGreen;
|
|
|
|
const PaperlessLogo.black({super.key, this.height, this.width})
|
|
: _color = Colors.black;
|
|
|
|
const PaperlessLogo.colored(Color color, {super.key, this.height, this.width})
|
|
: _color = color;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
constraints: BoxConstraints(
|
|
maxHeight: height ?? Theme.of(context).iconTheme.size ?? 32,
|
|
maxWidth: width ?? Theme.of(context).iconTheme.size ?? 32,
|
|
),
|
|
padding: const EdgeInsets.only(right: 8),
|
|
child: Assets.logos.paperlessLogoWhiteSvg.svg(
|
|
colorFilter: ColorFilter.mode(
|
|
_color,
|
|
BlendMode.srcIn,
|
|
),
|
|
));
|
|
}
|
|
}
|