mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
adding basic widget for device managment
This commit is contained in:
13
lib/pages/device_managment/bloc/device_managment_bloc.dart
Normal file
13
lib/pages/device_managment/bloc/device_managment_bloc.dart
Normal file
@ -0,0 +1,13 @@
|
||||
import 'package:bloc/bloc.dart';
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
part 'device_managment_event.dart';
|
||||
part 'device_managment_state.dart';
|
||||
|
||||
class DeviceManagmentBloc extends Bloc<DeviceManagmentEvent, DeviceManagmentState> {
|
||||
DeviceManagmentBloc() : super(DeviceManagmentInitial()) {
|
||||
on<DeviceManagmentEvent>((event, emit) {
|
||||
// TODO: implement event handler
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
part of 'device_managment_bloc.dart';
|
||||
|
||||
sealed class DeviceManagmentEvent extends Equatable {
|
||||
const DeviceManagmentEvent();
|
||||
|
||||
@override
|
||||
List<Object> get props => [];
|
||||
}
|
10
lib/pages/device_managment/bloc/device_managment_state.dart
Normal file
10
lib/pages/device_managment/bloc/device_managment_state.dart
Normal file
@ -0,0 +1,10 @@
|
||||
part of 'device_managment_bloc.dart';
|
||||
|
||||
sealed class DeviceManagmentState extends Equatable {
|
||||
const DeviceManagmentState();
|
||||
|
||||
@override
|
||||
List<Object> get props => [];
|
||||
}
|
||||
|
||||
final class DeviceManagmentInitial extends DeviceManagmentState {}
|
23
lib/pages/device_managment/view/device_managment_page.dart
Normal file
23
lib/pages/device_managment/view/device_managment_page.dart
Normal file
@ -0,0 +1,23 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/widgets/device_managment_body.dart';
|
||||
import 'package:syncrow_web/web_layout/web_scaffold.dart';
|
||||
|
||||
class DeviceManagementPage extends StatelessWidget {
|
||||
const DeviceManagementPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return WebScaffold(
|
||||
enableMenuSideba: true,
|
||||
appBarTitle: Row(
|
||||
children: [
|
||||
Text(
|
||||
'Device Management',
|
||||
style: Theme.of(context).textTheme.headlineLarge,
|
||||
)
|
||||
],
|
||||
),
|
||||
scaffoldBody: const DeviceManagementBody(),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_web/core/extension/build_context_x.dart';
|
||||
import 'package:syncrow_web/pages/common/filter/filter_widget.dart';
|
||||
import 'package:syncrow_web/utils/style.dart';
|
||||
|
||||
class DeviceManagementBody extends StatelessWidget {
|
||||
const DeviceManagementBody({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(30),
|
||||
height: context.screenHeight,
|
||||
width: context.screenWidth,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
FilterWidget(
|
||||
size: context.screenSize,
|
||||
tabs: ['All', 'Online', 'Offline', 'Low Battery'],
|
||||
selectedIndex: 0,
|
||||
onTabChanged: (index) {},
|
||||
),
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
Wrap(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Community',
|
||||
style: context.textTheme.bodyMedium!.copyWith(
|
||||
fontWeight: FontWeight.w400,
|
||||
color: const Color(0xff000000)),
|
||||
),
|
||||
Container(
|
||||
width: context.screenWidth * 0.15,
|
||||
margin: const EdgeInsets.only(top: 8),
|
||||
decoration: containerDecoration,
|
||||
child: TextFormField(
|
||||
//: accessBloc.passwordName,
|
||||
style: const TextStyle(color: Colors.black),
|
||||
decoration: textBoxDecoration()!
|
||||
.copyWith(hintText: 'Please enter'),
|
||||
)),
|
||||
],
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user