Shared WS
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:oc_front/core/models/shared_workspace_local.dart';
|
||||
import 'package:oc_front/models/search.dart';
|
||||
import 'package:oc_front/pages/catalog.dart';
|
||||
import 'package:oc_front/core/models/workspace_local.dart';
|
||||
import 'package:oc_front/widgets/items/item_row.dart';
|
||||
import 'package:oc_front/widgets/menu_clipper/shared_workspace_menu.dart';
|
||||
import 'package:oc_front/widgets/menu_clipper/workspace_menu.dart';
|
||||
|
||||
GlobalKey<EndDrawerWidgetState> endDrawerKey = GlobalKey<EndDrawerWidgetState>();
|
||||
@@ -15,36 +17,47 @@ class EndDrawerWidgetState extends State<EndDrawerWidget> {
|
||||
@override Widget build(BuildContext context) {
|
||||
List<ItemRowWidget> itemRows = WorkspaceLocal.items.map(
|
||||
(e) => ItemRowWidget(contextWidth: 400, item: e, keys: [endDrawerKey, CatalogFactory.key],)).toList();
|
||||
return Container(
|
||||
color: Colors.white,
|
||||
width: 400,
|
||||
height: MediaQuery.of(context).size.height,
|
||||
child: SingleChildScrollView(
|
||||
print(WorkspaceLocal.workspaces[WorkspaceLocal.current]!.shared);
|
||||
print(SharedWorkspaceLocal.workspaces);
|
||||
return Stack( children: [
|
||||
Container(
|
||||
color: Colors.white,
|
||||
width: 400,
|
||||
height: MediaQuery.of(context).size.height,
|
||||
child: Column( children: [
|
||||
Container(
|
||||
width: 400,
|
||||
height: 50,
|
||||
decoration: const BoxDecoration(color: Color.fromRGBO(38, 166, 154, 1)),
|
||||
child: const Center(
|
||||
child: Row( mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(padding: EdgeInsets.only(right: 20), child: Icon(Icons.shopping_cart_outlined, size: 18, color: Colors.white)),
|
||||
Text("Workspace", style: TextStyle(fontSize: 18, color: Colors.white, fontWeight: FontWeight.w600))
|
||||
])
|
||||
|
||||
Container(
|
||||
width: 400,
|
||||
height: 50,
|
||||
decoration: const BoxDecoration(color: Color.fromRGBO(38, 166, 154, 1)),
|
||||
child: const Center(
|
||||
child: Row( mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(padding: EdgeInsets.only(right: 20), child: Icon(Icons.shopping_cart_outlined, size: 18, color: Colors.white)),
|
||||
Text("Workspace", style: TextStyle(fontSize: 18, color: Colors.white, fontWeight: FontWeight.w600))
|
||||
])
|
||||
|
||||
),
|
||||
),
|
||||
),
|
||||
MenuWorkspaceWidget(simpliest: true, width: 400),
|
||||
itemRows.isEmpty ? Container( height: MediaQuery.of(context).size.height - 100,
|
||||
color: Colors.grey.shade300,
|
||||
child: const Center(child: Text("WORKSPACE IS EMPTY",
|
||||
style: TextStyle(fontSize: 25, fontWeight: FontWeight.w600, color: Colors.white))))
|
||||
: Container( child: SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: Column( children: itemRows)
|
||||
)),
|
||||
])
|
||||
)
|
||||
MenuWorkspaceWidget(simpliest: true, width: 400),
|
||||
Column( children: [
|
||||
itemRows.isEmpty ? Container( height: MediaQuery.of(context).size.height - 100,
|
||||
color: Colors.grey.shade300,
|
||||
child: const Center(child: Text("WORKSPACE IS EMPTY",
|
||||
style: TextStyle(fontSize: 25, fontWeight: FontWeight.w600, color: Colors.white))))
|
||||
: Container( height: MediaQuery.of(context).size.height - 100, child: SingleChildScrollView(
|
||||
scrollDirection: Axis.vertical,
|
||||
child: Column( children: [ ...itemRows, Container(height: 50)])
|
||||
)),
|
||||
])
|
||||
])
|
||||
),
|
||||
Positioned( bottom: 0, left: 0,
|
||||
child: SharedMenuWorkspaceWidget( width: 400,
|
||||
excluded: const [],
|
||||
before: WorkspaceLocal.workspaces[WorkspaceLocal.current]!.shared,
|
||||
selected: WorkspaceLocal.workspaces[WorkspaceLocal.current]!.shared,
|
||||
reverse: itemRows.isEmpty, contextID: WorkspaceLocal.current ?? "",) )
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user