46 lines
1.2 KiB
Dart
46 lines
1.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:satu/shared/app_colors.dart';
|
|
|
|
class DictionaryTile extends StatelessWidget {
|
|
const DictionaryTile({
|
|
required this.title,
|
|
Key? key,
|
|
this.subTitle,
|
|
this.onPress,
|
|
}) : super(key: key);
|
|
|
|
final String title;
|
|
final String? subTitle;
|
|
final Function()? onPress;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
decoration: const BoxDecoration(color: whiteColor),
|
|
child: Material(
|
|
color: Colors.transparent,
|
|
child: InkWell(
|
|
onTap: onPress,
|
|
child: Padding(
|
|
padding:
|
|
const EdgeInsets.symmetric(horizontal: 15.0, vertical: 10.0),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
title,
|
|
style: const TextStyle(fontSize: 12, color: textColor),
|
|
),
|
|
if (subTitle != null && subTitle!.isNotEmpty)
|
|
Text(subTitle!,
|
|
style: const TextStyle(
|
|
fontSize: 10, color: placeholderColor)),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|