buildByMaterial method
build on material mode
Implementation
@override
Widget buildByMaterial(BuildContext context) {
final theme = Theme.of(context);
final iconColor = valueOf('tint', tint) ?? theme.colorScheme.primary;
final textColor = valueOf('tint', tint) ?? theme.colorScheme.onSurface;
// Check if this is a search navigation bar
final searchConf = valueOf('searchConfig', searchConfig);
if (searchConf != null) {
return _buildMaterialSearchNavBar(
context, theme, iconColor, textColor, searchConf);
}
return Container(
height: valueOf('height', height) ??
(valueOf('largeTitle', largeTitle) ? 96 : 56),
decoration: valueOf('transparent', transparent)
? null
: BoxDecoration(
color: theme.appBarTheme.backgroundColor ??
theme.colorScheme.surface,
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.1),
offset: const Offset(0, 1),
blurRadius: 2,
),
],
),
child: SafeArea(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: valueOf('largeTitle', largeTitle)
? _buildLargeTitleLayout(textColor, iconColor)
: _buildRegularLayout(textColor, iconColor),
),
),
);
}