import 'package:didvan/config/theme_data.dart'; import 'package:flutter/material.dart'; class MessageBarBtn extends StatelessWidget { final bool enable; final IconData icon; final Function()? click; final Color? color; const MessageBarBtn( {Key? key, required this.enable, required this.icon, this.click, this.color}) : super(key: key); @override Widget build(BuildContext context) { return Container( width: 32, height: 32, decoration: BoxDecoration( shape: BoxShape.circle, color: enable ? color ?? Theme.of(context).colorScheme.primary : Theme.of(context).colorScheme.border), child: InkWell( onTap: click, child: Icon( icon, size: 18, color: enable ? Theme.of(context).colorScheme.white : null, ), ), ); } }