You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
437 B
18 lines
437 B
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)),
|
|
),
|
|
);
|
|
}
|
|
}
|