forked from firka/student-legacy
made live activity color only visible on ios
This commit is contained in:
parent
85f5c408c0
commit
5eec61a7a9
@ -1,5 +1,7 @@
|
|||||||
// ignore_for_file: use_build_context_synchronously
|
// ignore_for_file: use_build_context_synchronously
|
||||||
|
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:dropdown_button2/dropdown_button2.dart';
|
import 'package:dropdown_button2/dropdown_button2.dart';
|
||||||
import 'package:filcnaplo/api/providers/user_provider.dart';
|
import 'package:filcnaplo/api/providers/user_provider.dart';
|
||||||
import 'package:filcnaplo/helpers/subject.dart';
|
import 'package:filcnaplo/helpers/subject.dart';
|
||||||
@ -570,53 +572,55 @@ class PersonalizeSettingsScreenState extends State<PersonalizeSettingsScreen>
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
// live activity color
|
// live activity color
|
||||||
SplittedPanel(
|
if (Platform.isIOS)
|
||||||
padding: const EdgeInsets.only(top: 9.0),
|
SplittedPanel(
|
||||||
cardPadding: const EdgeInsets.all(4.0),
|
padding: const EdgeInsets.only(top: 9.0),
|
||||||
isSeparated: true,
|
cardPadding: const EdgeInsets.all(4.0),
|
||||||
children: [
|
isSeparated: true,
|
||||||
PanelButton(
|
children: [
|
||||||
onPressed: () {
|
PanelButton(
|
||||||
if (!Provider.of<PremiumProvider>(context,
|
onPressed: () {
|
||||||
listen: false)
|
if (!Provider.of<PremiumProvider>(context,
|
||||||
.hasScope(PremiumScopes.liveActivityColor)) {
|
listen: false)
|
||||||
PremiumLockedFeatureUpsell.show(
|
.hasScope(PremiumScopes.liveActivityColor)) {
|
||||||
context: context,
|
PremiumLockedFeatureUpsell.show(
|
||||||
feature: PremiumFeature.liveActivity,
|
context: context,
|
||||||
);
|
feature: PremiumFeature.liveActivity,
|
||||||
return;
|
);
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SettingsHelper.liveActivityColor(context);
|
SettingsHelper.liveActivityColor(context);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
title: Text(
|
title: Text(
|
||||||
"live_activity_color".i18n,
|
"live_activity_color".i18n,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
color:
|
||||||
|
AppColors.of(context).text.withOpacity(.95),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
leading: Icon(
|
||||||
|
FeatherIcons.activity,
|
||||||
|
size: 22.0,
|
||||||
color: AppColors.of(context).text.withOpacity(.95),
|
color: AppColors.of(context).text.withOpacity(.95),
|
||||||
),
|
),
|
||||||
),
|
trailing: Container(
|
||||||
leading: Icon(
|
margin: const EdgeInsets.only(left: 2.0),
|
||||||
FeatherIcons.activity,
|
width: 12.0,
|
||||||
size: 22.0,
|
height: 12.0,
|
||||||
color: AppColors.of(context).text.withOpacity(.95),
|
decoration: BoxDecoration(
|
||||||
),
|
shape: BoxShape.circle,
|
||||||
trailing: Container(
|
color: settingsProvider.liveActivityColor,
|
||||||
margin: const EdgeInsets.only(left: 2.0),
|
),
|
||||||
width: 12.0,
|
),
|
||||||
height: 12.0,
|
borderRadius: const BorderRadius.vertical(
|
||||||
decoration: BoxDecoration(
|
top: Radius.circular(12.0),
|
||||||
shape: BoxShape.circle,
|
bottom: Radius.circular(12.0),
|
||||||
color: settingsProvider.liveActivityColor,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
borderRadius: const BorderRadius.vertical(
|
],
|
||||||
top: Radius.circular(12.0),
|
),
|
||||||
bottom: Radius.circular(12.0),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
|
|
||||||
// SplittedPanel(
|
// SplittedPanel(
|
||||||
// padding: const EdgeInsets.only(top: 9.0),
|
// padding: const EdgeInsets.only(top: 9.0),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user