49 lines
1.2 KiB
Dart
49 lines
1.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'package:pweb/widgets/appbar/profile.dart';
|
|
import 'package:pweb/widgets/logo.dart';
|
|
|
|
|
|
class PayoutAppBar extends StatelessWidget implements PreferredSizeWidget {
|
|
const PayoutAppBar({
|
|
super.key,
|
|
required this.title,
|
|
required this.onAddFundsPressed,
|
|
this.actions,
|
|
this.onLogout,
|
|
this.avatarUrl,
|
|
});
|
|
|
|
final Widget title;
|
|
final VoidCallback onAddFundsPressed;
|
|
final List<Widget>? actions;
|
|
final Future<void> Function()? onLogout;
|
|
final String? avatarUrl;
|
|
|
|
@override
|
|
Size get preferredSize => const Size.fromHeight(kToolbarHeight);
|
|
|
|
@override
|
|
Widget build(BuildContext context) => Padding(
|
|
padding: const EdgeInsets.only(left: 110, right: 80),
|
|
child: AppBar(
|
|
automaticallyImplyLeading: false,
|
|
title: Row(
|
|
children: [
|
|
ServiceLogo(),
|
|
SizedBox(width: 16),
|
|
title,
|
|
],
|
|
),
|
|
// leading: Padding(padding: EdgeInsetsGeometry.symmetric(horizontal: 8, vertical: 8), child: ServiceLogo()),
|
|
actions: [
|
|
ProfileAvatar(
|
|
avatarUrl: avatarUrl,
|
|
onLogout: onLogout,
|
|
),
|
|
const SizedBox(width: 8),
|
|
],
|
|
),
|
|
);
|
|
}
|