2022-09-03 20:41:39 +00:00
|
|
|
import 'package:flutter/foundation.dart';
|
2022-08-15 13:08:37 +00:00
|
|
|
import 'package:flutter/material.dart';
|
2022-08-12 17:00:09 +00:00
|
|
|
import 'package:loris/business_logic/settings.dart';
|
2022-07-03 13:47:24 +00:00
|
|
|
|
2022-07-04 17:37:53 +00:00
|
|
|
const String name = "loris";
|
2022-09-02 22:42:03 +00:00
|
|
|
const String version = "v0.2 'the themes update'";
|
2022-06-28 20:05:24 +00:00
|
|
|
const String useragent = "$name/$version";
|
2022-08-06 14:50:30 +00:00
|
|
|
const String website = "https://git.kittycat.homes/zoe/loris";
|
2022-08-06 10:13:00 +00:00
|
|
|
|
2022-09-03 20:41:39 +00:00
|
|
|
final Map<String, String> defaultHeaders = {
|
|
|
|
if (!kIsWeb) "User-Agent": useragent,
|
2022-06-28 20:05:24 +00:00
|
|
|
"accept": "application/json",
|
|
|
|
"Content-Type": "application/json"
|
|
|
|
};
|
2022-08-06 10:13:00 +00:00
|
|
|
|
2022-08-12 22:28:00 +00:00
|
|
|
const List<String> bad = [
|
|
|
|
"gab.com",
|
|
|
|
"spinster.xyz",
|
|
|
|
"truthsocial.com",
|
|
|
|
"poa.st",
|
|
|
|
"gleasonator.com",
|
|
|
|
"shitposter.club",
|
|
|
|
"freespeechextremist.com"
|
|
|
|
];
|
|
|
|
|
2022-09-04 18:03:24 +00:00
|
|
|
double getWidth(context) {
|
|
|
|
return (MediaQuery.of(context).size.width * settings!.postWidth) - 56;
|
|
|
|
}
|
|
|
|
|
|
|
|
BoxConstraints getConstraints(context) {
|
|
|
|
return BoxConstraints(
|
|
|
|
maxWidth: settings!.maxPostWidth,
|
|
|
|
minWidth: 375,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2022-08-29 21:38:14 +00:00
|
|
|
const List<Locale> availableLocales = [Locale("en", "US"), Locale("de")];
|
2022-08-12 17:00:09 +00:00
|
|
|
|
|
|
|
Settings? settings;
|
2022-08-29 21:30:26 +00:00
|
|
|
|
|
|
|
const String legalese =
|
2022-09-02 21:19:25 +00:00
|
|
|
"loris is licensed under the CNPLv7+ to find out more go to https://thufie.lain.haus/NPL.html";
|