Commit 97210f76 authored by Nicolas Richard Walter Boeckh's avatar Nicolas Richard Walter Boeckh 💬

Grouping files by usage, added BT button to header, graph WIP

parent 795567f4
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_blue","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_blue-0.7.2\\\\","dependencies":[]},{"name":"geolocator","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\geolocator-5.2.1\\\\","dependencies":["google_api_availability","location_permissions"]},{"name":"google_api_availability","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\google_api_availability-2.0.2\\\\","dependencies":[]},{"name":"location_permissions","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\location_permissions-2.0.4+1\\\\","dependencies":[]},{"name":"path_provider","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-1.6.0\\\\","dependencies":[]},{"name":"permission_handler","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\permission_handler-4.2.0+hotfix.3\\\\","dependencies":[]},{"name":"shared_preferences","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences-0.5.7+2\\\\","dependencies":[]},{"name":"sqflite","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-1.2.0\\\\","dependencies":[]}],"android":[{"name":"flutter_blue","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_blue-0.7.2\\\\","dependencies":[]},{"name":"geolocator","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\geolocator-5.2.1\\\\","dependencies":["google_api_availability","location_permissions"]},{"name":"google_api_availability","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\google_api_availability-2.0.2\\\\","dependencies":[]},{"name":"location_permissions","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\location_permissions-2.0.4+1\\\\","dependencies":[]},{"name":"path_provider","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-1.6.0\\\\","dependencies":[]},{"name":"permission_handler","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\permission_handler-4.2.0+hotfix.3\\\\","dependencies":[]},{"name":"shared_preferences","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences-0.5.7+2\\\\","dependencies":[]},{"name":"sqflite","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-1.2.0\\\\","dependencies":[]}],"macos":[{"name":"shared_preferences_macos","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_macos-0.0.1+8\\\\","dependencies":[]},{"name":"sqflite","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-1.2.0\\\\","dependencies":[]}],"linux":[],"windows":[],"web":[{"name":"shared_preferences_web","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_web-0.1.2+5\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_blue","dependencies":[]},{"name":"geolocator","dependencies":["google_api_availability","location_permissions"]},{"name":"google_api_availability","dependencies":[]},{"name":"location_permissions","dependencies":[]},{"name":"path_provider","dependencies":[]},{"name":"permission_handler","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"sqflite","dependencies":[]}],"date_created":"2020-07-03 18:51:09.681273","version":"1.20.0-3.0.pre.126"}
\ No newline at end of file
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_blue","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_blue-0.7.2\\\\","dependencies":[]},{"name":"geolocator","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\geolocator-5.2.1\\\\","dependencies":["google_api_availability","location_permissions"]},{"name":"google_api_availability","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\google_api_availability-2.0.2\\\\","dependencies":[]},{"name":"location_permissions","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\location_permissions-2.0.4+1\\\\","dependencies":[]},{"name":"path_provider","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-1.6.0\\\\","dependencies":[]},{"name":"permission_handler","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\permission_handler-4.2.0+hotfix.3\\\\","dependencies":[]},{"name":"shared_preferences","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences-0.5.7+2\\\\","dependencies":[]},{"name":"sqflite","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-1.2.0\\\\","dependencies":[]}],"android":[{"name":"flutter_blue","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_blue-0.7.2\\\\","dependencies":[]},{"name":"geolocator","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\geolocator-5.2.1\\\\","dependencies":["google_api_availability","location_permissions"]},{"name":"google_api_availability","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\google_api_availability-2.0.2\\\\","dependencies":[]},{"name":"location_permissions","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\location_permissions-2.0.4+1\\\\","dependencies":[]},{"name":"path_provider","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-1.6.0\\\\","dependencies":[]},{"name":"permission_handler","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\permission_handler-4.2.0+hotfix.3\\\\","dependencies":[]},{"name":"shared_preferences","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences-0.5.7+2\\\\","dependencies":[]},{"name":"sqflite","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-1.2.0\\\\","dependencies":[]}],"macos":[{"name":"shared_preferences_macos","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_macos-0.0.1+8\\\\","dependencies":[]},{"name":"sqflite","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-1.2.0\\\\","dependencies":[]}],"linux":[],"windows":[],"web":[{"name":"shared_preferences_web","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_web-0.1.2+5\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_blue","dependencies":[]},{"name":"geolocator","dependencies":["google_api_availability","location_permissions"]},{"name":"google_api_availability","dependencies":[]},{"name":"location_permissions","dependencies":[]},{"name":"path_provider","dependencies":[]},{"name":"permission_handler","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"sqflite","dependencies":[]}],"date_created":"2020-07-09 14:40:40.685116","version":"1.19.0-2.0.pre.49"}
\ No newline at end of file
......@@ -11,7 +11,7 @@ class BatteryVisualizerWidget extends StatelessWidget {
Stream<int> getBatteryLevel2() async* {
Random r = new Random();
while (true) {
yield r.nextInt(100);
yield 100; //r.nextInt(100);
await Future.delayed(Duration(seconds: 10));
}
}
......@@ -32,7 +32,7 @@ class BatteryVisualizerWidget extends StatelessWidget {
Widget build(BuildContext context) {
return StreamBuilder<int>(
stream: this.isLeft ? BatteryService().getBatteryLevel() : getBatteryLevel2(),
initialData: null,
initialData: 0,
builder: (context, snapshot) {
int data = snapshot.data;
return Stack(
......
import 'dart:async';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:logair_application/ui/animation/forward_animation.dart';
import 'package:logair_application/logic/handlers/bluetooth_le_handler.dart';
import 'package:logair_application/ui/bluetooth_dialog/dialog.dart';
import 'package:logair_application/utils/enums/bluetooth_connection_status.dart';
/// Button enabling the app to connect to a PM detector device.
class BluetoothButton extends StatefulWidget {
BluetoothButton({Key key}) : super(key: key);
@override
_BluetoothButtonState createState() => _BluetoothButtonState();
}
class _BluetoothButtonState extends State<BluetoothButton> {
_BluetoothButtonState({Key key});
Color _color;
BluetoothConnectionStatus _status;
// Can ignore dart(cancel_subscriptions) because linter error, subscription canceled in dispose.
// ignore: cancel_subscriptions
StreamSubscription<BluetoothConnectionStatus> _connectionStatusListener;
/// This [Function] enables non-dirty transitions, only on value change, reducing overhead.
void connectionStatusStateChanger(BluetoothConnectionStatus newStatus) {
if (mounted && newStatus != _status) {
Color newColor;
switch (newStatus) {
case BluetoothConnectionStatus.BTSTATUS_NOT_STREAMING:
newColor = Colors.grey[350];
break;
case BluetoothConnectionStatus.BTSTATUS_DISCOVERING_SERVICES:
newColor = Colors.blue[100];
break;
case BluetoothConnectionStatus.BTSTATUS_GETTING_CHARACTERISTICS:
newColor = Colors.blue[200];
break;
case BluetoothConnectionStatus.BTSTATUS_SETTING_MTU:
newColor = Colors.blue[300];
break;
case BluetoothConnectionStatus.BTSTATUS_STREAMING:
newColor = Colors.blueAccent;
break;
default:
}
setState(() {
_color = newColor;
_status = newStatus;
});
}
}
@override
void initState() {
super.initState();
this._connectionStatusListener = BTLEHandler().getConnectionStatus().listen(connectionStatusStateChanger);
}
@override
Future<void> dispose() async {
this._connectionStatusListener.cancel();
this._connectionStatusListener = null;
super.dispose();
}
@override
Widget build(BuildContext context) {
return Material(
color: Colors.transparent,
child: StreamBuilder<BluetoothConnectionStatus>(
stream: BTLEHandler().getConnectionStatus(),
initialData: BluetoothConnectionStatus.BTSTATUS_NOT_STREAMING,
builder: (context, snapshot) {
BluetoothConnectionStatus _bluetoothStatus = snapshot.data;
return Ink(
decoration: BoxDecoration(
border: Border.all(
color: Colors.white,
width: 2.0,
),
shape: BoxShape.circle,
),
child: Ink(
decoration: BoxDecoration(
border: Border.all(
color: Colors.indigoAccent,
width: 2.0,
),
color: _color,
shape: BoxShape.circle,
),
child: InkWell(
borderRadius: BorderRadius.circular(100.0),
onTap: () {
print("onTap");
if (_bluetoothStatus != BluetoothConnectionStatus.BTSTATUS_STREAMING) {
print("Tap On");
Navigator.push(
context,
PopForwardRoute(
page: BluetoothDialog(),
),
);
return true;
} else {
BTLEHandler().disconnect();
print('Tap off');
return true;
}
},
child: Padding(
padding: EdgeInsets.all(10),
child: Icon(
Icons.bluetooth,
color: Colors.white,
size: 30.0,
),
),
)
)
);
}
),
);
}
}
\ No newline at end of file
import 'package:flutter/material.dart';
import 'dart:math';
class CardPainter extends CustomPainter {
CardPainter({@required this.isLeft, @required this.battery, @required this.color});
......
import 'package:flutter/material.dart';
import 'package:logair_application/ui/components/battery_visualizer.dart';
import 'package:logair_application/ui/components/bluetooth_button.dart';
import 'package:logair_application/ui/base/battery_visualizer.dart';
import 'package:logair_application/ui/base/bluetooth_button.dart';
class HeaderWidget extends StatelessWidget {
HeaderWidget({Key key}) : super(key: key);
......
......@@ -3,9 +3,9 @@ import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_blue/flutter_blue.dart';
import 'package:logair_application/logic/handlers/bluetooth_le_handler.dart';
import 'package:logair_application/ui/components/bluetooth_adapter_off.dart';
import 'package:logair_application/ui/components/bluetooth_adapter_unavailable.dart';
import 'package:logair_application/ui/dialog/bluetooth_selection_dialog.dart';
import 'package:logair_application/ui/bluetooth_dialog/bluetooth_adapter_off.dart';
import 'package:logair_application/ui/bluetooth_dialog/adapter_unavailable.dart';
import 'package:logair_application/ui/bluetooth_dialog/selection_dialog.dart';
class BluetoothDialog extends StatefulWidget {
BluetoothDialog({Key key}) : super(key: key);
......@@ -61,10 +61,12 @@ class _BluetoothDialogState extends State<BluetoothDialog> {
),
Expanded(
flex: 1,
child: RaisedButton(
onPressed: () => Navigator.of(context).pop(false),
child: Text("Back"),
)
child: Center(
child: RaisedButton(
onPressed: () => Navigator.of(context).pop(false),
child: Text("Back"),
),
),
),
],
),
......
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:logair_application/ui/animation/forward_animation.dart';
import 'package:logair_application/logic/handlers/bluetooth_le_handler.dart';
import 'package:logair_application/ui/dialog/bluetooth_dialog.dart';
class BluetoothButton extends StatefulWidget {
BluetoothButton({Key key}) : super(key: key);
@override
_BluetoothButtonState createState() => _BluetoothButtonState();
}
class _BluetoothButtonState extends State<BluetoothButton> {
_BluetoothButtonState({Key key});
@override
Widget build(BuildContext context) {
return Material(
child: StreamBuilder<bool>(
stream: BTLEHandler().isDeviceConnected(),
initialData: false,
builder: (context, snapshot) {
bool _bluetoothConnected = snapshot.data;
return Ink(
decoration: BoxDecoration(
border: Border.all(
color: Colors.indigoAccent,
width: 2.0,
),
color: _bluetoothConnected ? Colors.blue[200] : Colors.white,
shape: BoxShape.circle,
),
child: InkWell(
borderRadius: BorderRadius.circular(100.0),
onTap: () {
print("onTap");
if (!_bluetoothConnected) {
print("Tap On");
Navigator.push(
context,
PopForwardRoute(
page: BluetoothDialog(),
),
);
return true;
} else {
BTLEHandler().disconnect();
print('Tap off');
return true;
}
},
child: Padding(
padding: EdgeInsets.all(10),
child: Icon(
Icons.bluetooth,
color: _bluetoothConnected ? Colors.grey : Colors.red,
size: 30.0,
),
),
)
);
}
),
);
}
}
\ No newline at end of file
import 'package:flutter/material.dart';
class Indicator extends StatelessWidget {
final Color color;
final String text;
final bool isSquare;
final double size;
final Color textColor;
const Indicator({
Key key,
this.color,
this.text,
this.isSquare,
this.size = 16,
this.textColor = const Color(0xff505050),
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Row(
children: <Widget>[
Container(
width: size,
height: size,
decoration: BoxDecoration(
shape: isSquare ? BoxShape.rectangle : BoxShape.circle,
color: color,
),
),
const SizedBox(
width: 4,
),
Text(
text,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold, color: textColor),
)
],
);
}
}
\ No newline at end of file
......@@ -4,12 +4,11 @@ import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:geolocator/geolocator.dart';
import 'package:logair_application/logic/handlers/bluetooth_le_handler.dart';
import 'package:logair_application/logic/handlers/data_handler.dart';
import 'package:logair_application/logic/handlers/position_handler.dart';
import 'package:logair_application/logic/data_packet.dart';
import 'package:logair_application/ui/carousel_card.dart';
import 'package:logair_application/ui/components/bluetooth_button.dart';
import 'package:logair_application/ui/components/graph/indicator.dart';
class DataWidget extends StatelessWidget {
DataWidget();
......@@ -69,129 +68,177 @@ class DataWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
Widget widget = Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
padding: EdgeInsets.symmetric(horizontal: 3),
height: 300,
child: Column(
children: [
Container(
padding: EdgeInsets.all(5),
child: BluetoothButton(),
),
StreamBuilder(
stream: BTLEHandler().isDeviceConnected(),
initialData: false,
builder: (context, snapshot) {
final bool value = snapshot.data;
if (value)
return Text("Connected");
else
return Text("Not connected");
},
),
Spacer( flex: 1, ),
StreamBuilder<DataPacket>(
stream: DataHandler().getDataStream(),
initialData: null,
builder: (context, snapshot) {
DataPacket data = snapshot.data;
return _buildPacketDisplay(data);
}
),
Spacer( flex: 1, ),
StreamBuilder<Position>(
stream: PositionHandler().getCurrentOrLastPosition(),
builder: (context, snapshot) {
Position data = snapshot.data;
return _buildLocationDisplay(data);
},
),
],
child: SingleChildScrollView(
child: Column(
children: [
// Local data (Chart + Data points)
Chart(),
Container(
padding: EdgeInsets.symmetric(horizontal: 3),
height: 300,
child: Column(
children: [
StreamBuilder<DataPacket>(
stream: DataHandler().getDataStream(),
initialData: null,
builder: (context, snapshot) {
DataPacket data = snapshot.data;
return _buildPacketDisplay(data);
}
),
Spacer( flex: 1, ),
StreamBuilder<Position>(
stream: PositionHandler().getCurrentOrLastPosition(),
builder: (context, snapshot) {
Position data = snapshot.data;
return _buildLocationDisplay(data);
},
),
],
),
),
),
Container(
height: 50,
),
Container(
height: 50,
child: Text('WIP Chart')
),
Container(
height: 200,
child: LineChart(
sampleData1()
)
),
],
Container(
height: 220,
),
Container(
height: 50,
child: Text('WIP Chart')
),
],
)
)
);
return CarouselCard(child: widget);
}
}
LineChartData sampleData1() {
return LineChartData(
lineTouchData: LineTouchData(
touchTooltipData: LineTouchTooltipData(
tooltipBgColor: Colors.blueGrey.withOpacity(0.8),
),
touchCallback: (LineTouchResponse touchResponse) {},
handleBuiltInTouches: true,
),
gridData: FlGridData(
show: false,
),
titlesData: FlTitlesData(
bottomTitles: SideTitles(
showTitles: true,
reservedSize: 22,
textStyle: const TextStyle(
color: Color(0xff72719b),
fontSize: 12,
),
margin: 10,
getTitles: (value) {
switch (value.toInt()) {
case 1:
return 'WIP';
}
return '';
},
),
leftTitles: SideTitles(
showTitles: true,
textStyle: const TextStyle(
color: Color(0xff75729e),
fontSize: 12,
),
getTitles: (value) {
switch (value.toInt()) {
case 1:
return 'WIP';
}
return '';
},
margin: 8,
reservedSize: 30,
),
),
borderData: FlBorderData(
border: const Border(
bottom: BorderSide(
color: Color(0xff4e4965),
width: 4,
class Chart extends StatefulWidget {
Chart({Key key}) : super(key: key);
@override
State<StatefulWidget> createState() => _ChartState();
}
class _ChartState extends State<Chart> {
_ChartState({Key key});
int touchedIndex;
@override
Widget build(BuildContext context) {
return Row(
children: [
Expanded(
flex: 2,
child: LineChart(
LineChartData(
lineTouchData: LineTouchData(
touchCallback: (lineTouchResponse) => {
},
handleBuiltInTouches: false,
),
gridData: FlGridData(
show: true,
),
// Build from DataPacket would enable getting every 10 seconds add HH:mm:ss
titlesData: FlTitlesData(
bottomTitles: SideTitles(
showTitles: true,
reservedSize: 22,
textStyle: const TextStyle(
color: Color(0xff72719b),
fontSize: 12,
),
margin: 10,
getTitles: (value) {
switch (value.toInt()) {
case 1:
return 'WIP';
}
return '';
},
),
// TODO Set values for PM
leftTitles: SideTitles(
showTitles: true,
textStyle: const TextStyle(
color: Color(0xff75729e),
fontSize: 12,
),
getTitles: (value) {
switch (value.toInt()) {
case 1:
return 'WIP';
}
return '';
},
margin: 8,
reservedSize: 30,
),
),
borderData: FlBorderData(
border: const Border(
bottom: BorderSide(
color: Color(0xff4e4965),
width: 4,
),
),
),
minX: 0,
maxX: 14,
maxY: 4,
minY: 0,
lineBarsData: linesBarData1(),
)
)
),
),
),
minX: 0,
maxX: 14,
maxY: 4,
minY: 0,
lineBarsData: linesBarData1(),
);
Expanded(
flex: 1,
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Indicator(
color: Color(0xff0293ee),
text: 'PM 1',
isSquare: true,
),
SizedBox(
height: 4,
),
Indicator(
color: Color(0xfff8b250),
text: 'PM 2.5',
isSquare: true,
),
SizedBox(
height: 4,
),
Indicator(
color: Color(0xff845bef),
text: 'PM 4',
isSquare: true,
),
SizedBox(
height: 4,
),
Indicator(
color: Color(0xff13d38e),
text: 'PM 10',
isSquare: true,
),
SizedBox(
height: 18,
),
],
)
)
]
);
}
}
List<LineChartBarData> linesBarData1() {
......
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:logair_application/localization/localization.dart';
Future<dynamic> showBluetoothUnavailableDialog(BuildContext context) async {
final _returnValue = await showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return SimpleDialog(
children: <Widget>[
Container(
child: Column(
children: <Widget>[
ListTile(
title: Text(
AppLocalization.of(context).bluetoothUnsupported
),
),
SimpleDialogOption(
child: Text(AppLocalization.of(context).ok),
onPressed: () => Navigator.of(context).pop(false),
)
],
)
),
]
);
}
);
return _returnValue;
}
\ No newline at end of file
......@@ -2,14 +2,14 @@ import 'package:carousel_slider/carousel_slider.dart';
import 'package:flutter/material.dart';
import 'package:logair_application/ui/animation/slide_animation.dart';
import 'package:logair_application/logic/controllers/home_controller.dart';
import 'package:logair_application/ui/components/header.dart';
import 'package:logair_application/ui/base/header.dart';
import 'package:logair_application/ui/routes/stats.dart';
import 'package:logair_application/ui/base_widget.dart';
import 'package:logair_application/ui/map_widget.dart';
import 'package:logair_application/ui/data_widget.dart';
import 'package:logair_application/ui/social_widget.dart';
import 'package:logair_application/ui/components/battery_visualizer.dart';
import 'package:logair_application/ui/base/battery_visualizer.dart';
class HomeView extends StatelessWidget {
HomeView({Key key}) : super(key: key);
......
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'package:logair_application/ui/animation/forward_animation.dart';