Replace describeEnum with .name

This commit is contained in:
Shawn 2023-09-05 17:47:45 -06:00
parent bc21f55d62
commit 345f73f048

View File

@ -1,6 +1,4 @@
// ignore_for_file: constant_identifier_names
import 'package:flutter/foundation.dart';
import 'package:wonders/common_libs.dart';
class AppIcon extends StatelessWidget {
@ -11,9 +9,8 @@ class AppIcon extends StatelessWidget {
@override
Widget build(BuildContext context) {
String i = describeEnum(icon).toLowerCase().replaceAll('_', '-');
String i = icon.name.toLowerCase().replaceAll('_', '-');
String path = 'assets/images/_common/icons/icon-$i.png';
//print(path);
return SizedBox(
width: size,
height: size,