diff --git a/README.md b/README.md index e000a55..7c485f2 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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. diff --git a/lib/colors.dart b/lib/colors.dart index 5a9b07b..071dc23 100644 --- a/lib/colors.dart +++ b/lib/colors.dart @@ -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); diff --git a/lib/homescreen.dart b/lib/homescreen.dart index 04361dc..3bd0f96 100644 --- a/lib/homescreen.dart +++ b/lib/homescreen.dart @@ -16,7 +16,7 @@ class _HomeScreenState extends State { 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; @@ -65,7 +65,8 @@ class _HomeScreenState extends State { suffixIcon: IconButton( onPressed: () { FocusScope.of(context).requestFocus(new FocusNode()); - calculateBill(double.tryParse(billTotalController.text)); + calculateBill( + double.tryParse(billTotalController.text)); }, icon: Icon( Icons.keyboard_return, @@ -73,7 +74,6 @@ class _HomeScreenState extends State { ), )), ), - Padding( padding: EdgeInsets.fromLTRB(5.0, 10.0, 5.0, 10.0), child: Text( @@ -81,7 +81,6 @@ class _HomeScreenState extends State { style: Theme.of(context).textTheme.body1, ), ), - Padding( padding: EdgeInsets.fromLTRB(5.0, 10.0, 5.0, 10.0), child: Text( @@ -89,7 +88,6 @@ class _HomeScreenState extends State { style: Theme.of(context).textTheme.body1, ), ), - Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -101,7 +99,6 @@ class _HomeScreenState extends State { style: Theme.of(context).primaryTextTheme.subhead, ), ), - IconButton( onPressed: () { if (tipPercent > 0) { @@ -111,16 +108,14 @@ class _HomeScreenState extends State { }, 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) { @@ -130,8 +125,6 @@ class _HomeScreenState extends State { }, icon: Icon(Icons.add), ), - - ]), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -143,7 +136,7 @@ class _HomeScreenState extends State { textAlign: TextAlign.left, style: Theme.of(context).primaryTextTheme.subhead, ), - ), + ), IconButton( onPressed: () { if (tipSplit > 1) { @@ -152,15 +145,15 @@ class _HomeScreenState extends State { } }, 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) { @@ -169,22 +162,16 @@ class _HomeScreenState extends State { } }, 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: [ - Row( + Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( @@ -196,7 +183,7 @@ class _HomeScreenState extends State { style: Theme.of(context).textTheme.subhead, ), ], - ), + ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -221,8 +208,7 @@ class _HomeScreenState extends State { "${formatter.format(totalEach)}", style: Theme.of(context).textTheme.subhead, ), - ] - ), + ]), ], ), ), @@ -266,10 +252,10 @@ class _HomeScreenState extends State { 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(() {}); } } diff --git a/lib/main.dart b/lib/main.dart index c2c4cc7..4d9625e 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -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), diff --git a/pubspec.yaml b/pubspec.yaml index 6064e7c..aa0105a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ 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 @@ -7,7 +7,7 @@ description: A Combined Flutter iOS and watchOS app. # 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"