mobileapplicationPassvault/lib/custom_widgets/reuse_card.dart

44 lines
1.2 KiB
Dart
Raw Normal View History

2024-04-12 05:23:32 +00:00
import 'package:flutter/material.dart';
import 'package:flutter_passvault/custom_widgets/reuse_textview.dart';
class CardView extends StatelessWidget {
final String title;
final String? description;
final bool showdescription;
// ignore: use_key_in_widget_constructors, prefer_const_constructors_in_immutables
CardView(
{required this.title, this.description, this.showdescription = true});
@override
Widget build(BuildContext context) {
return Card(
elevation: 2,
child: ListTile(
title: ReusableTextView(
text: title,
// ignore: prefer_const_constructors
textStyle: TextStyle(
fontFamily: 'source-sans-pro.regular.ttf',
color: Colors.black,
fontSize: 20,
),
),
subtitle: showdescription
? ReusableTextView(
text: description!,
// ignore: prefer_const_constructors
textStyle: TextStyle(
fontFamily: 'source-sans-pro.regular.ttf',
color: Colors.black,
fontSize: 20,
),
)
: null,
),
);
}
}