randomizer done

This commit is contained in:
Zypherift 2024-03-14 00:56:00 +01:00
parent 7fdae2b25e
commit 5d250a4c39
2 changed files with 35 additions and 26 deletions

View File

@ -1,6 +1,6 @@
import 'dart:io';
import 'dart:math';
import 'package:refilc/helpers/dirtywords_helper.dart';
import 'package:refilc/api/client.dart';
import 'package:flutter/material.dart';
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
@ -14,32 +14,37 @@ class ErrorReportScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color(0xFFE3EBFB),
backgroundColor: Color(0xFFE3EBFB),
body: SafeArea(
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Column(
children: [
const Spacer(),
Image.asset(
'assets/icons/ic_rounded.png',
height: 50,
width: 50,
),
Image.asset('assets/icons/ic_rounded.png', height: 40),
const SizedBox(height: 16),
Padding(
padding: const EdgeInsets.only(bottom: 2.0),
padding: const EdgeInsets.only(bottom: 4.0),
child: Text(
"ekretaYou".i18n,
style: TextStyle(
color: const Color(0xFF011234).withOpacity(0.7),
color: Color(0xFF011234).withOpacity(0.7),
fontSize: 24.0,
fontWeight: FontWeight.w700,
),
),
),
Text(
"description".i18n, //TODO: randomize using DirtyWords.xml
FutureBuilder<String>(
future: dirtyString(),
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return CircularProgressIndicator();
}
if (snapshot.hasError) {
return Text("Error: ${snapshot.error}");
}
return Text(
snapshot.data ?? "",
textAlign: TextAlign.center,
style: const TextStyle(
color: Color(0xFF011234),
@ -47,14 +52,18 @@ class ErrorReportScreen extends StatelessWidget {
fontWeight: FontWeight.w700,
fontStyle: FontStyle.italic,
),
);
},
),
const SizedBox(height: 16),
Text(
"smth_went_wrong".i18n,
textAlign: TextAlign.center,
style: const TextStyle(
color: Color(0xFF011234),
fontSize: 24.0,
fontWeight: FontWeight.w700,
fontSize: 16.0,
fontWeight: FontWeight.w500,
fontFamily: 'Geist',
fontStyle: FontStyle.italic,
),
),
@ -135,7 +144,7 @@ class ErrorReportScreen extends StatelessWidget {
const EdgeInsets.symmetric(vertical: 14.0),
),
backgroundColor: MaterialStateProperty.all(
const Color(0xFFF3F7FE),
Color(0xFFF3F7FE),
),
shape: MaterialStateProperty.all(
RoundedRectangleBorder(
@ -143,7 +152,7 @@ class ErrorReportScreen extends StatelessWidget {
),
),
side: MaterialStateProperty.all(
const BorderSide(width: 1.0, color: Color(0xFFC7D3EB)),
BorderSide(width: 1.0, color: Color(0xFFC7D3EB)),
),
),
child: Text(
@ -259,7 +268,7 @@ class ErrorDetail extends StatelessWidget {
const EdgeInsets.symmetric(horizontal: 6.5, vertical: 4.0),
margin: const EdgeInsets.only(top: 4.0),
decoration: BoxDecoration(
color: const Color.fromARGB(255, 218, 218, 218),
color: Color.fromARGB(255, 218, 218, 218),
borderRadius: BorderRadius.circular(4.0)),
child: Text(
content,

View File

@ -15,7 +15,7 @@ extension SettingsLocalization on String {
"stack": "Stack Trace",
"done": "Done",
"smth_went_wrong":
"Something went wrong, it is of course the fault of Educational Development Informatikai Zrt. (e-KRÉTA) in any case! /s",
"Something went wrong, it is of course the fault of Educational Development Informatikai Zrt. (e-KRÉTA) in any case! (Joke, our fault of course)",
},
"hu_hu": {
"ekretaYou": "e-KRÉTA, te",
@ -29,7 +29,7 @@ extension SettingsLocalization on String {
"stack": "Stacktrace",
"done": "Kész",
"smth_went_wrong":
"Valami probléma történt, ez természetesen az Educational Development Informatikai Zrt. (e-KRÉTA) hibája minden esetben! /s",
"Valami probléma történt, ez természetesen az Educational Development Informatikai Zrt. (e-KRÉTA) hibája minden esetben! (Vicc, természetesen a mi hibánk)",
},
"de_de": {
"ekretaYou": "e-KRÉTA, du",
@ -43,7 +43,7 @@ extension SettingsLocalization on String {
"stack": "Stack Trace",
"done": "Fertig",
"smth_went_wrong":
"Irgendetwas ist schief gelaufen, es ist natürlich auf jeden Fall die Schuld der Educational Development Informatikai Zrt. (e-KRÉTA)! /ss",
"Irgendetwas ist schief gelaufen, es ist natürlich auf jeden Fall die Schuld der Educational Development Informatikai Zrt. (e-KRÉTA)! (Scherz, natürlich unsere Schuld)",
},
};