36 lines
762 B
Dart
36 lines
762 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class PopAppbar extends StatelessWidget implements PreferredSizeWidget {
|
|
final VoidCallback onPressed;
|
|
final String label;
|
|
|
|
const PopAppbar({
|
|
super.key,
|
|
required this.onPressed,
|
|
required this.label,
|
|
});
|
|
|
|
@override
|
|
Size get preferredSize => Size.fromHeight(kToolbarHeight);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return AppBar(
|
|
backgroundColor: Colors.white,
|
|
leading: IconButton(
|
|
icon: const Icon(Icons.arrow_back),
|
|
onPressed: onPressed,
|
|
),
|
|
iconTheme: const IconThemeData(
|
|
color: Colors.black,
|
|
),
|
|
title: Text(
|
|
label,
|
|
style: const TextStyle(
|
|
color: Colors.black,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|