only show relevant calendar sync options
This commit is contained in:
parent
c2754b83ae
commit
afb9e5ee2c
@ -1,5 +1,7 @@
|
|||||||
// ignore_for_file: use_build_context_synchronously
|
// ignore_for_file: use_build_context_synchronously
|
||||||
|
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:refilc/api/providers/user_provider.dart';
|
import 'package:refilc/api/providers/user_provider.dart';
|
||||||
import 'package:refilc/models/linked_account.dart';
|
import 'package:refilc/models/linked_account.dart';
|
||||||
import 'package:refilc/models/settings.dart';
|
import 'package:refilc/models/settings.dart';
|
||||||
@ -196,77 +198,79 @@ class CalendarSyncScreenState extends State<CalendarSyncScreen>
|
|||||||
if (thirdPartyProvider.linkedAccounts.isEmpty)
|
if (thirdPartyProvider.linkedAccounts.isEmpty)
|
||||||
Column(
|
Column(
|
||||||
children: [
|
children: [
|
||||||
SplittedPanel(
|
if (Platform.isAndroid)
|
||||||
title: Text('choose_account'.i18n),
|
SplittedPanel(
|
||||||
padding: EdgeInsets.zero,
|
title: Text('choose_account'.i18n),
|
||||||
cardPadding: const EdgeInsets.all(4.0),
|
padding: EdgeInsets.zero,
|
||||||
isSeparated: true,
|
cardPadding: const EdgeInsets.all(4.0),
|
||||||
children: [
|
isSeparated: true,
|
||||||
PanelButton(
|
children: [
|
||||||
onPressed: () async {
|
PanelButton(
|
||||||
await Provider.of<ThirdPartyProvider>(context,
|
onPressed: () async {
|
||||||
listen: false)
|
await Provider.of<ThirdPartyProvider>(context,
|
||||||
.googleSignIn();
|
listen: false)
|
||||||
|
.googleSignIn();
|
||||||
|
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
title: Text(
|
title: Text(
|
||||||
'Google',
|
'Google',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: AppColors.of(context)
|
color: AppColors.of(context)
|
||||||
.text
|
.text
|
||||||
.withOpacity(.95),
|
.withOpacity(.95),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
leading: Image.asset(
|
||||||
|
'assets/images/ext_logo/google.png',
|
||||||
|
width: 24.0,
|
||||||
|
height: 24.0,
|
||||||
|
),
|
||||||
|
borderRadius: const BorderRadius.vertical(
|
||||||
|
top: Radius.circular(12),
|
||||||
|
bottom: Radius.circular(12),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
leading: Image.asset(
|
],
|
||||||
'assets/images/ext_logo/google.png',
|
),
|
||||||
width: 24.0,
|
// const SizedBox(
|
||||||
height: 24.0,
|
// height: 9.0,
|
||||||
),
|
// ),
|
||||||
borderRadius: const BorderRadius.vertical(
|
if (Platform.isIOS)
|
||||||
top: Radius.circular(12),
|
SplittedPanel(
|
||||||
bottom: Radius.circular(12),
|
padding: EdgeInsets.zero,
|
||||||
),
|
cardPadding: const EdgeInsets.all(4.0),
|
||||||
),
|
isSeparated: true,
|
||||||
],
|
children: [
|
||||||
),
|
PanelButton(
|
||||||
const SizedBox(
|
onPressed: null,
|
||||||
height: 9.0,
|
title: Text(
|
||||||
),
|
'Apple',
|
||||||
SplittedPanel(
|
style: TextStyle(
|
||||||
padding: EdgeInsets.zero,
|
color: AppColors.of(context)
|
||||||
cardPadding: const EdgeInsets.all(4.0),
|
.text
|
||||||
isSeparated: true,
|
.withOpacity(.55),
|
||||||
children: [
|
decoration: TextDecoration.lineThrough,
|
||||||
PanelButton(
|
),
|
||||||
onPressed: null,
|
),
|
||||||
title: Text(
|
leading: Image.asset(
|
||||||
'Apple',
|
'assets/images/ext_logo/apple.png',
|
||||||
style: TextStyle(
|
width: 24.0,
|
||||||
color: AppColors.of(context)
|
height: 24.0,
|
||||||
.text
|
),
|
||||||
.withOpacity(.55),
|
trailing: Text(
|
||||||
decoration: TextDecoration.lineThrough,
|
'soon'.i18n,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontStyle: FontStyle.italic,
|
||||||
|
fontSize: 14.0),
|
||||||
|
),
|
||||||
|
borderRadius: const BorderRadius.vertical(
|
||||||
|
top: Radius.circular(12),
|
||||||
|
bottom: Radius.circular(12),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
leading: Image.asset(
|
],
|
||||||
'assets/images/ext_logo/apple.png',
|
),
|
||||||
width: 24.0,
|
|
||||||
height: 24.0,
|
|
||||||
),
|
|
||||||
trailing: Text(
|
|
||||||
'soon'.i18n,
|
|
||||||
style: const TextStyle(
|
|
||||||
fontStyle: FontStyle.italic,
|
|
||||||
fontSize: 14.0),
|
|
||||||
),
|
|
||||||
borderRadius: const BorderRadius.vertical(
|
|
||||||
top: Radius.circular(12),
|
|
||||||
bottom: Radius.circular(12),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user