This commit is contained in:
Patrick Alvin Alcala 2025-02-14 13:07:37 +08:00
parent 941e9eaa5b
commit 4753926c34
4 changed files with 137 additions and 70 deletions

View file

@ -0,0 +1,41 @@
import 'package:flutter/material.dart';
import 'package:gap/gap.dart';
import 'package:pharmacy_mobile/widgets/text_widget.dart';
class DropdownWrapperMultiWidget extends StatelessWidget {
final List list;
final String text;
final List<Widget> children;
const DropdownWrapperMultiWidget({
super.key,
required this.list,
required this.text,
required this.children,
});
@override
Widget build(BuildContext context) {
return (list.isEmpty)
? Column(
children: [
const Gap(8),
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
spacing: 16,
children: [
const CircularProgressIndicator(color: Color.fromRGBO(255, 255, 255, 1)),
TextWidget(
text: 'Fetching $text',
size: 16,
)
],
),
],
)
: Column(
children: children,
);
}
}

View file

@ -3,8 +3,9 @@ import 'package:flutter/material.dart';
class PageBackgroundWidget extends StatelessWidget {
final Widget child;
final String? page;
final double? height;
const PageBackgroundWidget({super.key, required this.child, this.page});
const PageBackgroundWidget({super.key, required this.child, this.page, this.height});
@override
Widget build(BuildContext context) {
@ -12,7 +13,7 @@ class PageBackgroundWidget extends StatelessWidget {
scrollDirection: Axis.vertical,
child: Container(
alignment: Alignment.center,
height: MediaQuery.of(context).size.height + 200,
height: height ?? MediaQuery.of(context).size.height + 200,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(