fixed deprecated warnings
This commit is contained in:
@@ -67,7 +67,7 @@ class PanelTitle extends StatelessWidget {
|
||||
child: DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.titleMedium!.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColors.of(context).text.withOpacity(0.65)),
|
||||
color: AppColors.of(context).text.withValues(alpha: 0.65)),
|
||||
child: title,
|
||||
),
|
||||
);
|
||||
|
||||
@@ -23,18 +23,28 @@ class PanelActionButton extends StatelessWidget {
|
||||
padding: padding,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
side: BorderSide(color: Theme.of(context).colorScheme.secondary.withOpacity(.6), width: 2),
|
||||
side: BorderSide(
|
||||
color:
|
||||
Theme.of(context).colorScheme.secondary.withValues(alpha: .6),
|
||||
width: 2),
|
||||
),
|
||||
child: ListTile(
|
||||
leading: leading != null
|
||||
? Theme(
|
||||
data: Theme.of(context).copyWith(iconTheme: IconThemeData(color: Theme.of(context).colorScheme.secondary)),
|
||||
data: Theme.of(context).copyWith(
|
||||
iconTheme: IconThemeData(
|
||||
color: Theme.of(context).colorScheme.secondary)),
|
||||
child: leading!,
|
||||
)
|
||||
: null,
|
||||
trailing: trailing,
|
||||
title: title != null
|
||||
? DefaultTextStyle(style: Theme.of(context).textTheme.titleMedium!.copyWith(fontWeight: FontWeight.w500, fontSize: 15.0), child: title!)
|
||||
? DefaultTextStyle(
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.titleMedium!
|
||||
.copyWith(fontWeight: FontWeight.w500, fontSize: 15.0),
|
||||
child: title!)
|
||||
: null,
|
||||
contentPadding: EdgeInsets.zero,
|
||||
visualDensity: VisualDensity.compact,
|
||||
|
||||
@@ -36,8 +36,9 @@ class PanelButton extends StatelessWidget {
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: borderRadius ?? BorderRadius.circular(12.0)),
|
||||
fillColor: background
|
||||
? Colors.white.withOpacity(
|
||||
Theme.of(context).brightness == Brightness.light ? .35 : .2)
|
||||
? Colors.white.withValues(
|
||||
alpha:
|
||||
Theme.of(context).brightness == Brightness.light ? .35 : .2)
|
||||
: null,
|
||||
child: ListTile(
|
||||
leading: leading != null
|
||||
@@ -57,7 +58,7 @@ class PanelButton extends StatelessWidget {
|
||||
width: 2.0,
|
||||
height: 32.0,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.of(context).text.withOpacity(.15),
|
||||
color: AppColors.of(context).text.withValues(alpha: .15),
|
||||
borderRadius: BorderRadius.circular(45.0),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user