This commit is contained in:
horoli 2026-02-04 01:11:32 +09:00
parent 5cdb6217ed
commit e020e44d8f
13 changed files with 85 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 603 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

View File

@ -0,0 +1,51 @@
import 'package:flutter/material.dart';
class CustomIcon extends StatelessWidget {
final String iconPath;
final double? size;
final Color? iconColor;
final double opacity;
const CustomIcon({
super.key,
required this.iconPath,
this.size = 64,
this.iconColor,
this.opacity = 1.0,
});
@override
Widget build(BuildContext context) {
return Opacity(
opacity: opacity,
child: SizedBox(
width: size ?? 64,
height: size ?? 64,
child: Stack(
alignment: Alignment.center,
children: [
// Background Border (Always 000 for Battle/Default)
SizedBox.expand(
child: Image.asset(
'assets/images/icons/borders/border_000.png',
fit: BoxFit.contain,
filterQuality: FilterQuality.high,
),
),
// Inner Icon
FractionallySizedBox(
widthFactor: 0.6,
heightFactor: 0.6,
child: Image.asset(
iconPath,
fit: BoxFit.contain,
filterQuality: FilterQuality.high,
color: iconColor,
),
),
],
),
),
);
}
}

View File

@ -0,0 +1,34 @@
import 'package:flutter/material.dart';
import 'custom_icon.dart'; // Import CustomIcon
class CustomIconButton extends StatelessWidget {
final String iconPath;
final VoidCallback? onTap;
final double? size;
final bool isEnabled;
final Color? iconColor;
const CustomIconButton({
super.key,
required this.iconPath,
this.onTap,
this.size = 64.0,
this.isEnabled = true,
this.iconColor,
});
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: isEnabled ? onTap : null,
behavior: HitTestBehavior.opaque,
child: CustomIcon(
iconPath: iconPath,
size: size,
iconColor: iconColor,
opacity: isEnabled ? 1.0 : 0.5,
),
);
}
}