반응형
import 'package:flutter/material.dart';
class LetterBoxWidget extends StatelessWidget {
final Color? boxColor;
final Color? textColor;
final String text;
const LetterBoxWidget({super.key, this.boxColor, this.textColor, required this.text});
@override
Widget build(BuildContext context) {
return AnimatedContainer(
duration: Duration(milliseconds: 500),
curve: Curves.easeInOut,
margin: EdgeInsets.symmetric(horizontal: 4),
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
color: boxColor,
borderRadius: BorderRadius.circular(8),
border: boxColor == null ? Border.all(color: Theme.of(context).colorScheme.onSurface)
: null),
child: Center(
child: Text(text,style: Theme.of(context).textTheme.headlineLarge?.copyWith(
color: textColor
),),
),
);
}
}반응형
'새내기 게임 개발자[Unity]' 카테고리의 다른 글
| Flutter WordGame core/get_it.dart (0) | 2025.10.19 |
|---|---|
| Flutter Word Game features/home/widgets/slider_selection_widget.dart (0) | 2025.10.19 |
| Flutter Word Game features/game/presentation/widget/attempt_row_widget.dart (0) | 2025.10.19 |
| Flutter Word Game features/game/presentation/bloc/game_state.dart (0) | 2025.10.19 |
| Flutter Word Game features/game/presentation/bloc/game_event.dart (0) | 2025.10.19 |