centered loading
This commit is contained in:
parent
2a8e6cb679
commit
0eead07f00
|
|
@ -64,9 +64,12 @@ class _HistoriesScreenState extends State<HistoriesScreen> {
|
|||
BlocBuilder<OrderBloc, OrderState>(
|
||||
builder: (context, state) {
|
||||
if (state is OrderLoading && state.orders.isEmpty) {
|
||||
return const SliverToBoxAdapter(
|
||||
child: Center(
|
||||
child: CircularProgressIndicator(),
|
||||
return SliverToBoxAdapter(
|
||||
child: SizedBox(
|
||||
height: MediaQuery.of(context).size.height - kToolbarHeight * 3,
|
||||
child: const Center(
|
||||
child: CircularProgressIndicator(),
|
||||
),
|
||||
),
|
||||
);
|
||||
} else if (state is OrderError && state.orders.isEmpty) {
|
||||
|
|
|
|||
|
|
@ -70,9 +70,12 @@ class _OrdersScreenState extends State<OrdersScreen> with AutomaticKeepAliveClie
|
|||
BlocBuilder<OrderBloc, OrderState>(
|
||||
builder: (context, state) {
|
||||
if (state is OrderLoading && state.orders.isEmpty || state is OrderInitial) {
|
||||
return const SliverToBoxAdapter(
|
||||
child: Center(
|
||||
child: CircularProgressIndicator(),
|
||||
return SliverToBoxAdapter(
|
||||
child: SizedBox(
|
||||
height: MediaQuery.of(context).size.height / 2.5,
|
||||
child: const Center(
|
||||
child: CircularProgressIndicator(),
|
||||
),
|
||||
),
|
||||
);
|
||||
} else if (state is OrderError && state.orders.isEmpty) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue