Aidra Connect 10.0.2+16
Aidra Connect Mobile Application
Loading...
Searching...
No Matches
custom_appbar.dart
Go to the documentation of this file.
1import 'package:flutter/material.dart';
2import 'package:flutter_screenutil/flutter_screenutil.dart';
3import 'package:flutter_svg/flutter_svg.dart';
4import 'package:go_router/go_router.dart';
5import 'dart:ui';
6
7import 'package:hugeicons/hugeicons.dart';
8
9class CustomAppBar extends StatelessWidget {
10 final bool isLeadingVisible;
11 final String title;
12 final List<Widget>? actions;
13
15 super.key,
16 required this.isLeadingVisible,
17 required this.title,
18 this.actions,
19 });
20
21 @override
22 Widget build(BuildContext context) {
23 return ClipRect(
24 child: BackdropFilter(
25 filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
26 child: SafeArea(
27 child: Row(
28 mainAxisSize: MainAxisSize.max,
29 children: [
31 IconButton(
32 onPressed: () {
33 context.pop();
34 },
35 icon: Directionality.of(context) == TextDirection.rtl
36 ? const Icon(HugeIcons.strokeRoundedArrowRight02)
37 : const Icon(HugeIcons.strokeRoundedArrowLeft02),
38 ),
39 if (!isLeadingVisible) SizedBox(width: 48.sp),
40 Expanded(
41 child: Column(
42 children: [
43 SizedBox(height: 5.sp),
44 SvgPicture.asset(
45 'assets/svgs/logo_aidra.svg',
46 colorFilter: ColorFilter.mode(
47 Theme.of(context).colorScheme.onSurface,
48 BlendMode.srcATop,
49 ),
50 height: 20.sp,
51 ),
52 SizedBox(height: 5.sp),
53 Center(
54 child: Text(
55 title,
56 style: Theme.of(context).textTheme.displaySmall?.copyWith(
57 fontSize: 13.sp,
58 ),
59 ),
60 ),
61 ],
62 )),
63 if (actions != null)
64 Row(children: actions!)
65 else
66 SizedBox(width: 48.sp),
67 ],
68 ),
69 ),
70 ),
71 );
72 }
73}
final bool isLeadingVisible
final IconData icon
final VoidCallback onPressed
final String title
final Widget child
override Widget build(BuildContext context)
final List< Widget > actions
const CustomAppBar({ super.key, required this.isLeadingVisible, required this.title, this.actions, })