1. save file as json
2. modify html to show all data 3. set black as the background color of appbar
This commit is contained in:
@@ -79,7 +79,8 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
// TRY THIS: Try changing the color here to a specific color (to
|
||||
// Colors.amber, perhaps?) and trigger a hot reload to see the AppBar
|
||||
// change color while the other colors stay the same.
|
||||
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
|
||||
backgroundColor:
|
||||
Colors.black, //Theme.of(context).colorScheme.inversePrimary,
|
||||
// Here we take the value from the MyHomePage object that was created by
|
||||
// the App.build method, and use it to set our appbar title.
|
||||
title: Text(widget.title),
|
||||
@@ -163,7 +164,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
await methodChannel.invokeMethod('getExternalDownloadsPath');
|
||||
DateTime now = DateTime.now();
|
||||
String formattedDate = DateFormat('yyyy-MM-dd_HH-mm-ss').format(now);
|
||||
File file = File('$downloadsPath/$formattedDate.txt');
|
||||
File file = File('$downloadsPath/$formattedDate.json');
|
||||
var sink = file.openWrite();
|
||||
sink.write(jsonEncode(mLightSensorEvents));
|
||||
await sink.flush();
|
||||
|
||||
Reference in New Issue
Block a user