mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-07-23 22:51:00 -04:00
update deps, fix context
This commit is contained in:
parent
fa72782f39
commit
2caaf35d52
3 changed files with 68 additions and 54 deletions
|
@ -67,53 +67,55 @@ class HomeScreenState extends State<HomeScreen>
|
|||
final scaleConfig = theme.extension<ScaleConfig>()!;
|
||||
|
||||
await showAlertWidgetModal(
|
||||
context: context,
|
||||
title: translate('splash.beta_title'),
|
||||
child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
Icon(Icons.warning, size: 64.scaled(context)),
|
||||
RichText(
|
||||
textScaler: MediaQuery.of(context).textScaler,
|
||||
textAlign: TextAlign.center,
|
||||
text: TextSpan(
|
||||
children: <TextSpan>[
|
||||
TextSpan(
|
||||
text: translate('splash.beta_text'),
|
||||
context: context,
|
||||
title: translate('splash.beta_title'),
|
||||
child: Builder(
|
||||
builder: (context) =>
|
||||
Column(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
Icon(Icons.warning, size: 64.scaled(context)),
|
||||
RichText(
|
||||
textScaler: MediaQuery.of(context).textScaler,
|
||||
textAlign: TextAlign.center,
|
||||
text: TextSpan(
|
||||
children: <TextSpan>[
|
||||
TextSpan(
|
||||
text: translate('splash.beta_text'),
|
||||
style: theme.textTheme.bodyMedium!
|
||||
.copyWith(color: scale.primaryScale.appText),
|
||||
),
|
||||
TextSpan(
|
||||
text: 'https://veilid.com/chat/knownissues',
|
||||
style: theme.textTheme.bodyMedium!.copyWith(
|
||||
color: scaleConfig.useVisualIndicators
|
||||
? scale.secondaryScale.primaryText
|
||||
: scale.secondaryScale.primary,
|
||||
decoration: TextDecoration.underline,
|
||||
),
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () => launchUrlString(
|
||||
'https://veilid.com/chat/knownissues'),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Row(mainAxisSize: MainAxisSize.min, children: [
|
||||
StatefulBuilder(
|
||||
builder: (context, setState) => Checkbox(
|
||||
value: displayBetaWarning,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
displayBetaWarning = value ?? true;
|
||||
});
|
||||
},
|
||||
)),
|
||||
Text(
|
||||
translate('settings_page.display_beta_warning'),
|
||||
style: theme.textTheme.bodyMedium!
|
||||
.copyWith(color: scale.primaryScale.appText),
|
||||
),
|
||||
TextSpan(
|
||||
text: 'https://veilid.com/chat/knownissues',
|
||||
style: theme.textTheme.bodyMedium!.copyWith(
|
||||
color: scaleConfig.useVisualIndicators
|
||||
? scale.secondaryScale.primaryText
|
||||
: scale.secondaryScale.primary,
|
||||
decoration: TextDecoration.underline,
|
||||
),
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () =>
|
||||
launchUrlString('https://veilid.com/chat/knownissues'),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Row(mainAxisSize: MainAxisSize.min, children: [
|
||||
StatefulBuilder(
|
||||
builder: (context, setState) => Checkbox(
|
||||
value: displayBetaWarning,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
displayBetaWarning = value ?? true;
|
||||
});
|
||||
},
|
||||
)),
|
||||
Text(
|
||||
translate('settings_page.display_beta_warning'),
|
||||
style: theme.textTheme.bodyMedium!
|
||||
.copyWith(color: scale.primaryScale.appText),
|
||||
),
|
||||
]),
|
||||
]),
|
||||
);
|
||||
]),
|
||||
]),
|
||||
));
|
||||
|
||||
final preferencesInstance = PreferencesRepository.instance;
|
||||
await preferencesInstance.set(preferencesInstance.value.copyWith(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue