fix(ui): Button margins

pull/211/head
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,20 +134,16 @@ class InitializingPage extends StatelessWidget {
},
),
),
ConstrainedBox(
constraints: const BoxConstraints(
minWidth: double.infinity,
),
child: OutlinedButton(
child: Text(
cubit.state is ServerInstallationFinished
? 'basis.close'.tr()
: 'basis.later'.tr(),
),
onPressed: () {
context.router.popUntilRoot();
},
// const SizedBox(height: 8),
BrandOutlinedButton(
child: Text(
cubit.state is ServerInstallationFinished
? 'basis.close'.tr()
: 'basis.later'.tr(),
),
onPressed: () {
context.router.popUntilRoot();
},
),
],
),