refactor(ui): Delete SPBrandButton

This commit is contained in:
Inex Code 2024-10-30 15:38:20 +03:00
parent 3cd61e9cee
commit 731f15fff6
3 changed files with 3 additions and 33 deletions

View file

@ -1,2 +0,0 @@
export 'brand_button.dart';
export 'sp_brand_button.dart';

View file

@ -1,28 +0,0 @@
import 'package:flutter/material.dart';
class SPBrandButton extends StatelessWidget {
const SPBrandButton({
required this.child,
required this.onPressed,
super.key,
});
SPBrandButton.text({
required final String title,
required this.onPressed,
super.key,
}) : child = Text(title);
final Widget child;
final VoidCallback onPressed;
@override
Widget build(final BuildContext context) => FilledButton(
// TODO(misterfourtytwo): move button styles to theme configuration
style: const ButtonStyle(
minimumSize: WidgetStatePropertyAll(Size.fromHeight(48)),
),
onPressed: onPressed,
child: child,
);
}

View file

@ -1,6 +1,6 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:selfprivacy/ui/components/buttons/buttons.dart';
import 'package:selfprivacy/ui/components/buttons/brand_button.dart';
// base widget for onboarding view
class OnboardingView extends StatelessWidget {
@ -41,8 +41,8 @@ class OnboardingView extends StatelessWidget {
Padding(
padding: const EdgeInsets.symmetric(horizontal: 15) +
const EdgeInsets.only(bottom: 30),
child: SPBrandButton.text(
title: buttonTitle.tr(),
child: BrandButton.filled(
text: buttonTitle.tr(),
onPressed: onProceed,
),
),