KonectarApp/lib/widgets/customeventsappbar.dart

89 lines
2.9 KiB
Dart
Raw Permalink Normal View History

2024-09-06 06:30:31 +00:00
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
import 'package:konectar_events/utils/util.dart';
import 'package:konectar_events/widgets/custombutton.dart';
class EventsAppBar extends StatelessWidget implements PreferredSizeWidget {
EventsAppBar({
super.key,
});
@override
Widget build(BuildContext context) {
// TODO: implement build
return AppBar(
title: Row(
children: [
// Text(
// 'Konectar Events',
// style:
// TextStyle(fontSize: isTablet ? 22 : 16, color: Colors.white),
// ),
// SizedBox(
// width: 30,
// height: 30,
// child: Image.asset(
// "assets/images/konectar.png",
// ),
// ),
Container(
padding: EdgeInsets.all(20.0),
width: isTablet
? MediaQuery.of(context).size.width * 0.60
: MediaQuery.of(context).size.width * 0.55,
height: 80,
child: TextField(
style: TextStyle(
fontSize: isTablet ? 16 : 13, color: Colors.white),
decoration: InputDecoration(
hintText: "Search Event",
hintStyle: TextStyle(
fontSize: isTablet ? 16 : 13, color: Colors.grey),
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.black)),
))),
],
),
backgroundColor: Color.fromARGB(255, 0, 71, 132),
automaticallyImplyLeading: false,
centerTitle: false,
actions: [
Padding(
padding: const EdgeInsets.all(4.0),
child: InkWell(
onTap: () {
// Scaffold.of(context).openEndDrawer();
},
child: const Icon(
Icons.sort,
color: Colors.white,
),
),
// CustomButton(
// backgroundColor: Colors.white,
// onPressed: () => Scaffold.of(context).openEndDrawer(),
// //tooltip: MaterialLocalizations.of(context).openAppDrawerTooltip,
// title: 'Filters',
// fontsize: isTablet ? 16 : 13,
// textColor: Colors.black,
// ),
)
],
leading: InkWell(
onTap: () {
Navigator.pop(context);
},
child: const Icon(
Icons.arrow_back_ios,
color: Colors.white,
),
));
}
@override
// TODO: implement preferredSize
Size get preferredSize => Size.fromHeight(kToolbarHeight);
}