build: fix lints for new flutter version (#4154)
This commit is contained in:
parent
3c8a6710fc
commit
f0d70fea70
6 changed files with 96 additions and 83 deletions
|
|
@ -45,45 +45,56 @@ class ChatAccessSettingsPageView extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
),
|
||||
for (final historyVisibility in HistoryVisibility.values)
|
||||
RadioListTile<HistoryVisibility>.adaptive(
|
||||
title: Text(
|
||||
historyVisibility
|
||||
.getLocalizedString(MatrixLocals(L10n.of(context))),
|
||||
),
|
||||
value: historyVisibility,
|
||||
groupValue: room.historyVisibility,
|
||||
onChanged: controller.historyVisibilityLoading ||
|
||||
!room.canChangeHistoryVisibility
|
||||
? null
|
||||
: controller.setHistoryVisibility,
|
||||
RadioGroup<HistoryVisibility>(
|
||||
groupValue: room.historyVisibility,
|
||||
onChanged: controller.historyVisibilityLoading ||
|
||||
!room.canChangeHistoryVisibility
|
||||
? (_) {}
|
||||
: controller.setHistoryVisibility,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
for (final historyVisibility in HistoryVisibility.values)
|
||||
RadioListTile<HistoryVisibility>.adaptive(
|
||||
title: Text(
|
||||
historyVisibility.getLocalizedString(
|
||||
MatrixLocals(L10n.of(context)),
|
||||
),
|
||||
),
|
||||
value: historyVisibility,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Divider(color: theme.dividerColor),
|
||||
ListTile(
|
||||
title: Text(
|
||||
// #Pangea
|
||||
// L10n.of(context).whoIsAllowedToJoinThisGroup,
|
||||
L10n.of(context).whoIsAllowedToJoinThisChat,
|
||||
// Pangea#
|
||||
L10n.of(context).whoIsAllowedToJoinThisGroup,
|
||||
style: TextStyle(
|
||||
color: theme.colorScheme.secondary,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
for (final joinRule in controller.availableJoinRules)
|
||||
if (joinRule != JoinRules.private)
|
||||
RadioListTile<JoinRules>.adaptive(
|
||||
title: Text(
|
||||
joinRule.localizedString(L10n.of(context)),
|
||||
),
|
||||
value: joinRule,
|
||||
groupValue: room.joinRules,
|
||||
onChanged: controller.joinRulesLoading ||
|
||||
!room.canChangeJoinRules
|
||||
? null
|
||||
: controller.setJoinRule,
|
||||
),
|
||||
RadioGroup(
|
||||
groupValue: room.joinRules,
|
||||
onChanged: controller.setJoinRule,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
for (final joinRule in controller.availableJoinRules)
|
||||
if (joinRule != JoinRules.private)
|
||||
RadioListTile<JoinRules>.adaptive(
|
||||
enabled: !controller.joinRulesLoading &&
|
||||
room.canChangeJoinRules,
|
||||
title: Text(
|
||||
joinRule.localizedString(L10n.of(context)),
|
||||
),
|
||||
value: joinRule,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Divider(color: theme.dividerColor),
|
||||
if ({JoinRules.public, JoinRules.knock}
|
||||
.contains(room.joinRules)) ...[
|
||||
|
|
@ -96,20 +107,26 @@ class ChatAccessSettingsPageView extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
),
|
||||
for (final guestAccess in GuestAccess.values)
|
||||
RadioListTile<GuestAccess>.adaptive(
|
||||
title: Text(
|
||||
guestAccess.getLocalizedString(
|
||||
MatrixLocals(L10n.of(context)),
|
||||
),
|
||||
),
|
||||
value: guestAccess,
|
||||
groupValue: room.guestAccess,
|
||||
onChanged: controller.guestAccessLoading ||
|
||||
!room.canChangeGuestAccess
|
||||
? null
|
||||
: controller.setGuestAccess,
|
||||
RadioGroup(
|
||||
groupValue: room.guestAccess,
|
||||
onChanged: controller.setGuestAccess,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
for (final guestAccess in GuestAccess.values)
|
||||
RadioListTile<GuestAccess>.adaptive(
|
||||
enabled: !controller.guestAccessLoading &&
|
||||
room.canChangeGuestAccess,
|
||||
title: Text(
|
||||
guestAccess.getLocalizedString(
|
||||
MatrixLocals(L10n.of(context)),
|
||||
),
|
||||
),
|
||||
value: guestAccess,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Divider(color: theme.dividerColor),
|
||||
ListTile(
|
||||
title: Text(
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
|
@ -52,13 +53,11 @@ class ChatEncryptionSettingsView extends StatelessWidget {
|
|||
value: room.encrypted,
|
||||
onChanged: controller.enableEncryption,
|
||||
),
|
||||
// #Pangea
|
||||
// Icon(
|
||||
// CupertinoIcons.lock_shield,
|
||||
// size: 128,
|
||||
// color: theme.colorScheme.onInverseSurface,
|
||||
// ),
|
||||
// Pangea#
|
||||
Icon(
|
||||
CupertinoIcons.lock_shield,
|
||||
size: 128,
|
||||
color: theme.colorScheme.onInverseSurface,
|
||||
),
|
||||
const Divider(),
|
||||
if (room.isDirectChat)
|
||||
Padding(
|
||||
|
|
@ -111,7 +110,7 @@ class ChatEncryptionSettingsView extends StatelessWidget {
|
|||
itemBuilder: (BuildContext context, int i) =>
|
||||
SwitchListTile(
|
||||
value: !deviceKeys[i].blocked,
|
||||
activeColor: deviceKeys[i].verified
|
||||
activeThumbColor: deviceKeys[i].verified
|
||||
? Colors.green
|
||||
: Colors.orange,
|
||||
onChanged: (_) =>
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class InstructionsToggleState extends State<InstructionsToggle> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SwitchListTile.adaptive(
|
||||
activeColor: AppConfig.activeToggleColor,
|
||||
activeThumbColor: AppConfig.activeToggleColor,
|
||||
title: Text(L10n.of(context).doNotShowAgain),
|
||||
value: widget.instructionsKey.isToggledOff,
|
||||
onChanged: ((value) async {
|
||||
|
|
|
|||
|
|
@ -301,7 +301,8 @@ class SettingsLearningView extends StatelessWidget {
|
|||
subtitle: Text(
|
||||
L10n.of(context).publicProfileDesc,
|
||||
),
|
||||
activeColor: AppConfig.activeToggleColor,
|
||||
activeThumbColor:
|
||||
AppConfig.activeToggleColor,
|
||||
contentPadding: EdgeInsets.zero,
|
||||
),
|
||||
ResetInstructionsListTile(
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class PSettingsSwitchListTileState
|
|||
contentPadding: EdgeInsets.zero,
|
||||
value: currentValue,
|
||||
title: Text(widget.title),
|
||||
activeColor: AppConfig.activeToggleColor,
|
||||
activeThumbColor: AppConfig.activeToggleColor,
|
||||
subtitle: widget.subtitle != null ? Text(widget.subtitle!) : null,
|
||||
onChanged: widget.enabled
|
||||
? (bool newValue) async {
|
||||
|
|
|
|||
|
|
@ -42,37 +42,33 @@ class AppConfigDialogState extends State<AppConfigDialog> {
|
|||
maxWidth: 256,
|
||||
),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
...widget.overrides.map((override) {
|
||||
return RadioListTile<AppConfigOverride?>.adaptive(
|
||||
title: Text(
|
||||
override.environment ?? L10n.of(context).unkDisplayName,
|
||||
child: RadioGroup<AppConfigOverride?>(
|
||||
groupValue: selectedOverride,
|
||||
onChanged: (override) {
|
||||
setState(() {
|
||||
selectedOverride = override;
|
||||
});
|
||||
},
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
...widget.overrides.map((override) {
|
||||
return RadioListTile<AppConfigOverride?>.adaptive(
|
||||
title: Text(
|
||||
override.environment ?? L10n.of(context).unkDisplayName,
|
||||
),
|
||||
value: override,
|
||||
);
|
||||
}).toList()
|
||||
..insert(
|
||||
0,
|
||||
RadioListTile<AppConfigOverride?>.adaptive(
|
||||
title: Text(L10n.of(context).defaultOption),
|
||||
value: null,
|
||||
),
|
||||
),
|
||||
value: override,
|
||||
groupValue: selectedOverride,
|
||||
onChanged: (override) {
|
||||
setState(() {
|
||||
selectedOverride = override;
|
||||
});
|
||||
},
|
||||
);
|
||||
}).toList()
|
||||
..insert(
|
||||
0,
|
||||
RadioListTile<AppConfigOverride?>.adaptive(
|
||||
title: Text(L10n.of(context).defaultOption),
|
||||
value: null,
|
||||
groupValue: selectedOverride,
|
||||
onChanged: (override) {
|
||||
setState(() {
|
||||
selectedOverride = null;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue