From 1601a544a2ed8f6c4e418bbac8e7068203857d7a Mon Sep 17 00:00:00 2001 From: Moe Date: Mon, 16 May 2022 07:51:47 +0700 Subject: [PATCH] Cleanup import --- lib/api/api.dart | 1 + lib/components/carousel.dart | 2 +- lib/components/checkout_form.dart | 2 +- lib/components/checkout_items.dart | 3 ++- lib/components/color_dot.dart | 2 +- lib/components/forgot_pass_body.dart | 3 ++- lib/components/login_error.dart | 2 +- lib/components/login_form.dart | 2 +- lib/components/new_arrival_products.dart | 6 +++--- lib/components/otp_body.dart | 2 +- lib/components/payment_body.dart | 4 ++-- lib/components/popular_products.dart | 6 +++--- lib/components/product_card.dart | 2 +- lib/components/register_error.dart | 2 +- lib/components/register_form.dart | 2 +- lib/components/register_verify.dart | 2 +- lib/components/search_form.dart | 2 +- lib/components/transaction_product_box.dart | 2 +- lib/main.dart | 4 ++-- lib/screens/checkout.dart | 1 + lib/screens/forgotpassword.dart | 1 + lib/screens/home.dart | 4 ++-- lib/screens/login.dart | 1 + lib/screens/otp.dart | 1 + lib/screens/payment.dart | 1 + lib/screens/register.dart | 1 + 26 files changed, 35 insertions(+), 26 deletions(-) diff --git a/lib/api/api.dart b/lib/api/api.dart index 7879b26..3e39cba 100644 --- a/lib/api/api.dart +++ b/lib/api/api.dart @@ -1,4 +1,5 @@ import 'package:dio/dio.dart'; + import 'package:nekoya_flutter/api/config.dart'; Future getProducts() async { diff --git a/lib/components/carousel.dart b/lib/components/carousel.dart index 2128dee..f60b416 100644 --- a/lib/components/carousel.dart +++ b/lib/components/carousel.dart @@ -1,5 +1,5 @@ -import 'package:flutter/material.dart'; import 'package:carousel_slider/carousel_slider.dart'; +import 'package:flutter/material.dart'; class Carousel extends StatefulWidget { const Carousel({Key? key}) : super(key: key); diff --git a/lib/components/checkout_form.dart b/lib/components/checkout_form.dart index 40cebdc..27729e4 100644 --- a/lib/components/checkout_form.dart +++ b/lib/components/checkout_form.dart @@ -1,5 +1,5 @@ -import 'package:flutter/material.dart'; import 'dart:convert'; +import 'package:flutter/material.dart'; import 'package:flutter_form_builder/flutter_form_builder.dart'; import 'package:nekoya_flutter/api/api.dart'; diff --git a/lib/components/checkout_items.dart b/lib/components/checkout_items.dart index db855ce..900ad04 100644 --- a/lib/components/checkout_items.dart +++ b/lib/components/checkout_items.dart @@ -1,8 +1,9 @@ +import 'package:intl/intl.dart'; import 'package:flutter/material.dart'; + import 'package:nekoya_flutter/api/api.dart'; import 'package:nekoya_flutter/data/cart.dart'; import 'package:nekoya_flutter/components/cart_box.dart'; -import 'package:intl/intl.dart'; class CheckoutItems extends StatefulWidget { const CheckoutItems({Key? key}) : super(key: key); diff --git a/lib/components/color_dot.dart b/lib/components/color_dot.dart index d59df7b..b28350d 100644 --- a/lib/components/color_dot.dart +++ b/lib/components/color_dot.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import '../utils/utils.dart'; +import 'package:nekoya_flutter/utils/utils.dart'; class ColorDot extends StatelessWidget { const ColorDot({ diff --git a/lib/components/forgot_pass_body.dart b/lib/components/forgot_pass_body.dart index e258341..a53069f 100644 --- a/lib/components/forgot_pass_body.dart +++ b/lib/components/forgot_pass_body.dart @@ -1,5 +1,6 @@ -import 'package:flutter/material.dart'; import 'package:lottie/lottie.dart'; +import 'package:flutter/material.dart'; + import 'package:nekoya_flutter/api/api.dart'; import 'package:nekoya_flutter/screens/otp.dart'; diff --git a/lib/components/login_error.dart b/lib/components/login_error.dart index abb5e50..7adc691 100644 --- a/lib/components/login_error.dart +++ b/lib/components/login_error.dart @@ -1,5 +1,5 @@ -import 'package:flutter/material.dart'; import 'package:lottie/lottie.dart'; +import 'package:flutter/material.dart'; class LoginError extends StatefulWidget { const LoginError({Key? key}) : super(key: key); diff --git a/lib/components/login_form.dart b/lib/components/login_form.dart index 3969ec2..33eb804 100644 --- a/lib/components/login_form.dart +++ b/lib/components/login_form.dart @@ -1,5 +1,5 @@ -import 'package:flutter/material.dart'; import 'package:lottie/lottie.dart'; +import 'package:flutter/material.dart'; import 'package:nekoya_flutter/api/api.dart'; import 'package:nekoya_flutter/components/login_error.dart'; diff --git a/lib/components/new_arrival_products.dart b/lib/components/new_arrival_products.dart index e9d0765..c3219c9 100644 --- a/lib/components/new_arrival_products.dart +++ b/lib/components/new_arrival_products.dart @@ -1,10 +1,10 @@ import 'package:flutter/material.dart'; -import '../utils/utils.dart'; -import 'product_card.dart'; -import 'section_title.dart'; import 'package:nekoya_flutter/api/api.dart'; import 'package:nekoya_flutter/components/product_detail.dart'; +import 'package:nekoya_flutter/components/product_card.dart'; +import 'package:nekoya_flutter/components/section_title.dart'; +import 'package:nekoya_flutter/utils/utils.dart'; class NewArrivalProducts extends StatelessWidget { const NewArrivalProducts({ diff --git a/lib/components/otp_body.dart b/lib/components/otp_body.dart index 3319040..95093ac 100644 --- a/lib/components/otp_body.dart +++ b/lib/components/otp_body.dart @@ -1,6 +1,6 @@ +import 'package:lottie/lottie.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:lottie/lottie.dart'; class OtpBody extends StatefulWidget { const OtpBody({Key? key}) : super(key: key); diff --git a/lib/components/payment_body.dart b/lib/components/payment_body.dart index 09dad7c..76c8161 100644 --- a/lib/components/payment_body.dart +++ b/lib/components/payment_body.dart @@ -1,8 +1,8 @@ +import 'package:intl/intl.dart'; import 'package:flutter/material.dart'; + import 'package:nekoya_flutter/api/api.dart'; import 'package:nekoya_flutter/data/cart.dart'; -import 'package:intl/intl.dart'; - import 'package:nekoya_flutter/components/menu.dart'; class PaymentBody extends StatefulWidget { diff --git a/lib/components/popular_products.dart b/lib/components/popular_products.dart index 11c087b..8460fa3 100644 --- a/lib/components/popular_products.dart +++ b/lib/components/popular_products.dart @@ -1,10 +1,10 @@ import 'package:flutter/material.dart'; import 'package:nekoya_flutter/api/api.dart'; +import 'package:nekoya_flutter/components/product_card.dart'; import 'package:nekoya_flutter/components/product_detail.dart'; -import '../utils/utils.dart'; -import 'product_card.dart'; -import 'section_title.dart'; +import 'package:nekoya_flutter/components/section_title.dart'; +import 'package:nekoya_flutter/utils/utils.dart'; class PopularProducts extends StatelessWidget { const PopularProducts({ diff --git a/lib/components/product_card.dart b/lib/components/product_card.dart index 27647f1..cd2597b 100644 --- a/lib/components/product_card.dart +++ b/lib/components/product_card.dart @@ -1,7 +1,7 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; -import '../utils/utils.dart'; +import 'package:nekoya_flutter/utils/utils.dart'; class ProductCard extends StatelessWidget { const ProductCard({ diff --git a/lib/components/register_error.dart b/lib/components/register_error.dart index 190d671..982be21 100644 --- a/lib/components/register_error.dart +++ b/lib/components/register_error.dart @@ -1,5 +1,5 @@ -import 'package:flutter/material.dart'; import 'package:lottie/lottie.dart'; +import 'package:flutter/material.dart'; class RegisterError extends StatefulWidget { const RegisterError({Key? key}) : super(key: key); diff --git a/lib/components/register_form.dart b/lib/components/register_form.dart index 6753962..beeb293 100644 --- a/lib/components/register_form.dart +++ b/lib/components/register_form.dart @@ -1,5 +1,5 @@ -import 'package:flutter/material.dart'; import 'package:lottie/lottie.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_form_builder/flutter_form_builder.dart'; import 'package:nekoya_flutter/api/api.dart'; diff --git a/lib/components/register_verify.dart b/lib/components/register_verify.dart index 487684c..a1456ee 100644 --- a/lib/components/register_verify.dart +++ b/lib/components/register_verify.dart @@ -1,5 +1,5 @@ -import 'package:flutter/material.dart'; import 'package:lottie/lottie.dart'; +import 'package:flutter/material.dart'; class RegisterVerify extends StatefulWidget { const RegisterVerify({Key? key}) : super(key: key); diff --git a/lib/components/search_form.dart b/lib/components/search_form.dart index f2e51cd..5b941fa 100644 --- a/lib/components/search_form.dart +++ b/lib/components/search_form.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import '../utils/utils.dart'; +import 'package:nekoya_flutter/utils/utils.dart'; const OutlineInputBorder outlineInputBorder = OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(12)), diff --git a/lib/components/transaction_product_box.dart b/lib/components/transaction_product_box.dart index 5845632..ac75965 100644 --- a/lib/components/transaction_product_box.dart +++ b/lib/components/transaction_product_box.dart @@ -1,5 +1,5 @@ -import 'package:flutter/material.dart'; import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter/material.dart'; class TransactionProductBox extends StatefulWidget { const TransactionProductBox({Key? key, required this.imageUrl, required this.title, required this.quantity}) : super(key: key); diff --git a/lib/main.dart b/lib/main.dart index 27b55fc..eac1c39 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,7 +1,7 @@ -import 'package:flutter/services.dart'; -import 'package:flutter/material.dart'; import 'package:page_transition/page_transition.dart'; import 'package:animated_splash_screen/animated_splash_screen.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter/material.dart'; import 'package:nekoya_flutter/screens/login.dart'; import 'package:nekoya_flutter/screens/register.dart'; diff --git a/lib/screens/checkout.dart b/lib/screens/checkout.dart index 2df041f..aa3a4da 100644 --- a/lib/screens/checkout.dart +++ b/lib/screens/checkout.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; + import 'package:nekoya_flutter/components/checkout_form.dart'; import 'package:nekoya_flutter/components/checkout_items.dart'; diff --git a/lib/screens/forgotpassword.dart b/lib/screens/forgotpassword.dart index 2b920ea..fc90518c 100644 --- a/lib/screens/forgotpassword.dart +++ b/lib/screens/forgotpassword.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; + import 'package:nekoya_flutter/components/forgot_pass_body.dart'; class ForgotPassword extends StatefulWidget { diff --git a/lib/screens/home.dart b/lib/screens/home.dart index fe9333e..a85e15f 100644 --- a/lib/screens/home.dart +++ b/lib/screens/home.dart @@ -1,11 +1,11 @@ import 'package:flutter/material.dart'; -import 'package:nekoya_flutter/components/bannerimage.dart'; -import 'package:nekoya_flutter/utils/utils.dart'; +import 'package:nekoya_flutter/components/bannerimage.dart'; import 'package:nekoya_flutter/components/carousel.dart'; import 'package:nekoya_flutter/components/new_arrival_products.dart'; import 'package:nekoya_flutter/components/popular_products.dart'; import 'package:nekoya_flutter/components/search_form.dart'; +import 'package:nekoya_flutter/utils/utils.dart'; class Home extends StatelessWidget { const Home({Key? key}) : super(key: key); diff --git a/lib/screens/login.dart b/lib/screens/login.dart index c902137..04e7fcb 100644 --- a/lib/screens/login.dart +++ b/lib/screens/login.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; + import 'package:nekoya_flutter/components/login_form.dart'; class Login extends StatefulWidget { diff --git a/lib/screens/otp.dart b/lib/screens/otp.dart index 1893307..f143dbf 100644 --- a/lib/screens/otp.dart +++ b/lib/screens/otp.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; + import 'package:nekoya_flutter/components/otp_body.dart'; class Otp extends StatefulWidget { diff --git a/lib/screens/payment.dart b/lib/screens/payment.dart index 5256278..b9e419d 100644 --- a/lib/screens/payment.dart +++ b/lib/screens/payment.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; + import 'package:nekoya_flutter/components/payment_body.dart'; class Payment extends StatefulWidget { diff --git a/lib/screens/register.dart b/lib/screens/register.dart index 28e42fc..ee8b65b 100644 --- a/lib/screens/register.dart +++ b/lib/screens/register.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; + import 'package:nekoya_flutter/components/register_form.dart'; class Register extends StatefulWidget {