This commit is contained in:
mohammad
2024-11-14 10:23:00 +03:00
parent 6920d9129e
commit 48327fbbe5
9 changed files with 16 additions and 15 deletions
@@ -44,7 +44,7 @@ class SosScreen extends StatelessWidget {
builder: (context, state) {
final sensor = BlocProvider.of<SosBloc>(context);
SosModel model =
SosModel(batteryPercentage: 0, waterContactState: 'normal');
SosModel(batteryPercentage: 0, sosContactState: 'normal');
if (state is LoadingNewSate) {
model = state.sosSensor;
} else if (state is UpdateState) {
@@ -68,6 +68,7 @@ class SosScreen extends StatelessWidget {
child: Column(
children: [
BatteryBar(
batteryPercentage: model.batteryPercentage,
),
Expanded(
@@ -110,7 +111,7 @@ class SosScreen extends StatelessWidget {
],
),
child: SvgPicture.asset(
model.waterContactState == 'normal'
model.sosContactState == 'normal'
? Assets.redSos
: Assets.greenSos,
fit: BoxFit.fill,
@@ -26,7 +26,7 @@ class LocationSosPage extends StatelessWidget {
builder: (context, state) {
final sensor = BlocProvider.of<SosBloc>(context);
SosModel model =
SosModel(batteryPercentage: 0, waterContactState: 'normal');
SosModel(batteryPercentage: 0, sosContactState: 'normal');
return state is SosLoadingState
? const Center(
@@ -29,7 +29,7 @@ class QuestionPage extends StatelessWidget {
builder: (context, state) {
final sensor = BlocProvider.of<SosBloc>(context);
SosModel model =
SosModel(batteryPercentage: 0, waterContactState: 'normal');
SosModel(batteryPercentage: 0, sosContactState: 'normal');
if (state is LoadingNewSate) {
model = state.sosSensor;
} else if (state is UpdateState) {
@@ -28,7 +28,7 @@ class ShareSosPage extends StatelessWidget {
builder: (context, state) {
final sensor = BlocProvider.of<SosBloc>(context);
SosModel model =
SosModel(batteryPercentage: 0, waterContactState: 'normal');
SosModel(batteryPercentage: 0, sosContactState: 'normal');
if (state is LoadingNewSate) {
model = state.sosSensor;
} else if (state is UpdateState) {
@@ -28,7 +28,7 @@ class SosInfoPge extends StatelessWidget {
builder: (context, state) {
final sensor = BlocProvider.of<SosBloc>(context);
SosModel model =
SosModel(batteryPercentage: 0, waterContactState: 'normal');
SosModel(batteryPercentage: 0, sosContactState: 'normal');
if (state is LoadingNewSate) {
model = state.sosSensor;
} else if (state is UpdateState) {
@@ -32,7 +32,7 @@ class SosProfilePage extends StatelessWidget {
builder: (context, state) {
final sensor = BlocProvider.of<SosBloc>(context);
SosModel model =
SosModel(batteryPercentage: 0, waterContactState: 'normal');
SosModel(batteryPercentage: 0, sosContactState: 'normal');
if (state is LoadingNewSate) {
model = state.sosSensor;
} else if (state is UpdateState) {
@@ -37,7 +37,7 @@ class SosSettings extends StatelessWidget {
builder: (context, state) {
final sensor = BlocProvider.of<SosBloc>(context);
SosModel model =
SosModel(batteryPercentage: 0, waterContactState: 'normal');
SosModel(batteryPercentage: 0, sosContactState: 'normal');
if (state is LoadingNewSate) {
model = state.sosSensor;
} else if (state is UpdateState) {