fixed deprecated warnings
This commit is contained in:
@@ -326,7 +326,7 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
// onPressed: () =>
|
||||
// _showBottomSheet(user.getUser(user.id ?? "")),
|
||||
// icon: Icon(FeatherIcons.moreVertical,
|
||||
// color: AppColors.of(context).text.withOpacity(0.8)),
|
||||
// color: AppColors.of(context).text.withValues(alpha: 0.8)),
|
||||
// ),
|
||||
// const SizedBox(
|
||||
// width: 5,
|
||||
@@ -345,7 +345,7 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
// ),
|
||||
// // _showBottomSheet(user.getUser(user.id ?? "")),
|
||||
// icon: Icon(FeatherIcons.fileText,
|
||||
// color: AppColors.of(context).text.withOpacity(0.8)),
|
||||
// color: AppColors.of(context).text.withValues(alpha: 0.8)),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
@@ -358,7 +358,9 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
icon: Icon(FeatherIcons.x,
|
||||
color: AppColors.of(context).text.withOpacity(0.8)),
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withValues(alpha: 0.8)),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 5.0,
|
||||
@@ -424,7 +426,7 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
leading: Icon(
|
||||
FeatherIcons.info,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
),
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
top: Radius.circular(12.0), bottom: Radius.circular(4.0)),
|
||||
@@ -443,7 +445,7 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
leading: Icon(
|
||||
FeatherIcons.grid,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
),
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
top: Radius.circular(4.0), bottom: Radius.circular(4.0)),
|
||||
@@ -456,7 +458,7 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
leading: Icon(
|
||||
FeatherIcons.edit3,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
),
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
top: Radius.circular(4.0), bottom: Radius.circular(4.0)),
|
||||
@@ -476,7 +478,7 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
leading: Icon(
|
||||
FeatherIcons.users,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
),
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
top: Radius.circular(4.0), bottom: Radius.circular(4.0)),
|
||||
@@ -543,7 +545,7 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
// width: 75.0,
|
||||
// decoration: BoxDecoration(
|
||||
// borderRadius: BorderRadius.circular(12.0),
|
||||
// color: AppColors.of(context).text.withOpacity(.25),
|
||||
// color: AppColors.of(context).text.withValues(alpha: .25),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
@@ -781,14 +783,18 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
title: Text(
|
||||
"grade_streak".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withValues(alpha: 0.95),
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
subtitle: Text(
|
||||
"grade_streak_subtitle".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(0.75),
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withValues(alpha: 0.75),
|
||||
),
|
||||
),
|
||||
leading: Image.asset(
|
||||
@@ -802,7 +808,9 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
trailing: Text(
|
||||
"${user.gradeStreak}",
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withValues(alpha: 0.95),
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 18.0,
|
||||
),
|
||||
@@ -842,7 +850,7 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
// leading: Icon(
|
||||
// FeatherIcons.link,
|
||||
// size: 22.0,
|
||||
// color: AppColors.of(context).text.withOpacity(0.95),
|
||||
// color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
// ),
|
||||
// trailing: GestureDetector(
|
||||
// onTap: () {
|
||||
@@ -869,7 +877,7 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
// child: Icon(
|
||||
// FeatherIcons.helpCircle,
|
||||
// size: 20.0,
|
||||
// color: AppColors.of(context).text.withOpacity(0.95),
|
||||
// color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
// ),
|
||||
// ),
|
||||
// borderRadius: const BorderRadius.vertical(
|
||||
@@ -930,7 +938,9 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
leading: Icon(
|
||||
FeatherIcons.sun,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withValues(alpha: 0.95),
|
||||
),
|
||||
trailing: Text(
|
||||
themeModeText,
|
||||
@@ -1023,7 +1033,7 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
leading: Icon(
|
||||
Icons.qr_code,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
),
|
||||
title: Text("qr_scanner".i18n),
|
||||
onPressed: () => Navigator.of(context).push(
|
||||
@@ -1040,7 +1050,7 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
leading: Icon(
|
||||
FeatherIcons.mail,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
),
|
||||
title: Text("news".i18n),
|
||||
onPressed: () => _openNews(context),
|
||||
@@ -1053,7 +1063,7 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
leading: Icon(
|
||||
FeatherIcons.map,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
),
|
||||
title: Text("stickermap".i18n),
|
||||
onPressed: () => launchUrl(
|
||||
@@ -1104,7 +1114,7 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
leading: Icon(
|
||||
FeatherIcons.lock,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
),
|
||||
title: Text("privacy".i18n),
|
||||
// onPressed: () => launchUrl(
|
||||
@@ -1120,7 +1130,7 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
leading: Icon(
|
||||
FeatherIcons.atSign,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
),
|
||||
title: const Text("Discord"),
|
||||
onPressed: () => launchUrl(Uri.parse("https://dc.refilc.hu"),
|
||||
@@ -1134,7 +1144,7 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
leading: Icon(
|
||||
FeatherIcons.globe,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
),
|
||||
title: const Text("www.refilc.hu"),
|
||||
onPressed: () => launchUrl(Uri.parse("https://www.refilc.hu"),
|
||||
@@ -1148,7 +1158,7 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
leading: Icon(
|
||||
FeatherIcons.github,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
),
|
||||
title: const Text("Github"),
|
||||
onPressed: () => launchUrl(
|
||||
@@ -1163,7 +1173,7 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
leading: Icon(
|
||||
FeatherIcons.award,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
),
|
||||
title: Text("licenses".i18n),
|
||||
onPressed: () => showLicensePage(context: context),
|
||||
@@ -1184,7 +1194,7 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.2),
|
||||
color: Colors.black.withValues(alpha: 0.2),
|
||||
blurRadius: 40.0,
|
||||
)
|
||||
],
|
||||
@@ -1204,24 +1214,23 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
FeatherIcons.barChart2,
|
||||
size: 22.0,
|
||||
color: settings.analyticsEnabled
|
||||
? AppColors.of(context).text.withOpacity(0.95)
|
||||
: AppColors.of(context).text.withOpacity(.25),
|
||||
? AppColors.of(context).text.withValues(alpha: 0.95)
|
||||
: AppColors.of(context).text.withValues(alpha: .25),
|
||||
),
|
||||
title: Text(
|
||||
"Analytics".i18n,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 16.0,
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settings.analyticsEnabled ? 1.0 : .5),
|
||||
color: AppColors.of(context).text.withValues(
|
||||
alpha: settings.analyticsEnabled ? 1.0 : .5),
|
||||
),
|
||||
),
|
||||
subtitle: Text(
|
||||
"Anonymous Usage Analytics".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withOpacity(settings.analyticsEnabled ? .5 : .2),
|
||||
color: AppColors.of(context).text.withValues(
|
||||
alpha: settings.analyticsEnabled ? .5 : .2),
|
||||
),
|
||||
),
|
||||
onChanged: (v) {
|
||||
@@ -1244,7 +1253,7 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
leading: Icon(
|
||||
Icons.feedback_outlined,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
),
|
||||
title: Text("feedback".i18n),
|
||||
onPressed: () => {
|
||||
@@ -1320,7 +1329,7 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
leading: Icon(
|
||||
Icons.tune_outlined,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: .95),
|
||||
),
|
||||
title: Text("exp_settings".i18n),
|
||||
onPressed: () => Clipboard.setData(ClipboardData(
|
||||
@@ -1338,7 +1347,7 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
leading: Icon(
|
||||
FeatherIcons.copy,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: .95),
|
||||
),
|
||||
title: Text("copy_jwt".i18n),
|
||||
onPressed: () => Clipboard.setData(ClipboardData(
|
||||
@@ -1355,7 +1364,8 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
leading: Icon(
|
||||
FeatherIcons.key,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(.95),
|
||||
color:
|
||||
AppColors.of(context).text.withValues(alpha: .95),
|
||||
),
|
||||
title: const Text("Remove Premium"),
|
||||
onPressed: () {
|
||||
@@ -1387,7 +1397,7 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withOpacity(0.65)),
|
||||
.withValues(alpha: 0.65)),
|
||||
child: Text("v${release.data!['version']}"),
|
||||
);
|
||||
} else {
|
||||
@@ -1402,7 +1412,7 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withOpacity(0.65)),
|
||||
.withValues(alpha: 0.65)),
|
||||
child: Text("v$envAppVer"),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user