Fix text overflows for long subspace names
This commit is contained in:
parent
d513e466fd
commit
8c047827de
3 changed files with 53 additions and 35 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import "package:flutter/material.dart";
|
||||
import "package:nexus/widgets/divider_widget.dart";
|
||||
|
||||
class DividerText extends StatelessWidget {
|
||||
final String text;
|
||||
|
|
@ -6,24 +7,6 @@ class DividerText extends StatelessWidget {
|
|||
const DividerText(this.text, {super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => LayoutBuilder(
|
||||
builder: (context, constraints) => Row(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 16,
|
||||
child: Divider(color: Theme.of(context).colorScheme.onSurface),
|
||||
),
|
||||
ConstrainedBox(
|
||||
constraints: .new(maxWidth: constraints.maxWidth - 32),
|
||||
child: Padding(
|
||||
padding: const .all(8),
|
||||
child: Text(text, style: Theme.of(context).textTheme.labelLarge),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Divider(color: Theme.of(context).colorScheme.onSurface),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
Widget build(BuildContext context) =>
|
||||
DividerWidget(Text(text, style: Theme.of(context).textTheme.labelLarge));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue