feat: appbar
This commit is contained in:
@@ -7,13 +7,23 @@ class SizedGap extends SizedBox {
|
||||
|
||||
// Widgets to be used in Column
|
||||
const SizedGap.sh({super.key}) : super(height: SizeConstants.s);
|
||||
const SizedGap.xsh({super.key}) : super(height: SizeConstants.xs);
|
||||
const SizedGap.xxsh({super.key}) : super(height: SizeConstants.xxs);
|
||||
const SizedGap.mh({super.key}) : super(height: SizeConstants.m);
|
||||
const SizedGap.xmh({super.key}) : super(height: SizeConstants.xm);
|
||||
const SizedGap.xxmh({super.key}) : super(height: SizeConstants.xxm);
|
||||
const SizedGap.lh({super.key}) : super(height: SizeConstants.l);
|
||||
const SizedGap.xlh({super.key}) : super(height: SizeConstants.xl);
|
||||
const SizedGap.xxlh({super.key}) : super(height: SizeConstants.xxl);
|
||||
|
||||
// Widgets to be used in Row
|
||||
const SizedGap.sw({super.key}) : super(width: SizeConstants.s);
|
||||
const SizedGap.xsw({super.key}) : super(width: SizeConstants.xs);
|
||||
const SizedGap.xxsw({super.key}) : super(width: SizeConstants.xxs);
|
||||
const SizedGap.mw({super.key}) : super(width: SizeConstants.m);
|
||||
const SizedGap.xmw({super.key}) : super(width: SizeConstants.xm);
|
||||
const SizedGap.xxmw({super.key}) : super(width: SizeConstants.xxm);
|
||||
const SizedGap.lw({super.key}) : super(width: SizeConstants.l);
|
||||
const SizedGap.xlw({super.key}) : super(width: SizeConstants.xl);
|
||||
const SizedGap.xxlw({super.key}) : super(width: SizeConstants.xxl);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:immich_mobile/presentation/components/common/gap.widget.dart';
|
||||
import 'package:immich_mobile/utils/constants/size_constants.dart';
|
||||
import 'package:immich_mobile/utils/extensions/build_context.extension.dart';
|
||||
|
||||
class ImPageEmptyIndicator extends StatelessWidget {
|
||||
final IconData icon;
|
||||
final String? message;
|
||||
final Widget? subtitle;
|
||||
|
||||
const ImPageEmptyIndicator({
|
||||
super.key,
|
||||
required this.icon,
|
||||
this.message,
|
||||
this.subtitle,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
icon,
|
||||
size: SizeConstants.xl,
|
||||
color: context.colorScheme.primary,
|
||||
),
|
||||
const SizedGap.mh(),
|
||||
if (message != null) Text(message!),
|
||||
if (subtitle != null) subtitle!,
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,7 @@ class ImUserAvatar extends StatelessWidget {
|
||||
fit: BoxFit.cover,
|
||||
placeholder: (_, __) => Image.memory(
|
||||
kTransparentImage,
|
||||
semanticLabel: 'Transparent',
|
||||
semanticLabel: 'Transparent Image',
|
||||
),
|
||||
fadeInDuration: const Duration(milliseconds: 300),
|
||||
errorWidget: (_, error, stackTrace) => SizedBox.square(),
|
||||
|
||||
Reference in New Issue
Block a user