refactor: Tweak the design of the BrokenDomainOutlinedCard

pull/394/head
Inex Code 2023-12-12 08:31:37 +03:00
parent 9d09354363
commit 4ed038d34c
2 changed files with 20 additions and 17 deletions

View File

@ -452,7 +452,7 @@
"server_rebooted": "Server rebooted. Waiting for the last verification…", "server_rebooted": "Server rebooted. Waiting for the last verification…",
"server_started": "Server started. It will be validated and rebooted now…", "server_started": "Server started. It will be validated and rebooted now…",
"server_created": "Server created. DNS checks and server boot in progress…", "server_created": "Server created. DNS checks and server boot in progress…",
"domain_critical_error": "We can't reach it! Read more…", "domain_critical_error": "We can't reach this domain! Tap to read more…",
"until_the_next_check": "Until the next check: ", "until_the_next_check": "Until the next check: ",
"check": "Check", "check": "Check",
"one_more_restart": "One more restart to apply your security certificates.", "one_more_restart": "One more restart to apply your security certificates.",

View File

@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
import 'package:selfprivacy/logic/cubit/providers/providers_cubit.dart'; import 'package:selfprivacy/logic/cubit/providers/providers_cubit.dart';
import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart'; import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart';
import 'package:selfprivacy/logic/providers/dns_providers/dns_provider.dart'; import 'package:selfprivacy/logic/providers/dns_providers/dns_provider.dart';
import 'package:selfprivacy/ui/components/cards/outlined_card.dart'; import 'package:selfprivacy/ui/components/cards/filled_card.dart';
class BrokenDomainOutlinedCard extends StatelessWidget { class BrokenDomainOutlinedCard extends StatelessWidget {
const BrokenDomainOutlinedCard({ const BrokenDomainOutlinedCard({
@ -18,9 +18,8 @@ class BrokenDomainOutlinedCard extends StatelessWidget {
@override @override
Widget build(final BuildContext context) => SizedBox( Widget build(final BuildContext context) => SizedBox(
width: double.infinity, width: double.infinity,
child: OutlinedCard( child: FilledCard(
borderColor: Theme.of(context).colorScheme.error, error: true,
borderWidth: 1,
child: InkResponse( child: InkResponse(
highlightShape: BoxShape.rectangle, highlightShape: BoxShape.rectangle,
onTap: () => context.read<SupportSystemCubit>().showArticle( onTap: () => context.read<SupportSystemCubit>().showArticle(
@ -28,7 +27,7 @@ class BrokenDomainOutlinedCard extends StatelessWidget {
context: context, context: context,
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(16.0),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
@ -36,18 +35,22 @@ class BrokenDomainOutlinedCard extends StatelessWidget {
Icon( Icon(
Icons.error, Icons.error,
color: Theme.of(context).colorScheme.error, color: Theme.of(context).colorScheme.error,
size: 24.0,
), ),
const SizedBox(width: 8), const SizedBox(width: 12.0),
Column( Flexible(
mainAxisAlignment: MainAxisAlignment.start, child: Column(
crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Text( children: [
domain, Text(
style: Theme.of(context).textTheme.bodyLarge, domain,
), overflow: TextOverflow.ellipsis,
Text('initializing.domain_critical_error'.tr()), style: Theme.of(context).textTheme.bodyLarge,
], ),
Text('initializing.domain_critical_error'.tr()),
],
),
), ),
], ],
), ),