added gif

This commit is contained in:
komekh 2024-08-29 16:51:26 +05:00
parent 1eebe2c468
commit 2a8e6cb679
7 changed files with 21 additions and 6 deletions

BIN
assets/images/search.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 865 KiB

View File

@ -20,7 +20,7 @@
"login_hint": "Öz loginiňizi ýazyň",
"password": "Açar sözi",
"password_hint": "Öz açar sözüni ýazyň",
"credentials_validation_header": "'Invalid credentials",
"credentials_validation_header": "Invalid credentials",
"credentials_validation_body": "Username or Password Wrong!",
"required_validation": "This field can't be empty",
"order": "Sargyt",

View File

@ -11,4 +11,5 @@ sealed class AppAssets {
static const String trucksPng = 'assets/images/trucks.png';
static const String header = 'assets/images/header.png';
static const String search = 'assets/images/search.png';
static const String searchGif = 'assets/images/search.gif';
}

View File

@ -25,7 +25,7 @@ class UserRemoteDataSourceImpl implements UserRemoteDataSource {
},
body: json.encode(
{
'UserName': params.username,
'UserName': params.username.trim(),
'Password': params.password,
},
),

View File

@ -100,7 +100,9 @@ class _HistoriesScreenState extends State<HistoriesScreen> {
),
);
} else {
return const SizedBox.shrink();
return const SliverToBoxAdapter(
child: SizedBox.shrink(),
);
}
},
),

View File

@ -69,7 +69,7 @@ class _OrdersScreenState extends State<OrdersScreen> with AutomaticKeepAliveClie
),
BlocBuilder<OrderBloc, OrderState>(
builder: (context, state) {
if (state is OrderLoading && state.orders.isEmpty) {
if (state is OrderLoading && state.orders.isEmpty || state is OrderInitial) {
return const SliverToBoxAdapter(
child: Center(
child: CircularProgressIndicator(),
@ -108,7 +108,9 @@ class _OrdersScreenState extends State<OrdersScreen> with AutomaticKeepAliveClie
),
);
} else {
return const SizedBox.shrink();
return const SliverToBoxAdapter(
child: SizedBox.shrink(),
);
}
},
),

View File

@ -15,7 +15,17 @@ class EmptyOrder extends StatelessWidget {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Image.asset(AppAssets.search),
ColorFiltered(
colorFilter: const ColorFilter.mode(
AppColors.surface,
BlendMode.multiply,
),
child: Image.asset(
AppAssets.searchGif,
height: 120,
width: 120,
),
),
Space.yf(),
Text('order_not_available'.tr()),
],