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) {