Shared space
This commit is contained in:
@@ -10,13 +10,6 @@ import 'package:oc_front/pages/abstract_page.dart';
|
||||
class CatalogFactory implements AbstractFactory {
|
||||
@override GlobalKey getKey() { return key; }
|
||||
static GlobalKey<CatalogPageWidgetState> key = GlobalKey<CatalogPageWidgetState>();
|
||||
@override void clear() {
|
||||
mainKey?.currentState?.setState(() {
|
||||
HeaderConstants.headerKey.currentState?.setState(() {});
|
||||
HeaderConstants.headerWidget?.setState(() {});
|
||||
key.currentState?.widget.items = [];
|
||||
});
|
||||
}
|
||||
@override bool searchFill() { return key.currentState?.widget.items.isEmpty ?? true; }
|
||||
@override Widget factory(GoRouterState state, List<String> args) { return CatalogPageWidget(); }
|
||||
@override void search(BuildContext context, bool special) {
|
||||
@@ -46,9 +39,8 @@ class CatalogPageWidgetState extends State<CatalogPageWidget> {
|
||||
@override Widget build(BuildContext context) {
|
||||
if (widget.items.isEmpty) { return Container(); }
|
||||
return Column( children : [
|
||||
SizedBox(
|
||||
width: getMainWidth(context),
|
||||
height: getMainHeight(context),
|
||||
SizedBox( width: getMainWidth(context),
|
||||
height: getMainHeight(context) - 50,
|
||||
child: SingleChildScrollView( child: CatalogWidget(items: CatalogFactory.key.currentState?.widget.items, itemWidth: widget.itemWidth) )),
|
||||
]
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user