mirror of
https://github.com/koloideal/Casha.git
synced 2026-08-08 17:51:14 +03:00
bc51609f85
big
32 lines
661 B
Dart
32 lines
661 B
Dart
import 'package:flutter/material.dart';
|
|
import 'transaction.dart';
|
|
|
|
class AppCategory {
|
|
final String key;
|
|
final TransactionType type;
|
|
final String labelEn;
|
|
final String labelRu;
|
|
final IconData icon;
|
|
final Color color;
|
|
final String iconName;
|
|
final bool isCustom;
|
|
final int? id;
|
|
|
|
const AppCategory({
|
|
required this.key,
|
|
required this.type,
|
|
required this.labelEn,
|
|
required this.labelRu,
|
|
required this.icon,
|
|
required this.color,
|
|
required this.iconName,
|
|
this.isCustom = false,
|
|
this.id,
|
|
});
|
|
|
|
String label(bool isRu) {
|
|
final value = isRu ? labelRu : labelEn;
|
|
return value.isEmpty ? key : value;
|
|
}
|
|
}
|