1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- import 'package:flutter/material.dart';
- class CountSecond extends StatelessWidget {
- final int second;
- const CountSecond({
- super.key,
- required this.second,
- });
- @override
- Widget build(BuildContext context) {
- return Container(
- padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(40),
- color: Theme.of(context).colorScheme.secondary,
- ),
- child: Row(
- mainAxisSize: MainAxisSize.min,
- children: [
- const SizedBox(width: 8),
- Column(
- crossAxisAlignment: CrossAxisAlignment.end,
- children: [
- SizedBox(
- width: 34,
- child: Text(
- '$second',
- textAlign: TextAlign.end,
- style: Theme.of(context).textTheme.titleLarge?.copyWith(
- color: Theme.of(context).colorScheme.onSecondary,
- fontSize: 24,
- fontWeight: FontWeight.w600,
- ),
- ),
- ),
- Text(
- '秒',
- style: Theme.of(context).textTheme.titleSmall?.copyWith(
- color: Theme.of(context).colorScheme.onSecondary,
- ),
- ),
- ],
- ),
- const SizedBox(width: 8),
- Icon(
- Icons.timer,
- size: 48,
- color: Theme.of(context).colorScheme.onSecondary,
- ),
- ],
- ),
- );
- }
- }
|