import 'package:flutter/material.dart'; class CustomToast extends StatelessWidget { final String msg; const CustomToast({Key? key, required this.msg}) : super(key: key); @override Widget build(BuildContext context) { return Container( margin: EdgeInsets.only(bottom: MediaQuery.of(context).padding.bottom + 20), padding: const EdgeInsets.symmetric(horizontal: 17, vertical: 10), decoration: BoxDecoration( color: Theme.of(context).colorScheme.primaryContainer.withOpacity(0.8), borderRadius: BorderRadius.circular(20), ), child: Text(msg, style: Theme.of(context) .textTheme .labelMedium! .copyWith(color: Theme.of(context).colorScheme.primary)), ); } }