mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-08 23:18:16 -07:00
Init repo
This commit is contained in:
commit
764b6034e3
566 changed files with 212335 additions and 0 deletions
57
lib/screens/shared/fladder_icon.dart
Normal file
57
lib/screens/shared/fladder_icon.dart
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
import 'package:fladder/util/theme_extensions.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'dart:ui' as ui;
|
||||
|
||||
class FladderIcon extends StatelessWidget {
|
||||
final double size;
|
||||
const FladderIcon({this.size = 100, super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
ShaderMask(
|
||||
shaderCallback: (Rect bounds) {
|
||||
return ui.Gradient.linear(
|
||||
const Offset(30, 30),
|
||||
const Offset(80, 80),
|
||||
[
|
||||
Theme.of(context).colorScheme.primary,
|
||||
Theme.of(context).colorScheme.secondary,
|
||||
],
|
||||
);
|
||||
},
|
||||
child: RotatedBox(
|
||||
quarterTurns: 1,
|
||||
child: SvgPicture.asset(
|
||||
"icons/fladder_icon_grayscale.svg",
|
||||
width: size,
|
||||
colorFilter: const ColorFilter.mode(Colors.white, BlendMode.srcIn),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class FladderIconOutlined extends StatelessWidget {
|
||||
final double size;
|
||||
final Color? color;
|
||||
const FladderIconOutlined({this.size = 100, this.color, super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return RotatedBox(
|
||||
quarterTurns: 1,
|
||||
child: SvgPicture.asset(
|
||||
"icons/fladder_icon_outline.svg",
|
||||
width: size,
|
||||
colorFilter: ColorFilter.mode(color ?? context.colors.onSurfaceVariant, BlendMode.srcATop),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue