feat: Adjust padding in SAR Update Sheet for keyboard visibility

This commit is contained in:
Janez T
2025-10-15 15:19:58 +02:00
parent 52efa03d32
commit f76cd227e1
2 changed files with 9 additions and 7 deletions

View File

@@ -488,9 +488,6 @@ class _HomeScreenState extends State<HomeScreen> with SingleTickerProviderStateM
FilledButton(
onPressed: () async {
await provider.disconnect();
if (context.mounted) {
context.read<AppProvider>().clearAllData();
}
},
style: FilledButton.styleFrom(
backgroundColor: Colors.red.shade700,
@@ -587,9 +584,6 @@ class _HomeScreenState extends State<HomeScreen> with SingleTickerProviderStateM
? null
: () async {
await provider.disconnect();
if (context.mounted) {
context.read<AppProvider>().clearAllData();
}
},
icon: const Icon(Icons.bluetooth_disabled, size: 18),
label: const Text('Disconnect'),

View File

@@ -137,6 +137,9 @@ class _SarUpdateSheetState extends State<SarUpdateSheet> {
@override
Widget build(BuildContext context) {
// Get keyboard height to adjust padding
final keyboardHeight = MediaQuery.of(context).viewInsets.bottom;
return Container(
height: MediaQuery.of(context).size.height * 0.9,
decoration: const BoxDecoration(
@@ -185,7 +188,12 @@ class _SarUpdateSheetState extends State<SarUpdateSheet> {
// Content
Expanded(
child: SingleChildScrollView(
padding: const EdgeInsets.all(16),
padding: EdgeInsets.only(
left: 16,
right: 16,
top: 16,
bottom: keyboardHeight > 0 ? keyboardHeight + 16 : 16,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [