v6.0.0 - Flutter format
This commit is contained in:
parent
e40b36a181
commit
f5d22921b9
@ -0,0 +1 @@
|
||||
|
||||
@ -516,8 +516,7 @@ Future<List<dynamic>> getWishlistProducts() async {
|
||||
String? currentProductsJSON =
|
||||
await (NyStorage.read(SharedKey.wishlistProducts));
|
||||
if (currentProductsJSON != null) {
|
||||
favouriteProducts =
|
||||
(jsonDecode(currentProductsJSON)).toList();
|
||||
favouriteProducts = (jsonDecode(currentProductsJSON)).toList();
|
||||
}
|
||||
return favouriteProducts;
|
||||
}
|
||||
|
||||
@ -16,7 +16,6 @@ import 'package:flutter_app/resources/widgets/safearea_widget.dart';
|
||||
import 'package:flutter_app/resources/widgets/woosignal_ui.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
|
||||
|
||||
import 'package:woosignal/models/response/order.dart';
|
||||
|
||||
class AccountOrderDetailPage extends NyStatefulWidget {
|
||||
|
||||
@ -19,7 +19,6 @@ import 'package:flutter_app/resources/widgets/safearea_widget.dart';
|
||||
import 'package:flutter_app/resources/widgets/woosignal_ui.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
|
||||
|
||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||
import 'package:woosignal/models/response/product_category.dart';
|
||||
import 'package:woosignal/models/response/products.dart' as ws_product;
|
||||
|
||||
@ -16,7 +16,6 @@ import 'package:flutter_app/resources/widgets/app_loader_widget.dart';
|
||||
import 'package:flutter_app/resources/widgets/safearea_widget.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
|
||||
|
||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||
import 'package:woosignal/models/response/products.dart' as ws_product;
|
||||
|
||||
|
||||
@ -17,7 +17,6 @@ import 'package:flutter_app/resources/widgets/safearea_widget.dart';
|
||||
import 'package:flutter_app/resources/widgets/woosignal_ui.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
|
||||
|
||||
class CheckoutPaymentTypePage extends StatefulWidget {
|
||||
CheckoutPaymentTypePage();
|
||||
|
||||
|
||||
@ -18,7 +18,6 @@ import 'package:nylo_framework/nylo_framework.dart';
|
||||
|
||||
import 'package:woosignal/models/response/order.dart' as ws_order;
|
||||
|
||||
|
||||
import '../widgets/woosignal_ui.dart';
|
||||
|
||||
class CheckoutStatusPage extends NyStatefulWidget {
|
||||
|
||||
@ -15,9 +15,6 @@ import 'package:flutter_app/resources/widgets/safearea_widget.dart';
|
||||
import 'package:flutter_swiper_tv/flutter_swiper.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
|
||||
|
||||
|
||||
|
||||
class ProductImageViewerPage extends NyStatefulWidget {
|
||||
@override
|
||||
final ProductImageViewerController controller =
|
||||
|
||||
@ -104,7 +104,13 @@ class _WishListPageWidgetState extends State<WishListPageWidget> {
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(product.name!, style: TextStyle(fontWeight: FontWeight.bold), maxLines: 2, overflow: TextOverflow.ellipsis,),
|
||||
Text(
|
||||
product.name!,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
Text(
|
||||
formatStringCurrency(
|
||||
total: product.price),
|
||||
|
||||
@ -181,9 +181,12 @@ class _NoticHomeWidgetState extends State<NoticHomeWidget> {
|
||||
itemBuilder: (cxt, i) {
|
||||
return Container(
|
||||
// height: 200,
|
||||
width: MediaQuery.of(context).size.width / 2.5,
|
||||
width:
|
||||
MediaQuery.of(context).size.width /
|
||||
2.5,
|
||||
child: ProductItemContainer(
|
||||
product: products[i], onTap: _showProduct),
|
||||
product: products[i],
|
||||
onTap: _showProduct),
|
||||
);
|
||||
},
|
||||
itemCount: products.length,
|
||||
|
||||
@ -73,9 +73,8 @@ class _NoticThemeWidgetState extends State<NoticThemeWidget> {
|
||||
),
|
||||
showSelectedLabels: false,
|
||||
showUnselectedLabels: false,
|
||||
items: allNavWidgets!
|
||||
.map((e) => e.bottomNavigationBarItem)
|
||||
.toList(),
|
||||
items:
|
||||
allNavWidgets!.map((e) => e.bottomNavigationBarItem).toList(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@ -28,7 +28,6 @@ class ProductDetailUpsellWidget extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _ProductDetailUpsellWidgetState extends State<ProductDetailUpsellWidget> {
|
||||
|
||||
final ProductLoaderController _productLoaderController =
|
||||
ProductLoaderController();
|
||||
|
||||
@ -79,9 +78,12 @@ class _ProductDetailUpsellWidgetState extends State<ProductDetailUpsellWidget> {
|
||||
shrinkWrap: true,
|
||||
scrollDirection: Axis.horizontal,
|
||||
children: products
|
||||
.map((e) => Container(
|
||||
.map(
|
||||
(e) => Container(
|
||||
width: MediaQuery.of(context).size.width / 2.2,
|
||||
child: ProductItemContainer(product: e),),)
|
||||
child: ProductItemContainer(product: e),
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
|
||||
@ -16,7 +16,6 @@ class SafeAreaWidget extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
return SafeArea(
|
||||
minimum: EdgeInsets.only(left: 16, right: 16, bottom: 8),
|
||||
child: child!,
|
||||
|
||||
@ -313,8 +313,7 @@ class ProductItemContainer extends StatelessWidget {
|
||||
return SizedBox.shrink();
|
||||
}
|
||||
return LayoutBuilder(
|
||||
builder: (cxt, constraints) =>
|
||||
InkWell(
|
||||
builder: (cxt, constraints) => InkWell(
|
||||
child: Container(
|
||||
margin: EdgeInsets.all(4),
|
||||
child: Column(
|
||||
@ -355,20 +354,12 @@ class ProductItemContainer extends StatelessWidget {
|
||||
textAlign: TextAlign.center,
|
||||
text: TextSpan(
|
||||
text: '',
|
||||
style: Theme
|
||||
.of(context)
|
||||
.textTheme
|
||||
.bodyText1,
|
||||
style: Theme.of(context).textTheme.bodyText1,
|
||||
children: <TextSpan>[
|
||||
TextSpan(
|
||||
text:
|
||||
"${workoutSaleDiscount(
|
||||
salePrice: product!.salePrice,
|
||||
priceBefore: product!
|
||||
.regularPrice)}% ${trans(
|
||||
"off")}",
|
||||
style: Theme
|
||||
.of(context)
|
||||
"${workoutSaleDiscount(salePrice: product!.salePrice, priceBefore: product!.regularPrice)}% ${trans("off")}",
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyText1!
|
||||
.copyWith(
|
||||
@ -389,8 +380,7 @@ class ProductItemContainer extends StatelessWidget {
|
||||
margin: const EdgeInsets.only(top: 2, bottom: 2),
|
||||
child: Text(
|
||||
product!.name!,
|
||||
style: Theme
|
||||
.of(context)
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyText2!
|
||||
.copyWith(fontSize: 15),
|
||||
@ -406,8 +396,7 @@ class ProductItemContainer extends StatelessWidget {
|
||||
children: [
|
||||
AutoSizeText(
|
||||
"${formatStringCurrency(total: product!.price)} ",
|
||||
style: Theme
|
||||
.of(context)
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyText2!
|
||||
.copyWith(fontWeight: FontWeight.w600),
|
||||
@ -418,8 +407,7 @@ class ProductItemContainer extends StatelessWidget {
|
||||
text: TextSpan(children: [
|
||||
TextSpan(
|
||||
text: '${trans("Was")}: ',
|
||||
style: Theme
|
||||
.of(context)
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyText1!
|
||||
.copyWith(
|
||||
@ -430,8 +418,7 @@ class ProductItemContainer extends StatelessWidget {
|
||||
text: formatStringCurrency(
|
||||
total: product!.regularPrice,
|
||||
),
|
||||
style: Theme
|
||||
.of(context)
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyText1!
|
||||
.copyWith(
|
||||
@ -449,8 +436,7 @@ class ProductItemContainer extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
onTap: () =>
|
||||
onTap != null
|
||||
onTap: () => onTap != null
|
||||
? onTap!(product)
|
||||
: Navigator.pushNamed(context, "/product-detail",
|
||||
arguments: product),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user