Commit e2873e65 authored by Nicolas Richard Walter Boeckh's avatar Nicolas Richard Walter Boeckh 💬
Browse files

Thoughts on firmware implementation, doc on streams

parent e1ea0caa
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"battery","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\battery-0.3.1+7\\\\","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":"plugin_scaffold","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\plugin_scaffold-1.2.0\\\\","dependencies":[]},{"name":"rx_ble","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\rx_ble-0.6.1\\\\","dependencies":["plugin_scaffold"]},{"name":"sqflite","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-1.2.0\\\\","dependencies":[]}],"android":[{"name":"battery","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\battery-0.3.1+7\\\\","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":"plugin_scaffold","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\plugin_scaffold-1.2.0\\\\","dependencies":[]},{"name":"rx_ble","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\rx_ble-0.6.1\\\\","dependencies":["plugin_scaffold"]},{"name":"sqflite","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-1.2.0\\\\","dependencies":[]}],"macos":[{"name":"sqflite","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-1.2.0\\\\","dependencies":[]}],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"battery","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":"plugin_scaffold","dependencies":[]},{"name":"rx_ble","dependencies":["plugin_scaffold"]},{"name":"sqflite","dependencies":[]}],"date_created":"2020-02-06 16:34:56.089969","version":"1.14.7-pre.83"}
\ No newline at end of file
{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"battery","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":"plugin_scaffold","dependencies":[]},{"name":"rx_ble","dependencies":["plugin_scaffold"]},{"name":"sqflite","dependencies":[]}]}
\ No newline at end of file
......@@ -21,7 +21,9 @@ Also also, the UI and service elements of battery, bluetooth or web should be di
Check on whether or not a listener can be affixed to whatever the platform is doing, consider the Kotlin/Swift equivalents to `TimerTask's`, but in the background.
Bluetooth should have at least a few tasks (discovery -> pump all MAC's and display), (connect <- ) (read ->).
Bluetooth should have at least a few tasks (discovery -> pump all MAC's and display), (connect <- ) (read ->). Event Streams ?
Thought of firmware implementation for obfuscation / integrity verification. See issue [here](https://gitlab.unige.ch/Nicolas.Boeckh/la_app_xos/issues/4).
### Resources
......@@ -31,6 +33,10 @@ Bluetooth should have at least a few tasks (discovery -> pump all MAC's and disp
- [Dialogs](https://www.filledstacks.com/snippet/quick-and-easy-dialogs-in-flutter-with-rf-flutter/)
- [Platform Channels](https://flutter.dev/docs/development/platform-integration/platform-channels?tab=ios-channel-swift-tab) \[[Code](https://github.com/flutter/flutter/tree/master/examples/platform_channel_swift)\]
- [Networking in the background](https://flutter.dev/docs/cookbook/networking/background-parsing)
- [Singletons](https://medium.com/flutter-community/flutter-design-patterns-1-singleton-437f04e923ce)
- [Streams Channel](https://pub.dev/packages/streams_channel)
- [More Channels](https://programming.vip/docs/flutter-learning-notes-29-how-flutter-communicates-with-native.html)
- [More Channels - SO](https://stackoverflow.com/questions/56170451/what-is-the-difference-between-methodchannel-eventchannel-basicmessagechannel)
## [0.0.1] - 05/02/2020
......@@ -42,6 +48,11 @@ Useful to implement at the beginning because otherwise refactoring becomes painf
Based on the intl package, and uses it's generators to convert the `.arb` files (text, description, etc. in JSON format) to `.dart` files, of which only one is loaded at launch (also possible to force reload on language switch).
### Resources
- [Intl package documentation](https://pub.dev/packages/intl) \[[Code](https://github.com/dart-lang/intl)\]
- [Intl extensibility documentation](https://github.com/flutter/website/blob/master/examples/internationalization/add_language/lib/main.dart)
### Annex 1
```nil
......
......@@ -14,12 +14,15 @@ import android.os.Build.VERSION
import android.os.Build.VERSION_CODES
import io.flutter.plugin.common.MethodChannel
class MainActivity: FlutterActivity() {
private val _BATTERYCHANNEL = "logair.application/battery";
class Channels {
val BATTERY_CHANNEL = "logair.application/battery";
val BLUETOOTH_CHANNEL = "logair.application/btle";
}
class MainActivity: FlutterActivity() {
override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
GeneratedPluginRegistrant.registerWith(flutterEngine);
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, _BATTERYCHANNEL).setMethodCallHandler {
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, Channels.BATTERY_CHANNEL).setMethodCallHandler {
call, result ->
if (call.method == "getBatteryLevel") {
val batteryLevel = getBatteryLevel()
......@@ -44,7 +47,7 @@ class MainActivity: FlutterActivity() {
batteryLevel = intent!!.getIntExtra(BatteryManager.EXTRA_LEVEL, -1) * 100 / intent.getIntExtra(BatteryManager.EXTRA_SCALE, -1)
}
return batteryLevel
return batteryLevel;
}
......
......@@ -16,12 +16,12 @@ class CarouselCard extends StatelessWidget {
builder: (context, sizingInfo) => new Container(
color: color,
width: sizingInfo.localWidgetSize.width,
padding: EdgeInsets.only(right: 2, left: 2, bottom: 2, top:1),
padding: EdgeInsets.all(1),
child: Container(
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(color: Colors.grey.shade500),
borderRadius: BorderRadius.only(topLeft: Radius.circular(2), topRight: Radius.circular(2), bottomLeft: Radius.circular(40), bottomRight: Radius.circular(40)),
borderRadius: BorderRadius.only(topLeft: Radius.circular(4), topRight: Radius.circular(4), bottomLeft: Radius.circular(40), bottomRight: Radius.circular(40)),
),
child: child
),
......
......@@ -220,12 +220,12 @@ packages:
source: hosted
version: "2.1.4"
intl:
dependency: "direct main"
dependency: transitive
description:
name: intl
url: "https://pub.dartlang.org"
source: hosted
version: "0.16.1"
version: "0.16.0"
intl_translation:
dependency: "direct main"
description:
......
......@@ -7,6 +7,10 @@ version: 0.0.2
environment:
sdk: ">=2.6.0 <3.0.0"
global_configuration:
dependency_overrides:
intl: ^0.16.1
dependencies:
flutter:
sdk: flutter
......@@ -20,12 +24,11 @@ dependencies:
permission_handler: ^4.2.0+hotfix.3
get_it: ^3.1.0
intl_translation: ^0.17.9
flutter_localizations:
sdk: flutter
intl: ^0.16.1
intl_translation: ^0.17.9
dev_dependencies:
flutter_test:
sdk: flutter
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment