patch small issue with trad and theme
This commit is contained in:
@@ -8,6 +8,7 @@ class GenFilterSection extends StatelessWidget {
|
||||
final VoidCallback onToggleOpen;
|
||||
final Set<int> selectedGens;
|
||||
final void Function(int) onToggle;
|
||||
final Color surfaceColor;
|
||||
|
||||
const GenFilterSection({
|
||||
super.key,
|
||||
@@ -15,6 +16,7 @@ class GenFilterSection extends StatelessWidget {
|
||||
required this.onToggleOpen,
|
||||
required this.selectedGens,
|
||||
required this.onToggle,
|
||||
required this.surfaceColor,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -29,19 +31,19 @@ class GenFilterSection extends StatelessWidget {
|
||||
onPressed: onToggleOpen,
|
||||
icon: Icon(
|
||||
isOpen ? Icons.expand_less : Icons.filter_list,
|
||||
color: const Color(0xFF1B2333),
|
||||
color: surfaceColor,
|
||||
),
|
||||
label: Text(
|
||||
AppLocalizations.of(context)!.genFilter,
|
||||
style: const TextStyle(
|
||||
color: Color(0xFF1B2333),
|
||||
style: TextStyle(
|
||||
color: surfaceColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 16,
|
||||
letterSpacing: 2,
|
||||
),
|
||||
),
|
||||
style: OutlinedButton.styleFrom(
|
||||
side: const BorderSide(color: Color(0xFF1B2333), width: 2),
|
||||
side: BorderSide(color: surfaceColor, width: 2),
|
||||
padding: const EdgeInsets.symmetric(vertical: 12),
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.zero),
|
||||
),
|
||||
@@ -51,7 +53,7 @@ class GenFilterSection extends StatelessWidget {
|
||||
duration: const Duration(milliseconds: 250),
|
||||
curve: Curves.easeInOut,
|
||||
child: isOpen
|
||||
? _GenFilterPanel(selectedGens: selectedGens, onToggle: onToggle)
|
||||
? _GenFilterPanel(selectedGens: selectedGens, onToggle: onToggle, surfaceColor: surfaceColor)
|
||||
: const SizedBox.shrink(),
|
||||
),
|
||||
],
|
||||
@@ -63,8 +65,9 @@ class GenFilterSection extends StatelessWidget {
|
||||
class _GenFilterPanel extends StatelessWidget {
|
||||
final Set<int> selectedGens;
|
||||
final void Function(int) onToggle;
|
||||
final Color surfaceColor;
|
||||
|
||||
const _GenFilterPanel({required this.selectedGens, required this.onToggle});
|
||||
const _GenFilterPanel({required this.selectedGens, required this.onToggle, required this.surfaceColor});
|
||||
|
||||
static const _genNames = [
|
||||
'Gen I', 'Gen II', 'Gen III', 'Gen IV', 'Gen V', 'Gen VI', 'Gen VII', 'Gen VIII', 'Gen IX'
|
||||
@@ -76,7 +79,7 @@ class _GenFilterPanel extends StatelessWidget {
|
||||
margin: const EdgeInsets.only(top: 4),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
border: Border.all(color: const Color(0xFF1B2333), width: 2),
|
||||
border: Border.all(color: surfaceColor, width: 2),
|
||||
),
|
||||
child: Column(
|
||||
children: List.generate(AppConstants.genRanges.length, (i) {
|
||||
|
||||
@@ -8,12 +8,14 @@ class GuessSilhouette extends StatelessWidget {
|
||||
final Pokemon pokemon;
|
||||
final bool isShiny;
|
||||
final bool isGuessed;
|
||||
final Color surfaceColor;
|
||||
|
||||
const GuessSilhouette({
|
||||
super.key,
|
||||
required this.pokemon,
|
||||
required this.isShiny,
|
||||
required this.isGuessed,
|
||||
required this.surfaceColor,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -27,7 +29,7 @@ class GuessSilhouette extends StatelessWidget {
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFF3B6EE3),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(color: const Color(0xFF1B2333), width: 8),
|
||||
border: Border.all(color: surfaceColor, width: 8),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@@ -51,7 +53,7 @@ class GuessSilhouette extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Container(
|
||||
color: const Color(0xFF1B2333),
|
||||
color: surfaceColor,
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.symmetric(vertical: 8),
|
||||
child: Text(
|
||||
|
||||
Reference in New Issue
Block a user