Skip to content

Commit

Permalink
changed theme and added an icon
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudoincorrect committed Apr 8, 2021
1 parent 39dbbe1 commit 6b0a2b1
Show file tree
Hide file tree
Showing 31 changed files with 126 additions and 28 deletions.
2 changes: 1 addition & 1 deletion Mobile_app/smart_mask/.flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"ext_storage","path":"C:\\\\Users\\\\maxim\\\\Programming\\\\SDKs\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\ext_storage-1.0.3\\\\","dependencies":[]},{"name":"flutter_blue","path":"C:\\\\Users\\\\maxim\\\\Programming\\\\SDKs\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_blue-0.7.2\\\\","dependencies":[]},{"name":"path_provider","path":"C:\\\\Users\\\\maxim\\\\Programming\\\\SDKs\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-2.0.1\\\\","dependencies":[]},{"name":"permission_handler","path":"C:\\\\Users\\\\maxim\\\\Programming\\\\SDKs\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\permission_handler-6.1.1\\\\","dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\maxim\\\\Programming\\\\SDKs\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-2.0.0+3\\\\","dependencies":[]}],"android":[{"name":"ext_storage","path":"C:\\\\Users\\\\maxim\\\\Programming\\\\SDKs\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\ext_storage-1.0.3\\\\","dependencies":[]},{"name":"flutter_blue","path":"C:\\\\Users\\\\maxim\\\\Programming\\\\SDKs\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_blue-0.7.2\\\\","dependencies":[]},{"name":"path_provider","path":"C:\\\\Users\\\\maxim\\\\Programming\\\\SDKs\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-2.0.1\\\\","dependencies":[]},{"name":"permission_handler","path":"C:\\\\Users\\\\maxim\\\\Programming\\\\SDKs\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\permission_handler-6.1.1\\\\","dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\maxim\\\\Programming\\\\SDKs\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-2.0.0+3\\\\","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"C:\\\\Users\\\\maxim\\\\Programming\\\\SDKs\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_macos-2.0.0\\\\","dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\maxim\\\\Programming\\\\SDKs\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-2.0.0+3\\\\","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\Users\\\\maxim\\\\Programming\\\\SDKs\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-2.0.0\\\\","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\Users\\\\maxim\\\\Programming\\\\SDKs\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-2.0.0\\\\","dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"ext_storage","dependencies":[]},{"name":"flutter_blue","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux","path_provider_windows"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"permission_handler","dependencies":[]},{"name":"sqflite","dependencies":[]}],"date_created":"2021-04-07 16:57:02.511073","version":"2.0.4"}
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"ext_storage","path":"C:\\\\Users\\\\maxim\\\\Programming\\\\SDKs\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\ext_storage-1.0.3\\\\","dependencies":[]},{"name":"flutter_blue","path":"C:\\\\Users\\\\maxim\\\\Programming\\\\SDKs\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_blue-0.7.2\\\\","dependencies":[]},{"name":"path_provider","path":"C:\\\\Users\\\\maxim\\\\Programming\\\\SDKs\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-2.0.1\\\\","dependencies":[]},{"name":"permission_handler","path":"C:\\\\Users\\\\maxim\\\\Programming\\\\SDKs\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\permission_handler-6.1.1\\\\","dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\maxim\\\\Programming\\\\SDKs\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-2.0.0+3\\\\","dependencies":[]}],"android":[{"name":"ext_storage","path":"C:\\\\Users\\\\maxim\\\\Programming\\\\SDKs\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\ext_storage-1.0.3\\\\","dependencies":[]},{"name":"flutter_blue","path":"C:\\\\Users\\\\maxim\\\\Programming\\\\SDKs\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_blue-0.7.2\\\\","dependencies":[]},{"name":"path_provider","path":"C:\\\\Users\\\\maxim\\\\Programming\\\\SDKs\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-2.0.1\\\\","dependencies":[]},{"name":"permission_handler","path":"C:\\\\Users\\\\maxim\\\\Programming\\\\SDKs\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\permission_handler-6.1.1\\\\","dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\maxim\\\\Programming\\\\SDKs\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-2.0.0+3\\\\","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"C:\\\\Users\\\\maxim\\\\Programming\\\\SDKs\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_macos-2.0.0\\\\","dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\maxim\\\\Programming\\\\SDKs\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-2.0.0+3\\\\","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\Users\\\\maxim\\\\Programming\\\\SDKs\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-2.0.0\\\\","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\Users\\\\maxim\\\\Programming\\\\SDKs\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-2.0.0\\\\","dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"ext_storage","dependencies":[]},{"name":"flutter_blue","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux","path_provider_windows"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"permission_handler","dependencies":[]},{"name":"sqflite","dependencies":[]}],"date_created":"2021-04-08 14:21:29.902564","version":"2.0.4"}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<application
android:name="io.flutter.app.FlutterApplication"
android:icon="@mipmap/ic_launcher"
android:icon="@mipmap/launcher_icon"
android:label="smart_mask"
android:requestLegacyExternalStorage="true">
<activity
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Mobile_app/smart_mask/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -492,4 +492,4 @@
/* End XCConfigurationList section */
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions Mobile_app/smart_mask/lib/TODO
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,24 @@
TO DO
-------------------------------------------------------------
Add option Graph without data hole
Add a home page with quick view of the sensor
Change the theme and add an Icon
Profile the app


-------------------------------------------------------------
IN PROCESS
-------------------------------------------------------------
Download data to file system
Add a home page with quick view of the sensor


-------------------------------------------------------------
DONE

Date Tag Description
-------------------------------------------------------------
Fix disconnect/connect setNotifyValue
07/04/2021 BLOC Move to flutter_bloc package
07/04/2021 BLOC Download data to file system
07/04/2021 BLOC Fix disconnect/connect setNotifyValue
06/04/2021 BLOC Move to flutter_bloc package
04/04/2021 BLOC Add low pass filter to data
04/04/2021 BLOC Add High pass filter to data
01/04/2021 BLOC handle sensor change in Analytics bloc
Expand Down
29 changes: 10 additions & 19 deletions Mobile_app/smart_mask/lib/src/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import 'package:smart_mask/src/ui/screens/graphs_screen.dart';
import 'package:smart_mask/src/ui/screens/analytics_screen.dart';
import 'package:smart_mask/src/ui/screens/sensor_details_screen.dart';
import 'package:smart_mask/src/ui/screens/home_screen.dart';
import 'package:smart_mask/src/ui/theme/theme.dart';

class MyApp extends StatelessWidget {
@override
Expand All @@ -35,20 +36,6 @@ class MyApp extends StatelessWidget {
),
);
}

ThemeData getTheme() {
return ThemeData(
brightness: Brightness.dark,
primaryColor: Colors.blue,
accentColor: Colors.blueAccent,
buttonTheme: ButtonThemeData(
buttonColor: Colors.blue,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(5))),
textTheme: ButtonTextTheme.primary,
),
);
}
}

class SplashScreen extends StatelessWidget {
Expand All @@ -74,19 +61,23 @@ class _TabControlState extends State<TabControl> {
appBar: AppBar(
title: Row(
children: <Widget>[
const Text(
'Smart Mask',
style: TextStyle(fontSize: 30),
Image(
image: new AssetImage("assets/icon/smart_mask_logo_3_75px.png"),
width: 50,
height: 50,
color: null,
fit: BoxFit.scaleDown,
alignment: Alignment.center,
),
Expanded(child: Container()),
BlocBuilder<BleBloc, BleState>(
buildWhen: (_, state) => state is BleStateSetConnected,
builder: (context, state) {
if (state is BleStateSetConnected) {
if (state.connected)
return Text("Connected");
return Text("Smart Mask Connected");
else
return Text("Disconnected");
return Text("Smart Mask Disconnected");
}
return Text("Loading..");
},
Expand Down
1 change: 0 additions & 1 deletion Mobile_app/smart_mask/lib/src/ui/screens/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import 'package:flutter/material.dart';
class HomeScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
print("location need to be enabled for bluetooth discovery");
return Center(child: Text("Home"));
}
}
42 changes: 42 additions & 0 deletions Mobile_app/smart_mask/lib/src/ui/theme/theme.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import 'package:flutter/material.dart';

const PRIMARY_COLOR = Color.fromARGB(255, 141, 0, 119);
const ACCENT_COLOR = Color.fromARGB(255, 200, 142, 0);
const BUTTON_COLOR = Color.fromARGB(255, 0, 120, 120);

ThemeData getTheme() {
// https://paletton.com/#uid=54+0y0kOlp2rfRiO9GhQXg6YA2E
return ThemeData(
brightness: Brightness.dark,
primaryColor: PRIMARY_COLOR,
accentColor: ACCENT_COLOR,
textButtonTheme: getTextButtonThemeData(),
elevatedButtonTheme: getElevatedButtonThemeData(),
outlinedButtonTheme: getOutlinedButtonThemeData(),
// buttonTheme: getButtonThemeData(),
);
}
//
// ButtonThemeData getButtonThemeData() {
// return ButtonThemeData(
// buttonColor: BUTTON_COLOR,
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.all(Radius.circular(5))),
// textTheme: ButtonTextTheme.primary,
// );
// }

TextButtonThemeData getTextButtonThemeData() {
return TextButtonThemeData(
style: TextButton.styleFrom(primary: BUTTON_COLOR));
}

ElevatedButtonThemeData getElevatedButtonThemeData() {
return ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(primary: BUTTON_COLOR));
}

OutlinedButtonThemeData getOutlinedButtonThemeData() {
return OutlinedButtonThemeData(
style: OutlinedButton.styleFrom(primary: BUTTON_COLOR));
}
56 changes: 56 additions & 0 deletions Mobile_app/smart_mask/pubspec.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
archive:
dependency: transitive
description:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.2"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
async:
dependency: transitive
description:
Expand Down Expand Up @@ -78,6 +92,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
crypto:
dependency: transitive
description:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
csv:
dependency: "direct main"
description:
Expand Down Expand Up @@ -153,6 +174,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.7.2"
flutter_launcher_icons:
dependency: "direct main"
description:
name: flutter_launcher_icons
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.0"
flutter_test:
dependency: "direct dev"
description: flutter
Expand All @@ -165,6 +193,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1"
image:
dependency: transitive
description:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.2"
intl:
dependency: transitive
description:
Expand Down Expand Up @@ -256,6 +291,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.1"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "4.1.0"
platform:
dependency: transitive
description:
Expand Down Expand Up @@ -394,6 +436,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "5.1.0"
yaml:
dependency: transitive
description:
name: yaml
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.0"
sdks:
dart: ">=2.12.0 <3.0.0"
flutter: ">=1.24.0-10"
11 changes: 10 additions & 1 deletion Mobile_app/smart_mask/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,23 @@ dependencies:
permission_handler: ^6.1.1
ext_storage: ^1.0.3
csv: ^5.0.0
flutter_launcher_icons: ^0.9.0

dev_dependencies:
flutter_test:
sdk: flutter

flutter:
uses-material-design: true
assets:
- assets/icon/smart_mask_logo_3.png
- assets/icon/smart_mask_logo_3_75px.png

analyzer:
enable-experiment:
- non-nullable
- non-nullable

flutter_icons:
android: "launcher_icon"
ios: true
image_path: "assets/icon/smart_mask_logo_3.png"

0 comments on commit 6b0a2b1

Please sign in to comment.