2023-07-26 22:38:09 -04:00
|
|
|
import 'package:awesome_extensions/awesome_extensions.dart';
|
2023-07-23 23:13:21 -04:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
import 'package:flutter_translate/flutter_translate.dart';
|
|
|
|
|
|
|
|
class DefaultAppBar extends AppBar {
|
|
|
|
DefaultAppBar(BuildContext context,
|
2023-07-26 14:20:29 -04:00
|
|
|
{required super.title, super.key, Widget? leading, List<Widget>? actions})
|
2023-07-23 23:13:21 -04:00
|
|
|
: super(
|
|
|
|
leading: leading ??
|
|
|
|
Container(
|
|
|
|
margin: const EdgeInsets.all(4),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: Colors.black.withAlpha(32),
|
|
|
|
shape: BoxShape.circle),
|
2023-07-26 22:38:09 -04:00
|
|
|
child:
|
|
|
|
SvgPicture.asset('assets/images/vlogo.svg', height: 32)
|
|
|
|
.paddingAll(4)),
|
2023-07-23 23:13:21 -04:00
|
|
|
actions: (actions ?? <Widget>[])
|
|
|
|
..add(
|
|
|
|
IconButton(
|
|
|
|
icon: const Icon(Icons.settings),
|
|
|
|
tooltip: translate('app_bar.settings_tooltip'),
|
|
|
|
onPressed: () {
|
|
|
|
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
|
|
|
|
content: Text(
|
|
|
|
'Accessibility and language options coming soon')));
|
|
|
|
},
|
|
|
|
),
|
|
|
|
));
|
|
|
|
}
|