status_preview_card.dart 1.52 KB
import 'package:doublefeel_flutter/app/modules/watch_theme/models/watch_theme_models.dart';
import 'package:doublefeel_flutter/core/util/size_extensions.dart';
import 'package:flutter/material.dart';

import 'watch_theme_character_avatar.dart';
import 'watch_theme_section_card.dart';

class StatusPreviewCard extends StatelessWidget {
  final WatchThemeItem themeItem;
  const StatusPreviewCard({super.key, required this.themeItem});

  @override
  Widget build(BuildContext context) {
    return WatchThemeSectionCard(
      padding: EdgeInsets.fromLTRB(20.dp, 20.dp, 20.dp, 17.dp),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          const WatchThemeSectionTitle('状态预览'),
          SizedBox(height: 24.dp),
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              for (final item in themeItem.infoList)
                Column(
                  children: [
                    WatchThemeCharacterAvatar(
                      size: 60,
                      assetPath: item.assetPath,
                    ),
                    SizedBox(height: 4.dp),
                    Text(
                      item.title,
                      style: TextStyle(
                        fontSize: 12.dp,
                        fontWeight: FontWeight.w400,
                        height: 1.25,
                      ),
                    ),
                  ],
                ),
            ],
          ),
        ],
      ),
    );
  }
}