You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.4 KiB
54 lines
1.4 KiB
import 'package:flutter/material.dart';
|
|
|
|
class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
|
|
final String title;
|
|
|
|
const CustomAppBar({Key? key, required this.title}) : super(key: key);
|
|
|
|
@override
|
|
Size get preferredSize => const Size.fromHeight(kToolbarHeight);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return AppBar(
|
|
backgroundColor: Colors.transparent,
|
|
elevation: 5,
|
|
flexibleSpace: Container(
|
|
decoration: const BoxDecoration(
|
|
gradient: LinearGradient(
|
|
colors: [Colors.white, const Color.fromARGB(255, 4, 54, 95)],
|
|
begin: Alignment.topLeft,
|
|
end: Alignment.bottomRight,
|
|
),
|
|
),
|
|
child: Row(
|
|
children: [
|
|
const Spacer(),
|
|
Align(
|
|
alignment: Alignment.center,
|
|
child: Text(
|
|
title,
|
|
style: const TextStyle(
|
|
fontSize: 25,
|
|
color: Colors.white,
|
|
),
|
|
),
|
|
),
|
|
const Spacer(),
|
|
Padding(
|
|
padding: const EdgeInsets.only(right: 10.0),
|
|
child: Align(
|
|
alignment: Alignment.centerRight,
|
|
child: Image.asset(
|
|
'assets/youmaz2.png',
|
|
width: 100,
|
|
height: 50,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|