mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 17:47:28 +00:00
35 lines
1.3 KiB
Dart
35 lines
1.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter/services.dart';
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
|
|
import 'package:syncrow_app/features/app_layout/bloc/home_cubit.dart';
|
|
import 'package:syncrow_app/features/app_layout/view/widgets/app_body.dart';
|
|
import 'package:syncrow_app/features/app_layout/view/widgets/default_app_bar.dart';
|
|
import 'package:syncrow_app/features/app_layout/view/widgets/default_nav_bar.dart';
|
|
import 'package:syncrow_app/features/devices/view/widgets/smart_door/smart_linkage_view.dart';
|
|
import 'package:syncrow_app/features/shared_widgets/default_scaffold.dart';
|
|
import 'package:syncrow_app/utils/helpers/custom_page_route.dart';
|
|
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
|
|
|
class AppLayout extends StatelessWidget {
|
|
const AppLayout({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return BlocProvider(
|
|
create: (context) => HomeCubit.getInstance(),
|
|
child: BlocBuilder<HomeCubit, HomeState>(
|
|
builder: (context, state) {
|
|
return DefaultScaffold(
|
|
appBar: HomeCubit.getInstance().spaces != null
|
|
? const DefaultAppBar()
|
|
: null,
|
|
bottomNavBar: const DefaultNavBar(),
|
|
child: const AppBody(),
|
|
);
|
|
},
|
|
),
|
|
);
|
|
}
|
|
}
|