Implemented FittedBox Widget

This commit is contained in:
2025-07-01 21:29:10 +02:00
parent 3da8c886ff
commit 9fcd919847
2 changed files with 14 additions and 11 deletions

View File

@@ -123,19 +123,21 @@ class _RoundViewState extends State<RoundView> {
index, index,
Padding( Padding(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: horizontal: 4 +
_getSegmendetControlPadding(maxLength), _getSegmendetControlPadding(maxLength),
vertical: 6, vertical: 6,
), ),
child: Text( child: FittedBox(
name, fit: BoxFit.scaleDown,
textAlign: TextAlign.center, child: Text(
maxLines: 1, name,
style: TextStyle( textAlign: TextAlign.center,
fontWeight: FontWeight.bold, maxLines: 1,
fontSize: _getSegmendetControlFontSize( style: TextStyle(
widget.gameSession fontWeight: FontWeight.bold,
.getMaxLengthOfPlayerNames()), fontSize: _getSegmendetControlFontSize(
maxLength),
),
), ),
), ),
), ),

View File

@@ -2,7 +2,7 @@ name: cabo_counter
description: "Mobile app for the card game Cabo" description: "Mobile app for the card game Cabo"
publish_to: 'none' publish_to: 'none'
version: 0.3.2+248 version: 0.3.3+255
environment: environment:
sdk: ^3.5.4 sdk: ^3.5.4
@@ -26,6 +26,7 @@ dependencies:
sdk: flutter sdk: flutter
intl: any intl: any
syncfusion_flutter_charts: ^30.1.37 syncfusion_flutter_charts: ^30.1.37
auto_size_text: ^3.0.0
dev_dependencies: dev_dependencies:
flutter_test: flutter_test: