You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
681B

  1. import 'package:flutter/material.dart';
  2. class WidgetToast extends StatelessWidget {
  3. String message;
  4. Color color = Colors.greenAccent;
  5. WidgetToast({@required this.message, this.color});
  6. @override
  7. Widget build(BuildContext context) {
  8. return Container(
  9. padding: const EdgeInsets.symmetric(horizontal: 24.0, vertical: 12.0),
  10. decoration: BoxDecoration(
  11. borderRadius: BorderRadius.circular(25.0),
  12. color: color,
  13. ),
  14. child: Row(
  15. mainAxisSize: MainAxisSize.min,
  16. children: [
  17. Icon(Icons.check),
  18. SizedBox(
  19. width: 12.0,
  20. ),
  21. Text(message),
  22. ],
  23. ),
  24. );
  25. }
  26. }