You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1018 B
Dart
31 lines
1018 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:test_sa/extensions/context_extension.dart';
|
|
import 'package:test_sa/extensions/int_extensions.dart';
|
|
|
|
import '../../models/enums/translation_keys.dart';
|
|
import '../app_style/app_color.dart';
|
|
|
|
class DefaultAppBar extends StatelessWidget implements PreferredSizeWidget {
|
|
final TranslationKeys title;
|
|
const DefaultAppBar({@required this.title, Key key}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return AppBar(
|
|
leading: InkWell(
|
|
onTap: () {
|
|
Navigator.of(context).pop();
|
|
},
|
|
child: const Icon(Icons.arrow_back_ios),
|
|
),
|
|
titleSpacing: 0,
|
|
leadingWidth: 50.toScreenWidth,
|
|
titleTextStyle: Theme.of(context).textTheme.headlineSmall?.copyWith(fontWeight: FontWeight.w600, color: context.isDark ? AppColor.neutral30 : AppColor.neutral50),
|
|
title: Text(context.translate(title)),
|
|
);
|
|
}
|
|
|
|
@override
|
|
Size get preferredSize => Size.fromHeight(60.toScreenHeight);
|
|
}
|