stylizable item title component
This commit is contained in:
parent
f906c1cfa2
commit
0acafc58ab
|
|
@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
|
|||
|
||||
class ItemTitle extends StatelessWidget {
|
||||
final String title;
|
||||
final TextStyle? style;
|
||||
final IconData? icon;
|
||||
final Color? color;
|
||||
|
||||
|
|
@ -12,6 +13,7 @@ class ItemTitle extends StatelessWidget {
|
|||
required this.title,
|
||||
this.icon,
|
||||
this.color,
|
||||
this.style,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
|
|
@ -26,7 +28,7 @@ class ItemTitle extends StatelessWidget {
|
|||
if (icon != null) const SizedBox(width: 4),
|
||||
DidvanText(
|
||||
title,
|
||||
style: Theme.of(context).textTheme.subtitle1,
|
||||
style: style ?? Theme.of(context).textTheme.subtitle1,
|
||||
color: color ?? Theme.of(context).colorScheme.title,
|
||||
)
|
||||
],
|
||||
|
|
|
|||
Loading…
Reference in New Issue