fix licenses crashing the app
This commit is contained in:
parent
ea61556f38
commit
eed5290109
|
@ -4,10 +4,13 @@ const String name = "loris";
|
||||||
const String version = "v0.1 'is this thing on'";
|
const String version = "v0.1 'is this thing on'";
|
||||||
const String useragent = "$name/$version";
|
const String useragent = "$name/$version";
|
||||||
const String website = "https://git.kittycat.homes/zoe/slothmu";
|
const String website = "https://git.kittycat.homes/zoe/slothmu";
|
||||||
|
const String legalese = "todo";
|
||||||
|
|
||||||
const Map<String, String> defaultHeaders = {
|
const Map<String, String> defaultHeaders = {
|
||||||
"User-Agent": useragent,
|
"User-Agent": useragent,
|
||||||
"accept": "application/json",
|
"accept": "application/json",
|
||||||
"Content-Type": "application/json"
|
"Content-Type": "application/json"
|
||||||
};
|
};
|
||||||
|
|
||||||
const List<String> bad = ["gab.com", "spinster.xyz", "truthsocial.com"];
|
const List<String> bad = ["gab.com", "spinster.xyz", "truthsocial.com"];
|
||||||
const List<Locale> availableLocales = [Locale("en"), Locale("de")];
|
const List<Locale> availableLocales = [Locale("en"), Locale("de")];
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:localization/localization.dart';
|
||||||
|
import '../../global.dart' as global;
|
||||||
|
|
||||||
|
class AboutSettings extends StatelessWidget {
|
||||||
|
const AboutSettings({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
|
||||||
|
Text("about".i18n()),
|
||||||
|
TextButton.icon(
|
||||||
|
onPressed: () {
|
||||||
|
showAboutDialog(
|
||||||
|
context: context,
|
||||||
|
applicationName: global.name,
|
||||||
|
applicationVersion: global.version,
|
||||||
|
applicationLegalese: global.legalese,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
icon: const Icon(Icons.question_mark),
|
||||||
|
label: Text("show-about-page".i18n()))
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
|
@ -21,6 +21,7 @@ class LogoutButton extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Row(
|
return Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
FutureBuilder<String>(
|
FutureBuilder<String>(
|
||||||
future: settings.loadInstanceUrl(),
|
future: settings.loadInstanceUrl(),
|
||||||
|
|
|
@ -1,12 +1,17 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:localization/localization.dart';
|
import 'package:localization/localization.dart';
|
||||||
import './account.dart' as account;
|
import './account.dart' as account;
|
||||||
|
import './about.dart' as about;
|
||||||
|
|
||||||
Widget settings(context) {
|
Widget settings(context) {
|
||||||
final List<Widget> categories = [
|
final List<Widget> categories = [
|
||||||
SettingsPanel(
|
SettingsPanel(
|
||||||
title: "account-settings".i18n(),
|
title: "account-settings".i18n(),
|
||||||
content: const account.AccountSettings()),
|
content: const account.AccountSettings()),
|
||||||
|
SettingsPanel(
|
||||||
|
title: "about".i18n(),
|
||||||
|
content: const about.AboutSettings(),
|
||||||
|
)
|
||||||
];
|
];
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.all(24),
|
padding: const EdgeInsets.all(24),
|
||||||
|
|
10
pubspec.lock
10
pubspec.lock
|
@ -104,7 +104,7 @@ packages:
|
||||||
name: http
|
name: http
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.13.4"
|
version: "0.13.5"
|
||||||
http_parser:
|
http_parser:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -188,7 +188,7 @@ packages:
|
||||||
name: path_provider_windows
|
name: path_provider_windows
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "2.1.1"
|
||||||
platform:
|
platform:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -272,7 +272,7 @@ packages:
|
||||||
name: shelf
|
name: shelf
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.1"
|
version: "1.3.2"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
|
@ -333,7 +333,7 @@ packages:
|
||||||
name: url_launcher
|
name: url_launcher
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.1.4"
|
version: "6.1.5"
|
||||||
url_launcher_android:
|
url_launcher_android:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -375,7 +375,7 @@ packages:
|
||||||
name: url_launcher_web
|
name: url_launcher_web
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.12"
|
version: "2.0.13"
|
||||||
url_launcher_windows:
|
url_launcher_windows:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
Loading…
Reference in New Issue