Visibility of bottom bar in round view reworked

This commit is contained in:
Felix Kirchner
2025-04-27 11:09:13 +02:00
parent 999c496719
commit be62980fbd
2 changed files with 49 additions and 41 deletions

View File

@@ -2,6 +2,7 @@ import 'package:cabo_counter/data/game_session.dart';
import 'package:cabo_counter/utility/theme.dart' as theme; import 'package:cabo_counter/utility/theme.dart' as theme;
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart';
class RoundView extends StatefulWidget { class RoundView extends StatefulWidget {
final GameSession gameSession; final GameSession gameSession;
@@ -259,7 +260,9 @@ class _RoundViewState extends State<RoundView> {
left: 0, left: 0,
right: 0, right: 0,
bottom: bottomInset, bottom: bottomInset,
child: Container( child: KeyboardVisibilityBuilder(builder: (context, visible) {
if (!visible) {
return Container(
height: 80, height: 80,
padding: const EdgeInsets.only(bottom: 20), padding: const EdgeInsets.only(bottom: 20),
color: theme.backgroundTintColor, color: theme.backgroundTintColor,
@@ -298,8 +301,12 @@ class _RoundViewState extends State<RoundView> {
), ),
], ],
), ),
), );
), } else {
return const SizedBox.shrink();
}
}),
)
], ],
), ),
); );

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.1.3+51 version: 0.1.3+54
environment: environment:
sdk: ^3.5.4 sdk: ^3.5.4
@@ -14,6 +14,7 @@ dependencies:
font_awesome_flutter: ^10.8.0 font_awesome_flutter: ^10.8.0
url_launcher: any url_launcher: any
package_info_plus: any package_info_plus: any
flutter_keyboard_visibility: ^6.0.0
dev_dependencies: dev_dependencies:
flutter_test: flutter_test: