mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-11-19 07:09:14 +00:00
fix: brand_header now extends preferred_size_widget
This commit is contained in:
parent
70b2fc28ab
commit
71bd5e5ad2
|
@ -1,6 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class BrandHeader extends StatelessWidget {
|
||||
class BrandHeader extends StatelessWidget implements PreferredSizeWidget {
|
||||
const BrandHeader({
|
||||
super.key,
|
||||
this.title = '',
|
||||
|
@ -8,6 +8,9 @@ class BrandHeader extends StatelessWidget {
|
|||
this.onBackButtonPressed,
|
||||
});
|
||||
|
||||
@override
|
||||
Size get preferredSize => const Size.fromHeight(52.0);
|
||||
|
||||
final String title;
|
||||
final bool hasBackButton;
|
||||
final VoidCallback? onBackButtonPressed;
|
||||
|
|
|
@ -21,11 +21,8 @@ class MorePage extends StatelessWidget {
|
|||
|
||||
return Scaffold(
|
||||
appBar: Breakpoints.small.isActive(context)
|
||||
? PreferredSize(
|
||||
preferredSize: const Size.fromHeight(52),
|
||||
child: BrandHeader(
|
||||
title: 'basis.more'.tr(),
|
||||
),
|
||||
? BrandHeader(
|
||||
title: 'basis.more'.tr(),
|
||||
)
|
||||
: null,
|
||||
body: ListView(
|
||||
|
|
|
@ -65,11 +65,8 @@ class _ProvidersPageState extends State<ProvidersPage> {
|
|||
|
||||
return Scaffold(
|
||||
appBar: Breakpoints.small.isActive(context)
|
||||
? PreferredSize(
|
||||
preferredSize: const Size.fromHeight(52),
|
||||
child: BrandHeader(
|
||||
title: 'basis.providers_title'.tr(),
|
||||
),
|
||||
? BrandHeader(
|
||||
title: 'basis.providers_title'.tr(),
|
||||
)
|
||||
: null,
|
||||
body: ListView(
|
||||
|
|
|
@ -37,11 +37,8 @@ class _ServicesPageState extends State<ServicesPage> {
|
|||
|
||||
return Scaffold(
|
||||
appBar: Breakpoints.small.isActive(context)
|
||||
? PreferredSize(
|
||||
preferredSize: const Size.fromHeight(52),
|
||||
child: BrandHeader(
|
||||
title: 'basis.services'.tr(),
|
||||
),
|
||||
? BrandHeader(
|
||||
title: 'basis.services'.tr(),
|
||||
)
|
||||
: null,
|
||||
body: !isReady
|
||||
|
|
|
@ -129,11 +129,8 @@ class UsersPage extends StatelessWidget {
|
|||
|
||||
return Scaffold(
|
||||
appBar: Breakpoints.small.isActive(context)
|
||||
? PreferredSize(
|
||||
preferredSize: const Size.fromHeight(52),
|
||||
child: BrandHeader(
|
||||
title: 'basis.users'.tr(),
|
||||
),
|
||||
? BrandHeader(
|
||||
title: 'basis.users'.tr(),
|
||||
)
|
||||
: null,
|
||||
body: child,
|
||||
|
|
Loading…
Reference in a new issue