Fixed design issues

This commit is contained in:
Abdullah Alassaf
2024-07-04 10:26:18 +03:00
parent 38af926d64
commit f2dc9cc11c
6 changed files with 628 additions and 622 deletions
@@ -53,7 +53,6 @@ class ParametersList extends StatelessWidget {
0,
),
);
print('result=== $result');
if (result != null) {
BlocProvider.of<WallSensorBloc>(context)
.add(ChangeValueEvent(value: result, code: controlCode));
@@ -49,64 +49,62 @@ class WallMountedInterface extends StatelessWidget {
wallSensorModel = state.wallSensorModel;
}
return AnnotatedRegion(
value: SystemUiOverlayStyle(
statusBarColor: ColorsManager.primaryColor.withOpacity(0.5),
statusBarIconBrightness: Brightness.light,
),
child: Scaffold(
backgroundColor: ColorsManager.backgroundColor,
extendBodyBehindAppBar: true,
extendBody: true,
appBar: DeviceAppbar(
deviceName: deviceModel.name!,
deviceUuid: deviceModel.uuid!,
value: SystemUiOverlayStyle(
statusBarColor: ColorsManager.primaryColor.withOpacity(0.5),
statusBarIconBrightness: Brightness.light,
),
body: Container(
width: MediaQuery.sizeOf(context).width,
height: MediaQuery.sizeOf(context).height,
padding: const EdgeInsets.all(Constants.defaultPadding),
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage(
Assets.assetsImagesBackground,
),
fit: BoxFit.cover,
opacity: 0.4,
),
child: Scaffold(
backgroundColor: ColorsManager.backgroundColor,
extendBodyBehindAppBar: true,
extendBody: true,
appBar: DeviceAppbar(
deviceName: deviceModel.name!,
deviceUuid: deviceModel.uuid!,
),
child: state is LoadingInitialState
? const Center(
child: RefreshProgressIndicator(),
)
: SafeArea(
child: RefreshIndicator(
onRefresh: () async {
BlocProvider.of<WallSensorBloc>(context).add(InitialEvent());
},
child:
ListView(
children: [
Container(
height: MediaQuery.of(context).size.height,
child: Column(
children: [
PresenceIndicator(
state: wallSensorModel.presenceState,
),
ParametersList(
wallSensor: deviceModel,
presenceSensorsModel: wallSensorModel,
),
],
),
),
],
),
body: Container(
width: MediaQuery.sizeOf(context).width,
height: MediaQuery.sizeOf(context).height,
padding: const EdgeInsets.all(Constants.defaultPadding),
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage(
Assets.assetsImagesBackground,
),
),
),
));
fit: BoxFit.cover,
opacity: 0.4,
),
),
child: state is LoadingInitialState
? const Center(
child: RefreshProgressIndicator(),
)
: SafeArea(
child: RefreshIndicator(
onRefresh: () async {
BlocProvider.of<WallSensorBloc>(context).add(InitialEvent());
},
child: ListView(
children: [
Container(
height: MediaQuery.of(context).size.height,
child: Column(
children: [
PresenceIndicator(
state: wallSensorModel.presenceState,
),
ParametersList(
wallSensor: deviceModel,
presenceSensorsModel: wallSensorModel,
),
],
),
),
],
),
),
),
),
));
}),
);
}