Skip to content

Commit

Permalink
new version for appstore update
Browse files Browse the repository at this point in the history
  • Loading branch information
SpiralArm Consulting Ltd committed Feb 2, 2019
1 parent e1c4065 commit df6f9ab
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 40 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ I have got message working from an iOS app to the watch via the plugin, this can




## Generating a Distro build
The only way, so far, I have found of creating a distro build is following this seqence.

Expand All @@ -55,6 +56,14 @@ This will fail, but it generates the *correct shell scripts* to enable iOS to ca

## Versions

### 2.1
- updated Watch and Phone UI
- currency now defaults to the phone/ipad locale
- package made universal, so it runs on iPad (no watch supoort)

### 2.0
- first app store release

### 1.4 - Rough and Ready but Working!
I have now managed to add the required code into the iOS project to allow it to communicate with Flutter and send data updates from the watch so they are reflected in the app.
Basically if you do a calculation for a Tip on the watch then the data is transferred to the associated device.
Expand Down
6 changes: 3 additions & 3 deletions lib/colors.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';

/// This defines the colours used in the app
const appPrimaryColor = Color(0xFFE6E6E6);//Color(0xFF000000);
const appScaffoldColor = Color(0xFFE6E6E6);//Color(0xFF000000);
const appPrimaryColor = Color(0xFFE6E6E6); //Color(0xFF000000);
const appScaffoldColor = Color(0xFFE6E6E6); //Color(0xFF000000);
const appPrimaryTextColor = Color(0xFF0D5FFF);
const appTextColor = Color(0xFF333333);//Color(0xFFFECC66);
const appTextColor = Color(0xFF333333); //Color(0xFFFECC66);
50 changes: 18 additions & 32 deletions lib/homescreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class _HomeScreenState extends State<HomeScreen> {
StreamSubscription tipSubscription;

NumberFormat formatter = NumberFormat("##0.00");
TextEditingController billTotalController = TextEditingController();
TextEditingController billTotalController = TextEditingController();
int tipPercent = 10, tipSplit = 1;
double billTotal = 0.0;
double totalWithTip = 0.0;
Expand Down Expand Up @@ -65,31 +65,29 @@ class _HomeScreenState extends State<HomeScreen> {
suffixIcon: IconButton(
onPressed: () {
FocusScope.of(context).requestFocus(new FocusNode());
calculateBill(double.tryParse(billTotalController.text));
calculateBill(
double.tryParse(billTotalController.text));
},
icon: Icon(
Icons.keyboard_return,
color: Theme.of(context).textTheme.body1.color,
),
)),
),

Padding(
padding: EdgeInsets.fromLTRB(5.0, 10.0, 5.0, 10.0),
child: Text(
"Enter the total amount of your bill above and press the 'Return' icon.",
style: Theme.of(context).textTheme.body1,
),
),

Padding(
padding: EdgeInsets.fromLTRB(5.0, 10.0, 5.0, 10.0),
child: Text(
"Alter Tip and Split Between to update the bill breakdown.",
style: Theme.of(context).textTheme.body1,
),
),

Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Expand All @@ -101,7 +99,6 @@ class _HomeScreenState extends State<HomeScreen> {
style: Theme.of(context).primaryTextTheme.subhead,
),
),

IconButton(
onPressed: () {
if (tipPercent > 0) {
Expand All @@ -111,16 +108,14 @@ class _HomeScreenState extends State<HomeScreen> {
},
icon: Icon(Icons.remove),
),

Container(
width: 40.0,
child: Text(
"$tipPercent%",
style: Theme.of(context).textTheme.subhead,
textAlign: TextAlign.center,
),
),

),
),
IconButton(
onPressed: () {
if (tipPercent < 50) {
Expand All @@ -130,8 +125,6 @@ class _HomeScreenState extends State<HomeScreen> {
},
icon: Icon(Icons.add),
),


]),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
Expand All @@ -143,7 +136,7 @@ class _HomeScreenState extends State<HomeScreen> {
textAlign: TextAlign.left,
style: Theme.of(context).primaryTextTheme.subhead,
),
),
),
IconButton(
onPressed: () {
if (tipSplit > 1) {
Expand All @@ -152,15 +145,15 @@ class _HomeScreenState extends State<HomeScreen> {
}
},
icon: Icon(Icons.remove),
),
),
Container(
width: 40.0,
width: 40.0,
child: Text(
"$tipSplit",
style: Theme.of(context).textTheme.subhead,
textAlign: TextAlign.center,
),
),
),
),
IconButton(
onPressed: () {
if (tipSplit < 50) {
Expand All @@ -169,22 +162,16 @@ class _HomeScreenState extends State<HomeScreen> {
}
},
icon: Icon(Icons.add),
),

),
]),

Container(
decoration: BoxDecoration(
border: Border.all(
color: appPrimaryTextColor,
width: 2.0
),
borderRadius: BorderRadius.all( Radius.circular(5.0))
),
border: Border.all(color: appPrimaryTextColor, width: 2.0),
borderRadius: BorderRadius.all(Radius.circular(5.0))),
padding: EdgeInsets.all(8.0),
child: Column(
children: <Widget>[
Row(
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text(
Expand All @@ -196,7 +183,7 @@ class _HomeScreenState extends State<HomeScreen> {
style: Theme.of(context).textTheme.subhead,
),
],
),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Expand All @@ -221,8 +208,7 @@ class _HomeScreenState extends State<HomeScreen> {
"${formatter.format(totalEach)}",
style: Theme.of(context).textTheme.subhead,
),
]
),
]),
],
),
),
Expand Down Expand Up @@ -266,10 +252,10 @@ class _HomeScreenState extends State<HomeScreen> {
setupDeviceLocale() async {
List locales = await platform.invokeMethod("preferredLanguages");
debugPrint("$locales");
if(locales.length> 0){
if (locales.length > 0) {
formatter = NumberFormat.simpleCurrency(locale: locales[0]);
}
billTotalController.text = formatter.format(0.0);
setState((){});
setState(() {});
}
}
3 changes: 0 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ class TipCalculator extends StatelessWidget {
),
iconTheme: base.iconTheme.copyWith(color: appPrimaryTextColor),
inputDecorationTheme: InputDecorationTheme(
//fillColor: Colors.white,
//filled: true,

labelStyle: TextStyle(color: appTextColor, fontSize: 25.0),
enabledBorder: const OutlineInputBorder(
borderSide: const BorderSide(color: appPrimaryTextColor, width: 2.0),
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: watchtips
description: A Combined Flutter iOS and watchOS app.
description: A Combined Flutter iOS and watchOS app, now with iPad app support

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# Read more about versioning at semver.org.
version: 2.0.1+1
version: 2.1.0+1

environment:
sdk: ">=2.0.0-dev.68.0 <3.0.0"
Expand Down

0 comments on commit df6f9ab

Please sign in to comment.