mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-13 09:20:31 -07:00
chore: Fix dart deprecation messages
This commit is contained in:
parent
607dea3de1
commit
39a7537116
81 changed files with 258 additions and 195 deletions
|
|
@ -1,7 +1,9 @@
|
|||
import 'package:fladder/util/widget_extensions.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import 'package:fladder/util/widget_extensions.dart';
|
||||
|
||||
class NavigationButton extends ConsumerStatefulWidget {
|
||||
final String? label;
|
||||
final Widget selectedIcon;
|
||||
|
|
@ -58,10 +60,15 @@ class _NavigationButtonState extends ConsumerState<NavigationButton> {
|
|||
elevation: const WidgetStatePropertyAll(0),
|
||||
padding: const WidgetStatePropertyAll(EdgeInsets.zero),
|
||||
backgroundColor: const WidgetStatePropertyAll(Colors.transparent),
|
||||
iconColor: WidgetStateProperty.resolveWith((states) {
|
||||
return widget.selected
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.45);
|
||||
}),
|
||||
foregroundColor: WidgetStateProperty.resolveWith((states) {
|
||||
return widget.selected
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Theme.of(context).colorScheme.onSurface.withOpacity(0.45);
|
||||
: Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.45);
|
||||
})),
|
||||
onPressed: widget.onPressed,
|
||||
child: AnimatedContainer(
|
||||
|
|
@ -94,7 +101,7 @@ class _NavigationButtonState extends ConsumerState<NavigationButton> {
|
|||
width: widget.selected ? 14 : 0,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
color: Theme.of(context).colorScheme.primary.withOpacity(widget.selected ? 1 : 0),
|
||||
color: Theme.of(context).colorScheme.primary.withValues(alpha: widget.selected ? 1 : 0),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue