Componente appbar y primary buttom

This commit is contained in:
Juan Felipe Duarte
2023-04-13 15:23:16 -05:00
parent 2eea2d6502
commit 232ca3df46
13 changed files with 112 additions and 263 deletions
+35
View File
@@ -0,0 +1,35 @@
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,
),
),
);
}
}