update loaing
This commit is contained in:
@@ -9,6 +9,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:worker/core/widgets/loading_indicator.dart';
|
||||
import 'package:worker/core/constants/ui_constants.dart';
|
||||
import 'package:worker/core/router/app_router.dart';
|
||||
import 'package:worker/core/theme/colors.dart';
|
||||
@@ -102,7 +103,7 @@ class _CartPageState extends ConsumerState<CartPage> {
|
||||
],
|
||||
),
|
||||
body: cartState.isLoading && cartState.isEmpty
|
||||
? const Center(child: CircularProgressIndicator())
|
||||
? const CustomLoadingIndicator()
|
||||
: cartState.errorMessage != null && cartState.isEmpty
|
||||
? _buildErrorState(context, cartState.errorMessage!)
|
||||
: cartState.isEmpty
|
||||
@@ -132,9 +133,7 @@ class _CartPageState extends ConsumerState<CartPage> {
|
||||
if (cartState.isLoading)
|
||||
Container(
|
||||
color: colorScheme.onSurface.withValues(alpha: 0.1),
|
||||
child: const Center(
|
||||
child: CircularProgressIndicator(),
|
||||
),
|
||||
child: const CustomLoadingIndicator(),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -315,14 +314,9 @@ class _CartPageState extends ConsumerState<CartPage> {
|
||||
elevation: 0,
|
||||
),
|
||||
child: _isSyncing
|
||||
? SizedBox(
|
||||
width: 20,
|
||||
height: 20,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2,
|
||||
valueColor:
|
||||
AlwaysStoppedAnimation<Color>(colorScheme.surface),
|
||||
),
|
||||
? CustomLoadingIndicator(
|
||||
color: colorScheme.surface,
|
||||
size: 20,
|
||||
)
|
||||
: Text(
|
||||
'Tiến hành đặt hàng',
|
||||
|
||||
Reference in New Issue
Block a user