blob: bb17e1138841ab76da7f7ba3014e89e61c86ed2b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import 'package:aves/theme/icons.dart';
import 'package:aves/widgets/common/extensions/build_context.dart';
import 'package:aves_model/aves_model.dart';
import 'package:flutter/widgets.dart';
extension ExtraTileLayoutView on TileLayout {
String getName(BuildContext context) {
final l10n = context.l10n;
return switch (this) {
TileLayout.mosaic => l10n.tileLayoutMosaic,
TileLayout.grid => l10n.tileLayoutGrid,
TileLayout.list => l10n.tileLayoutList,
};
}
IconData get icon {
return switch (this) {
TileLayout.mosaic => AIcons.layoutMosaic,
TileLayout.grid => AIcons.layoutGrid,
TileLayout.list => AIcons.layoutList,
};
}
}
|