Skip to content

Commit

Permalink
Changelog 1.1.9:
Browse files Browse the repository at this point in the history
- Removed print statements in DriveHelper
- Adjusted the way the version is received
- Email address is now also in a FittedBox
  • Loading branch information
theRookieCoder committed May 7, 2021
1 parent 4eb0084 commit 383bce7
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 30 deletions.
10 changes: 3 additions & 7 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
- Future resolved without errors
- Display the `HomePage` and pass `driveHelper` to it
- Future resolved with errors
- Display a `Scaffold` with a `grey[850]` background to match the `HomePage`, and a `Column` of 2 `Text`s. In the second `Text`, I display the error returned, with a monospaced font
- Display a `Scaffold` with a `Column` of 2 `Text`s. In the second `Text`, I display the error returned, with a monospaced font
- Future not resolved
- I display a `Scaffold` with a `grey[850]` background, and a `CircularProgressIndicator` enclosed in a `SizedBox` of size 200<sup>2</sup>
- I display a `Scaffold` with a `CircularProgressIndicator` enclosed in a `SizedBox` of size 200<sup>2</sup>
- The future provided is `DriveHelper.signInAndInit`. It does the following:
- Creates a `GoogleSignIn` with the `DriveApi.driveFileScope`
- Updates `account` with the an awaited `GoogleSignInAccount` from `signInWithGoogle`
Expand All @@ -24,10 +24,6 @@
- On failing that, it creates a new Google Sheets file called `log` in the aforementioned app folder
- It fills the file with the headers for the file's values
- Gets the version number specfied in `pubspec.yaml` by using `PackageInfo`
- Prints the following:
- App folder ID
- Log file ID
- App version number

## The HomePage

Expand All @@ -47,7 +43,7 @@ The `ListView`'s children are as follows:
- The `Column`'s children consist of the following:
- A `GoogleCircleUserAvatar` from `DriveHelper` with a height and width equal to the drawer width divided by 2.5 and padding of `10px`
- The Google account's display name, enclosed in a `FittedBox` to allow the `Text` to scale down if needed and `headline4` text style
- The Google account's email address, with `headline6` text style
- The Google account's email address, also enclosed in a `FittedBox`, with `headline6` text style
- The main buttons
- These buttons are `ListTile`s with `Text` and a relevant `Icon`
- There are 4 buttons as follows:
Expand Down
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,19 @@ After that, BP Logger can add the date, time, diastolic, and systolic values to

If you want to install the app by building from source:

- Install Dart and Flutter SDK on your computer, they're pretty big
- Install Dart and Flutter SDK on your computer, they're pretty large in size
- Download the source files using `gh repo clone theRookieCoder/bp_logger`
- `cd` into the source folder
- Connect your Android or iPhone using a usb cable (or wirelessly if you know how to do that)
- Check that Flutter can see your phone by running `flutter devices`
- Run `flutter run --release`
- If you run into issues, try running `flutter doctor` and seeing if that helps

## Installing

Currently, BP Logger is not available in any app stores and hence has to sideloaded.
Currently, BP Logger is not available in any app stores and hence has to sideloaded.

You can add the [website](https://bp-logger-rookie-coder.web.app) to your homescreen but this takes forever to load and does not perform very well (not that that matters much anyway)
Alternatively, you can add the [website](https://bp-logger-rookie-coder.web.app) to your homescreen but this takes forever to load and does not perform very well (not that that matters much anyway)

### Android

Expand All @@ -31,7 +32,7 @@ You can sideload the Android version of BP Logger fairly easily.

- It should open up to the latest version

- Under assets, find a file called `bp_logger_x.x.x.apk` make sure the file ends in `apk`
- Under assets, find a file called `bp_logger_x.x.x.apk` _make sure the file ends in `apk`_

- Simply click on it to download it

Expand All @@ -49,7 +50,7 @@ You can sideload the Android version of BP Logger fairly easily.
### iOS

Sideloading on iOS is not easy, and neither is it easy for me to publish my app in the App Store.
Sideloading on iOS is not easy, and neither is it easy for me to publish my app in the App Store.

There are 2 ways of sideloading. The easiest is using AltStore

Expand All @@ -61,6 +62,3 @@ There are 2 ways of sideloading. The easiest is using AltStore
- It should install and as long as your iPhone is connected to your computer once a week, it should renew

You can also the variety of other method, such as [this](installonair.com) website, or building from source



9 changes: 2 additions & 7 deletions lib/DriveHelper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,8 @@ class DriveHelper {
);

// 4. Get the version of the app for displaying in the about dialog
PackageInfo.fromPlatform().then((PackageInfo packageInfo) {
version = packageInfo.version;
});

print("Log file ID = $logFileID");
print("App folder ID = $appFolderID");
print("App version = $version");
final packageInfo = await PackageInfo.fromPlatform();
version = packageInfo.version;
}

Future<String> getFileId(String fileName) async {
Expand Down
12 changes: 7 additions & 5 deletions lib/HomePage.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import "package:flutter/material.dart"; // UI
// For rejecting everything but digits in the TextField
import "package:flutter/services.dart" show FilteringTextInputFormatter;
import "package:intl/intl.dart" show DateFormat; // To get date and time
import "DriveHelper.dart"; // Backend stuff
import "package:flutter/gestures.dart" show TapGestureRecognizer; // For links
import "package:url_launcher/url_launcher.dart"
show launch; // For opening links
import 'FileAppendDialog.dart';
import 'LogOutDialog.dart'; // For logging out
import "DriveHelper.dart"; // Backend stuff

class HomePage extends StatefulWidget {
const HomePage({Key key, @required this.driveHelper}) : super(key: key);
Expand Down Expand Up @@ -89,9 +88,12 @@ class _HomePageState extends State<HomePage> {
),
),
// Email ID of user
Text(
driveHelper.getEmail(),
style: Theme.of(context).textTheme.headline6,
FittedBox(
fit: BoxFit.scaleDown,
child: Text(
driveHelper.getEmail(),
style: Theme.of(context).textTheme.headline6,
),
)
],
),
Expand Down
3 changes: 1 addition & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,11 @@ class MyApp extends StatelessWidget {
snapshot.hasError) {
child = Scaffold(
key: ValueKey(1),
backgroundColor: Colors.grey[850],
body: Center(
child: Column(
children: [
Text(
"BP Logger has encountered an error",
"BP Logger encountered an error",
style: Theme.of(context).textTheme.subtitle1,
),
Text(
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Logs BP values in Google Drive as a Sheets file
publish_to: "none"

# The following defines the version and build number for your application.
version: 1.1.8+1
version: 1.1.9

environment:
sdk: ">=2.11.0"
Expand Down

0 comments on commit 383bce7

Please sign in to comment.