displayInfo static method

void displayInfo(
  1. String message,
  2. dynamic context, {
  3. bool info = false,
  4. IconData icon = Icons.report_problem_outlined,
})

Implementation

static void displayInfo(String message, context,
    {bool info = false, IconData icon = Icons.report_problem_outlined}) {
  var ctx = context;
  ScaffoldMessenger.of(ctx).showSnackBar(SnackBar(
    content: Row(crossAxisAlignment: CrossAxisAlignment.start, children: [
      Icon(!info ? icon : Icons.check_circle),
      const SizedBox(
        width: 10,
      ),
      Flexible(
          child: Text(message,
              style: const TextStyle().copyWith(
                  color: Theme.of(context).colorScheme.onSecondary))),
    ]),
    backgroundColor: Theme.of(context).colorScheme.secondary,
    //backgroundColor:
    //  !info ? Colors.red : MaterialColorHelper.buildColor(26, 92, 6),
    duration: const Duration(seconds: 4),
  ));
}