mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-09-18 17:37:50 +00:00
dd81053f42
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>
31 lines
777 B
Dart
31 lines
777 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class BrandHeader extends StatelessWidget {
|
|
const BrandHeader({
|
|
super.key,
|
|
this.title = '',
|
|
this.hasBackButton = false,
|
|
this.onBackButtonPressed,
|
|
});
|
|
|
|
final String title;
|
|
final bool hasBackButton;
|
|
final VoidCallback? onBackButtonPressed;
|
|
|
|
@override
|
|
Widget build(final BuildContext context) => AppBar(
|
|
centerTitle: true,
|
|
title: Padding(
|
|
padding: const EdgeInsets.only(top: 4.0),
|
|
child: Text(title),
|
|
),
|
|
leading: hasBackButton
|
|
? IconButton(
|
|
icon: const Icon(Icons.arrow_back),
|
|
onPressed:
|
|
onBackButtonPressed ?? () => Navigator.of(context).pop(),
|
|
)
|
|
: null,
|
|
);
|
|
}
|