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'); assert(text != null || child != null, 'required title or child');
return ConstrainedBox( return ConstrainedBox(
constraints: const BoxConstraints( constraints: const BoxConstraints(
minHeight: 40,
minWidth: double.infinity, minWidth: double.infinity,
), ),
child: FilledButton( child: FilledButton(
key: key, key: key,
onPressed: onPressed, onPressed: onPressed,
style: ElevatedButton.styleFrom(
tapTargetSize: MaterialTapTargetSize.padded,
),
child: child ?? Text(text ?? ''), child: child ?? Text(text ?? ''),
), ),
); );

View File

@ -17,11 +17,13 @@ class BrandOutlinedButton extends StatelessWidget {
@override @override
Widget build(final BuildContext context) => ConstrainedBox( Widget build(final BuildContext context) => ConstrainedBox(
constraints: const BoxConstraints( constraints: const BoxConstraints(
minHeight: 40,
minWidth: double.infinity, minWidth: double.infinity,
), ),
child: OutlinedButton( child: OutlinedButton(
onPressed: onPressed, onPressed: onPressed,
style: OutlinedButton.styleFrom(
tapTargetSize: MaterialTapTargetSize.padded,
),
child: child ?? child: child ??
Text( Text(
title ?? '', 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/logic/cubit/support_system/support_system_cubit.dart';
import 'package:selfprivacy/ui/components/buttons/brand_button.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/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/drawers/progress_drawer.dart';
import 'package:selfprivacy/ui/components/progress_bar/progress_bar.dart'; import 'package:selfprivacy/ui/components/progress_bar/progress_bar.dart';
import 'package:selfprivacy/ui/components/drawers/support_drawer.dart'; import 'package:selfprivacy/ui/components/drawers/support_drawer.dart';
@ -133,20 +134,16 @@ class InitializingPage extends StatelessWidget {
}, },
), ),
), ),
ConstrainedBox( // const SizedBox(height: 8),
constraints: const BoxConstraints( BrandOutlinedButton(
minWidth: double.infinity, child: Text(
), cubit.state is ServerInstallationFinished
child: OutlinedButton( ? 'basis.close'.tr()
child: Text( : 'basis.later'.tr(),
cubit.state is ServerInstallationFinished
? 'basis.close'.tr()
: 'basis.later'.tr(),
),
onPressed: () {
context.router.popUntilRoot();
},
), ),
onPressed: () {
context.router.popUntilRoot();
},
), ),
], ],
), ),