Monday, December 11, 2023

AppBar (State less Widget)

 STATE LESS WIDGET





import 'package:flutter/material.dart';

class AppBarWidget extends StatelessWidget {
final Widget title;
final Color? bgcolor;

const AppBarWidget({super.key, required this.title, this.bgcolor});

@override
Widget build(BuildContext context) {
return AppBar(
title: title,
leading: Icon(Icons.agriculture_rounded),
actions: <Widget>[
Icon(Icons.add),
IconButton(onPressed: (){}, icon: Icon(Icons.call)),
],
backgroundColor: bgcolor ?? Colors.green,
centerTitle: true,
);
}
}

No comments:

Post a Comment

Featured post

Compress Image With Show File Size & Resolution in Flutter

 Compress Image With Show File Size & Resolution  1.Multiple File Image Compress with file Size import 'dart:io' ; import 'p...

LightBlog