mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-16 01:56:24 +00:00
push fetch devices and connecting the filters
This commit is contained in:
@ -25,6 +25,7 @@ class HomeUpdateTree extends HomeState {
|
||||
@override
|
||||
List<Object> get props => [graph, builder];
|
||||
}
|
||||
|
||||
class HomeUserInfoLoaded extends HomeState {
|
||||
final UserModel user;
|
||||
|
||||
|
@ -1,7 +1,3 @@
|
||||
|
||||
|
||||
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
|
||||
class HomeItemModel {
|
||||
@ -11,12 +7,11 @@ class HomeItemModel {
|
||||
final bool? active;
|
||||
final void Function(BuildContext context) onPress;
|
||||
|
||||
|
||||
HomeItemModel({
|
||||
this.title,
|
||||
this.icon,
|
||||
this.color,
|
||||
this.active,
|
||||
this.title,
|
||||
this.icon,
|
||||
this.color,
|
||||
this.active,
|
||||
required this.onPress,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -22,11 +22,12 @@ class HomeCard extends StatelessWidget {
|
||||
return InkWell(
|
||||
onTap: active ? onTap : null,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.only(left: 10,right: 10,bottom: 10),
|
||||
padding: const EdgeInsets.only(left: 10, right: 10, bottom: 10),
|
||||
decoration: BoxDecoration(
|
||||
color: evenNumbers && active?
|
||||
ColorsManager.blueColor.withOpacity(0.8) :
|
||||
(active ?ColorsManager.blueColor
|
||||
color: evenNumbers && active
|
||||
? ColorsManager.blueColor.withOpacity(0.8)
|
||||
: (active
|
||||
? ColorsManager.blueColor
|
||||
: ColorsManager.blueColor.withOpacity(0.2)),
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
),
|
||||
|
@ -8,9 +8,7 @@ class HomePage extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ResponsiveLayout(
|
||||
desktopBody: HomeWebPage(),
|
||||
mobileBody:HomeMobilePage()
|
||||
);
|
||||
return ResponsiveLayout(
|
||||
desktopBody: HomeWebPage(), mobileBody: HomeMobilePage());
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,8 @@ class HomeMobilePage extends StatelessWidget {
|
||||
width: size.width * 0.68,
|
||||
child: GridView.builder(
|
||||
itemCount: 8,
|
||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
gridDelegate:
|
||||
const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2,
|
||||
crossAxisSpacing: 20.0,
|
||||
mainAxisSpacing: 20.0,
|
||||
|
@ -39,7 +39,8 @@ class HomeWebPage extends StatelessWidget {
|
||||
Text(
|
||||
'ACCESS YOUR APPS',
|
||||
style: Theme.of(context)
|
||||
.textTheme.headlineLarge!
|
||||
.textTheme
|
||||
.headlineLarge!
|
||||
.copyWith(color: Colors.black, fontSize: 40),
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
@ -63,7 +64,8 @@ class HomeWebPage extends StatelessWidget {
|
||||
active: homeBloc.homeItems[index].active!,
|
||||
name: homeBloc.homeItems[index].title!,
|
||||
img: homeBloc.homeItems[index].icon!,
|
||||
onTap: () => homeBloc.homeItems[index].onPress(context),
|
||||
onTap: () =>
|
||||
homeBloc.homeItems[index].onPress(context),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
@ -32,8 +32,8 @@ class TreeWidget extends StatelessWidget {
|
||||
SizedBox(
|
||||
width: 100,
|
||||
child: TextFormField(
|
||||
decoration:
|
||||
const InputDecoration(labelText: "Subtree separation"),
|
||||
decoration: const InputDecoration(
|
||||
labelText: "Subtree separation"),
|
||||
onChanged: (text) {
|
||||
firstNodeName = text;
|
||||
},
|
||||
@ -73,9 +73,7 @@ class TreeWidget extends StatelessWidget {
|
||||
child: GraphView(
|
||||
graph: state.graph,
|
||||
algorithm: BuchheimWalkerAlgorithm(
|
||||
state.builder,
|
||||
TreeEdgeRenderer(state.builder)
|
||||
),
|
||||
state.builder, TreeEdgeRenderer(state.builder)),
|
||||
paint: Paint()
|
||||
..color = Colors.green
|
||||
..strokeWidth = 1
|
||||
@ -138,7 +136,7 @@ Widget rectangleWidget(String text, Node node, BuildContext blocContext) {
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
width: MediaQuery.of(blocContext).size.width*0.2,
|
||||
width: MediaQuery.of(blocContext).size.width * 0.2,
|
||||
margin: EdgeInsets.symmetric(vertical: 10.0, horizontal: 20.0),
|
||||
padding: EdgeInsets.all(20.0),
|
||||
decoration: BoxDecoration(
|
||||
@ -163,7 +161,7 @@ Widget rectangleWidget(String text, Node node, BuildContext blocContext) {
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10.0),
|
||||
SizedBox(
|
||||
SizedBox(
|
||||
child: Text(
|
||||
text,
|
||||
style: const TextStyle(
|
||||
|
Reference in New Issue
Block a user