feat: Implement rich notification settings
This commit is contained in:
parent
da5bc56299
commit
87a73dd777
@ -64,20 +64,18 @@ class ThemesSettingsState extends State<ThemesSettings> {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
ListTile(
|
SwitchListTile(
|
||||||
title: Text(
|
title: Text(
|
||||||
L10n.of(context).useAmoledTheme,
|
L10n.of(context).useAmoledTheme,
|
||||||
),
|
),
|
||||||
trailing: Switch(
|
value: _amoledEnabled,
|
||||||
value: _amoledEnabled,
|
activeColor: Theme.of(context).primaryColor,
|
||||||
activeColor: Theme.of(context).primaryColor,
|
onChanged: (bool value) {
|
||||||
onChanged: (bool value) {
|
setState(() {
|
||||||
setState(() {
|
_amoledEnabled = value;
|
||||||
_amoledEnabled = value;
|
themeEngine.switchTheme(matrix, _selectedTheme, value);
|
||||||
themeEngine.switchTheme(matrix, _selectedTheme, value);
|
});
|
||||||
});
|
},
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
@ -559,6 +559,51 @@
|
|||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
},
|
},
|
||||||
|
"directChats": "Direct Chats",
|
||||||
|
"@directChats": {
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"containsDisplayName": "Contains display name",
|
||||||
|
"@containsDisplayName": {
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"containsUserName": "Contains user name",
|
||||||
|
"@containsUserName": {
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"inviteForMe": "Invite for me",
|
||||||
|
"@inviteForMe": {
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"memberChanges": "Member changes",
|
||||||
|
"@memberChanges": {
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"botMessages": "Bot messages",
|
||||||
|
"@botMessages": {
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"pushRules": "Push rules",
|
||||||
|
"@pushRules": {
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"notifications": "Notifications",
|
||||||
|
"@notifications": {
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"notificationsEnabledForThisAccount": "Notifications enabled for this account",
|
||||||
|
"@notificationsEnabledForThisAccount": {
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
|
},
|
||||||
"edit": "Edit",
|
"edit": "Edit",
|
||||||
"@edit": {
|
"@edit": {
|
||||||
"type": "text",
|
"type": "text",
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
import 'dart:io';
|
|
||||||
|
|
||||||
import 'package:adaptive_dialog/adaptive_dialog.dart';
|
import 'package:adaptive_dialog/adaptive_dialog.dart';
|
||||||
import 'package:fluffychat/views/settings_3pid.dart';
|
import 'package:fluffychat/views/settings_3pid.dart';
|
||||||
|
import 'package:fluffychat/views/settings_notifications.dart';
|
||||||
|
import 'package:fluffychat/views/settings_style.dart';
|
||||||
import 'package:flushbar/flushbar_helper.dart';
|
import 'package:flushbar/flushbar_helper.dart';
|
||||||
import 'package:famedlysdk/famedlysdk.dart';
|
import 'package:famedlysdk/famedlysdk.dart';
|
||||||
import 'package:file_picker_cross/file_picker_cross.dart';
|
import 'package:file_picker_cross/file_picker_cross.dart';
|
||||||
|
|
||||||
import 'package:fluffychat/components/settings_themes.dart';
|
|
||||||
import 'package:fluffychat/config/app_config.dart';
|
import 'package:fluffychat/config/app_config.dart';
|
||||||
import 'package:fluffychat/utils/platform_infos.dart';
|
import 'package:fluffychat/utils/platform_infos.dart';
|
||||||
import 'package:fluffychat/utils/sentry_controller.dart';
|
import 'package:fluffychat/utils/sentry_controller.dart';
|
||||||
@ -202,22 +201,6 @@ class _SettingsState extends State<Settings> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void setWallpaperAction(BuildContext context) async {
|
|
||||||
final wallpaper = await ImagePicker().getImage(source: ImageSource.gallery);
|
|
||||||
if (wallpaper == null) return;
|
|
||||||
Matrix.of(context).wallpaper = File(wallpaper.path);
|
|
||||||
await Matrix.of(context)
|
|
||||||
.store
|
|
||||||
.setItem(SettingKeys.wallpaper, wallpaper.path);
|
|
||||||
setState(() => null);
|
|
||||||
}
|
|
||||||
|
|
||||||
void deleteWallpaperAction(BuildContext context) async {
|
|
||||||
Matrix.of(context).wallpaper = null;
|
|
||||||
await Matrix.of(context).store.deleteItem(SettingKeys.wallpaper);
|
|
||||||
setState(() => null);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> requestSSSSCache(BuildContext context) async {
|
Future<void> requestSSSSCache(BuildContext context) async {
|
||||||
final handle = Matrix.of(context).client.encryption.ssss.open();
|
final handle = Matrix.of(context).client.encryption.ssss.open();
|
||||||
final input = await showTextInputDialog(
|
final input = await showTextInputDialog(
|
||||||
@ -323,48 +306,23 @@ class _SettingsState extends State<Settings> {
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(
|
title: Text(
|
||||||
L10n.of(context).changeTheme,
|
L10n.of(context).notifications,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Theme.of(context).primaryColor,
|
color: Theme.of(context).primaryColor,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
ThemesSettings(),
|
ListTile(
|
||||||
if (!kIsWeb && Matrix.of(context).store != null)
|
trailing: Icon(Icons.notifications),
|
||||||
Divider(thickness: 1),
|
title: Text(L10n.of(context).notifications),
|
||||||
if (!kIsWeb && Matrix.of(context).store != null)
|
onTap: () async => await Navigator.of(context).push(
|
||||||
ListTile(
|
AppRoute.defaultRoute(
|
||||||
title: Text(
|
context,
|
||||||
L10n.of(context).wallpaper,
|
SettingsNotificationsView(),
|
||||||
style: TextStyle(
|
|
||||||
color: Theme.of(context).primaryColor,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (Matrix.of(context).wallpaper != null)
|
),
|
||||||
ListTile(
|
|
||||||
title: Image.file(
|
|
||||||
Matrix.of(context).wallpaper,
|
|
||||||
height: 38,
|
|
||||||
fit: BoxFit.cover,
|
|
||||||
),
|
|
||||||
trailing: Icon(
|
|
||||||
Icons.delete_forever,
|
|
||||||
color: Colors.red,
|
|
||||||
),
|
|
||||||
onTap: () => deleteWallpaperAction(context),
|
|
||||||
),
|
|
||||||
if (!kIsWeb && Matrix.of(context).store != null)
|
|
||||||
Builder(builder: (context) {
|
|
||||||
return ListTile(
|
|
||||||
title: Text(L10n.of(context).changeWallpaper),
|
|
||||||
trailing: Icon(Icons.wallpaper),
|
|
||||||
onTap: () => setWallpaperAction(context),
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
Divider(thickness: 1),
|
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(
|
title: Text(
|
||||||
L10n.of(context).chat,
|
L10n.of(context).chat,
|
||||||
@ -375,44 +333,45 @@ class _SettingsState extends State<Settings> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
|
title: Text(L10n.of(context).changeTheme),
|
||||||
|
onTap: () async => await Navigator.of(context).push(
|
||||||
|
AppRoute.defaultRoute(
|
||||||
|
context,
|
||||||
|
SettingsStyleView(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
trailing: Icon(Icons.wallpaper),
|
||||||
|
),
|
||||||
|
SwitchListTile(
|
||||||
title: Text(L10n.of(context).renderRichContent),
|
title: Text(L10n.of(context).renderRichContent),
|
||||||
trailing: Switch(
|
value: AppConfig.renderHtml,
|
||||||
value: AppConfig.renderHtml,
|
onChanged: (bool newValue) async {
|
||||||
activeColor: Theme.of(context).primaryColor,
|
AppConfig.renderHtml = newValue;
|
||||||
onChanged: (bool newValue) async {
|
await Matrix.of(context)
|
||||||
AppConfig.renderHtml = newValue;
|
.store
|
||||||
await Matrix.of(context)
|
.setItem(SettingKeys.renderHtml, newValue.toString());
|
||||||
.store
|
setState(() => null);
|
||||||
.setItem(SettingKeys.renderHtml, newValue.toString());
|
},
|
||||||
setState(() => null);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
ListTile(
|
SwitchListTile(
|
||||||
title: Text(L10n.of(context).hideRedactedEvents),
|
title: Text(L10n.of(context).hideRedactedEvents),
|
||||||
trailing: Switch(
|
value: AppConfig.hideRedactedEvents,
|
||||||
value: AppConfig.hideRedactedEvents,
|
onChanged: (bool newValue) async {
|
||||||
activeColor: Theme.of(context).primaryColor,
|
AppConfig.hideRedactedEvents = newValue;
|
||||||
onChanged: (bool newValue) async {
|
await Matrix.of(context).store.setItem(
|
||||||
AppConfig.hideRedactedEvents = newValue;
|
SettingKeys.hideRedactedEvents, newValue.toString());
|
||||||
await Matrix.of(context).store.setItem(
|
setState(() => null);
|
||||||
SettingKeys.hideRedactedEvents, newValue.toString());
|
},
|
||||||
setState(() => null);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
ListTile(
|
SwitchListTile(
|
||||||
title: Text(L10n.of(context).hideUnknownEvents),
|
title: Text(L10n.of(context).hideUnknownEvents),
|
||||||
trailing: Switch(
|
value: AppConfig.hideUnknownEvents,
|
||||||
value: AppConfig.hideUnknownEvents,
|
onChanged: (bool newValue) async {
|
||||||
activeColor: Theme.of(context).primaryColor,
|
AppConfig.hideUnknownEvents = newValue;
|
||||||
onChanged: (bool newValue) async {
|
await Matrix.of(context).store.setItem(
|
||||||
AppConfig.hideUnknownEvents = newValue;
|
SettingKeys.hideUnknownEvents, newValue.toString());
|
||||||
await Matrix.of(context).store.setItem(
|
setState(() => null);
|
||||||
SettingKeys.hideUnknownEvents, newValue.toString());
|
},
|
||||||
setState(() => null);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(L10n.of(context).emoteSettings),
|
title: Text(L10n.of(context).emoteSettings),
|
||||||
|
181
lib/views/settings_notifications.dart
Normal file
181
lib/views/settings_notifications.dart
Normal file
@ -0,0 +1,181 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:famedlysdk/famedlysdk.dart';
|
||||||
|
import 'package:fluffychat/components/adaptive_page_layout.dart';
|
||||||
|
import 'package:fluffychat/components/dialogs/simple_dialogs.dart';
|
||||||
|
import 'package:fluffychat/utils/firebase_controller.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||||
|
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
|
||||||
|
import 'package:open_noti_settings/open_noti_settings.dart';
|
||||||
|
|
||||||
|
import '../components/matrix.dart';
|
||||||
|
import 'chat_list.dart';
|
||||||
|
|
||||||
|
class NotificationSettingsItem {
|
||||||
|
final PushRuleKind type;
|
||||||
|
final String key;
|
||||||
|
final String Function(BuildContext) title;
|
||||||
|
NotificationSettingsItem(this.type, this.key, this.title);
|
||||||
|
}
|
||||||
|
|
||||||
|
class SettingsNotificationsView extends StatelessWidget {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return AdaptivePageLayout(
|
||||||
|
primaryPage: FocusPage.SECOND,
|
||||||
|
firstScaffold: ChatList(),
|
||||||
|
secondScaffold: SettingsNotifications(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class SettingsNotifications extends StatelessWidget {
|
||||||
|
static List<NotificationSettingsItem> items = [
|
||||||
|
NotificationSettingsItem(
|
||||||
|
PushRuleKind.underride,
|
||||||
|
'.m.rule.room_one_to_one',
|
||||||
|
(c) => L10n.of(c).directChats,
|
||||||
|
),
|
||||||
|
NotificationSettingsItem(
|
||||||
|
PushRuleKind.override,
|
||||||
|
'.m.rule.contains_display_name',
|
||||||
|
(c) => L10n.of(c).containsDisplayName,
|
||||||
|
),
|
||||||
|
NotificationSettingsItem(
|
||||||
|
PushRuleKind.content,
|
||||||
|
'.m.rule.contains_user_name',
|
||||||
|
(c) => L10n.of(c).containsUserName,
|
||||||
|
),
|
||||||
|
NotificationSettingsItem(
|
||||||
|
PushRuleKind.override,
|
||||||
|
'.m.rule.invite_for_me',
|
||||||
|
(c) => L10n.of(c).inviteForMe,
|
||||||
|
),
|
||||||
|
NotificationSettingsItem(
|
||||||
|
PushRuleKind.override,
|
||||||
|
'.m.rule.member_event',
|
||||||
|
(c) => L10n.of(c).memberChanges,
|
||||||
|
),
|
||||||
|
NotificationSettingsItem(
|
||||||
|
PushRuleKind.override,
|
||||||
|
'.m.rule.suppress_notices',
|
||||||
|
(c) => L10n.of(c).botMessages,
|
||||||
|
),
|
||||||
|
];
|
||||||
|
void _openAndroidNotificationSettingsAction() async {
|
||||||
|
await NotificationSetting.configureChannel(
|
||||||
|
NotificationDetails(
|
||||||
|
android: AndroidNotificationDetails(
|
||||||
|
FirebaseController.CHANNEL_ID,
|
||||||
|
FirebaseController.CHANNEL_NAME,
|
||||||
|
FirebaseController.CHANNEL_DESCRIPTION,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
return NotificationSetting.open();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool _getNotificationSetting(
|
||||||
|
BuildContext context, NotificationSettingsItem item) {
|
||||||
|
final pushRules = Matrix.of(context).client.globalPushRules;
|
||||||
|
switch (item.type) {
|
||||||
|
case PushRuleKind.content:
|
||||||
|
return pushRules.content
|
||||||
|
?.singleWhere((r) => r.ruleId == item.key, orElse: () => null)
|
||||||
|
?.enabled;
|
||||||
|
case PushRuleKind.override:
|
||||||
|
return pushRules.override
|
||||||
|
?.singleWhere((r) => r.ruleId == item.key, orElse: () => null)
|
||||||
|
?.enabled;
|
||||||
|
case PushRuleKind.room:
|
||||||
|
return pushRules.room
|
||||||
|
?.singleWhere((r) => r.ruleId == item.key, orElse: () => null)
|
||||||
|
?.enabled;
|
||||||
|
case PushRuleKind.sender:
|
||||||
|
return pushRules.sender
|
||||||
|
?.singleWhere((r) => r.ruleId == item.key, orElse: () => null)
|
||||||
|
?.enabled;
|
||||||
|
case PushRuleKind.underride:
|
||||||
|
return pushRules.underride
|
||||||
|
?.singleWhere((r) => r.ruleId == item.key, orElse: () => null)
|
||||||
|
?.enabled;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void _setNotificationSetting(
|
||||||
|
BuildContext context, NotificationSettingsItem item, bool enabled) {
|
||||||
|
SimpleDialogs(context).tryRequestWithLoadingDialog(
|
||||||
|
Matrix.of(context).client.enablePushRule(
|
||||||
|
'global',
|
||||||
|
item.type,
|
||||||
|
item.key,
|
||||||
|
enabled,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
title: Text(L10n.of(context).notifications),
|
||||||
|
),
|
||||||
|
body: StreamBuilder(
|
||||||
|
stream: Matrix.of(context)
|
||||||
|
.client
|
||||||
|
.onAccountData
|
||||||
|
.stream
|
||||||
|
.where((event) => event.type == 'm.push_rules'),
|
||||||
|
builder: (BuildContext context, _) {
|
||||||
|
return ListView(
|
||||||
|
children: [
|
||||||
|
SwitchListTile(
|
||||||
|
value: !Matrix.of(context).client.allPushNotificationsMuted,
|
||||||
|
title:
|
||||||
|
Text(L10n.of(context).notificationsEnabledForThisAccount),
|
||||||
|
onChanged: (_) =>
|
||||||
|
SimpleDialogs(context).tryRequestWithLoadingDialog(
|
||||||
|
Matrix.of(context).client.setMuteAllPushNotifications(
|
||||||
|
!Matrix.of(context).client.allPushNotificationsMuted,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (!Matrix.of(context).client.allPushNotificationsMuted) ...{
|
||||||
|
if (!kIsWeb && Platform.isAndroid)
|
||||||
|
ListTile(
|
||||||
|
title: Text('Ton, Vibration, LED-Farbe'),
|
||||||
|
trailing: CircleAvatar(
|
||||||
|
backgroundColor:
|
||||||
|
Theme.of(context).scaffoldBackgroundColor,
|
||||||
|
foregroundColor: Colors.grey,
|
||||||
|
child: Icon(Icons.edit_outlined),
|
||||||
|
),
|
||||||
|
onTap: () => _openAndroidNotificationSettingsAction(),
|
||||||
|
),
|
||||||
|
Divider(thickness: 1),
|
||||||
|
ListTile(
|
||||||
|
title: Text(
|
||||||
|
L10n.of(context).pushRules,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Theme.of(context).primaryColor,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
for (var item in items)
|
||||||
|
SwitchListTile(
|
||||||
|
value: _getNotificationSetting(context, item) ?? true,
|
||||||
|
title: Text(item.title(context)),
|
||||||
|
onChanged: (bool enabled) =>
|
||||||
|
_setNotificationSetting(context, item, enabled),
|
||||||
|
),
|
||||||
|
}
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
89
lib/views/settings_style.dart
Normal file
89
lib/views/settings_style.dart
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:fluffychat/components/adaptive_page_layout.dart';
|
||||||
|
import 'package:fluffychat/components/settings_themes.dart';
|
||||||
|
import 'package:fluffychat/config/setting_keys.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||||
|
import 'package:image_picker/image_picker.dart';
|
||||||
|
|
||||||
|
import '../components/matrix.dart';
|
||||||
|
import 'chat_list.dart';
|
||||||
|
|
||||||
|
class SettingsStyleView extends StatelessWidget {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return AdaptivePageLayout(
|
||||||
|
primaryPage: FocusPage.SECOND,
|
||||||
|
firstScaffold: ChatList(),
|
||||||
|
secondScaffold: SettingsStyle(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class SettingsStyle extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
_SettingsStyleState createState() => _SettingsStyleState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _SettingsStyleState extends State<SettingsStyle> {
|
||||||
|
void setWallpaperAction(BuildContext context) async {
|
||||||
|
final wallpaper = await ImagePicker().getImage(source: ImageSource.gallery);
|
||||||
|
if (wallpaper == null) return;
|
||||||
|
Matrix.of(context).wallpaper = File(wallpaper.path);
|
||||||
|
await Matrix.of(context)
|
||||||
|
.store
|
||||||
|
.setItem(SettingKeys.wallpaper, wallpaper.path);
|
||||||
|
setState(() => null);
|
||||||
|
}
|
||||||
|
|
||||||
|
void deleteWallpaperAction(BuildContext context) async {
|
||||||
|
Matrix.of(context).wallpaper = null;
|
||||||
|
await Matrix.of(context).store.deleteItem(SettingKeys.wallpaper);
|
||||||
|
setState(() => null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
title: Text(L10n.of(context).changeTheme),
|
||||||
|
),
|
||||||
|
body: ListView(
|
||||||
|
children: [
|
||||||
|
ThemesSettings(),
|
||||||
|
Divider(thickness: 1),
|
||||||
|
ListTile(
|
||||||
|
title: Text(
|
||||||
|
L10n.of(context).wallpaper,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Theme.of(context).primaryColor,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (Matrix.of(context).wallpaper != null)
|
||||||
|
ListTile(
|
||||||
|
title: Image.file(
|
||||||
|
Matrix.of(context).wallpaper,
|
||||||
|
height: 38,
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
trailing: Icon(
|
||||||
|
Icons.delete_forever,
|
||||||
|
color: Colors.red,
|
||||||
|
),
|
||||||
|
onTap: () => deleteWallpaperAction(context),
|
||||||
|
),
|
||||||
|
Builder(builder: (context) {
|
||||||
|
return ListTile(
|
||||||
|
title: Text(L10n.of(context).changeWallpaper),
|
||||||
|
trailing: Icon(Icons.wallpaper),
|
||||||
|
onTap: () => setWallpaperAction(context),
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
61
pubspec.lock
61
pubspec.lock
@ -42,7 +42,7 @@ packages:
|
|||||||
name: ansicolor
|
name: ansicolor
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.5"
|
version: "1.1.1"
|
||||||
archive:
|
archive:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -70,7 +70,7 @@ packages:
|
|||||||
name: async
|
name: async
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.5.0-nullsafety.3"
|
version: "2.5.0-nullsafety.1"
|
||||||
base58check:
|
base58check:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -84,7 +84,7 @@ packages:
|
|||||||
name: boolean_selector
|
name: boolean_selector
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0-nullsafety.3"
|
version: "2.1.0-nullsafety.1"
|
||||||
cached_network_image:
|
cached_network_image:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -105,14 +105,14 @@ packages:
|
|||||||
name: characters
|
name: characters
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0-nullsafety.5"
|
version: "1.1.0-nullsafety.3"
|
||||||
charcode:
|
charcode:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: charcode
|
name: charcode
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0-nullsafety.3"
|
version: "1.2.0-nullsafety.1"
|
||||||
circular_check_box:
|
circular_check_box:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -133,14 +133,14 @@ packages:
|
|||||||
name: clock
|
name: clock
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0-nullsafety.3"
|
version: "1.1.0-nullsafety.1"
|
||||||
collection:
|
collection:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: collection
|
name: collection
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.15.0-nullsafety.5"
|
version: "1.15.0-nullsafety.3"
|
||||||
convert:
|
convert:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -203,13 +203,13 @@ packages:
|
|||||||
name: fake_async
|
name: fake_async
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0-nullsafety.3"
|
version: "1.2.0-nullsafety.1"
|
||||||
famedlysdk:
|
famedlysdk:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
path: "."
|
path: "."
|
||||||
ref: "01ce832aaa738d4e4432e1f0912b0427ce8d134c"
|
ref: "20ae1ae20e51840643988768620cc9900f83231c"
|
||||||
resolved-ref: "01ce832aaa738d4e4432e1f0912b0427ce8d134c"
|
resolved-ref: "20ae1ae20e51840643988768620cc9900f83231c"
|
||||||
url: "https://gitlab.com/famedly/famedlysdk.git"
|
url: "https://gitlab.com/famedly/famedlysdk.git"
|
||||||
source: git
|
source: git
|
||||||
version: "0.0.1"
|
version: "0.0.1"
|
||||||
@ -343,7 +343,7 @@ packages:
|
|||||||
name: flutter_local_notifications
|
name: flutter_local_notifications
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.1+5"
|
version: "3.0.1+6"
|
||||||
flutter_local_notifications_platform_interface:
|
flutter_local_notifications_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -533,7 +533,7 @@ packages:
|
|||||||
name: js
|
name: js
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.6.3-nullsafety.3"
|
version: "0.6.3-nullsafety.2"
|
||||||
localstorage:
|
localstorage:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -561,7 +561,7 @@ packages:
|
|||||||
name: matcher
|
name: matcher
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.10-nullsafety.3"
|
version: "0.12.10-nullsafety.1"
|
||||||
matrix_file_e2ee:
|
matrix_file_e2ee:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -582,7 +582,7 @@ packages:
|
|||||||
name: meta
|
name: meta
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0-nullsafety.6"
|
version: "1.3.0-nullsafety.3"
|
||||||
mime:
|
mime:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -662,6 +662,15 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.3"
|
version: "3.0.3"
|
||||||
|
open_noti_settings:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
path: "."
|
||||||
|
ref: master
|
||||||
|
resolved-ref: ff18b3917672ff64b3882a184df96d008f87bbcd
|
||||||
|
url: "https://github.com/ChristianPauly/flutter_open_notification_settings.git"
|
||||||
|
source: git
|
||||||
|
version: "0.0.2+5"
|
||||||
package_config:
|
package_config:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -689,7 +698,7 @@ packages:
|
|||||||
name: path
|
name: path
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.0-nullsafety.3"
|
version: "1.8.0-nullsafety.1"
|
||||||
path_drawing:
|
path_drawing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -925,7 +934,7 @@ packages:
|
|||||||
name: source_span
|
name: source_span
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.0-nullsafety.4"
|
version: "1.8.0-nullsafety.2"
|
||||||
sqflite:
|
sqflite:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -960,21 +969,21 @@ packages:
|
|||||||
name: stack_trace
|
name: stack_trace
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.10.0-nullsafety.6"
|
version: "1.10.0-nullsafety.1"
|
||||||
stream_channel:
|
stream_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stream_channel
|
name: stream_channel
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0-nullsafety.3"
|
version: "2.1.0-nullsafety.1"
|
||||||
string_scanner:
|
string_scanner:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: string_scanner
|
name: string_scanner
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0-nullsafety.3"
|
version: "1.1.0-nullsafety.1"
|
||||||
swipe_to_action:
|
swipe_to_action:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -995,28 +1004,28 @@ packages:
|
|||||||
name: term_glyph
|
name: term_glyph
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0-nullsafety.3"
|
version: "1.2.0-nullsafety.1"
|
||||||
test:
|
test:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test
|
name: test
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.16.0-nullsafety.12"
|
version: "1.16.0-nullsafety.5"
|
||||||
test_api:
|
test_api:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.19-nullsafety.6"
|
version: "0.2.19-nullsafety.2"
|
||||||
test_core:
|
test_core:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_core
|
name: test_core
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.12-nullsafety.11"
|
version: "0.3.12-nullsafety.5"
|
||||||
timezone:
|
timezone:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -1037,7 +1046,7 @@ packages:
|
|||||||
name: typed_data
|
name: typed_data
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0-nullsafety.5"
|
version: "1.3.0-nullsafety.3"
|
||||||
universal_html:
|
universal_html:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -1121,7 +1130,7 @@ packages:
|
|||||||
name: vector_math
|
name: vector_math
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0-nullsafety.5"
|
version: "2.1.0-nullsafety.3"
|
||||||
vm_service:
|
vm_service:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -1193,5 +1202,5 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.2"
|
version: "0.1.2"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.12.0-0.0 <=2.12.0-29.10.beta"
|
dart: ">=2.10.2 <2.11.0"
|
||||||
flutter: ">=1.22.2 <2.0.0"
|
flutter: ">=1.22.2 <2.0.0"
|
||||||
|
@ -13,7 +13,7 @@ dependencies:
|
|||||||
famedlysdk:
|
famedlysdk:
|
||||||
git:
|
git:
|
||||||
url: https://gitlab.com/famedly/famedlysdk.git
|
url: https://gitlab.com/famedly/famedlysdk.git
|
||||||
ref: 01ce832aaa738d4e4432e1f0912b0427ce8d134c
|
ref: 20ae1ae20e51840643988768620cc9900f83231c
|
||||||
|
|
||||||
localstorage: ^3.0.3+6
|
localstorage: ^3.0.3+6
|
||||||
file_picker_cross: 4.2.2
|
file_picker_cross: 4.2.2
|
||||||
@ -63,6 +63,10 @@ dependencies:
|
|||||||
swipe_to_action: ^0.1.0
|
swipe_to_action: ^0.1.0
|
||||||
flutter_svg: 0.19.1 # Because fluffychat depends on flutter_svg >=0.19.2 which requires Flutter SDK version >=1.24.0-6.0.pre <2.0.0, version solving failed.
|
flutter_svg: 0.19.1 # Because fluffychat depends on flutter_svg >=0.19.2 which requires Flutter SDK version >=1.24.0-6.0.pre <2.0.0, version solving failed.
|
||||||
flutter_cache_manager: ^2.0.0
|
flutter_cache_manager: ^2.0.0
|
||||||
|
open_noti_settings:
|
||||||
|
git:
|
||||||
|
url: https://github.com/ChristianPauly/flutter_open_notification_settings.git
|
||||||
|
ref: master
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
Loading…
Reference in New Issue
Block a user