Fix: category colors and count elements
This commit is contained in:
@@ -8,7 +8,6 @@ import 'package:gymlink_module_web/pages/basket.dart';
|
||||
import 'package:gymlink_module_web/pages/detail.dart';
|
||||
import 'package:gymlink_module_web/pages/order_history.dart';
|
||||
import 'package:gymlink_module_web/providers/cart.dart';
|
||||
import 'package:gymlink_module_web/providers/main.dart';
|
||||
import 'package:gymlink_module_web/tools/items.dart';
|
||||
import 'package:gymlink_module_web/tools/prefs.dart';
|
||||
import 'package:gymlink_module_web/tools/relative.dart';
|
||||
@@ -148,6 +147,8 @@ class _MainPageState extends State<MainPage> {
|
||||
_onSearch();
|
||||
}
|
||||
}),
|
||||
textInputAction: TextInputAction.search,
|
||||
onSubmitted: (_) => _onSearch(),
|
||||
decoration: InputDecoration(
|
||||
hintText: 'Поиск',
|
||||
border: OutlineInputBorder(
|
||||
@@ -231,12 +232,8 @@ class _MainPageState extends State<MainPage> {
|
||||
horizontal: 10, vertical: 10),
|
||||
child: Chip(
|
||||
label: Text(category.name),
|
||||
//FIXME: проблема с цветом
|
||||
backgroundColor: selectedCategory == category
|
||||
? context
|
||||
.read<GymLinkProvider>()
|
||||
.theme
|
||||
.primaryColorLight
|
||||
? Theme.of(context).primaryColor
|
||||
: Colors.white,
|
||||
labelStyle: TextStyle(
|
||||
color: selectedCategory == category
|
||||
|
||||
Reference in New Issue
Block a user