fluffychat/lib/pangea/analytics_summary/learning_settings_button.dart
wcjord d773347d6e
Morph-repo-2 (#1681)
* feat(morphs): repo for getting lang-specific list of morphs

* integrated repo into use of morph features and tags

* generated

* merged with previous push

* generated

* generated

* chore: fix .env file path

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: ggurdin <46800240+ggurdin@users.noreply.github.com>
Co-authored-by: ggurdin <ggurdin@gmail.com>
2025-02-03 12:21:29 -05:00

57 lines
1.6 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:fluffychat/pangea/common/widgets/pressable_button.dart';
/// A badge that represents one learning progress indicator (i.e., construct uses)
class LearningSettingsButton extends StatelessWidget {
final String? l2;
final VoidCallback onTap;
const LearningSettingsButton({
super.key,
this.l2,
required this.onTap,
});
@override
Widget build(BuildContext context) {
return Tooltip(
message: L10n.of(context).learningSettings,
child: PressableButton(
buttonHeight: 2.5,
borderRadius: BorderRadius.circular(15),
onPressed: onTap,
color: Theme.of(context).colorScheme.surfaceBright,
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Theme.of(context).colorScheme.surfaceBright,
),
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(
size: 14,
Icons.language,
color: Theme.of(context).colorScheme.primary,
weight: 1000,
),
const SizedBox(width: 5),
Text(
l2 ?? "?",
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
color: Theme.of(context).colorScheme.primary,
),
),
],
),
),
),
);
}
}