add auth, format
This commit is contained in:
@@ -38,15 +38,16 @@ class _QuotesPageState extends ConsumerState<QuotesPage> {
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_searchController..removeListener(_onSearchChanged)
|
||||
..dispose();
|
||||
_searchController
|
||||
..removeListener(_onSearchChanged)
|
||||
..dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
void _onSearchChanged() {
|
||||
ref.read(quoteSearchQueryProvider.notifier).updateQuery(
|
||||
_searchController.text,
|
||||
);
|
||||
ref
|
||||
.read(quoteSearchQueryProvider.notifier)
|
||||
.updateQuery(_searchController.text);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -104,13 +105,10 @@ class _QuotesPageState extends ConsumerState<QuotesPage> {
|
||||
}
|
||||
|
||||
return SliverList(
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
(context, index) {
|
||||
final quote = quotes[index];
|
||||
return _buildQuoteCard(quote);
|
||||
},
|
||||
childCount: quotes.length,
|
||||
),
|
||||
delegate: SliverChildBuilderDelegate((context, index) {
|
||||
final quote = quotes[index];
|
||||
return _buildQuoteCard(quote);
|
||||
}, childCount: quotes.length),
|
||||
);
|
||||
},
|
||||
loading: () => _buildLoadingState(),
|
||||
@@ -149,10 +147,7 @@ class _QuotesPageState extends ConsumerState<QuotesPage> {
|
||||
color: AppColors.grey500,
|
||||
fontSize: 14,
|
||||
),
|
||||
prefixIcon: const Icon(
|
||||
Icons.search,
|
||||
color: AppColors.grey500,
|
||||
),
|
||||
prefixIcon: const Icon(Icons.search, color: AppColors.grey500),
|
||||
suffixIcon: _searchController.text.isNotEmpty
|
||||
? IconButton(
|
||||
icon: const Icon(Icons.clear, color: AppColors.grey500),
|
||||
@@ -190,16 +185,10 @@ class _QuotesPageState extends ConsumerState<QuotesPage> {
|
||||
onPressed: () {
|
||||
_showFilterDialog();
|
||||
},
|
||||
icon: Icon(
|
||||
Icons.filter_list,
|
||||
color: AppColors.primaryBlue,
|
||||
),
|
||||
icon: Icon(Icons.filter_list, color: AppColors.primaryBlue),
|
||||
iconSize: 24,
|
||||
padding: const EdgeInsets.all(12),
|
||||
constraints: const BoxConstraints(
|
||||
minWidth: 48,
|
||||
minHeight: 48,
|
||||
),
|
||||
constraints: const BoxConstraints(minWidth: 48, minHeight: 48),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -213,9 +202,7 @@ class _QuotesPageState extends ConsumerState<QuotesPage> {
|
||||
return Card(
|
||||
margin: const EdgeInsets.only(bottom: 12),
|
||||
elevation: 1,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
||||
clipBehavior: Clip.antiAlias,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
@@ -270,10 +257,7 @@ class _QuotesPageState extends ConsumerState<QuotesPage> {
|
||||
// Additional Info (placeholder for now)
|
||||
const Text(
|
||||
'5 sản phẩm - Diện tích: 200m²',
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: AppColors.grey500,
|
||||
),
|
||||
style: TextStyle(fontSize: 13, color: AppColors.grey500),
|
||||
),
|
||||
|
||||
const SizedBox(height: 8),
|
||||
@@ -455,10 +439,7 @@ class _QuotesPageState extends ConsumerState<QuotesPage> {
|
||||
const SizedBox(height: 8),
|
||||
const Text(
|
||||
'Kéo xuống để làm mới',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: AppColors.grey500,
|
||||
),
|
||||
style: TextStyle(fontSize: 14, color: AppColors.grey500),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -469,9 +450,7 @@ class _QuotesPageState extends ConsumerState<QuotesPage> {
|
||||
/// Build loading state
|
||||
Widget _buildLoadingState() {
|
||||
return const SliverFillRemaining(
|
||||
child: Center(
|
||||
child: CircularProgressIndicator(),
|
||||
),
|
||||
child: Center(child: CircularProgressIndicator()),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -499,10 +478,7 @@ class _QuotesPageState extends ConsumerState<QuotesPage> {
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
error.toString(),
|
||||
style: const TextStyle(
|
||||
fontSize: 14,
|
||||
color: AppColors.grey500,
|
||||
),
|
||||
style: const TextStyle(fontSize: 14, color: AppColors.grey500),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user