loris/lib/global.dart

44 lines
1.1 KiB
Dart

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:loris/business_logic/settings.dart';
import 'themes/themes.dart' as themes;
const String name = "loris";
const String version = "v0.5 'the halloween update'";
const String useragent = "$name/$version";
const String website = "https://git.kittycat.homes/zoe/loris";
final Map<String, String> defaultHeaders = {
if (!kIsWeb) "User-Agent": useragent,
"accept": "application/json",
"Content-Type": "application/json"
};
const List<String> bad = [
"gab.com",
"spinster.xyz",
"truthsocial.com",
"poa.st",
"gleasonator.com",
"shitposter.club",
"freespeechextremist.com",
];
double getWidth(context) {
return (MediaQuery.of(context).size.width * settings!.postWidth) -
(themes.defaultSeperatorHeight * 2);
}
BoxConstraints getConstraints(context) {
return BoxConstraints(
maxWidth: settings!.maxPostWidth,
);
}
const List<Locale> availableLocales = [Locale("en", "US"), Locale("de")];
Settings? settings;
const String legalese =
"loris is licensed under the CNPLv7+ to find out more go to https://thufie.lain.haus/NPL.html";