From 1bc2727fac51f805126990cb3ea35eac1a4a29d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20=C4=90=E1=BA=A1i?= Date: Thu, 13 Apr 2023 23:37:46 +0700 Subject: [PATCH] commit 1 --- lib/main.dart | 3 +-- lib/models/product/product_detail_extra_model.dart | 1 + lib/routers/app_pages.dart | 1 + lib/services/product/product_detail_repository.dart | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 4d0095e..faa3bb3 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -12,8 +12,7 @@ class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return GetMaterialApp( - title: 'Test', - debugShowCheckedModeBanner: false, + title: 'Test Git', defaultTransition: Transition.native, getPages: AppPages.pages, ); diff --git a/lib/models/product/product_detail_extra_model.dart b/lib/models/product/product_detail_extra_model.dart index 34e1006..dc61417 100644 --- a/lib/models/product/product_detail_extra_model.dart +++ b/lib/models/product/product_detail_extra_model.dart @@ -8,6 +8,7 @@ part 'product_detail_extra_model.g.dart'; ) class ProductExtraModel { + final int id; final String name; final String min; diff --git a/lib/routers/app_pages.dart b/lib/routers/app_pages.dart index d576a4f..53faa6d 100644 --- a/lib/routers/app_pages.dart +++ b/lib/routers/app_pages.dart @@ -5,6 +5,7 @@ import 'package:test_fluter/routers/app_routes.dart'; class AppPages { static final pages = [ + GetPage( name: Routes.initial, page: () => const ProductDetailScreen(), diff --git a/lib/services/product/product_detail_repository.dart b/lib/services/product/product_detail_repository.dart index fbefbe9..c1042b5 100644 --- a/lib/services/product/product_detail_repository.dart +++ b/lib/services/product/product_detail_repository.dart @@ -7,6 +7,7 @@ class ProductDetailRepository { ProductDetailRepository(this.productProvider); Future getProductDetail() async { + final response = await productProvider.getProductDetail(); if (response.status.hasError) { return Future.error(response.statusText!);