76 lines
2.3 KiB
Dart
76 lines
2.3 KiB
Dart
|
import 'package:flutter/cupertino.dart';
|
||
|
import 'package:flutter/material.dart';
|
||
|
import 'package:flutter/rendering.dart';
|
||
|
import 'package:flutter/widgets.dart';
|
||
|
import 'package:flutter_svg/svg.dart';
|
||
|
import 'package:konectar_events/utils/util.dart';
|
||
|
import 'package:konectar_events/widgets/custombutton.dart';
|
||
|
|
||
|
class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||
|
final String title;
|
||
|
final Color backgroundcolor;
|
||
|
Color fontColor;
|
||
|
CustomAppBar(
|
||
|
{super.key,
|
||
|
required this.title,
|
||
|
required this.backgroundcolor,
|
||
|
this.fontColor = Colors.white});
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
// TODO: implement build
|
||
|
return AppBar(
|
||
|
title: Row(
|
||
|
children: [
|
||
|
// Image.asset(
|
||
|
// 'assets/images/konectar.png',
|
||
|
// width: isTablet ? 60.0 : 40.0,
|
||
|
// // color: Colors.white,
|
||
|
// // colorFilter: const ColorFilter.mode(Colors.white, BlendMode.srcIn),
|
||
|
// ),
|
||
|
Text(
|
||
|
title,
|
||
|
style: TextStyle(
|
||
|
fontSize: isTablet ? 24 : 20,
|
||
|
color: fontColor,
|
||
|
fontWeight: FontWeight.bold,
|
||
|
//fontFamily: 'SourceSerifLight'
|
||
|
),
|
||
|
),
|
||
|
//const Spacer(),
|
||
|
],
|
||
|
),
|
||
|
backgroundColor: backgroundcolor,
|
||
|
// backgroundColor: Colors.transparent,
|
||
|
automaticallyImplyLeading: true,
|
||
|
centerTitle: false,
|
||
|
// actions: [
|
||
|
// Padding(
|
||
|
// padding: const EdgeInsets.all(4.0),
|
||
|
// child: InkWell(
|
||
|
// onTap: () {
|
||
|
// Scaffold.of(context).openEndDrawer();
|
||
|
// },
|
||
|
// child: const Icon(
|
||
|
// Icons.sort,
|
||
|
// color: Colors.black,
|
||
|
// ),
|
||
|
// ),
|
||
|
|
||
|
// // CustomButton(
|
||
|
// // backgroundColor: Colors.white,
|
||
|
// // onPressed: () => Scaffold.of(context).openEndDrawer(),
|
||
|
// // //tooltip: MaterialLocalizations.of(context).openAppDrawerTooltip,
|
||
|
// // title: 'Filters',
|
||
|
// // fontsize: isTablet ? 16 : 13,
|
||
|
// // textColor: Colors.black,
|
||
|
// // ),
|
||
|
// )
|
||
|
// ],
|
||
|
);
|
||
|
}
|
||
|
|
||
|
@override
|
||
|
// TODO: implement preferredSize
|
||
|
Size get preferredSize => Size.fromHeight(kToolbarHeight);
|
||
|
}
|