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 : final AppInfo appInfo; 7 0 : const Header({ 8 : Key? key, 9 : required this.appInfo, 10 0 : }) : super(key: key); 11 : 12 0 : @override 13 : Widget build(BuildContext context) { 14 0 : return Container( 15 : padding: const EdgeInsets.symmetric( 16 : vertical: 8, 17 : ), 18 : height: Constants.controlBarHeight, 19 0 : child: Align( 20 : alignment: Alignment.centerLeft, 21 0 : child: Text( 22 0 : appInfo.name, 23 0 : style: Theme.of(context).textTheme.headline6!.copyWith( 24 : fontWeight: FontWeight.bold, 25 : ), 26 : ), 27 : ), 28 : ); 29 : } 30 : }