mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-04-20 22:13:48 +00:00
18 lines
437 B
Dart
18 lines
437 B
Dart
|
|
import 'package:flutter/material.dart';
|
||
|
|
|
||
|
|
class AdaptiveAppBarTitle extends StatelessWidget {
|
||
|
|
final String text;
|
||
|
|
|
||
|
|
const AdaptiveAppBarTitle(this.text, {super.key});
|
||
|
|
|
||
|
|
@override
|
||
|
|
Widget build(BuildContext context) {
|
||
|
|
return LayoutBuilder(
|
||
|
|
builder: (context, constraints) => SizedBox(
|
||
|
|
width: constraints.maxWidth,
|
||
|
|
child: FittedBox(fit: BoxFit.scaleDown, child: Text(text, maxLines: 1)),
|
||
|
|
),
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|