WIP - more decoupling of blocs

This commit is contained in:
Anton Stubenbord
2022-12-12 01:29:34 +01:00
parent e2a20cea75
commit 2f31d9c053
51 changed files with 1083 additions and 800 deletions

View File

@@ -1,9 +1,32 @@
import 'package:flutter/widgets.dart';
extension WidgetPadding on Widget {
Widget padded([EdgeInsetsGeometry value = const EdgeInsets.all(8)]) {
Widget padded([double all = 8.0]) {
return Padding(
padding: value,
padding: EdgeInsets.all(all),
child: this,
);
}
Widget paddedSymmetrically({double horizontal = 0.0, double vertical = 0.0}) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: horizontal, vertical: vertical),
child: this,
);
}
Widget paddedOnly(
{double top = 0.0,
double bottom = 0.0,
double left = 0.0,
double right = 0.0}) {
return Padding(
padding: EdgeInsets.only(
top: top,
bottom: bottom,
left: left,
right: right,
),
child: this,
);
}