diff --git a/lib/views/dictionaries/category/category_edit.dart b/lib/views/dictionaries/category/category_edit.dart new file mode 100644 index 0000000..7faa20c --- /dev/null +++ b/lib/views/dictionaries/category/category_edit.dart @@ -0,0 +1,15 @@ +import 'package:flutter/material.dart'; + +class CategoryEdit extends StatefulWidget { + const CategoryEdit({Key? key}) : super(key: key); + + @override + _CategoryEditState createState() => _CategoryEditState(); +} + +class _CategoryEditState extends State { + @override + Widget build(BuildContext context) { + return Container(); + } +} diff --git a/lib/views/dictionaries/category/category_view.dart b/lib/views/dictionaries/category/category_view.dart index c61634d..c94c505 100644 --- a/lib/views/dictionaries/category/category_view.dart +++ b/lib/views/dictionaries/category/category_view.dart @@ -69,10 +69,6 @@ class _CategoryDictionaryViewState extends State { controller: _searchTextController, fieldFocusNode: _searchFocusNode, ), - verticalSpaceTiny, - const ProductsTitleBarBar( - title: 'Выберите категорию', - ), Expanded( child: ListView.separated( physics: const BouncingScrollPhysics(), @@ -80,7 +76,10 @@ class _CategoryDictionaryViewState extends State { itemBuilder: (BuildContext context, int index) { final CategoryRowDao category = items[index]; return DictionaryTile( - title: category.name, subTitle: 'Родитель: ${category.parentName}' + title: category.name, + subTitle: category.parentName.isEmpty + ? 'Корневая категория' + : 'Родитель: ${category.parentName}' // key: Key('category_${category.id}'), //onPress: () => () {}, ); @@ -113,7 +112,7 @@ class _CategoryDictionaryViewState extends State { filtered.forEach((element) { final Category category = _categories .firstWhere((parent) => parent.id == element.parentId, orElse: () { - return Category()..name = 'Корневая категория'; + return Category(); }); String parentName = category.name; final CategoryRowDao rowDao =