added new feature badge and unseen new feature list to settings
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:refilc/theme/colors/colors.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'chips.i18n.dart';
|
||||
|
||||
class BetaChip extends StatelessWidget {
|
||||
const BetaChip({super.key, this.disabled = false});
|
||||
@@ -22,7 +23,7 @@ class BetaChip extends StatelessWidget {
|
||||
padding: const EdgeInsets.only(left: 8, right: 8),
|
||||
child: Center(
|
||||
child: Text(
|
||||
"BETA",
|
||||
"beta".i18n,
|
||||
softWrap: true,
|
||||
style: TextStyle(
|
||||
fontSize: 10,
|
||||
24
refilc_mobile_ui/lib/common/chips/chips.i18n.dart
Normal file
24
refilc_mobile_ui/lib/common/chips/chips.i18n.dart
Normal file
@@ -0,0 +1,24 @@
|
||||
import 'package:i18n_extension/i18n_extension.dart';
|
||||
|
||||
extension ScreensLocalization on String {
|
||||
static final _t = Translations.byLocale("hu_hu") +
|
||||
{
|
||||
"en_en": {
|
||||
"new": "NEW",
|
||||
"beta": "BETA",
|
||||
},
|
||||
"hu_hu": {
|
||||
"new": "ÚJ",
|
||||
"beta": "BÉTA",
|
||||
},
|
||||
"de_de": {
|
||||
"new": "NEU",
|
||||
"beta": "BETA",
|
||||
},
|
||||
};
|
||||
|
||||
String get i18n => localize(this, _t);
|
||||
String fill(List<Object> params) => localizeFill(this, params);
|
||||
String plural(int value) => localizePlural(value, this, _t);
|
||||
String version(Object modifier) => localizeVersion(modifier, this, _t);
|
||||
}
|
||||
45
refilc_mobile_ui/lib/common/chips/new_chip.dart
Normal file
45
refilc_mobile_ui/lib/common/chips/new_chip.dart
Normal file
@@ -0,0 +1,45 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:refilc/theme/colors/colors.dart';
|
||||
import 'chips.i18n.dart';
|
||||
|
||||
class NewChip extends StatelessWidget {
|
||||
const NewChip({super.key, this.disabled = false});
|
||||
|
||||
final bool disabled;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color:
|
||||
disabled ? AppColors.of(context).text.withOpacity(.25) : Colors.red,
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
padding:
|
||||
const EdgeInsets.only(left: 6.0, right: 8.0, top: 4.0, bottom: 4.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.hotel_class_rounded,
|
||||
color: disabled
|
||||
? AppColors.of(context).text.withOpacity(.5)
|
||||
: Colors.white,
|
||||
size: 14.0,
|
||||
),
|
||||
const SizedBox(width: 2.0),
|
||||
Text(
|
||||
'new'.i18n,
|
||||
style: TextStyle(
|
||||
color: disabled
|
||||
? AppColors.of(context).text.withOpacity(.5)
|
||||
: Colors.white,
|
||||
fontSize: 12.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -389,6 +389,8 @@ class PlusScreenState extends State<PlusScreen> {
|
||||
),
|
||||
),
|
||||
child: CheckboxListTile(
|
||||
side:
|
||||
const BorderSide(color: Colors.black, width: 2.0),
|
||||
contentPadding:
|
||||
const EdgeInsets.only(left: 15.0, right: 10.0),
|
||||
value: docsAccepted,
|
||||
|
||||
@@ -13,7 +13,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:refilc_mobile_ui/screens/settings/settings_screen.i18n.dart';
|
||||
import 'package:refilc_mobile_ui/common/beta_chip.dart';
|
||||
import 'package:refilc_mobile_ui/common/chips/beta_chip.dart';
|
||||
|
||||
class MenuDesktopSettings extends StatelessWidget {
|
||||
const MenuDesktopSettings({super.key, required this.settings});
|
||||
|
||||
Reference in New Issue
Block a user