mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-11-27 20:04:55 +00:00
Refactor device-related views to improve code structure and readability. Add error handling for authentication token in the splash view. Remove unnecessary NavCubit from the app initialization.
21 lines
676 B
Dart
21 lines
676 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
import 'package:syncrow_app/features/devices/bloc/devices_cubit.dart';
|
|
import 'package:syncrow_app/features/devices/view/widgets/devices_view_body.dart';
|
|
|
|
class DevicesView extends StatelessWidget {
|
|
const DevicesView({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return BlocBuilder<DevicesCubit, DevicesState>(
|
|
builder: (context, state) => Container(
|
|
padding: const EdgeInsets.all(8),
|
|
width: MediaQuery.sizeOf(context).width,
|
|
height: MediaQuery.sizeOf(context).height,
|
|
child: const DevicesViewBody(),
|
|
),
|
|
);
|
|
}
|
|
}
|