watch_theme_header.dart 985 Bytes
import 'package:doublefeel_flutter/core/util/size_extensions.dart';
import 'package:flutter/material.dart';

import 'watch_face_preview.dart';
import 'watch_theme_colors.dart';

class WatchThemeHeader extends StatelessWidget {
  const WatchThemeHeader({
    super.key,
    this.title = '默认主题',
    this.faceAsset,
    this.faceFilePath,
  });

  final String title;
  final String? faceAsset;
  final String? faceFilePath;

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        SizedBox(height: 12.dp),
        Center(
          child: WatchFacePreview(
            faceAsset: faceAsset,
            faceFilePath: faceFilePath,
          ),
        ),
        SizedBox(height: 12.dp),
        Text(
          title,
          style: TextStyle(
            color: WatchThemeColors.textPrimary,
            fontSize: 20.dp,
            fontWeight: FontWeight.w600,
            height: 1.25,
          ),
        ),
      ],
    );
  }
}