mirror of
https://github.com/foss42/apidash.git
synced 2025-05-31 22:33:59 +08:00
wip: history details pane
This commit is contained in:
@ -20,38 +20,40 @@ class ErrorMessage extends StatelessWidget {
|
||||
return Padding(
|
||||
padding: kPh20v10,
|
||||
child: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
showIcon
|
||||
? Icon(
|
||||
Icons.warning_rounded,
|
||||
size: 40,
|
||||
color: color,
|
||||
)
|
||||
: const SizedBox(),
|
||||
SelectableText(
|
||||
message ?? 'An error occurred. $kUnexpectedRaiseIssue',
|
||||
textAlign: TextAlign.center,
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.titleMedium
|
||||
?.copyWith(color: color),
|
||||
),
|
||||
kVSpacer20,
|
||||
showIssueButton
|
||||
? FilledButton.tonalIcon(
|
||||
onPressed: () {
|
||||
launchUrl(Uri.parse(kGitUrl));
|
||||
},
|
||||
icon: const Icon(Icons.arrow_outward_rounded),
|
||||
label: Text(
|
||||
'Raise Issue',
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
)
|
||||
: const SizedBox(),
|
||||
],
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
showIcon
|
||||
? Icon(
|
||||
Icons.warning_rounded,
|
||||
size: 40,
|
||||
color: color,
|
||||
)
|
||||
: const SizedBox(),
|
||||
SelectableText(
|
||||
message ?? 'An error occurred. $kUnexpectedRaiseIssue',
|
||||
textAlign: TextAlign.center,
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.titleMedium
|
||||
?.copyWith(color: color),
|
||||
),
|
||||
kVSpacer20,
|
||||
showIssueButton
|
||||
? FilledButton.tonalIcon(
|
||||
onPressed: () {
|
||||
launchUrl(Uri.parse(kGitUrl));
|
||||
},
|
||||
icon: const Icon(Icons.arrow_outward_rounded),
|
||||
label: Text(
|
||||
'Raise Issue',
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
)
|
||||
: const SizedBox(),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
Reference in New Issue
Block a user