design: Remove cupertino icons

This commit is contained in:
Krille Fear 2021-11-14 13:24:01 +01:00
parent dbc56c2cf2
commit 66a66cefa3
10 changed files with 255 additions and 242 deletions

View File

@ -1,4 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
@ -42,6 +41,7 @@ class ChatDetailsView extends StatelessWidget {
(room.summary?.mJoinedMemberCount ?? 0);
final canRequestMoreMembers =
controller.members.length < actualMembersCount;
final iconColor = Theme.of(context).textTheme.bodyText1.color;
return StreamBuilder(
stream: room.onUpdate.stream,
builder: (context, snapshot) {
@ -105,9 +105,9 @@ class ChatDetailsView extends StatelessWidget {
? CircleAvatar(
backgroundColor: Theme.of(context)
.scaffoldBackgroundColor,
foregroundColor: Colors.grey,
foregroundColor: iconColor,
radius: Avatar.defaultSize / 2,
child: const Icon(CupertinoIcons.pen),
child: const Icon(Icons.edit_outlined),
)
: null,
title: Text(
@ -149,8 +149,8 @@ class ChatDetailsView extends StatelessWidget {
),
),
trailing: Icon(controller.displaySettings
? CupertinoIcons.chevron_down
: CupertinoIcons.right_chevron),
? Icons.keyboard_arrow_down_outlined
: Icons.keyboard_arrow_right_outlined),
onTap: controller.toggleDisplaySettings,
),
if (controller.displaySettings) ...[
@ -159,8 +159,9 @@ class ChatDetailsView extends StatelessWidget {
leading: CircleAvatar(
backgroundColor: Theme.of(context)
.scaffoldBackgroundColor,
foregroundColor: Colors.grey,
child: const Icon(CupertinoIcons.group),
foregroundColor: iconColor,
child: const Icon(
Icons.people_outline_outlined),
),
title: Text(
L10n.of(context).changeTheNameOfTheGroup),
@ -173,8 +174,8 @@ class ChatDetailsView extends StatelessWidget {
leading: CircleAvatar(
backgroundColor: Theme.of(context)
.scaffoldBackgroundColor,
foregroundColor: Colors.grey,
child: const Icon(CupertinoIcons.link),
foregroundColor: iconColor,
child: const Icon(Icons.link_outlined),
),
onTap: controller.editAliases,
title: Text(L10n.of(context).editRoomAliases),
@ -187,7 +188,7 @@ class ChatDetailsView extends StatelessWidget {
leading: CircleAvatar(
backgroundColor:
Theme.of(context).scaffoldBackgroundColor,
foregroundColor: Colors.grey,
foregroundColor: iconColor,
child: const Icon(
Icons.insert_emoticon_outlined),
),
@ -219,9 +220,8 @@ class ChatDetailsView extends StatelessWidget {
leading: CircleAvatar(
backgroundColor: Theme.of(context)
.scaffoldBackgroundColor,
foregroundColor: Colors.grey,
child: const Icon(
CupertinoIcons.checkmark_shield)),
foregroundColor: iconColor,
child: const Icon(Icons.shield_outlined)),
title: Text(L10n.of(context)
.whoIsAllowedToJoinThisGroup),
subtitle: Text(
@ -269,8 +269,9 @@ class ChatDetailsView extends StatelessWidget {
leading: CircleAvatar(
backgroundColor: Theme.of(context)
.scaffoldBackgroundColor,
foregroundColor: Colors.grey,
child: const Icon(CupertinoIcons.eye),
foregroundColor: iconColor,
child:
const Icon(Icons.visibility_outlined),
),
title: Text(L10n.of(context)
.visibilityOfTheChatHistory),
@ -309,9 +310,9 @@ class ChatDetailsView extends StatelessWidget {
leading: CircleAvatar(
backgroundColor: Theme.of(context)
.scaffoldBackgroundColor,
foregroundColor: Colors.grey,
child:
const Icon(CupertinoIcons.person_alt),
foregroundColor: iconColor,
child: const Icon(
Icons.person_add_alt_1_outlined),
),
title: Text(L10n.of(context)
.areGuestsAllowedToJoin),
@ -329,9 +330,9 @@ class ChatDetailsView extends StatelessWidget {
leading: CircleAvatar(
backgroundColor:
Theme.of(context).scaffoldBackgroundColor,
foregroundColor: Colors.grey,
foregroundColor: iconColor,
child: const Icon(
CupertinoIcons.slider_horizontal_3),
Icons.edit_attributes_outlined),
),
onTap: () =>
VRouter.of(context).to('permissions'),

View File

@ -264,14 +264,12 @@ class ChatListView extends StatelessWidget {
floatingActionButton: selectMode == SelectMode.normal
? controller.scrolledToTop
? FloatingActionButton.extended(
heroTag: 'main_fab',
onPressed: () =>
VRouter.of(context).to('/newprivatechat'),
icon: const Icon(CupertinoIcons.chat_bubble),
label: Text(L10n.of(context).newChat),
)
: FloatingActionButton(
heroTag: 'main_fab',
onPressed: () =>
VRouter.of(context).to('/newprivatechat'),
child: const Icon(CupertinoIcons.chat_bubble),

View File

@ -45,19 +45,19 @@ class SettingsController extends State<Settings> {
key: AvatarAction.camera,
label: L10n.of(context).openCamera,
isDefaultAction: true,
icon: CupertinoIcons.camera,
icon: Icons.camera_alt_outlined,
),
SheetAction(
key: AvatarAction.file,
label: L10n.of(context).openGallery,
icon: CupertinoIcons.photo,
icon: Icons.photo_outlined,
),
if (profile?.avatarUrl != null)
SheetAction(
key: AvatarAction.remove,
label: L10n.of(context).removeYourAvatar,
isDestructiveAction: true,
icon: CupertinoIcons.delete,
icon: Icons.delete_outlined,
),
],
);

View File

@ -1,4 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
@ -32,60 +31,64 @@ class SettingsView extends StatelessWidget {
background: ContentBanner(
controller.profile?.avatarUrl,
onEdit: controller.setAvatarAction,
defaultIcon: CupertinoIcons.person_circle,
defaultIcon: Icons.person_outline_outlined,
),
),
),
],
body: ListView(
children: <Widget>[
ListTile(
title: Text(L10n.of(context).changeTheme),
onTap: () => VRouter.of(context).to('/settings/style'),
leading: const Icon(CupertinoIcons.paintbrush),
),
ListTile(
leading: const Icon(CupertinoIcons.bell),
title: Text(L10n.of(context).notifications),
onTap: () => VRouter.of(context).to('/settings/notifications'),
),
ListTile(
leading: const Icon(CupertinoIcons.device_phone_portrait),
title: Text(L10n.of(context).devices),
onTap: () => VRouter.of(context).to('/settings/devices'),
),
ListTile(
leading: const Icon(CupertinoIcons.chat_bubble_2),
title: Text(L10n.of(context).chat),
onTap: () => VRouter.of(context).to('/settings/chat'),
),
ListTile(
leading: const Icon(CupertinoIcons.person),
title: Text(L10n.of(context).account),
onTap: () => VRouter.of(context).to('/settings/account'),
),
ListTile(
leading: const Icon(CupertinoIcons.shield),
title: Text(L10n.of(context).security),
onTap: () => VRouter.of(context).to('/settings/security'),
),
const Divider(thickness: 1),
ListTile(
leading: const Icon(CupertinoIcons.question_circle),
title: Text(L10n.of(context).help),
onTap: () => launch(AppConfig.supportUrl),
),
ListTile(
leading: const Icon(CupertinoIcons.checkmark_shield),
title: Text(L10n.of(context).privacy),
onTap: () => launch(AppConfig.privacyUrl),
),
ListTile(
leading: const Icon(CupertinoIcons.info_circle),
title: Text(L10n.of(context).about),
onTap: () => PlatformInfos.showDialog(context),
),
],
body: ListTileTheme(
iconColor: Theme.of(context).textTheme.bodyText1.color,
child: ListView(
children: <Widget>[
ListTile(
leading: const Icon(Icons.format_paint_outlined),
title: Text(L10n.of(context).changeTheme),
onTap: () => VRouter.of(context).to('/settings/style'),
),
const Divider(thickness: 1),
ListTile(
leading: const Icon(Icons.notifications_outlined),
title: Text(L10n.of(context).notifications),
onTap: () => VRouter.of(context).to('/settings/notifications'),
),
ListTile(
leading: const Icon(Icons.devices_outlined),
title: Text(L10n.of(context).devices),
onTap: () => VRouter.of(context).to('/settings/devices'),
),
ListTile(
leading: const Icon(Icons.chat_bubble_outline_outlined),
title: Text(L10n.of(context).chat),
onTap: () => VRouter.of(context).to('/settings/chat'),
),
ListTile(
leading: const Icon(Icons.account_circle_outlined),
title: Text(L10n.of(context).account),
onTap: () => VRouter.of(context).to('/settings/account'),
),
ListTile(
leading: const Icon(Icons.shield_outlined),
title: Text(L10n.of(context).security),
onTap: () => VRouter.of(context).to('/settings/security'),
),
const Divider(thickness: 1),
ListTile(
leading: const Icon(Icons.help_outline_outlined),
title: Text(L10n.of(context).help),
onTap: () => launch(AppConfig.supportUrl),
),
ListTile(
leading: const Icon(Icons.shield_sharp),
title: Text(L10n.of(context).privacy),
onTap: () => launch(AppConfig.privacyUrl),
),
ListTile(
leading: const Icon(Icons.info_outline_rounded),
title: Text(L10n.of(context).about),
onTap: () => PlatformInfos.showDialog(context),
),
],
),
),
),
);

View File

@ -17,48 +17,51 @@ class SettingsAccountView extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text(L10n.of(context).account)),
body: MaxWidthBody(
withScrolling: true,
child: Column(
children: [
ListTile(
title: Text(L10n.of(context).yourUserId),
subtitle: Text(Matrix.of(context).client.userID),
trailing: const Icon(Icons.copy_outlined),
onTap: () => FluffyShare.share(
Matrix.of(context).client.userID,
context,
body: ListTileTheme(
iconColor: Theme.of(context).textTheme.bodyText1.color,
child: MaxWidthBody(
withScrolling: true,
child: Column(
children: [
ListTile(
title: Text(L10n.of(context).yourUserId),
subtitle: Text(Matrix.of(context).client.userID),
trailing: const Icon(Icons.copy_outlined),
onTap: () => FluffyShare.share(
Matrix.of(context).client.userID,
context,
),
),
),
ListTile(
trailing: const Icon(CupertinoIcons.pen),
title: Text(L10n.of(context).editDisplayname),
subtitle: Text(controller.profile?.displayName ??
Matrix.of(context).client.userID.localpart),
onTap: controller.setDisplaynameAction,
),
const Divider(height: 1),
ListTile(
trailing: const Icon(CupertinoIcons.add_circled),
title: Text(L10n.of(context).addAccount),
subtitle: Text(L10n.of(context).enableMultiAccounts),
onTap: controller.addAccountAction,
),
ListTile(
trailing: const Icon(CupertinoIcons.arrow_right_square),
title: Text(L10n.of(context).logout),
onTap: controller.logoutAction,
),
const Divider(height: 1),
ListTile(
trailing: const Icon(CupertinoIcons.delete_solid),
title: Text(
L10n.of(context).deleteAccount,
style: const TextStyle(color: Colors.red),
ListTile(
trailing: const Icon(Icons.edit_outlined),
title: Text(L10n.of(context).editDisplayname),
subtitle: Text(controller.profile?.displayName ??
Matrix.of(context).client.userID.localpart),
onTap: controller.setDisplaynameAction,
),
onTap: controller.deleteAccountAction,
),
],
const Divider(height: 1),
ListTile(
trailing: const Icon(Icons.person_add_outlined),
title: Text(L10n.of(context).addAccount),
subtitle: Text(L10n.of(context).enableMultiAccounts),
onTap: controller.addAccountAction,
),
ListTile(
trailing: const Icon(Icons.exit_to_app_outlined),
title: Text(L10n.of(context).logout),
onTap: controller.logoutAction,
),
const Divider(height: 1),
ListTile(
trailing: const Icon(Icons.delete_outlined),
title: Text(
L10n.of(context).deleteAccount,
style: const TextStyle(color: Colors.red),
),
onTap: controller.deleteAccountAction,
),
],
),
),
),
);

View File

@ -1,4 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
@ -19,60 +18,63 @@ class SettingsChatView extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text(L10n.of(context).chat)),
body: MaxWidthBody(
withScrolling: true,
child: Column(
children: [
SettingsSwitchListTile(
title: L10n.of(context).renderRichContent,
onChanged: (b) => AppConfig.renderHtml = b,
storeKey: SettingKeys.renderHtml,
defaultValue: AppConfig.renderHtml,
),
SettingsSwitchListTile(
title: L10n.of(context).hideRedactedEvents,
onChanged: (b) => AppConfig.hideRedactedEvents = b,
storeKey: SettingKeys.hideRedactedEvents,
defaultValue: AppConfig.hideRedactedEvents,
),
SettingsSwitchListTile(
title: L10n.of(context).hideUnknownEvents,
onChanged: (b) => AppConfig.hideUnknownEvents = b,
storeKey: SettingKeys.hideUnknownEvents,
defaultValue: AppConfig.hideUnknownEvents,
),
SettingsSwitchListTile(
title: L10n.of(context).autoplayImages,
onChanged: (b) => AppConfig.autoplayImages = b,
storeKey: SettingKeys.autoplayImages,
defaultValue: AppConfig.autoplayImages,
),
if (PlatformInfos.isMobile)
body: ListTileTheme(
iconColor: Theme.of(context).textTheme.bodyText1.color,
child: MaxWidthBody(
withScrolling: true,
child: Column(
children: [
SettingsSwitchListTile(
title: L10n.of(context).sendOnEnter,
onChanged: (b) => AppConfig.sendOnEnter = b,
storeKey: SettingKeys.sendOnEnter,
defaultValue: AppConfig.sendOnEnter,
title: L10n.of(context).renderRichContent,
onChanged: (b) => AppConfig.renderHtml = b,
storeKey: SettingKeys.renderHtml,
defaultValue: AppConfig.renderHtml,
),
const Divider(height: 1),
ListTile(
title: Text(L10n.of(context).emoteSettings),
onTap: () => VRouter.of(context).to('emotes'),
trailing: const Padding(
padding: EdgeInsets.all(16.0),
child: Icon(Icons.insert_emoticon_outlined),
SettingsSwitchListTile(
title: L10n.of(context).hideRedactedEvents,
onChanged: (b) => AppConfig.hideRedactedEvents = b,
storeKey: SettingKeys.hideRedactedEvents,
defaultValue: AppConfig.hideRedactedEvents,
),
),
ListTile(
trailing: const Padding(
padding: EdgeInsets.all(16.0),
child: Icon(CupertinoIcons.phone),
SettingsSwitchListTile(
title: L10n.of(context).hideUnknownEvents,
onChanged: (b) => AppConfig.hideUnknownEvents = b,
storeKey: SettingKeys.hideUnknownEvents,
defaultValue: AppConfig.hideUnknownEvents,
),
title: Text(L10n.of(context).editJitsiInstance),
subtitle: Text(AppConfig.jitsiInstance),
onTap: controller.setJitsiInstanceAction,
),
],
SettingsSwitchListTile(
title: L10n.of(context).autoplayImages,
onChanged: (b) => AppConfig.autoplayImages = b,
storeKey: SettingKeys.autoplayImages,
defaultValue: AppConfig.autoplayImages,
),
if (PlatformInfos.isMobile)
SettingsSwitchListTile(
title: L10n.of(context).sendOnEnter,
onChanged: (b) => AppConfig.sendOnEnter = b,
storeKey: SettingKeys.sendOnEnter,
defaultValue: AppConfig.sendOnEnter,
),
const Divider(height: 1),
ListTile(
title: Text(L10n.of(context).emoteSettings),
onTap: () => VRouter.of(context).to('emotes'),
trailing: const Padding(
padding: EdgeInsets.all(16.0),
child: Icon(Icons.insert_emoticon_outlined),
),
),
ListTile(
trailing: const Padding(
padding: EdgeInsets.all(16.0),
child: Icon(Icons.phone_outlined),
),
title: Text(L10n.of(context).editJitsiInstance),
subtitle: Text(AppConfig.jitsiInstance),
onTap: controller.setJitsiInstanceAction,
),
],
),
),
),
);

View File

@ -1,4 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
@ -29,8 +28,7 @@ class EmotesSettingsView extends StatelessWidget {
floatingActionButton: controller.showSave
? FloatingActionButton(
onPressed: controller.saveAction,
child:
const Icon(CupertinoIcons.floppy_disk, color: Colors.white),
child: const Icon(Icons.save_outlined, color: Colors.white),
)
: null,
body: MaxWidthBody(
@ -78,7 +76,7 @@ class EmotesSettingsView extends StatelessWidget {
trailing: InkWell(
onTap: controller.addImageAction,
child: const Icon(
CupertinoIcons.add,
Icons.add_outlined,
color: Colors.green,
size: 32.0,
),
@ -198,7 +196,7 @@ class EmotesSettingsView extends StatelessWidget {
onTap: () =>
controller.removeImageAction(imageCode),
child: const Icon(
CupertinoIcons.delete,
Icons.delete_outlined,
color: Colors.red,
size: 32.0,
),

View File

@ -1,4 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:adaptive_dialog/adaptive_dialog.dart';
@ -19,78 +18,85 @@ class SettingsSecurityView extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text(L10n.of(context).security)),
body: MaxWidthBody(
withScrolling: true,
child: Column(
children: [
ListTile(
trailing: const Icon(CupertinoIcons.xmark_shield),
title: Text(L10n.of(context).ignoredUsers),
onTap: () => VRouter.of(context).to('ignorelist'),
),
ListTile(
trailing: const Icon(CupertinoIcons.padlock),
title: Text(
L10n.of(context).changePassword,
),
onTap: controller.changePasswordAccountAction,
),
ListTile(
trailing: const Icon(CupertinoIcons.mail),
title: Text(L10n.of(context).passwordRecovery),
onTap: () => VRouter.of(context).to('3pid'),
),
if (Matrix.of(context).client.encryption != null) ...{
const Divider(thickness: 1),
if (PlatformInfos.isMobile)
ListTile(
trailing: const Icon(Icons.lock_outlined),
title: Text(L10n.of(context).appLock),
onTap: controller.setAppLockAction,
),
body: ListTileTheme(
iconColor: Theme.of(context).textTheme.bodyText1.color,
child: MaxWidthBody(
withScrolling: true,
child: Column(
children: [
ListTile(
trailing: const Icon(Icons.close),
title: Text(L10n.of(context).ignoredUsers),
onTap: () => VRouter.of(context).to('ignorelist'),
),
ListTile(
title: Text(L10n.of(context).yourPublicKey),
onTap: () => showOkAlertDialog(
useRootNavigator: false,
context: context,
title: L10n.of(context).yourPublicKey,
message: Matrix.of(context).client.fingerprintKey.beautified,
okLabel: L10n.of(context).ok,
),
trailing: const Icon(Icons.vpn_key_outlined),
title: Text(
L10n.of(context).changePassword,
),
onTap: controller.changePasswordAccountAction,
),
ListTile(
title: Text(L10n.of(context).crossSigningEnabled),
trailing:
Matrix.of(context).client.encryption.crossSigning.enabled
? const Icon(Icons.check, color: Colors.green)
: const Icon(Icons.error, color: Colors.red),
trailing: const Icon(Icons.mail_outlined),
title: Text(L10n.of(context).passwordRecovery),
onTap: () => VRouter.of(context).to('3pid'),
),
ListTile(
title: Text(L10n.of(context).onlineKeyBackupEnabled),
trailing:
Matrix.of(context).client.encryption.keyManager.enabled
? const Icon(Icons.check, color: Colors.green)
: const Icon(Icons.error, color: Colors.red),
),
ListTile(
title: const Text('Session verified'),
trailing: !Matrix.of(context).client.isUnknownSession
? const Icon(Icons.check, color: Colors.green)
: const Icon(Icons.error, color: Colors.red),
),
FutureBuilder(
future:
Matrix.of(context).client.encryption.keyManager.isCached(),
builder: (context, snapshot) => ListTile(
title: Text(L10n.of(context).keysCached),
trailing: snapshot.data == true
if (Matrix.of(context).client.encryption != null) ...{
const Divider(thickness: 1),
if (PlatformInfos.isMobile)
ListTile(
trailing: const Icon(Icons.lock_outlined),
title: Text(L10n.of(context).appLock),
onTap: controller.setAppLockAction,
),
ListTile(
title: Text(L10n.of(context).yourPublicKey),
onTap: () => showOkAlertDialog(
useRootNavigator: false,
context: context,
title: L10n.of(context).yourPublicKey,
message:
Matrix.of(context).client.fingerprintKey.beautified,
okLabel: L10n.of(context).ok,
),
trailing: const Icon(Icons.vpn_key_outlined),
),
ListTile(
title: Text(L10n.of(context).crossSigningEnabled),
trailing:
Matrix.of(context).client.encryption.crossSigning.enabled
? const Icon(Icons.check, color: Colors.green)
: const Icon(Icons.error, color: Colors.red),
),
ListTile(
title: Text(L10n.of(context).onlineKeyBackupEnabled),
trailing:
Matrix.of(context).client.encryption.keyManager.enabled
? const Icon(Icons.check, color: Colors.green)
: const Icon(Icons.error, color: Colors.red),
),
ListTile(
title: const Text('Session verified'),
trailing: !Matrix.of(context).client.isUnknownSession
? const Icon(Icons.check, color: Colors.green)
: const Icon(Icons.error, color: Colors.red),
),
),
},
],
FutureBuilder(
future: Matrix.of(context)
.client
.encryption
.keyManager
.isCached(),
builder: (context, snapshot) => ListTile(
title: Text(L10n.of(context).keysCached),
trailing: snapshot.data == true
? const Icon(Icons.check, color: Colors.green)
: const Icon(Icons.error, color: Colors.red),
),
),
},
],
),
),
),
);

View File

@ -1,4 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:adaptive_theme/adaptive_theme.dart';
@ -93,7 +92,7 @@ class SettingsStyleView extends StatelessWidget {
fit: BoxFit.cover,
),
trailing: const Icon(
CupertinoIcons.delete,
Icons.delete_outlined,
color: Colors.red,
),
onTap: controller.deleteWallpaperAction,
@ -101,7 +100,10 @@ class SettingsStyleView extends StatelessWidget {
Builder(builder: (context) {
return ListTile(
title: Text(L10n.of(context).changeWallpaper),
trailing: const Icon(CupertinoIcons.photo),
trailing: Icon(
Icons.photo_outlined,
color: Theme.of(context).textTheme.bodyText1.color,
),
onTap: controller.setWallpaperAction,
);
}),

View File

@ -18,7 +18,7 @@ class ContentBanner extends StatelessWidget {
const ContentBanner(this.mxContent,
{this.height = 400,
this.defaultIcon = CupertinoIcons.group,
this.defaultIcon = Icons.people_outlined,
this.loading = false,
this.onEdit,
this.client,
@ -72,7 +72,7 @@ class ContentBanner extends StatelessWidget {
onPressed: onEdit,
backgroundColor: Theme.of(context).backgroundColor,
foregroundColor: Theme.of(context).textTheme.bodyText1.color,
child: const Icon(CupertinoIcons.camera),
child: const Icon(Icons.camera_alt_outlined),
),
),
],