mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-29 08:16:28 +00:00
23 lines
547 B
Dart
23 lines
547 B
Dart
|
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;
|
||
|
|
||
|
const AppBarWrapper({@required this.height, @required this.appBar})
|
||
|
: assert(height != null),
|
||
|
assert(appBar != null),
|
||
|
super();
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) => appBar;
|
||
|
|
||
|
@override
|
||
|
Size get preferredSize => Size.fromHeight(height);
|
||
|
}
|