mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-24 00:10:47 +00:00
fixed iOS init
This commit is contained in:
parent
2056a200bd
commit
c89776663f
1 changed files with 3 additions and 1 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||||
|
@ -34,7 +36,7 @@ class _ApplicationState extends State<Application> {
|
||||||
return FutureBuilder(
|
return FutureBuilder(
|
||||||
future: Future.wait([
|
future: Future.wait([
|
||||||
SharedPreferences.getInstance(),
|
SharedPreferences.getInstance(),
|
||||||
LightSensor.hasSensor,
|
Platform.isAndroid ? LightSensor.hasSensor : Future.value(false),
|
||||||
]),
|
]),
|
||||||
builder: (_, snapshot) {
|
builder: (_, snapshot) {
|
||||||
if (snapshot.data != null) {
|
if (snapshot.data != null) {
|
||||||
|
|
Loading…
Reference in a new issue