rename project
This commit is contained in:
@@ -3,7 +3,7 @@ import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:light_sesnor_capture/light_sensor_event.dart';
|
||||
import 'package:light_sensor_capture/light_sensor_event.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
void main() {
|
||||
@@ -111,9 +111,21 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
if (mState == 1) {
|
||||
mLightSensorEvents.add(snapshot.data);
|
||||
}
|
||||
return Text(
|
||||
'Sensor Data: ${jsonEncode(snapshot.data)}',
|
||||
style: Theme.of(context).textTheme.headlineLarge,
|
||||
return Column(
|
||||
children: [
|
||||
Text(
|
||||
'Sensor Data:',
|
||||
style: Theme.of(context).textTheme.headlineLarge,
|
||||
),
|
||||
Text(
|
||||
snapshot.data!.lux.toString(),
|
||||
style: Theme.of(context).textTheme.headlineLarge,
|
||||
),
|
||||
Text(
|
||||
snapshot.data!.timestamp.toString(),
|
||||
style: Theme.of(context).textTheme.headlineLarge,
|
||||
)
|
||||
],
|
||||
);
|
||||
} else {
|
||||
return const CircularProgressIndicator();
|
||||
|
||||
Reference in New Issue
Block a user