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 useragent = "$name/$version";
|
||||
const String website = "https://git.kittycat.homes/zoe/slothmu";
|
||||
const String legalese = "todo";
|
||||
|
||||
const Map<String, String> defaultHeaders = {
|
||||
"User-Agent": useragent,
|
||||
"accept": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
};
|
||||
|
||||
const List<String> bad = ["gab.com", "spinster.xyz", "truthsocial.com"];
|
||||
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
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
FutureBuilder<String>(
|
||||
future: settings.loadInstanceUrl(),
|
||||
|
|
|
@ -1,12 +1,17 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:localization/localization.dart';
|
||||
import './account.dart' as account;
|
||||
import './about.dart' as about;
|
||||
|
||||
Widget settings(context) {
|
||||
final List<Widget> categories = [
|
||||
SettingsPanel(
|
||||
title: "account-settings".i18n(),
|
||||
content: const account.AccountSettings()),
|
||||
SettingsPanel(
|
||||
title: "about".i18n(),
|
||||
content: const about.AboutSettings(),
|
||||
)
|
||||
];
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(24),
|
||||
|
|
10
pubspec.lock
10
pubspec.lock
|
@ -104,7 +104,7 @@ packages:
|
|||
name: http
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.13.4"
|
||||
version: "0.13.5"
|
||||
http_parser:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -188,7 +188,7 @@ packages:
|
|||
name: path_provider_windows
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
version: "2.1.1"
|
||||
platform:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -272,7 +272,7 @@ packages:
|
|||
name: shelf
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.3.1"
|
||||
version: "1.3.2"
|
||||
sky_engine:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
|
@ -333,7 +333,7 @@ packages:
|
|||
name: url_launcher
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "6.1.4"
|
||||
version: "6.1.5"
|
||||
url_launcher_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -375,7 +375,7 @@ packages:
|
|||
name: url_launcher_web
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.12"
|
||||
version: "2.0.13"
|
||||
url_launcher_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
Loading…
Reference in New Issue