Change loading placeholder

This commit is contained in:
Moe Poi ~ 2023-11-13 12:23:40 +07:00
parent 31b1e5765a
commit 52aa043fdb
5 changed files with 15 additions and 15 deletions

View file

@ -31,7 +31,9 @@ class _CarouselState extends State<Carousel> {
width: 1000, width: 1000,
decoration: const BoxDecoration( decoration: const BoxDecoration(
image: DecorationImage( image: DecorationImage(
image: AssetImage('assets/images/image_empty.webp'), fit: BoxFit.cover)), image: AssetImage(
'assets/images/logo_transparent.webp'),
fit: BoxFit.contain)),
), ),
errorWidget: (context, url, error) => errorWidget: (context, url, error) =>
Image.asset('assets/images/image_error.webp'), Image.asset('assets/images/image_error.webp'),
@ -73,15 +75,13 @@ class _CarouselState extends State<Carousel> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return CarouselSlider( return CarouselSlider(
items: imageSliders, items: imageSliders,
carouselController: _controller, carouselController: _controller,
options: CarouselOptions( options: CarouselOptions(
aspectRatio: 2.0, aspectRatio: 2.0,
enlargeCenterPage: true, enlargeCenterPage: true,
enableInfiniteScroll: false, enableInfiniteScroll: false,
initialPage: 2, initialPage: 2,
autoPlay: true autoPlay: true));
)
);
} }
} }

View file

@ -81,7 +81,7 @@ class _CheckoutItemsState extends State<CheckoutItems> {
return CartBox( return CartBox(
controller: false, controller: false,
imageUrl: imageUrl:
'https://i.ibb.co/QJFLZC4/La-Darknesss-Portrait.webp', 'https://telegra.ph/file/75f075e858198e4e7898a.png',
title: 'Loading...', title: 'Loading...',
quantity: 0, quantity: 0,
plus: () {}, plus: () {},

View file

@ -70,7 +70,7 @@ class NewArrivalProducts extends StatelessWidget {
child: ProductCard( child: ProductCard(
title: 'Loading...', title: 'Loading...',
imageUrl: imageUrl:
"https://i.ibb.co/QJFLZC4/La-Darknesss-Portrait.webp", "https://telegra.ph/file/75f075e858198e4e7898a.png",
bgColor: const Color(0xFFFEFBF9), bgColor: const Color(0xFFFEFBF9),
press: () {}, press: () {},
), ),

View file

@ -70,7 +70,7 @@ class PopularProducts extends StatelessWidget {
child: ProductCard( child: ProductCard(
title: 'Loading...', title: 'Loading...',
imageUrl: imageUrl:
"https://i.ibb.co/QJFLZC4/La-Darknesss-Portrait.webp", "https://telegra.ph/file/75f075e858198e4e7898a.png",
bgColor: const Color(0xFFFEFBF9), bgColor: const Color(0xFFFEFBF9),
press: () {}, press: () {},
), ),

View file

@ -169,7 +169,7 @@ class _TransactionBoxState extends State<TransactionBox> {
return const TransactionProductBox( return const TransactionProductBox(
imageUrl: imageUrl:
'https://i.ibb.co/QJFLZC4/La-Darknesss-Portrait.webp', 'https://telegra.ph/file/75f075e858198e4e7898a.png',
title: 'Loading...', title: 'Loading...',
quantity: 0, quantity: 0,
); );