mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-11-27 23:14:55 +00:00
26 lines
696 B
Dart
26 lines
696 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
import 'package:syncrow_app/features/devices/view/widgets/categories_view.dart';
|
|
|
|
import '../../bloc/devices_cubit.dart';
|
|
|
|
class DevicesViewBody extends StatelessWidget {
|
|
const DevicesViewBody({
|
|
super.key,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return BlocProvider(
|
|
create: (context) => DevicesCubit(),
|
|
child: BlocBuilder<DevicesCubit, DevicesState>(
|
|
builder: (context, state) {
|
|
return state is DevicesLoading
|
|
? const Center(child: CircularProgressIndicator())
|
|
: const CategoriesView();
|
|
},
|
|
),
|
|
);
|
|
}
|
|
}
|