mirror of
https://github.com/immich-app/immich.git
synced 2024-12-17 12:22:31 +02:00
086a957a2b
* chore: text correction * fix: update activities stat only when the widget is mounted * feat(mobile): edit date time * feat(mobile): edit location * chore(build): update gradle wrapper - 7.6.3 * style: dropdownmenu styling * style: wrap locationpicker in singlechildscrollview * test: add unit test for getTZAdjustedTimeAndOffset * pr changes --------- Co-authored-by: shalong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
37 lines
1.1 KiB
Dart
37 lines
1.1 KiB
Dart
import 'package:easy_localization/easy_localization.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
|
|
|
// Error widget to be used in Scaffold when an AsyncError is received
|
|
class ScaffoldErrorBody extends StatelessWidget {
|
|
final bool withIcon;
|
|
|
|
const ScaffoldErrorBody({super.key, this.withIcon = true});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Column(
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Text(
|
|
"scaffold_body_error_occurred",
|
|
style: context.textTheme.displayMedium,
|
|
textAlign: TextAlign.center,
|
|
).tr(),
|
|
if (withIcon)
|
|
Center(
|
|
child: Padding(
|
|
padding: const EdgeInsets.only(top: 15),
|
|
child: Icon(
|
|
Icons.error_outline,
|
|
size: 100,
|
|
color: context.themeData.iconTheme.color?.withOpacity(0.5),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|