Line data Source code
1 : import 'package:flutter/material.dart'; 2 : import 'package:widgetbook/src/constants/constants.dart'; 3 : import 'package:widgetbook/src/models/app_info.dart'; 4 : 5 : class Header extends StatelessWidget { 6 0 : const Header({ 7 : Key? key, 8 : required this.appInfo, 9 0 : }) : super(key: key); 10 : 11 : final AppInfo appInfo; 12 : 13 0 : @override 14 : Widget build(BuildContext context) { 15 0 : return Container( 16 : padding: const EdgeInsets.symmetric( 17 : vertical: 8, 18 : ), 19 : height: Constants.controlBarHeight, 20 0 : child: Align( 21 : alignment: Alignment.centerLeft, 22 0 : child: Text( 23 0 : appInfo.name, 24 0 : style: Theme.of(context).textTheme.headline6!.copyWith( 25 : fontWeight: FontWeight.bold, 26 : ), 27 : ), 28 : ), 29 : ); 30 : } 31 : }