add adaptive_scaffold

This commit is contained in:
shenlong-tanwen
2024-05-24 09:42:02 +05:30
parent fb6253d2d1
commit 1631df70e9
295 changed files with 2540 additions and 44480 deletions
@@ -0,0 +1,19 @@
import 'package:flutter/material.dart';
import 'package:immich_mobile/utils/constants/size_constants.dart';
@immutable
class SizedGap extends SizedBox {
const SizedGap({super.key, super.height, super.width});
// Widgets to be used in Column
const SizedGap.sh({super.key}) : super(height: SizeConstants.s);
const SizedGap.mh({super.key}) : super(height: SizeConstants.m);
const SizedGap.lh({super.key}) : super(height: SizeConstants.l);
const SizedGap.xlh({super.key}) : super(height: SizeConstants.xl);
// Widgets to be used in Row
const SizedGap.sw({super.key}) : super(width: SizeConstants.s);
const SizedGap.mw({super.key}) : super(width: SizeConstants.m);
const SizedGap.lw({super.key}) : super(width: SizeConstants.l);
const SizedGap.xlw({super.key}) : super(width: SizeConstants.xl);
}
@@ -0,0 +1,22 @@
import 'package:flutter/material.dart';
class ImLoadingIndicator extends StatelessWidget {
const ImLoadingIndicator({super.key, this.dimension, this.strokeWidth});
/// The size of the indicator with a default of 24
final double? dimension;
/// The width of the indicator with a default of 2
final double? strokeWidth;
@override
Widget build(BuildContext context) {
return SizedBox(
width: dimension ?? 24,
height: dimension ?? 24,
child: FittedBox(
child: CircularProgressIndicator(strokeWidth: strokeWidth ?? 2),
),
);
}
}