mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-09 17:39:42 +00:00
refactor(ui): Delete SPBrandButton
This commit is contained in:
parent
3cd61e9cee
commit
731f15fff6
|
@ -1,2 +0,0 @@
|
||||||
export 'brand_button.dart';
|
|
||||||
export 'sp_brand_button.dart';
|
|
|
@ -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,
|
|
||||||
);
|
|
||||||
}
|
|
|
@ -1,6 +1,6 @@
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.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
|
// base widget for onboarding view
|
||||||
class OnboardingView extends StatelessWidget {
|
class OnboardingView extends StatelessWidget {
|
||||||
|
@ -41,8 +41,8 @@ class OnboardingView extends StatelessWidget {
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 15) +
|
padding: const EdgeInsets.symmetric(horizontal: 15) +
|
||||||
const EdgeInsets.only(bottom: 30),
|
const EdgeInsets.only(bottom: 30),
|
||||||
child: SPBrandButton.text(
|
child: BrandButton.filled(
|
||||||
title: buttonTitle.tr(),
|
text: buttonTitle.tr(),
|
||||||
onPressed: onProceed,
|
onPressed: onProceed,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue