rename project

This commit is contained in:
2024-12-06 14:08:08 +08:00
parent 15476ae363
commit 857e1262ea
8 changed files with 24 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
# light_sesnor_capture
# light_sensor_capture
A new Flutter project.

View File

@@ -6,7 +6,7 @@ plugins {
}
android {
namespace = "tw.moonjuice.light_sesnor_capture"
namespace = "tw.moonjuice.light_sensor_capture"
compileSdk = flutter.compileSdkVersion
ndkVersion "25.1.8937393"
@@ -20,7 +20,7 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "tw.moonjuice.light_sesnor_capture"
applicationId = "tw.moonjuice.light_sensor_capture"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = flutter.minSdkVersion

View File

@@ -1,7 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:label="light_sesnor_capture"
android:label="light_sensor_capture"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity

View File

@@ -1,4 +1,4 @@
package tw.moonjuice.light_sesnor_capture;
package tw.moonjuice.light_sensor_capture;
import android.Manifest;
import android.content.Context;

View File

@@ -13,7 +13,7 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>light_sesnor_capture</string>
<string>light_sensor_capture</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>

View File

@@ -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)}',
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();

View File

@@ -1,4 +1,4 @@
name: light_sesnor_capture
name: light_sensor_capture
description: "A new Flutter project."
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.

View File

@@ -8,7 +8,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:light_sesnor_capture/main.dart';
import 'package:light_sensor_capture/main.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {