added new feature badge and unseen new feature list to settings
This commit is contained in:
42
refilc_mobile_ui/lib/common/chips/beta_chip.dart
Normal file
42
refilc_mobile_ui/lib/common/chips/beta_chip.dart
Normal file
@@ -0,0 +1,42 @@
|
||||
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});
|
||||
|
||||
final bool disabled;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
height: 25,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 200),
|
||||
decoration: BoxDecoration(
|
||||
color: !disabled
|
||||
? Theme.of(context).colorScheme.secondary
|
||||
: AppColors.of(context).text.withOpacity(.25),
|
||||
borderRadius: BorderRadius.circular(40),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left: 8, right: 8),
|
||||
child: Center(
|
||||
child: Text(
|
||||
"beta".i18n,
|
||||
softWrap: true,
|
||||
style: TextStyle(
|
||||
fontSize: 10,
|
||||
color: disabled
|
||||
? AppColors.of(context).text.withOpacity(.5)
|
||||
: Colors.white,
|
||||
fontWeight: FontWeight.w600,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user