44 lines
1.1 KiB
Dart
44 lines
1.1 KiB
Dart
import 'package:didvan/config/theme_data.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'text.dart';
|
|
import '../ink_wrapper.dart';
|
|
|
|
class DidvanTitleDivider extends StatelessWidget{
|
|
|
|
final String title;
|
|
final Function()? onClick;
|
|
|
|
const DidvanTitleDivider({super.key, required this.title, this.onClick});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return InkWrapper(
|
|
onPressed: onClick,
|
|
child: Row(
|
|
children: [
|
|
Expanded(
|
|
child: Divider(
|
|
height: 1,
|
|
color: Theme.of(context).colorScheme.border,
|
|
)),
|
|
Padding(
|
|
padding: const EdgeInsets.only(left: 8, right: 8),
|
|
child: DidvanText(
|
|
title,
|
|
style: Theme.of(context).textTheme.bodySmall,
|
|
color: Theme.of(context).colorScheme.inputText,
|
|
),
|
|
),
|
|
Expanded(
|
|
child: Divider(
|
|
height: 1,
|
|
color: Theme.of(context).colorScheme.border,
|
|
)),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
|
|
} |