2020-05-09 18:11:54 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
/// Customize the size of the AppBar
|
|
|
|
///
|
|
|
|
/// @author Pierre Hubert
|
|
|
|
|
|
|
|
/// Reduce the size of the appbar
|
|
|
|
class AppBarWrapper extends StatelessWidget implements PreferredSizeWidget {
|
|
|
|
final Widget appBar;
|
|
|
|
final double height;
|
|
|
|
|
2022-03-10 18:39:57 +00:00
|
|
|
const AppBarWrapper({required this.height, required this.appBar})
|
2022-03-11 15:41:29 +00:00
|
|
|
: super();
|
2020-05-09 18:11:54 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) => appBar;
|
|
|
|
|
|
|
|
@override
|
|
|
|
Size get preferredSize => Size.fromHeight(height);
|
|
|
|
}
|