From c89776663f10e9d0776716e3cfeafa082307340e Mon Sep 17 00:00:00 2001 From: Vadim <44135514+vodemn@users.noreply.github.com> Date: Sun, 29 Jan 2023 19:46:27 +0300 Subject: [PATCH] fixed iOS init --- lib/application.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/application.dart b/lib/application.dart index b140b37..fb55463 100644 --- a/lib/application.dart +++ b/lib/application.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; @@ -34,7 +36,7 @@ class _ApplicationState extends State { return FutureBuilder( future: Future.wait([ SharedPreferences.getInstance(), - LightSensor.hasSensor, + Platform.isAndroid ? LightSensor.hasSensor : Future.value(false), ]), builder: (_, snapshot) { if (snapshot.data != null) {