Flutter update

This commit is contained in:
Hillel Coren 2020-03-16 16:07:05 +02:00
parent e069cc2203
commit 5b0ecfea83
33 changed files with 103 additions and 81 deletions

View File

@ -27,7 +27,7 @@ class MessageDialog extends StatelessWidget {
SizedBox(height: 20.0),
Text(
message,
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.title,
),
SizedBox(height: 40.0),
Row(

View File

@ -26,7 +26,7 @@ class ErrorDialog extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Text(localization.anErrorOccurred,
style: Theme.of(context).textTheme.headline6),
style: Theme.of(context).textTheme.title),
SizedBox(height: 20.0),
Text(error.toString()),
SizedBox(height: 40.0),

View File

@ -130,7 +130,7 @@ class MultiSelectListState extends State<MultiSelectList> {
? localization.lookup(option)
: columnTitle,
textAlign: TextAlign.left,
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.title,
),
),
IconButton(

View File

@ -168,10 +168,10 @@ class DocumentTile extends StatelessWidget {
SizedBox(height: 25),
Text(document.name,
overflow: TextOverflow.ellipsis,
style: Theme.of(context).textTheme.headline5),
style: Theme.of(context).textTheme.headline),
Text(
'${formatDate(convertTimestampToDateString(document.createdAt), context)}${document.prettySize}',
style: Theme.of(context).textTheme.headline5,
style: Theme.of(context).textTheme.headline,
),
SizedBox(height: 20),
DocumentPreview(document),
@ -207,7 +207,7 @@ class DocumentTile extends StatelessWidget {
children: <Widget>[
Text(
document.name ?? '',
style: Theme.of(context).textTheme.headline5,
style: Theme.of(context).textTheme.headline,
overflow: TextOverflow.ellipsis,
),
Text(

View File

@ -355,13 +355,13 @@ class _EntityListTile extends StatelessWidget {
children: <Widget>[
Expanded(
child: Text(entity.listDisplayName,
style: Theme.of(context).textTheme.headline6),
style: Theme.of(context).textTheme.title),
),
entity.listDisplayAmount != null
? Text(
formatNumber(entity.listDisplayAmount, context,
formatNumberType: entity.listDisplayAmountType),
style: Theme.of(context).textTheme.headline6)
style: Theme.of(context).textTheme.title)
: Container(),
],
),

View File

@ -53,7 +53,7 @@ class _DateRangePickerState extends State<DateRangePicker> {
shrinkWrap: true,
children: <Widget>[
Text(localization.dateRange,
style: Theme.of(context).textTheme.headline6),
style: Theme.of(context).textTheme.title),
SizedBox(height: 16.0),
Row(
children: <Widget>[

View File

@ -16,9 +16,9 @@ class HelpLink extends StatelessWidget {
Widget build(BuildContext context) {
final localization = AppLocalization.of(context);
final ThemeData themeData = Theme.of(context);
final TextStyle aboutTextStyle = themeData.textTheme.bodyText1;
final TextStyle aboutTextStyle = themeData.textTheme.body1;
final TextStyle linkStyle =
themeData.textTheme.bodyText1.copyWith(color: themeData.accentColor);
themeData.textTheme.body1.copyWith(color: themeData.accentColor);
return Padding(
padding: const EdgeInsets.only(top: 20, bottom: 30),

View File

@ -76,7 +76,7 @@ class MenuDrawer extends StatelessWidget {
company.displayName.isEmpty
? localization.untitledCompany
: company.displayName,
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.title,
overflow: TextOverflow.ellipsis,
),
],
@ -634,9 +634,9 @@ void _showUpdate(BuildContext context) {
void _showAbout(BuildContext context) {
final localization = AppLocalization.of(context);
final ThemeData themeData = Theme.of(context);
final TextStyle aboutTextStyle = themeData.textTheme.bodyText1;
final TextStyle aboutTextStyle = themeData.textTheme.body1;
final TextStyle linkStyle =
themeData.textTheme.bodyText1.copyWith(color: themeData.accentColor);
themeData.textTheme.body1.copyWith(color: themeData.accentColor);
showAboutDialog(
context: context,

View File

@ -265,8 +265,8 @@ class _LoginState extends State<LoginView> {
_oneTimePasswordController.text.isNotEmpty;
final ThemeData themeData = Theme.of(context);
final TextStyle aboutTextStyle = themeData.textTheme.bodyText1;
final TextStyle linkStyle = themeData.textTheme.bodyText1
final TextStyle aboutTextStyle = themeData.textTheme.body1;
final TextStyle linkStyle = themeData.textTheme.body1
.copyWith(color: convertHexStringToColor(kDefaultAccentColor));
return Stack(

View File

@ -78,11 +78,11 @@ class ClientListItem extends StatelessWidget {
Expanded(
child: Text(
client.displayName,
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.title,
),
),
Text(formatNumber(client.balance, context, clientId: client.id),
style: Theme.of(context).textTheme.headline6),
style: Theme.of(context).textTheme.title),
],
),
),

View File

@ -83,11 +83,11 @@ class CompanyGatewayListItem extends StatelessWidget {
Expanded(
child: Text(
companyGateway.gateway.name,
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.title,
),
),
Text(formatNumber(companyGateway.listDisplayAmount, context),
style: Theme.of(context).textTheme.headline6),
style: Theme.of(context).textTheme.title),
],
),
),

View File

@ -163,7 +163,7 @@ class _CompanyGatewayEditState extends State<CompanyGatewayEdit>
const EdgeInsets.only(left: 16, top: 16, bottom: 16),
child: Text(
localization.acceptedCardLogos,
style: Theme.of(context).textTheme.headline5,
style: Theme.of(context).textTheme.headline,
),
),
CardListTile(

View File

@ -80,7 +80,7 @@ class CreditListItem extends StatelessWidget {
Expanded(
child: Text(
client.displayName,
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.title,
),
),
Text(
@ -88,7 +88,7 @@ class CreditListItem extends StatelessWidget {
credit.balance > 0 ? credit.balance : credit.amount,
context,
clientId: credit.clientId),
style: Theme.of(context).textTheme.headline6),
style: Theme.of(context).textTheme.title),
],
),
),

View File

@ -95,7 +95,7 @@ class _DashboardChartState extends State<DashboardChart> {
padding: EdgeInsets.all(14.0),
child: Text(
widget.title,
style: theme.textTheme.headline5,
style: theme.textTheme.headline,
),
),
Divider(height: 1.0),
@ -146,14 +146,14 @@ class _DashboardChartState extends State<DashboardChart> {
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(localization.lookup(dataGroup.name),
style: theme.textTheme.headline5.copyWith(
style: theme.textTheme.headline.copyWith(
color: isSelected ? Colors.white : null,
fontWeight: FontWeight.w400)),
SizedBox(height: 4.0),
Text(
formatNumber(dataGroup.total, context,
currencyId: widget.currencyId),
style: theme.textTheme.headline5.copyWith(
style: theme.textTheme.headline.copyWith(
color: isSelected ? Colors.white : null)),
SizedBox(height: 2.0),
changeString.isNotEmpty
@ -197,13 +197,13 @@ class _DashboardChartState extends State<DashboardChart> {
': ' +
formatNumber(series.average, context,
currencyId: widget.currencyId),
style: theme.textTheme.headline5,
style: theme.textTheme.headline,
),
),
_selected != null
? Text(
_selected,
style: theme.textTheme.headline5,
style: theme.textTheme.headline,
)
: SizedBox(),
],

View File

@ -77,7 +77,7 @@ class DashboardPanels extends StatelessWidget {
uiState.endDate(company), context),
style: Theme.of(context)
.textTheme
.headline6
.title
.copyWith(fontSize: 18),
),
),

View File

@ -74,11 +74,11 @@ class DesignListItem extends StatelessWidget {
Expanded(
child: Text(
design.name,
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.title,
),
),
Text(formatNumber(design.listDisplayAmount, context),
style: Theme.of(context).textTheme.headline6),
style: Theme.of(context).textTheme.title),
],
),
),

View File

@ -77,11 +77,11 @@ class DocumentListItem extends StatelessWidget {
Expanded(
child: Text(
document.name,
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.title,
),
),
Text(formatNumber(document.listDisplayAmount, context),
style: Theme.of(context).textTheme.headline6),
style: Theme.of(context).textTheme.title),
],
),
),

View File

@ -116,13 +116,13 @@ class ExpenseListItem extends StatelessWidget {
? expense.publicNotes
: formatDate(expense.expenseDate, context),
overflow: TextOverflow.ellipsis,
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.title,
),
),
Text(
formatNumber(expense.amountWithTax, context,
currencyId: expense.expenseCurrencyId),
style: Theme.of(context).textTheme.headline6)
style: Theme.of(context).textTheme.title)
],
),
),

View File

@ -73,11 +73,11 @@ class GroupListItem extends StatelessWidget {
Expanded(
child: Text(
group.name,
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.title,
),
),
Text(formatNumber(group.listDisplayAmount, context),
style: Theme.of(context).textTheme.headline6),
style: Theme.of(context).textTheme.title),
],
),
),

View File

@ -80,7 +80,7 @@ class InvoiceListItem extends StatelessWidget {
Expanded(
child: Text(
client.displayName,
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.title,
),
),
Text(
@ -88,7 +88,7 @@ class InvoiceListItem extends StatelessWidget {
invoice.balance > 0 ? invoice.balance : invoice.amount,
context,
clientId: invoice.clientId),
style: Theme.of(context).textTheme.headline6),
style: Theme.of(context).textTheme.title),
],
),
),

View File

@ -81,11 +81,11 @@ class PaymentListItem extends StatelessWidget {
Expanded(
child: Text(
client.displayName,
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.title,
),
),
Text(formatNumber(payment.amount, context),
style: Theme.of(context).textTheme.headline6),
style: Theme.of(context).textTheme.title),
],
),
),

View File

@ -74,11 +74,11 @@ class ProductListItem extends StatelessWidget {
Expanded(
child: Text(
product.productKey,
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.title,
),
),
Text(formatNumber(product.price, context),
style: Theme.of(context).textTheme.headline6),
style: Theme.of(context).textTheme.title),
],
),
),

View File

@ -78,11 +78,11 @@ class ProjectListItem extends StatelessWidget {
Expanded(
child: Text(
project.name,
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.title,
),
),
Text(formatNumber(project.listDisplayAmount, context),
style: Theme.of(context).textTheme.headline6),
style: Theme.of(context).textTheme.title),
],
),
),

View File

@ -80,14 +80,14 @@ class QuoteListItem extends StatelessWidget {
Expanded(
child: Text(
client.displayName,
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.title,
),
),
Text(
formatNumber(
quote.balance > 0 ? quote.balance : quote.amount, context,
clientId: quote.clientId),
style: Theme.of(context).textTheme.headline6),
style: Theme.of(context).textTheme.title),
],
),
),

View File

@ -69,7 +69,7 @@ class SettingsList extends StatelessWidget {
padding: const EdgeInsets.only(left: 19, top: 16, bottom: 16),
child: Text(
localization.basicSettings,
style: Theme.of(context).textTheme.bodyText1,
style: Theme.of(context).textTheme.body1,
),
),
SettingsListTile(
@ -127,7 +127,7 @@ class SettingsList extends StatelessWidget {
padding: const EdgeInsets.only(left: 19, top: 16, bottom: 16),
child: Text(
localization.advancedSettings,
style: Theme.of(context).textTheme.bodyText1,
style: Theme.of(context).textTheme.body1,
),
),
SettingsListTile(

View File

@ -97,13 +97,13 @@ class TaskListItem extends StatelessWidget {
: formatDate(convertTimestampToDateString(task.updatedAt),
context),
overflow: TextOverflow.ellipsis,
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.title,
),
),
LiveText(() {
return formatNumber(task.listDisplayAmount, context,
formatNumberType: FormatNumberType.duration);
}, style: Theme.of(context).textTheme.headline6),
}, style: Theme.of(context).textTheme.title),
],
),
),

View File

@ -74,11 +74,11 @@ class TaxRateListItem extends StatelessWidget {
Expanded(
child: Text(
taxRate.name,
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.title,
),
),
Text(formatNumber(taxRate.listDisplayAmount, context),
style: Theme.of(context).textTheme.headline6),
style: Theme.of(context).textTheme.title),
],
),
),

View File

@ -72,11 +72,11 @@ class UserListItem extends StatelessWidget {
Expanded(
child: Text(
user.fullName,
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.title,
),
),
Text(formatNumber(user.listDisplayAmount, context),
style: Theme.of(context).textTheme.headline6),
style: Theme.of(context).textTheme.title),
],
),
),

View File

@ -75,11 +75,11 @@ class VendorListItem extends StatelessWidget {
Expanded(
child: Text(
vendor.name,
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.title,
),
),
Text(formatNumber(vendor.listDisplayAmount, context),
style: Theme.of(context).textTheme.headline6),
style: Theme.of(context).textTheme.title),
],
),
),

View File

@ -77,14 +77,14 @@ packages:
name: build_runner
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.4"
version: "1.8.0"
build_runner_core:
dependency: transitive
description:
name: build_runner_core
url: "https://pub.dartlang.org"
source: hosted
version: "4.4.0"
version: "4.5.2"
built_collection:
dependency: "direct main"
description:
@ -168,7 +168,7 @@ packages:
name: coverage
url: "https://pub.dartlang.org"
source: hosted
version: "0.13.6"
version: "0.13.9"
crypto:
dependency: transitive
description:
@ -196,14 +196,14 @@ packages:
name: extended_image
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.9"
version: "0.7.1"
extended_image_library:
dependency: transitive
description:
name: extended_image_library
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.9"
version: "0.2.1"
extension:
dependency: transitive
description:
@ -238,14 +238,14 @@ packages:
name: firebase_auth
url: "https://pub.dartlang.org"
source: hosted
version: "0.15.4"
version: "0.15.5+2"
firebase_auth_platform_interface:
dependency: transitive
description:
name: firebase_auth_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.5"
version: "1.1.7"
firebase_auth_web:
dependency: transitive
description:
@ -259,14 +259,14 @@ packages:
name: firebase_core
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.4"
version: "0.4.4+3"
firebase_core_platform_interface:
dependency: transitive
description:
name: firebase_core_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
version: "1.0.4"
firebase_core_web:
dependency: transitive
description:
@ -401,14 +401,14 @@ packages:
name: google_sign_in_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.4"
version: "1.1.0"
google_sign_in_web:
dependency: transitive
description:
name: google_sign_in_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.3+2"
version: "0.8.4"
graphs:
dependency: transitive
description:
@ -471,7 +471,7 @@ packages:
name: in_app_purchase
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.1+1"
version: "0.3.1+2"
intl:
dependency: "direct main"
description:
@ -562,14 +562,14 @@ packages:
name: native_pdf_renderer
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
version: "1.8.1"
native_pdf_view:
dependency: "direct main"
description:
name: native_pdf_view
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
version: "2.2.0"
node_interop:
dependency: transitive
description:
@ -597,7 +597,7 @@ packages:
name: package_config
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.0"
version: "1.9.1"
package_resolver:
dependency: transitive
description:
@ -618,7 +618,21 @@ packages:
name: path_provider
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.1"
version: "1.6.5"
path_provider_macos:
dependency: transitive
description:
name: path_provider_macos
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.4"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
pedantic:
dependency: transitive
description:
@ -716,7 +730,7 @@ packages:
name: shared_preferences
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.6+2"
version: "0.5.6+3"
shared_preferences_macos:
dependency: transitive
description:
@ -805,7 +819,14 @@ packages:
name: sqflite
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.1"
version: "1.3.0"
sqflite_common:
dependency: transitive
description:
name: sqflite_common
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0+1"
stack_trace:
dependency: transitive
description:
@ -966,7 +987,7 @@ packages:
name: watcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.7+13"
version: "0.9.7+14"
web_socket_channel:
dependency: transitive
description:
@ -987,7 +1008,7 @@ packages:
name: webview_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.19+8"
version: "0.3.19+9"
xml:
dependency: transitive
description:

View File

@ -26,7 +26,8 @@ dependencies:
cached_network_image: ^2.0.0
url_launcher: ^5.4.2
share: ^0.6.3+6
intl: ^0.16.1
#intl: ^0.16.1
intl: any
flutter_slidable: ^0.5.4
charts_flutter: ^0.8.1
google_sign_in: ^4.1.4

View File

@ -272,7 +272,7 @@ else
#comment="STARTER: widgets - do not remove comment"
#if [ ${element} = ${fieldsArray[0]} ]; then
# code="Text(${module_snake}.${element}, style: Theme.of(context).textTheme.headline6),${lineBreak}"
# code="Text(${module_snake}.${element}, style: Theme.of(context).textTheme.title),${lineBreak}"
# code="${code}SizedBox(height: 12.0),${lineBreak}"
#else
# code="Text(${module_snake}.${element}),"

View File

@ -75,11 +75,11 @@ class StubListItem extends StatelessWidget {
Expanded(
child: Text(
stub.name,
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.title,
),
),
Text(formatNumber(stub.listDisplayAmount, context),
style: Theme.of(context).textTheme.headline6),
style: Theme.of(context).textTheme.title),
],
),
),