Skip to content

Commit df6f9ab

Browse files
author
SpiralArm Consulting Ltd
committed
new version for appstore update
1 parent e1c4065 commit df6f9ab

File tree

5 files changed

+32
-40
lines changed

5 files changed

+32
-40
lines changed

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ I have got message working from an iOS app to the watch via the plugin, this can
3333

3434

3535

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

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

5657
## Versions
5758

59+
### 2.1
60+
- updated Watch and Phone UI
61+
- currency now defaults to the phone/ipad locale
62+
- package made universal, so it runs on iPad (no watch supoort)
63+
64+
### 2.0
65+
- first app store release
66+
5867
### 1.4 - Rough and Ready but Working!
5968
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.
6069
Basically if you do a calculation for a Tip on the watch then the data is transferred to the associated device.

lib/colors.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'package:flutter/material.dart';
22

33
/// This defines the colours used in the app
4-
const appPrimaryColor = Color(0xFFE6E6E6);//Color(0xFF000000);
5-
const appScaffoldColor = Color(0xFFE6E6E6);//Color(0xFF000000);
4+
const appPrimaryColor = Color(0xFFE6E6E6); //Color(0xFF000000);
5+
const appScaffoldColor = Color(0xFFE6E6E6); //Color(0xFF000000);
66
const appPrimaryTextColor = Color(0xFF0D5FFF);
7-
const appTextColor = Color(0xFF333333);//Color(0xFFFECC66);
7+
const appTextColor = Color(0xFF333333); //Color(0xFFFECC66);

lib/homescreen.dart

+18-32
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class _HomeScreenState extends State<HomeScreen> {
1616
StreamSubscription tipSubscription;
1717

1818
NumberFormat formatter = NumberFormat("##0.00");
19-
TextEditingController billTotalController = TextEditingController();
19+
TextEditingController billTotalController = TextEditingController();
2020
int tipPercent = 10, tipSplit = 1;
2121
double billTotal = 0.0;
2222
double totalWithTip = 0.0;
@@ -65,31 +65,29 @@ class _HomeScreenState extends State<HomeScreen> {
6565
suffixIcon: IconButton(
6666
onPressed: () {
6767
FocusScope.of(context).requestFocus(new FocusNode());
68-
calculateBill(double.tryParse(billTotalController.text));
68+
calculateBill(
69+
double.tryParse(billTotalController.text));
6970
},
7071
icon: Icon(
7172
Icons.keyboard_return,
7273
color: Theme.of(context).textTheme.body1.color,
7374
),
7475
)),
7576
),
76-
7777
Padding(
7878
padding: EdgeInsets.fromLTRB(5.0, 10.0, 5.0, 10.0),
7979
child: Text(
8080
"Enter the total amount of your bill above and press the 'Return' icon.",
8181
style: Theme.of(context).textTheme.body1,
8282
),
8383
),
84-
8584
Padding(
8685
padding: EdgeInsets.fromLTRB(5.0, 10.0, 5.0, 10.0),
8786
child: Text(
8887
"Alter Tip and Split Between to update the bill breakdown.",
8988
style: Theme.of(context).textTheme.body1,
9089
),
9190
),
92-
9391
Row(
9492
mainAxisAlignment: MainAxisAlignment.spaceBetween,
9593
children: <Widget>[
@@ -101,7 +99,6 @@ class _HomeScreenState extends State<HomeScreen> {
10199
style: Theme.of(context).primaryTextTheme.subhead,
102100
),
103101
),
104-
105102
IconButton(
106103
onPressed: () {
107104
if (tipPercent > 0) {
@@ -111,16 +108,14 @@ class _HomeScreenState extends State<HomeScreen> {
111108
},
112109
icon: Icon(Icons.remove),
113110
),
114-
115111
Container(
116112
width: 40.0,
117113
child: Text(
118114
"$tipPercent%",
119115
style: Theme.of(context).textTheme.subhead,
120116
textAlign: TextAlign.center,
121-
),
122-
),
123-
117+
),
118+
),
124119
IconButton(
125120
onPressed: () {
126121
if (tipPercent < 50) {
@@ -130,8 +125,6 @@ class _HomeScreenState extends State<HomeScreen> {
130125
},
131126
icon: Icon(Icons.add),
132127
),
133-
134-
135128
]),
136129
Row(
137130
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@@ -143,7 +136,7 @@ class _HomeScreenState extends State<HomeScreen> {
143136
textAlign: TextAlign.left,
144137
style: Theme.of(context).primaryTextTheme.subhead,
145138
),
146-
),
139+
),
147140
IconButton(
148141
onPressed: () {
149142
if (tipSplit > 1) {
@@ -152,15 +145,15 @@ class _HomeScreenState extends State<HomeScreen> {
152145
}
153146
},
154147
icon: Icon(Icons.remove),
155-
),
148+
),
156149
Container(
157-
width: 40.0,
150+
width: 40.0,
158151
child: Text(
159152
"$tipSplit",
160153
style: Theme.of(context).textTheme.subhead,
161154
textAlign: TextAlign.center,
162-
),
163-
),
155+
),
156+
),
164157
IconButton(
165158
onPressed: () {
166159
if (tipSplit < 50) {
@@ -169,22 +162,16 @@ class _HomeScreenState extends State<HomeScreen> {
169162
}
170163
},
171164
icon: Icon(Icons.add),
172-
),
173-
165+
),
174166
]),
175-
176167
Container(
177168
decoration: BoxDecoration(
178-
border: Border.all(
179-
color: appPrimaryTextColor,
180-
width: 2.0
181-
),
182-
borderRadius: BorderRadius.all( Radius.circular(5.0))
183-
),
169+
border: Border.all(color: appPrimaryTextColor, width: 2.0),
170+
borderRadius: BorderRadius.all(Radius.circular(5.0))),
184171
padding: EdgeInsets.all(8.0),
185172
child: Column(
186173
children: <Widget>[
187-
Row(
174+
Row(
188175
mainAxisAlignment: MainAxisAlignment.spaceBetween,
189176
children: <Widget>[
190177
Text(
@@ -196,7 +183,7 @@ class _HomeScreenState extends State<HomeScreen> {
196183
style: Theme.of(context).textTheme.subhead,
197184
),
198185
],
199-
),
186+
),
200187
Row(
201188
mainAxisAlignment: MainAxisAlignment.spaceBetween,
202189
children: <Widget>[
@@ -221,8 +208,7 @@ class _HomeScreenState extends State<HomeScreen> {
221208
"${formatter.format(totalEach)}",
222209
style: Theme.of(context).textTheme.subhead,
223210
),
224-
]
225-
),
211+
]),
226212
],
227213
),
228214
),
@@ -266,10 +252,10 @@ class _HomeScreenState extends State<HomeScreen> {
266252
setupDeviceLocale() async {
267253
List locales = await platform.invokeMethod("preferredLanguages");
268254
debugPrint("$locales");
269-
if(locales.length> 0){
255+
if (locales.length > 0) {
270256
formatter = NumberFormat.simpleCurrency(locale: locales[0]);
271257
}
272258
billTotalController.text = formatter.format(0.0);
273-
setState((){});
259+
setState(() {});
274260
}
275261
}

lib/main.dart

-3
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ class TipCalculator extends StatelessWidget {
3333
),
3434
iconTheme: base.iconTheme.copyWith(color: appPrimaryTextColor),
3535
inputDecorationTheme: InputDecorationTheme(
36-
//fillColor: Colors.white,
37-
//filled: true,
38-
3936
labelStyle: TextStyle(color: appTextColor, fontSize: 25.0),
4037
enabledBorder: const OutlineInputBorder(
4138
borderSide: const BorderSide(color: appPrimaryTextColor, width: 2.0),

pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: watchtips
2-
description: A Combined Flutter iOS and watchOS app.
2+
description: A Combined Flutter iOS and watchOS app, now with iPad app support
33

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

1212
environment:
1313
sdk: ">=2.0.0-dev.68.0 <3.0.0"

0 commit comments

Comments
 (0)