randomizer done
This commit is contained in:
parent
7fdae2b25e
commit
5d250a4c39
@ -1,6 +1,6 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'dart:math';
|
import 'dart:math';
|
||||||
|
import 'package:refilc/helpers/dirtywords_helper.dart';
|
||||||
import 'package:refilc/api/client.dart';
|
import 'package:refilc/api/client.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
|
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
|
||||||
@ -14,47 +14,56 @@ class ErrorReportScreen extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: const Color(0xFFE3EBFB),
|
backgroundColor: Color(0xFFE3EBFB),
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(12.0),
|
padding: const EdgeInsets.all(12.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
Image.asset(
|
Image.asset('assets/icons/ic_rounded.png', height: 40),
|
||||||
'assets/icons/ic_rounded.png',
|
|
||||||
height: 50,
|
|
||||||
width: 50,
|
|
||||||
),
|
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(bottom: 2.0),
|
padding: const EdgeInsets.only(bottom: 4.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
"ekretaYou".i18n,
|
"ekretaYou".i18n,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: const Color(0xFF011234).withOpacity(0.7),
|
color: Color(0xFF011234).withOpacity(0.7),
|
||||||
fontSize: 24.0,
|
fontSize: 24.0,
|
||||||
fontWeight: FontWeight.w700,
|
fontWeight: FontWeight.w700,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
FutureBuilder<String>(
|
||||||
"description".i18n, //TODO: randomize using DirtyWords.xml
|
future: dirtyString(),
|
||||||
textAlign: TextAlign.center,
|
builder: (context, snapshot) {
|
||||||
style: const TextStyle(
|
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||||
color: Color(0xFF011234),
|
return CircularProgressIndicator();
|
||||||
fontSize: 24.0,
|
}
|
||||||
fontWeight: FontWeight.w700,
|
if (snapshot.hasError) {
|
||||||
fontStyle: FontStyle.italic,
|
return Text("Error: ${snapshot.error}");
|
||||||
),
|
}
|
||||||
|
return Text(
|
||||||
|
snapshot.data ?? "",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: const TextStyle(
|
||||||
|
color: Color(0xFF011234),
|
||||||
|
fontSize: 24.0,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
fontStyle: FontStyle.italic,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
),
|
),
|
||||||
|
const SizedBox(height: 16),
|
||||||
Text(
|
Text(
|
||||||
"smth_went_wrong".i18n,
|
"smth_went_wrong".i18n,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
color: Color(0xFF011234),
|
color: Color(0xFF011234),
|
||||||
fontSize: 24.0,
|
fontSize: 16.0,
|
||||||
fontWeight: FontWeight.w700,
|
fontWeight: FontWeight.w500,
|
||||||
|
fontFamily: 'Geist',
|
||||||
fontStyle: FontStyle.italic,
|
fontStyle: FontStyle.italic,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -135,7 +144,7 @@ class ErrorReportScreen extends StatelessWidget {
|
|||||||
const EdgeInsets.symmetric(vertical: 14.0),
|
const EdgeInsets.symmetric(vertical: 14.0),
|
||||||
),
|
),
|
||||||
backgroundColor: MaterialStateProperty.all(
|
backgroundColor: MaterialStateProperty.all(
|
||||||
const Color(0xFFF3F7FE),
|
Color(0xFFF3F7FE),
|
||||||
),
|
),
|
||||||
shape: MaterialStateProperty.all(
|
shape: MaterialStateProperty.all(
|
||||||
RoundedRectangleBorder(
|
RoundedRectangleBorder(
|
||||||
@ -143,7 +152,7 @@ class ErrorReportScreen extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
side: MaterialStateProperty.all(
|
side: MaterialStateProperty.all(
|
||||||
const BorderSide(width: 1.0, color: Color(0xFFC7D3EB)),
|
BorderSide(width: 1.0, color: Color(0xFFC7D3EB)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
@ -259,7 +268,7 @@ class ErrorDetail extends StatelessWidget {
|
|||||||
const EdgeInsets.symmetric(horizontal: 6.5, vertical: 4.0),
|
const EdgeInsets.symmetric(horizontal: 6.5, vertical: 4.0),
|
||||||
margin: const EdgeInsets.only(top: 4.0),
|
margin: const EdgeInsets.only(top: 4.0),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: const Color.fromARGB(255, 218, 218, 218),
|
color: Color.fromARGB(255, 218, 218, 218),
|
||||||
borderRadius: BorderRadius.circular(4.0)),
|
borderRadius: BorderRadius.circular(4.0)),
|
||||||
child: Text(
|
child: Text(
|
||||||
content,
|
content,
|
||||||
|
@ -15,7 +15,7 @@ extension SettingsLocalization on String {
|
|||||||
"stack": "Stack Trace",
|
"stack": "Stack Trace",
|
||||||
"done": "Done",
|
"done": "Done",
|
||||||
"smth_went_wrong":
|
"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": {
|
"hu_hu": {
|
||||||
"ekretaYou": "e-KRÉTA, te",
|
"ekretaYou": "e-KRÉTA, te",
|
||||||
@ -29,7 +29,7 @@ extension SettingsLocalization on String {
|
|||||||
"stack": "Stacktrace",
|
"stack": "Stacktrace",
|
||||||
"done": "Kész",
|
"done": "Kész",
|
||||||
"smth_went_wrong":
|
"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": {
|
"de_de": {
|
||||||
"ekretaYou": "e-KRÉTA, du",
|
"ekretaYou": "e-KRÉTA, du",
|
||||||
@ -43,7 +43,7 @@ extension SettingsLocalization on String {
|
|||||||
"stack": "Stack Trace",
|
"stack": "Stack Trace",
|
||||||
"done": "Fertig",
|
"done": "Fertig",
|
||||||
"smth_went_wrong":
|
"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)",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user