blob: 011c745fc24b4c1848c427a390bcebfe9991c537 [file] [log] [blame]
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'template.dart';
class CardTemplate extends TokenTemplate {
const CardTemplate(super.blockName, super.fileName, super.tokens);
String generate() => '''
// Generated version ${tokens["version"]}
class _${blockName}DefaultsM3 extends CardTheme {
const _${blockName}DefaultsM3(this.context)
: super(
clipBehavior: Clip.none,
elevation: ${elevation("md.comp.elevated-card.container")},
margin: const EdgeInsets.all(4.0),
shape: ${shape("md.comp.elevated-card.container")},
final BuildContext context;
Color? get color => ${componentColor("md.comp.elevated-card.container")};
Color? get shadowColor => ${colorOrTransparent("md.comp.elevated-card.container.shadow-color")};
Color? get surfaceTintColor => ${colorOrTransparent("md.comp.elevated-card.container.surface-tint-layer.color")};