fix(ui): Button margins

This commit is contained in:
Inex Code 2023-05-30 20:52:42 +03:00
parent 4e65d5f945
commit 370cbf1052
3 changed files with 16 additions and 15 deletions

View file

@ -32,12 +32,14 @@ class BrandButton {
assert(text != null || child != null, 'required title or child');
return ConstrainedBox(
constraints: const BoxConstraints(
minHeight: 40,
minWidth: double.infinity,
),
child: FilledButton(
key: key,
onPressed: onPressed,
style: ElevatedButton.styleFrom(
tapTargetSize: MaterialTapTargetSize.padded,
),
child: child ?? Text(text ?? ''),
),
);

View file

@ -17,11 +17,13 @@ class BrandOutlinedButton extends StatelessWidget {
@override
Widget build(final BuildContext context) => ConstrainedBox(
constraints: const BoxConstraints(
minHeight: 40,
minWidth: double.infinity,
),
child: OutlinedButton(
onPressed: onPressed,
style: OutlinedButton.styleFrom(
tapTargetSize: MaterialTapTargetSize.padded,
),
child: child ??
Text(
title ?? '',

View file

@ -12,6 +12,7 @@ import 'package:selfprivacy/logic/cubit/forms/setup/initializing/root_user_form_
import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart';
import 'package:selfprivacy/ui/components/buttons/brand_button.dart';
import 'package:selfprivacy/ui/components/brand_timer/brand_timer.dart';
import 'package:selfprivacy/ui/components/buttons/outlined_button.dart';
import 'package:selfprivacy/ui/components/drawers/progress_drawer.dart';
import 'package:selfprivacy/ui/components/progress_bar/progress_bar.dart';
import 'package:selfprivacy/ui/components/drawers/support_drawer.dart';
@ -133,11 +134,8 @@ class InitializingPage extends StatelessWidget {
},
),
),
ConstrainedBox(
constraints: const BoxConstraints(
minWidth: double.infinity,
),
child: OutlinedButton(
// const SizedBox(height: 8),
BrandOutlinedButton(
child: Text(
cubit.state is ServerInstallationFinished
? 'basis.close'.tr()
@ -147,7 +145,6 @@ class InitializingPage extends StatelessWidget {
context.router.popUntilRoot();
},
),
),
],
),
),