1
0
mirror of https://github.com/h7x4/Jisho-Study-Tool.git synced 2024-12-22 13:57:29 +01:00
Jisho-Study-Tool/lib/components/history/date_divider.dart
2022-01-25 20:44:00 +01:00

32 lines
812 B
Dart

import 'package:flutter/material.dart';
import '../../bloc/theme/theme_bloc.dart';
class TextDivider extends StatelessWidget {
final String text;
const TextDivider({
Key? key,
required this.text,
}) : super(key: key);
@override
Widget build(BuildContext context) => BlocBuilder<ThemeBloc, ThemeState>(
builder: (context, state) {
final colors = state.theme.menuGreyNormal;
return Container(
decoration: BoxDecoration(color: colors.background),
padding: const EdgeInsets.symmetric(
vertical: 5,
horizontal: 10,
),
child: DefaultTextStyle.merge(
child: Text(text),
style: TextStyle(color: colors.foreground),
),
);
},
);
}