fixed iOS init

This commit is contained in:
Vadim 2023-01-29 19:46:27 +03:00
parent 2056a200bd
commit c89776663f

View file

@ -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<Application> {
return FutureBuilder(
future: Future.wait([
SharedPreferences.getInstance(),
LightSensor.hasSensor,
Platform.isAndroid ? LightSensor.hasSensor : Future.value(false),
]),
builder: (_, snapshot) {
if (snapshot.data != null) {