mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-18 03:36:34 -07:00
Init repo
This commit is contained in:
commit
764b6034e3
566 changed files with 212335 additions and 0 deletions
39
lib/screens/details_screens/components/label_title_item.dart
Normal file
39
lib/screens/details_screens/components/label_title_item.dart
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
class LabelTitleItem extends ConsumerWidget {
|
||||
final Text? title;
|
||||
final String? label;
|
||||
final Widget? content;
|
||||
const LabelTitleItem({
|
||||
this.title,
|
||||
this.label,
|
||||
this.content,
|
||||
super.key,
|
||||
}) : assert(label != null || content != null);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
return Material(
|
||||
color: Colors.transparent,
|
||||
textStyle: Theme.of(context).textTheme.titleLarge?.copyWith(fontWeight: FontWeight.bold),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Opacity(
|
||||
opacity: 0.6,
|
||||
child: Material(
|
||||
color: Colors.transparent, textStyle: Theme.of(context).textTheme.titleMedium, child: title)),
|
||||
const SizedBox(width: 12),
|
||||
label != null
|
||||
? SelectableText(
|
||||
label!,
|
||||
)
|
||||
: content!,
|
||||
].whereNotNull().toList(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue