lemmur-app-android/lib/widgets/bottom_safe.dart

20 lines
557 B
Dart
Raw Normal View History

2021-01-26 23:16:47 +01:00
import 'package:flutter/material.dart';
class BottomSafe extends StatelessWidget {
final double additionalPadding;
static const fabPadding =
// FAB size + FAB margin, 56 is as per https://material.io/components/buttons-floating-action-button#anatomy
56 + kFloatingActionButtonMargin;
2021-01-26 23:16:47 +01:00
const BottomSafe([this.additionalPadding = 0]);
const BottomSafe.fab() : this(fabPadding);
2021-01-26 23:16:47 +01:00
@override
Widget build(BuildContext context) {
return SizedBox(
height: MediaQuery.of(context).padding.bottom + additionalPadding,
);
}
2021-01-26 23:16:47 +01:00
}