44 lines
1.2 KiB
Dart
44 lines
1.2 KiB
Dart
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,
|
|
),
|
|
);
|
|
}
|
|
}
|