mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-12 00:40:28 +00:00
feat: Adjust padding in SAR Update Sheet for keyboard visibility
This commit is contained in:
@@ -488,9 +488,6 @@ class _HomeScreenState extends State<HomeScreen> with SingleTickerProviderStateM
|
|||||||
FilledButton(
|
FilledButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await provider.disconnect();
|
await provider.disconnect();
|
||||||
if (context.mounted) {
|
|
||||||
context.read<AppProvider>().clearAllData();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
style: FilledButton.styleFrom(
|
style: FilledButton.styleFrom(
|
||||||
backgroundColor: Colors.red.shade700,
|
backgroundColor: Colors.red.shade700,
|
||||||
@@ -587,9 +584,6 @@ class _HomeScreenState extends State<HomeScreen> with SingleTickerProviderStateM
|
|||||||
? null
|
? null
|
||||||
: () async {
|
: () async {
|
||||||
await provider.disconnect();
|
await provider.disconnect();
|
||||||
if (context.mounted) {
|
|
||||||
context.read<AppProvider>().clearAllData();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.bluetooth_disabled, size: 18),
|
icon: const Icon(Icons.bluetooth_disabled, size: 18),
|
||||||
label: const Text('Disconnect'),
|
label: const Text('Disconnect'),
|
||||||
|
|||||||
@@ -137,6 +137,9 @@ class _SarUpdateSheetState extends State<SarUpdateSheet> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
// Get keyboard height to adjust padding
|
||||||
|
final keyboardHeight = MediaQuery.of(context).viewInsets.bottom;
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
height: MediaQuery.of(context).size.height * 0.9,
|
height: MediaQuery.of(context).size.height * 0.9,
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
@@ -185,7 +188,12 @@ class _SarUpdateSheetState extends State<SarUpdateSheet> {
|
|||||||
// Content
|
// Content
|
||||||
Expanded(
|
Expanded(
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
padding: const EdgeInsets.all(16),
|
padding: EdgeInsets.only(
|
||||||
|
left: 16,
|
||||||
|
right: 16,
|
||||||
|
top: 16,
|
||||||
|
bottom: keyboardHeight > 0 ? keyboardHeight + 16 : 16,
|
||||||
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
Reference in New Issue
Block a user