selfprivacy.org.app/lib/ui/components/buttons/sp_brand_button.dart
aliaksei tratseuski dd81053f42 refactor(UI): Rewrite onboarding page
rewrote OnboardingPage:
* decomposed into separate widgets
* now content stays centered on wide screens (set so width won't expand further than 480px)
* pageController is now properly disposed
* added some more code changes to
    * main (error widget builder)
    * brand_header (centerTitle instead of empty actions list)
    * console_page (listener callback fix, used gaps instead of SizedBox'es, added keys to list items)
    * service_page (just cleaner build method)
	* removed some dead code

Co-authored-by: Aliaksei Tratseuski <aliaksei.tratseuski@gmail.com>
Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/pulls/444
Co-authored-by: aliaksei tratseuski <misterfourtytwo@noreply.git.selfprivacy.org>
Co-committed-by: aliaksei tratseuski <misterfourtytwo@noreply.git.selfprivacy.org>
2024-02-08 13:59:52 +02:00

29 lines
697 B
Dart

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: MaterialStatePropertyAll(Size.fromHeight(48)),
),
onPressed: onPressed,
child: child,
);
}