forked from firka/firka
based on 549b7e3e11
with some parts removed, and some parts backported
from the latest commit
32 lines
796 B
Dart
32 lines
796 B
Dart
import 'package:firka_wear/helpers/icon_helper.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'firka_icon.dart';
|
|
|
|
class ClassIconWidget extends StatelessWidget {
|
|
final String _uid;
|
|
final String _className;
|
|
final String _category;
|
|
final Color color;
|
|
final double? size;
|
|
|
|
const ClassIconWidget(
|
|
{super.key,
|
|
required String uid,
|
|
required String className,
|
|
required String category,
|
|
this.color = Colors.white,
|
|
this.size})
|
|
: _className = className,
|
|
_uid = uid,
|
|
_category = category;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
var iconCategory = getIconType(_uid, _className, _category);
|
|
|
|
return FirkaIconWidget(FirkaIconType.Majesticons, getIconData(iconCategory),
|
|
color: color, size: size);
|
|
}
|
|
}
|