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