import 'package:flutter/material.dart'; import 'package:pweb/widgets/footer/widget.dart'; class PageWithFooter extends StatelessWidget { final PreferredSizeWidget? appBar; final Widget child; const PageWithFooter({ super.key, required this.child, this.appBar, }); @override Widget build(BuildContext context) => Scaffold( appBar: appBar, body: LayoutBuilder( builder: (context, constraints) => SingleChildScrollView( child: ConstrainedBox( constraints: BoxConstraints(minHeight: constraints.maxHeight), child: IntrinsicHeight( child: Column( children: [ Expanded(child: child), FooterWidget(), ], ), ), ), ), ), ); }