From dcaed1bc3d5d02a6eda8fd36013e8c6c3efdb520 Mon Sep 17 00:00:00 2001 From: Karol Stolarczyk Date: Tue, 10 Sep 2024 15:53:20 +0200 Subject: [PATCH 01/15] add score section --- lib/pages/detail/score_section.dart | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 lib/pages/detail/score_section.dart diff --git a/lib/pages/detail/score_section.dart b/lib/pages/detail/score_section.dart new file mode 100644 index 0000000..893f03b --- /dev/null +++ b/lib/pages/detail/score_section.dart @@ -0,0 +1,24 @@ + import 'package:flutter/material.dart'; + +class ScoreSectionData { + final int plCapital; + final bool plWorkers; + final bool plRnD; + final bool plRegistered; + final bool plNotGlobEnt; + final int plScore; + + ScoreSectionData({required this.plCapital, required this.plWorkers, required this.plRnD, required this.plRegistered, required this.plNotGlobEnt, required this.plScore}); +} + + class ScoreSection extends StatelessWidget { + final ScoreSectionData data; + + const ScoreSection({super.key, required this.data}); + @override + Widget build(BuildContext context) { + + throw UnimplementedError(); + } + } + \ No newline at end of file From 09b95af473a63f86ca4ff8d9b1963146dfda1d8f Mon Sep 17 00:00:00 2001 From: Karol Stolarczyk Date: Tue, 10 Sep 2024 16:15:07 +0200 Subject: [PATCH 02/15] score section fixes --- lib/pages/detail/score_section.dart | 151 +++++++++++++++++++++++++++- 1 file changed, 146 insertions(+), 5 deletions(-) diff --git a/lib/pages/detail/score_section.dart b/lib/pages/detail/score_section.dart index 893f03b..02b102a 100644 --- a/lib/pages/detail/score_section.dart +++ b/lib/pages/detail/score_section.dart @@ -1,7 +1,13 @@ import 'package:flutter/material.dart'; +import 'package:pola_flutter/i18n/strings.g.dart'; +import 'package:pola_flutter/theme/assets.gen.dart'; +import 'package:pola_flutter/theme/colors.dart'; +import 'package:pola_flutter/theme/fonts.gen.dart'; +import 'package:pola_flutter/theme/text_size.dart'; +import 'polish_capital_graph.dart'; class ScoreSectionData { - final int plCapital; + final double plCapital; final bool plWorkers; final bool plRnD; final bool plRegistered; @@ -15,10 +21,145 @@ class ScoreSectionData { final ScoreSectionData data; const ScoreSection({super.key, required this.data}); + @override Widget build(BuildContext context) { - - throw UnimplementedError(); - } + final Translations t = Translations.of(context); + + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Align( + alignment: Alignment.centerLeft, + child: Row( + children: [ + Assets.company.info.svg(height: 24.0, width: 24.0), + const SizedBox(width: 8.0), + Text( + t.companyScreen.ourRating, + style: TextStyle( + fontSize: TextSize.mediumTitle, + fontWeight: FontWeight.w600, + fontFamily: FontFamily.lato, + color: AppColors.text, + ), + ), + const SizedBox(width: 8.0), + Text( + t.companyScreen.points(score: data.plScore), + style: TextStyle( + fontSize: TextSize.newsTitle, + fontWeight: FontWeight.w700, + fontFamily: FontFamily.lato, + color: AppColors.text, + ), + ), + ], + ), + ), + Padding( + padding: const EdgeInsets.symmetric(vertical: 8.0), + child: ClipRRect( + borderRadius: BorderRadius.circular(10.0), + child: LinearProgressIndicator( + value: data.plCapital / 100.0, + backgroundColor: AppColors.buttonBackground, + valueColor: + const AlwaysStoppedAnimation(AppColors.defaultRed), + minHeight: 12.0, + ), + ), + ), + const SizedBox(height: 17.0), + Divider( + thickness: 1.0, + color: AppColors.divider, + indent: 0, + endIndent: 0, + ), + Padding( + padding: const EdgeInsets.only(top: 22.0), + child: Align( + alignment: Alignment.centerLeft, + child: Text( + t.companyScreen.gradingCriteria, + style: TextStyle( + fontSize: TextSize.mediumTitle, + fontWeight: FontWeight.w600, + fontFamily: FontFamily.lato, + color: AppColors.text, + ), + ), + ), + ), + const SizedBox(height: 22.0), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + PolishCapitalGraph(percentage: data.plCapital), + const SizedBox(width: 35.0), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + _DetailItem(t.companyScreen.producedInPoland, + data.plWorkers), + const SizedBox(height: 14.0), + _DetailItem(t.companyScreen.researchInPoland, + data.plRnD), + const SizedBox(height: 14.0), + _DetailItem(t.companyScreen.registeredInPoland, + data.plRegistered), + const SizedBox(height: 14.0), + _DetailItem(t.companyScreen.notConcernPart, + data.plNotGlobEnt ), + ], + ), + ), + ], + ), + const SizedBox(height: 22.0), + Divider( + thickness: 1.0, + color: AppColors.divider, + indent: 0, + endIndent: 0, + ), + + + ], + ); } } - \ No newline at end of file + class _DetailItem extends StatelessWidget { + const _DetailItem(this.text, this.state, {Key? key}) : super(key: key); + + final String text; + final bool state; + + @override + Widget build(BuildContext context) { + return Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Padding( + padding: const EdgeInsets.only(right: 3.0), + child: state ? Assets.company.taskAlt.svg() : Assets.company.radioButtonUnchecked.svg() + ), + Expanded( + child: Text( + text, + style: TextStyle( + fontSize: TextSize.description, + fontWeight: FontWeight.w400, + fontFamily: FontFamily.lato, + color: AppColors.text, + ), + softWrap: true, + overflow: TextOverflow.visible, + ), + ), + ], + ); + } +} From ea641d9e243c2b9cbbac80eb15dd4b3fa9e162c0 Mon Sep 17 00:00:00 2001 From: Karol Stolarczyk Date: Tue, 10 Sep 2024 16:19:14 +0200 Subject: [PATCH 03/15] fixes review --- lib/pages/detail/score_section.dart | 219 ++++++++++++++-------------- 1 file changed, 112 insertions(+), 107 deletions(-) diff --git a/lib/pages/detail/score_section.dart b/lib/pages/detail/score_section.dart index 02b102a..4d00f7c 100644 --- a/lib/pages/detail/score_section.dart +++ b/lib/pages/detail/score_section.dart @@ -1,4 +1,4 @@ - import 'package:flutter/material.dart'; +import 'package:flutter/material.dart'; import 'package:pola_flutter/i18n/strings.g.dart'; import 'package:pola_flutter/theme/assets.gen.dart'; import 'package:pola_flutter/theme/colors.dart'; @@ -6,7 +6,7 @@ import 'package:pola_flutter/theme/fonts.gen.dart'; import 'package:pola_flutter/theme/text_size.dart'; import 'polish_capital_graph.dart'; -class ScoreSectionData { +class CompanyScoreData { final double plCapital; final bool plWorkers; final bool plRnD; @@ -14,123 +14,127 @@ class ScoreSectionData { final bool plNotGlobEnt; final int plScore; - ScoreSectionData({required this.plCapital, required this.plWorkers, required this.plRnD, required this.plRegistered, required this.plNotGlobEnt, required this.plScore}); + CompanyScoreData( + {required this.plCapital, + required this.plWorkers, + required this.plRnD, + required this.plRegistered, + required this.plNotGlobEnt, + required this.plScore}); } - class ScoreSection extends StatelessWidget { - final ScoreSectionData data; +class CompanyScoreWidget extends StatelessWidget { + final CompanyScoreData data; - const ScoreSection({super.key, required this.data}); - - @override + const CompanyScoreWidget({super.key, required this.data}); + + @override Widget build(BuildContext context) { - final Translations t = Translations.of(context); + final Translations t = Translations.of(context); - return Column( - crossAxisAlignment: CrossAxisAlignment.start, + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Align( + alignment: Alignment.centerLeft, + child: Row( children: [ - Align( - alignment: Alignment.centerLeft, - child: Row( - children: [ - Assets.company.info.svg(height: 24.0, width: 24.0), - const SizedBox(width: 8.0), - Text( - t.companyScreen.ourRating, - style: TextStyle( - fontSize: TextSize.mediumTitle, - fontWeight: FontWeight.w600, - fontFamily: FontFamily.lato, - color: AppColors.text, - ), - ), - const SizedBox(width: 8.0), - Text( - t.companyScreen.points(score: data.plScore), - style: TextStyle( - fontSize: TextSize.newsTitle, - fontWeight: FontWeight.w700, - fontFamily: FontFamily.lato, - color: AppColors.text, - ), - ), - ], + Assets.company.info.svg(height: 24.0, width: 24.0), + const SizedBox(width: 8.0), + Text( + t.companyScreen.ourRating, + style: TextStyle( + fontSize: TextSize.mediumTitle, + fontWeight: FontWeight.w600, + fontFamily: FontFamily.lato, + color: AppColors.text, ), ), - Padding( - padding: const EdgeInsets.symmetric(vertical: 8.0), - child: ClipRRect( - borderRadius: BorderRadius.circular(10.0), - child: LinearProgressIndicator( - value: data.plCapital / 100.0, - backgroundColor: AppColors.buttonBackground, - valueColor: - const AlwaysStoppedAnimation(AppColors.defaultRed), - minHeight: 12.0, - ), + const SizedBox(width: 8.0), + Text( + t.companyScreen.points(score: data.plScore), + style: TextStyle( + fontSize: TextSize.newsTitle, + fontWeight: FontWeight.w700, + fontFamily: FontFamily.lato, + color: AppColors.text, ), ), - const SizedBox(height: 17.0), - Divider( - thickness: 1.0, - color: AppColors.divider, - indent: 0, - endIndent: 0, - ), - Padding( - padding: const EdgeInsets.only(top: 22.0), - child: Align( - alignment: Alignment.centerLeft, - child: Text( - t.companyScreen.gradingCriteria, - style: TextStyle( - fontSize: TextSize.mediumTitle, - fontWeight: FontWeight.w600, - fontFamily: FontFamily.lato, - color: AppColors.text, - ), - ), - ), + ], + ), + ), + Padding( + padding: const EdgeInsets.symmetric(vertical: 8.0), + child: ClipRRect( + borderRadius: BorderRadius.circular(10.0), + child: LinearProgressIndicator( + value: data.plCapital / 100.0, + backgroundColor: AppColors.buttonBackground, + valueColor: + const AlwaysStoppedAnimation(AppColors.defaultRed), + minHeight: 12.0, + ), + ), + ), + const SizedBox(height: 17.0), + Divider( + thickness: 1.0, + color: AppColors.divider, + indent: 0, + endIndent: 0, + ), + Padding( + padding: const EdgeInsets.only(top: 22.0), + child: Align( + alignment: Alignment.centerLeft, + child: Text( + t.companyScreen.gradingCriteria, + style: TextStyle( + fontSize: TextSize.mediumTitle, + fontWeight: FontWeight.w600, + fontFamily: FontFamily.lato, + color: AppColors.text, ), - const SizedBox(height: 22.0), - Row( + ), + ), + ), + const SizedBox(height: 22.0), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + PolishCapitalGraph(percentage: data.plCapital), + const SizedBox(width: 35.0), + Expanded( + child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - PolishCapitalGraph(percentage: data.plCapital), - const SizedBox(width: 35.0), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - _DetailItem(t.companyScreen.producedInPoland, - data.plWorkers), - const SizedBox(height: 14.0), - _DetailItem(t.companyScreen.researchInPoland, - data.plRnD), - const SizedBox(height: 14.0), - _DetailItem(t.companyScreen.registeredInPoland, - data.plRegistered), - const SizedBox(height: 14.0), - _DetailItem(t.companyScreen.notConcernPart, - data.plNotGlobEnt ), - ], - ), - ), + _DetailItem(t.companyScreen.producedInPoland, data.plWorkers), + const SizedBox(height: 14.0), + _DetailItem(t.companyScreen.researchInPoland, data.plRnD), + const SizedBox(height: 14.0), + _DetailItem( + t.companyScreen.registeredInPoland, data.plRegistered), + const SizedBox(height: 14.0), + _DetailItem( + t.companyScreen.notConcernPart, data.plNotGlobEnt), ], ), - const SizedBox(height: 22.0), - Divider( - thickness: 1.0, - color: AppColors.divider, - indent: 0, - endIndent: 0, - ), - - - ], - ); } - } - class _DetailItem extends StatelessWidget { + ), + ], + ), + const SizedBox(height: 22.0), + Divider( + thickness: 1.0, + color: AppColors.divider, + indent: 0, + endIndent: 0, + ), + ], + ); + } +} + +class _DetailItem extends StatelessWidget { const _DetailItem(this.text, this.state, {Key? key}) : super(key: key); final String text; @@ -143,9 +147,10 @@ class ScoreSectionData { crossAxisAlignment: CrossAxisAlignment.center, children: [ Padding( - padding: const EdgeInsets.only(right: 3.0), - child: state ? Assets.company.taskAlt.svg() : Assets.company.radioButtonUnchecked.svg() - ), + padding: const EdgeInsets.only(right: 3.0), + child: state + ? Assets.company.taskAlt.svg() + : Assets.company.radioButtonUnchecked.svg()), Expanded( child: Text( text, From 2daa5b72b7be276276ebc483296a30279508dd63 Mon Sep 17 00:00:00 2001 From: Karol Stolarczyk Date: Tue, 10 Sep 2024 16:56:11 +0200 Subject: [PATCH 04/15] fixes review --- ...ection.dart => company_score_widget.dart} | 0 lib/pages/detail/detail_content.dart | 59 ++++++++++++++++--- 2 files changed, 50 insertions(+), 9 deletions(-) rename lib/pages/detail/{score_section.dart => company_score_widget.dart} (100%) diff --git a/lib/pages/detail/score_section.dart b/lib/pages/detail/ company_score_widget.dart similarity index 100% rename from lib/pages/detail/score_section.dart rename to lib/pages/detail/ company_score_widget.dart diff --git a/lib/pages/detail/detail_content.dart b/lib/pages/detail/detail_content.dart index c647b98..df3b1a8 100644 --- a/lib/pages/detail/detail_content.dart +++ b/lib/pages/detail/detail_content.dart @@ -2,6 +2,8 @@ import 'package:flutter/material.dart'; import 'package:pola_flutter/models/company.dart'; import 'package:pola_flutter/models/search_result.dart'; import 'package:pola_flutter/i18n/strings.g.dart'; +import 'package:pola_flutter/pages/detail/%20company_score_widget.dart'; +import 'package:pola_flutter/pages/menu/version_bloc.dart'; import 'package:pola_flutter/theme/assets.gen.dart'; import 'package:pola_flutter/theme/colors.dart'; import 'package:pola_flutter/theme/fonts.gen.dart'; @@ -36,8 +38,7 @@ class DetailContent extends StatelessWidget { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - if ((company.isFriend ?? false)) - FriendsBar(), + if ((company.isFriend ?? false)) FriendsBar(), const SizedBox(height: 20.0), Padding( padding: const EdgeInsets.symmetric(horizontal: 17.0), @@ -78,9 +79,9 @@ class DetailContent extends StatelessWidget { borderRadius: BorderRadius.circular(10.0), child: LinearProgressIndicator( value: score / 100.0, - backgroundColor: AppColors.buttonBackground, - valueColor: - const AlwaysStoppedAnimation(AppColors.defaultRed), + backgroundColor: AppColors.buttonBackground, + valueColor: const AlwaysStoppedAnimation( + AppColors.defaultRed), minHeight: 12.0, ), ), @@ -148,7 +149,7 @@ class DetailContent extends StatelessWidget { if (hasLogo) Divider( thickness: 1.0, - color: AppColors.divider, + color: AppColors.divider, indent: 0, endIndent: 0, ), @@ -186,9 +187,10 @@ class _DetailItem extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.center, children: [ Padding( - padding: const EdgeInsets.only(right: 3.0), - child: state ? Assets.company.taskAlt.svg() : Assets.company.radioButtonUnchecked.svg() - ), + padding: const EdgeInsets.only(right: 3.0), + child: state + ? Assets.company.taskAlt.svg() + : Assets.company.radioButtonUnchecked.svg()), Expanded( child: Text( text, @@ -239,4 +241,43 @@ extension on Company { return null; } } + + CompanyScoreData? scoreData() { + final int? plCapital = this.plCapital; + final int? plWorkers = this.plWorkers; + final int? plRnD = this.plRnD; + final int? plRegistered = this.plRegistered; + final int? plNotGlobEnt = this.plNotGlobEnt; + final int? plScore = this.plScore; + + if (plCapital != null && + plWorkers != null && + plRnD != null && + plRegistered != null && + plNotGlobEnt != null && + plScore != null) { + return CompanyScoreData( + plCapital: plCapital.toDouble(), + plWorkers: plWorkers != 0, + plRnD: plRnD != 0, + plRegistered: plRegistered != 0, + plNotGlobEnt: plNotGlobEnt != 0, + plScore: plScore); + } + } +} + +class _ScoreSection extends StatelessWidget { + final Company company; + + const _ScoreSection({super.key, required this.company}); + @override + Widget build(BuildContext context) { + final scoreData = company.scoreData(); + if (scoreData != null) { + return CompanyScoreWidget(data: scoreData); + } else { + return Container(); + } + } } From 5a495b0fcab99d16f0c72aaafec9a2188561da76 Mon Sep 17 00:00:00 2001 From: Karol Stolarczyk Date: Tue, 10 Sep 2024 17:06:33 +0200 Subject: [PATCH 05/15] fixes review --- lib/pages/detail/ company_score_widget.dart | 2 +- lib/pages/detail/detail_content.dart | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/pages/detail/ company_score_widget.dart b/lib/pages/detail/ company_score_widget.dart index 4d00f7c..2544d9e 100644 --- a/lib/pages/detail/ company_score_widget.dart +++ b/lib/pages/detail/ company_score_widget.dart @@ -68,7 +68,7 @@ class CompanyScoreWidget extends StatelessWidget { child: ClipRRect( borderRadius: BorderRadius.circular(10.0), child: LinearProgressIndicator( - value: data.plCapital / 100.0, + value: data.plScore / 100.0, backgroundColor: AppColors.buttonBackground, valueColor: const AlwaysStoppedAnimation(AppColors.defaultRed), diff --git a/lib/pages/detail/detail_content.dart b/lib/pages/detail/detail_content.dart index df3b1a8..168d041 100644 --- a/lib/pages/detail/detail_content.dart +++ b/lib/pages/detail/detail_content.dart @@ -45,6 +45,8 @@ class DetailContent extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ + _ScoreSection(company: company), + Align( alignment: Alignment.centerLeft, child: Row( From c218264a1d89f2857f611ef19896df05d9a50f8b Mon Sep 17 00:00:00 2001 From: Karol Stolarczyk Date: Tue, 17 Sep 2024 19:06:28 +0200 Subject: [PATCH 06/15] add no score message --- lib/pages/detail/no_score_message.dart | 52 ++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 lib/pages/detail/no_score_message.dart diff --git a/lib/pages/detail/no_score_message.dart b/lib/pages/detail/no_score_message.dart new file mode 100644 index 0000000..13d13ce --- /dev/null +++ b/lib/pages/detail/no_score_message.dart @@ -0,0 +1,52 @@ + +import 'package:flutter/material.dart'; +import 'package:pola_flutter/theme/assets.gen.dart'; +import 'package:pola_flutter/theme/colors.dart'; +import 'package:pola_flutter/theme/fonts.gen.dart'; +import 'package:pola_flutter/theme/text_size.dart'; +import 'package:pola_flutter/i18n/strings.g.dart'; + +class NoScoreMessage extends StatelessWidget { + const NoScoreMessage({Key? key, required this.t}) : super(key: key); + + final Translations t; + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 22.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Center( + child: Assets.company.unpublished.svg(height: 109.42, width: 109.55), + ), + const SizedBox(height: 26.0), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 115.0), + ), + Text( + t.companyScreen.companyUnverified, + style: TextStyle( + fontSize: TextSize.description, + fontWeight: FontWeight.w400, + fontFamily: FontFamily.lato, + color: AppColors.text, + ), + textAlign: TextAlign.left, + ), + Text( + t.companyScreen.thankYou, + style: TextStyle( + fontSize: TextSize.description, + fontWeight: FontWeight.w700, + fontFamily: FontFamily.lato, + color: AppColors.text, + ), + textAlign: TextAlign.left, + ) + ], + ), + ); + } +} \ No newline at end of file From d0102816ab365e4088a0c112510cb3ee9773f1e7 Mon Sep 17 00:00:00 2001 From: Karol Stolarczyk Date: Wed, 18 Sep 2024 23:06:51 +0200 Subject: [PATCH 07/15] fixes review --- assets/company/unpublished.svg | 3 ++ lib/pages/detail/detail_content.dart | 42 +++++++++++++++++++------- lib/pages/detail/no_score_message.dart | 1 - 3 files changed, 34 insertions(+), 12 deletions(-) create mode 100644 assets/company/unpublished.svg diff --git a/assets/company/unpublished.svg b/assets/company/unpublished.svg new file mode 100644 index 0000000..a91d3ac --- /dev/null +++ b/assets/company/unpublished.svg @@ -0,0 +1,3 @@ + + + diff --git a/lib/pages/detail/detail_content.dart b/lib/pages/detail/detail_content.dart index 168d041..bc61f67 100644 --- a/lib/pages/detail/detail_content.dart +++ b/lib/pages/detail/detail_content.dart @@ -1,16 +1,15 @@ -import 'package:flutter/material.dart'; + import 'package:flutter/material.dart'; import 'package:pola_flutter/models/company.dart'; import 'package:pola_flutter/models/search_result.dart'; import 'package:pola_flutter/i18n/strings.g.dart'; -import 'package:pola_flutter/pages/detail/%20company_score_widget.dart'; -import 'package:pola_flutter/pages/menu/version_bloc.dart'; -import 'package:pola_flutter/theme/assets.gen.dart'; + import 'package:pola_flutter/theme/assets.gen.dart'; import 'package:pola_flutter/theme/colors.dart'; import 'package:pola_flutter/theme/fonts.gen.dart'; import 'package:pola_flutter/theme/text_size.dart'; -import 'logotypes.dart'; +import ' company_score_widget.dart'; import 'expandandable_text.dart'; -import 'polish_capital_graph.dart'; +import 'logotypes.dart'; + import 'polish_capital_graph.dart'; import 'friends_bar.dart'; class DetailContent extends StatelessWidget { @@ -20,7 +19,7 @@ class DetailContent extends StatelessWidget { @override Widget build(BuildContext context) { - if (searchResult.companies == null) { + if (searchResult.companies == null || searchResult.companies!.isEmpty) { return Padding( padding: const EdgeInsets.all(8.0), child: Text(searchResult.altText ?? ""), @@ -189,10 +188,11 @@ class _DetailItem extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.center, children: [ Padding( - padding: const EdgeInsets.only(right: 3.0), - child: state - ? Assets.company.taskAlt.svg() - : Assets.company.radioButtonUnchecked.svg()), + padding: const EdgeInsets.only(right: 3.0), + child: state + ? Assets.company.taskAlt.svg() + : Assets.company.radioButtonUnchecked.svg(), + ), Expanded( child: Text( text, @@ -273,10 +273,30 @@ class _ScoreSection extends StatelessWidget { final Company company; const _ScoreSection({super.key, required this.company}); + @override Widget build(BuildContext context) { final scoreData = company.scoreData(); + + // Check if scoreData is not null and if the score is zero if (scoreData != null) { + if (scoreData.plScore == 0) { + return Padding( + padding: const EdgeInsets.all(16.0), + child: Text( + "Niestety, ta firma nie została jeszcze zweryfikowana, więc nie możemy wyświetlić jej oceny. " + "Stale rozszerzamy naszą bazę, aby uwzględnić więcej firm.\n\n" + "Dziękujemy za cierpliwość!", + style: TextStyle( + fontSize: TextSize.description, + fontWeight: FontWeight.w400, + fontFamily: FontFamily.lato, + color: AppColors.text, + ), + textAlign: TextAlign.center, + ), + ); + } return CompanyScoreWidget(data: scoreData); } else { return Container(); diff --git a/lib/pages/detail/no_score_message.dart b/lib/pages/detail/no_score_message.dart index 13d13ce..03ef7f8 100644 --- a/lib/pages/detail/no_score_message.dart +++ b/lib/pages/detail/no_score_message.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:pola_flutter/theme/assets.gen.dart'; import 'package:pola_flutter/theme/colors.dart'; From 349085243c6cc32cf713108e4b5a9792867cf521 Mon Sep 17 00:00:00 2001 From: Karol Stolarczyk Date: Mon, 23 Sep 2024 15:54:31 +0200 Subject: [PATCH 08/15] fixes review --- lib/i18n/strings.g.dart | 8 ++++-- lib/i18n/strings.i18n.json | 4 ++- ..._widget.dart => company_score_widget.dart} | 0 lib/pages/detail/detail_content.dart | 26 ++++--------------- lib/pages/detail/no_score_message.dart | 3 --- 5 files changed, 14 insertions(+), 27 deletions(-) rename lib/pages/detail/{ company_score_widget.dart => company_score_widget.dart} (100%) diff --git a/lib/i18n/strings.g.dart b/lib/i18n/strings.g.dart index 5d5a61c..6918193 100644 --- a/lib/i18n/strings.g.dart +++ b/lib/i18n/strings.g.dart @@ -4,9 +4,9 @@ /// To regenerate, run: `dart run slang` /// /// Locales: 1 -/// Strings: 22 +/// Strings: 24 /// -/// Built on 2024-08-21 at 08:34 UTC +/// Built on 2024-09-23 at 13:35 UTC // coverage:ignore-file // ignore_for_file: type=lint @@ -189,6 +189,8 @@ class _StringsCompanyScreenEn { String points({required Object score}) => '${score} pkt'; String get companyFriend => ' Ta firma jest przyjacielem Poli'; String get polaFriends => 'Przyjaciele Poli'; + String get companyUnverified => 'Firma niezweryfikowana'; + String get thankYou => 'Dziekujemy'; } // Path: scan @@ -228,6 +230,8 @@ extension on Translations { case 'companyScreen.points': return ({required Object score}) => '${score} pkt'; case 'companyScreen.companyFriend': return ' Ta firma jest przyjacielem Poli'; case 'companyScreen.polaFriends': return 'Przyjaciele Poli'; + case 'companyScreen.companyUnverified': return 'Firma niezweryfikowana'; + case 'companyScreen.thankYou': return 'Dziekujemy'; case 'scan.scanning': return 'Skanowanie'; default: return null; } diff --git a/lib/i18n/strings.i18n.json b/lib/i18n/strings.i18n.json index 71b4726..54de958 100644 --- a/lib/i18n/strings.i18n.json +++ b/lib/i18n/strings.i18n.json @@ -22,7 +22,9 @@ "seeLess":" zobacz mniej", "points":"$score pkt", "companyFriend": " Ta firma jest przyjacielem Poli", - "polaFriends": "Przyjaciele Poli" + "polaFriends": "Przyjaciele Poli", + "companyUnverified": "Firma niezweryfikowana", + "thankYou": "Dziekujemy" }, "scan": { "scanning": "Skanowanie" diff --git a/lib/pages/detail/ company_score_widget.dart b/lib/pages/detail/company_score_widget.dart similarity index 100% rename from lib/pages/detail/ company_score_widget.dart rename to lib/pages/detail/company_score_widget.dart diff --git a/lib/pages/detail/detail_content.dart b/lib/pages/detail/detail_content.dart index bc61f67..c28fc3d 100644 --- a/lib/pages/detail/detail_content.dart +++ b/lib/pages/detail/detail_content.dart @@ -1,15 +1,15 @@ - import 'package:flutter/material.dart'; +import 'package:flutter/material.dart'; import 'package:pola_flutter/models/company.dart'; import 'package:pola_flutter/models/search_result.dart'; import 'package:pola_flutter/i18n/strings.g.dart'; - import 'package:pola_flutter/theme/assets.gen.dart'; +import 'package:pola_flutter/theme/assets.gen.dart'; import 'package:pola_flutter/theme/colors.dart'; import 'package:pola_flutter/theme/fonts.gen.dart'; import 'package:pola_flutter/theme/text_size.dart'; -import ' company_score_widget.dart'; +import 'company_score_widget.dart'; import 'expandandable_text.dart'; import 'logotypes.dart'; - import 'polish_capital_graph.dart'; +import 'polish_capital_graph.dart'; import 'friends_bar.dart'; class DetailContent extends StatelessWidget { @@ -278,24 +278,8 @@ class _ScoreSection extends StatelessWidget { Widget build(BuildContext context) { final scoreData = company.scoreData(); - // Check if scoreData is not null and if the score is zero - if (scoreData != null) { + if (scoreData != null) { if (scoreData.plScore == 0) { - return Padding( - padding: const EdgeInsets.all(16.0), - child: Text( - "Niestety, ta firma nie została jeszcze zweryfikowana, więc nie możemy wyświetlić jej oceny. " - "Stale rozszerzamy naszą bazę, aby uwzględnić więcej firm.\n\n" - "Dziękujemy za cierpliwość!", - style: TextStyle( - fontSize: TextSize.description, - fontWeight: FontWeight.w400, - fontFamily: FontFamily.lato, - color: AppColors.text, - ), - textAlign: TextAlign.center, - ), - ); } return CompanyScoreWidget(data: scoreData); } else { diff --git a/lib/pages/detail/no_score_message.dart b/lib/pages/detail/no_score_message.dart index 03ef7f8..39ab327 100644 --- a/lib/pages/detail/no_score_message.dart +++ b/lib/pages/detail/no_score_message.dart @@ -21,9 +21,6 @@ class NoScoreMessage extends StatelessWidget { child: Assets.company.unpublished.svg(height: 109.42, width: 109.55), ), const SizedBox(height: 26.0), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 115.0), - ), Text( t.companyScreen.companyUnverified, style: TextStyle( From cac6b5833a242a6ba5aaed448cc9821977091d54 Mon Sep 17 00:00:00 2001 From: Karol Stolarczyk Date: Mon, 23 Sep 2024 15:56:02 +0200 Subject: [PATCH 09/15] fixes review --- lib/pages/detail/detail_content.dart | 29 +--------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/lib/pages/detail/detail_content.dart b/lib/pages/detail/detail_content.dart index c28fc3d..b603222 100644 --- a/lib/pages/detail/detail_content.dart +++ b/lib/pages/detail/detail_content.dart @@ -46,34 +46,7 @@ class DetailContent extends StatelessWidget { children: [ _ScoreSection(company: company), - Align( - alignment: Alignment.centerLeft, - child: Row( - children: [ - Assets.company.info.svg(height: 24.0, width: 24.0), - const SizedBox(width: 8.0), - Text( - t.companyScreen.ourRating, - style: TextStyle( - fontSize: TextSize.mediumTitle, - fontWeight: FontWeight.w600, - fontFamily: FontFamily.lato, - color: AppColors.text, - ), - ), - const SizedBox(width: 8.0), - Text( - t.companyScreen.points(score: score), - style: TextStyle( - fontSize: TextSize.newsTitle, - fontWeight: FontWeight.w700, - fontFamily: FontFamily.lato, - color: AppColors.text, - ), - ), - ], - ), - ), + Padding( padding: const EdgeInsets.symmetric(vertical: 8.0), child: ClipRRect( From 91170d428ea0e0f93b51b585249940d2846b6aaf Mon Sep 17 00:00:00 2001 From: Karol Stolarczyk Date: Mon, 23 Sep 2024 16:18:10 +0200 Subject: [PATCH 10/15] fixes review --- lib/pages/detail/detail_content.dart | 70 ---------------------------- 1 file changed, 70 deletions(-) diff --git a/lib/pages/detail/detail_content.dart b/lib/pages/detail/detail_content.dart index b603222..922108c 100644 --- a/lib/pages/detail/detail_content.dart +++ b/lib/pages/detail/detail_content.dart @@ -45,76 +45,6 @@ class DetailContent extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ _ScoreSection(company: company), - - - Padding( - padding: const EdgeInsets.symmetric(vertical: 8.0), - child: ClipRRect( - borderRadius: BorderRadius.circular(10.0), - child: LinearProgressIndicator( - value: score / 100.0, - backgroundColor: AppColors.buttonBackground, - valueColor: const AlwaysStoppedAnimation( - AppColors.defaultRed), - minHeight: 12.0, - ), - ), - ), - const SizedBox(height: 17.0), - Divider( - thickness: 1.0, - color: AppColors.divider, - indent: 0, - endIndent: 0, - ), - Padding( - padding: const EdgeInsets.only(top: 22.0), - child: Align( - alignment: Alignment.centerLeft, - child: Text( - t.companyScreen.gradingCriteria, - style: TextStyle( - fontSize: TextSize.mediumTitle, - fontWeight: FontWeight.w600, - fontFamily: FontFamily.lato, - color: AppColors.text, - ), - ), - ), - ), - const SizedBox(height: 22.0), - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - PolishCapitalGraph(percentage: plCapital), - const SizedBox(width: 35.0), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - _DetailItem(t.companyScreen.producedInPoland, - (company.plWorkers ?? 0) != 0), - const SizedBox(height: 14.0), - _DetailItem(t.companyScreen.researchInPoland, - (company.plRnD ?? 0) != 0), - const SizedBox(height: 14.0), - _DetailItem(t.companyScreen.registeredInPoland, - (company.plRegistered ?? 0) != 0), - const SizedBox(height: 14.0), - _DetailItem(t.companyScreen.notConcernPart, - (company.plNotGlobEnt ?? 0) != 0), - ], - ), - ), - ], - ), - const SizedBox(height: 22.0), - Divider( - thickness: 1.0, - color: AppColors.divider, - indent: 0, - endIndent: 0, - ), if (hasDescription) ...[ Padding( padding: const EdgeInsets.symmetric(vertical: 22.0), From 3a97ccde35cb061ef462d82a3c795f4b40d95a09 Mon Sep 17 00:00:00 2001 From: Karol Stolarczyk Date: Mon, 23 Sep 2024 23:14:53 +0200 Subject: [PATCH 11/15] fixes review --- lib/pages/detail/detail_content.dart | 9 ++++----- lib/pages/detail/no_score_message.dart | 5 ++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/pages/detail/detail_content.dart b/lib/pages/detail/detail_content.dart index 922108c..dcc694b 100644 --- a/lib/pages/detail/detail_content.dart +++ b/lib/pages/detail/detail_content.dart @@ -9,6 +9,7 @@ import 'package:pola_flutter/theme/text_size.dart'; import 'company_score_widget.dart'; import 'expandandable_text.dart'; import 'logotypes.dart'; +import 'no_score_message.dart'; import 'polish_capital_graph.dart'; import 'friends_bar.dart'; @@ -147,7 +148,7 @@ extension on Company { } } - CompanyScoreData? scoreData() { + CompanyScoreData? _scoreData() { final int? plCapital = this.plCapital; final int? plWorkers = this.plWorkers; final int? plRnD = this.plRnD; @@ -179,14 +180,12 @@ class _ScoreSection extends StatelessWidget { @override Widget build(BuildContext context) { - final scoreData = company.scoreData(); + final scoreData = company._scoreData(); if (scoreData != null) { - if (scoreData.plScore == 0) { - } return CompanyScoreWidget(data: scoreData); } else { - return Container(); + return NoScoreMessage(); } } } diff --git a/lib/pages/detail/no_score_message.dart b/lib/pages/detail/no_score_message.dart index 39ab327..3e5395b 100644 --- a/lib/pages/detail/no_score_message.dart +++ b/lib/pages/detail/no_score_message.dart @@ -6,12 +6,11 @@ import 'package:pola_flutter/theme/text_size.dart'; import 'package:pola_flutter/i18n/strings.g.dart'; class NoScoreMessage extends StatelessWidget { - const NoScoreMessage({Key? key, required this.t}) : super(key: key); - - final Translations t; + @override Widget build(BuildContext context) { + final Translations t = Translations.of(context); return Padding( padding: const EdgeInsets.symmetric(vertical: 22.0), child: Column( From ca5eddc0d7523eba87a137795b9fb7d4f46ef167 Mon Sep 17 00:00:00 2001 From: Marcin Stepnowski Date: Wed, 25 Sep 2024 09:52:58 +0200 Subject: [PATCH 12/15] Generate assets file --- lib/theme/assets.gen.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/theme/assets.gen.dart b/lib/theme/assets.gen.dart index d79e809..6b02ffd 100644 --- a/lib/theme/assets.gen.dart +++ b/lib/theme/assets.gen.dart @@ -27,8 +27,11 @@ class $AssetsCompanyGen { /// File path: assets/company/task_alt.svg SvgGenImage get taskAlt => const SvgGenImage('assets/company/task_alt.svg'); + /// File path: assets/company/unpublished.svg + SvgGenImage get unpublished => const SvgGenImage('assets/company/unpublished.svg'); + /// List of all assets - List get values => [heart, info, radioButtonUnchecked, taskAlt]; + List get values => [heart, info, radioButtonUnchecked, taskAlt, unpublished]; } class $AssetsMenuPageGen { From f64b54049d90b695c2cc2913298aa095053d4c5f Mon Sep 17 00:00:00 2001 From: Karol Stolarczyk Date: Wed, 25 Sep 2024 22:43:00 +0200 Subject: [PATCH 13/15] fixes review --- lib/i18n/strings.g.dart | 10 +++++----- lib/i18n/strings.i18n.json | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/i18n/strings.g.dart b/lib/i18n/strings.g.dart index 6918193..46d8d04 100644 --- a/lib/i18n/strings.g.dart +++ b/lib/i18n/strings.g.dart @@ -6,7 +6,7 @@ /// Locales: 1 /// Strings: 24 /// -/// Built on 2024-09-23 at 13:35 UTC +/// Built on 2024-09-25 at 20:42 UTC // coverage:ignore-file // ignore_for_file: type=lint @@ -189,8 +189,8 @@ class _StringsCompanyScreenEn { String points({required Object score}) => '${score} pkt'; String get companyFriend => ' Ta firma jest przyjacielem Poli'; String get polaFriends => 'Przyjaciele Poli'; - String get companyUnverified => 'Firma niezweryfikowana'; - String get thankYou => 'Dziekujemy'; + String get companyUnverified => 'Niestety, ta firma nie została jeszcze zweryfikowana, więc nie możemy wyświetlić jej oceny. Stale rozszerzamy naszą bazę, aby uwzględnić więcej firm.'; + String get thankYou => 'Dziękujemy za cierpliwość!'; } // Path: scan @@ -230,8 +230,8 @@ extension on Translations { case 'companyScreen.points': return ({required Object score}) => '${score} pkt'; case 'companyScreen.companyFriend': return ' Ta firma jest przyjacielem Poli'; case 'companyScreen.polaFriends': return 'Przyjaciele Poli'; - case 'companyScreen.companyUnverified': return 'Firma niezweryfikowana'; - case 'companyScreen.thankYou': return 'Dziekujemy'; + case 'companyScreen.companyUnverified': return 'Niestety, ta firma nie została jeszcze zweryfikowana, więc nie możemy wyświetlić jej oceny. Stale rozszerzamy naszą bazę, aby uwzględnić więcej firm.'; + case 'companyScreen.thankYou': return 'Dziękujemy za cierpliwość!'; case 'scan.scanning': return 'Skanowanie'; default: return null; } diff --git a/lib/i18n/strings.i18n.json b/lib/i18n/strings.i18n.json index 54de958..0adf064 100644 --- a/lib/i18n/strings.i18n.json +++ b/lib/i18n/strings.i18n.json @@ -23,8 +23,8 @@ "points":"$score pkt", "companyFriend": " Ta firma jest przyjacielem Poli", "polaFriends": "Przyjaciele Poli", - "companyUnverified": "Firma niezweryfikowana", - "thankYou": "Dziekujemy" + "companyUnverified": "Niestety, ta firma nie została jeszcze zweryfikowana, więc nie możemy wyświetlić jej oceny. Stale rozszerzamy naszą bazę, aby uwzględnić więcej firm.", + "thankYou": "Dziękujemy za cierpliwość!" }, "scan": { "scanning": "Skanowanie" From d7e78ff4d1bbd41eedbcd650069a106377a3ae0a Mon Sep 17 00:00:00 2001 From: Karol Stolarczyk Date: Thu, 26 Sep 2024 19:05:22 +0200 Subject: [PATCH 14/15] fixes review --- lib/pages/detail/detail_content.dart | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/pages/detail/detail_content.dart b/lib/pages/detail/detail_content.dart index dcc694b..7ec6ef7 100644 --- a/lib/pages/detail/detail_content.dart +++ b/lib/pages/detail/detail_content.dart @@ -10,7 +10,6 @@ import 'company_score_widget.dart'; import 'expandandable_text.dart'; import 'logotypes.dart'; import 'no_score_message.dart'; -import 'polish_capital_graph.dart'; import 'friends_bar.dart'; class DetailContent extends StatelessWidget { @@ -28,9 +27,8 @@ class DetailContent extends StatelessWidget { } final company = searchResult.companies!.first; - final score = company.plScore ?? 0; - final double plCapital = (company.plCapital ?? 0).toDouble(); - final Translations t = Translations.of(context); + (company.plCapital ?? 0).toDouble(); + Translations.of(context); final hasLogo = company.logotypeUrl != null; final hasDescription = company.description?.isNotEmpty ?? false; @@ -79,8 +77,8 @@ class DetailContent extends StatelessWidget { } } -class _DetailItem extends StatelessWidget { - const _DetailItem(this.text, this.state, {Key? key}) : super(key: key); +class DetailItem extends StatelessWidget { + const DetailItem(this.text, this.state, {Key? key}) : super(key: key); final String text; final bool state; @@ -170,13 +168,14 @@ extension on Company { plNotGlobEnt: plNotGlobEnt != 0, plScore: plScore); } + return null; } } class _ScoreSection extends StatelessWidget { final Company company; - const _ScoreSection({super.key, required this.company}); + const _ScoreSection({required this.company}); @override Widget build(BuildContext context) { From 1da2f5a76bcd90f2c1cc23b4c4d045420199f69e Mon Sep 17 00:00:00 2001 From: Karol Stolarczyk Date: Tue, 1 Oct 2024 15:58:08 +0200 Subject: [PATCH 15/15] fixes review --- lib/pages/detail/detail_content.dart | 8 +-- lib/pages/detail/friends_bar.dart | 70 +++++++++++++------------- lib/pages/detail/no_score_message.dart | 13 ++--- 3 files changed, 43 insertions(+), 48 deletions(-) diff --git a/lib/pages/detail/detail_content.dart b/lib/pages/detail/detail_content.dart index 7ec6ef7..adceb4a 100644 --- a/lib/pages/detail/detail_content.dart +++ b/lib/pages/detail/detail_content.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:pola_flutter/models/company.dart'; import 'package:pola_flutter/models/search_result.dart'; -import 'package:pola_flutter/i18n/strings.g.dart'; import 'package:pola_flutter/theme/assets.gen.dart'; import 'package:pola_flutter/theme/colors.dart'; import 'package:pola_flutter/theme/fonts.gen.dart'; @@ -27,8 +26,6 @@ class DetailContent extends StatelessWidget { } final company = searchResult.companies!.first; - (company.plCapital ?? 0).toDouble(); - Translations.of(context); final hasLogo = company.logotypeUrl != null; final hasDescription = company.description?.isNotEmpty ?? false; @@ -37,7 +34,6 @@ class DetailContent extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ if ((company.isFriend ?? false)) FriendsBar(), - const SizedBox(height: 20.0), Padding( padding: const EdgeInsets.symmetric(horizontal: 17.0), child: Column( @@ -181,10 +177,10 @@ class _ScoreSection extends StatelessWidget { Widget build(BuildContext context) { final scoreData = company._scoreData(); - if (scoreData != null) { + if (scoreData != null) { return CompanyScoreWidget(data: scoreData); } else { - return NoScoreMessage(); + return NoScoreMessage(); } } } diff --git a/lib/pages/detail/friends_bar.dart b/lib/pages/detail/friends_bar.dart index 4814668..8b4994d 100644 --- a/lib/pages/detail/friends_bar.dart +++ b/lib/pages/detail/friends_bar.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; - import 'package:pola_flutter/theme/assets.gen.dart'; +import 'package:pola_flutter/theme/assets.gen.dart'; import 'package:pola_flutter/theme/colors.dart'; import 'package:pola_flutter/theme/fonts.gen.dart'; import 'package:pola_flutter/theme/text_size.dart'; @@ -10,46 +10,44 @@ class FriendsBar extends StatelessWidget { @override Widget build(BuildContext context) { final Translations t = Translations.of(context); - - return GestureDetector( - onTap: () { - showWebViewDialog( - context: context, - url: "https://www.pola-app.pl/m/friends", - title: t.companyScreen.polaFriends - ); - }, - child: Container( - height: 40.0, - color: AppColors.buttonBackground, - alignment: Alignment.center, - child: Row( - children: [ - Padding( - padding: const EdgeInsets.only(left: 19.0), - child: Assets.company.heart.svg() - ), - Expanded( - child: Center( - child: Text( - t.companyScreen.companyFriend, - style: TextStyle( + return Padding( + padding: const EdgeInsets.only(bottom: 20.0), + child: GestureDetector( + onTap: () { + showWebViewDialog( + context: context, + url: "https://www.pola-app.pl/m/friends", + title: t.companyScreen.polaFriends); + }, + child: Container( + height: 40.0, + color: AppColors.buttonBackground, + alignment: Alignment.center, + child: Row( + children: [ + Padding( + padding: const EdgeInsets.only(left: 19.0), + child: Assets.company.heart.svg()), + Expanded( + child: Center( + child: Text( + t.companyScreen.companyFriend, + style: TextStyle( fontSize: TextSize.smallTitle, fontWeight: FontWeight.w700, fontFamily: FontFamily.lato, - color:AppColors.defaultRed, + color: AppColors.defaultRed, + ), + textAlign: TextAlign.center, + ), ), - textAlign: TextAlign.center, ), - ), - ), - Padding( - padding: const EdgeInsets.only(right: 19.0), - child: Assets.company.heart.svg() + Padding( + padding: const EdgeInsets.only(right: 19.0), + child: Assets.company.heart.svg()), + ], ), - ], - ), - ), - ); + ), + )); } } diff --git a/lib/pages/detail/no_score_message.dart b/lib/pages/detail/no_score_message.dart index 3e5395b..b62eea0 100644 --- a/lib/pages/detail/no_score_message.dart +++ b/lib/pages/detail/no_score_message.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; import 'package:pola_flutter/theme/assets.gen.dart'; import 'package:pola_flutter/theme/colors.dart'; import 'package:pola_flutter/theme/fonts.gen.dart'; @@ -6,18 +7,17 @@ import 'package:pola_flutter/theme/text_size.dart'; import 'package:pola_flutter/i18n/strings.g.dart'; class NoScoreMessage extends StatelessWidget { - - @override Widget build(BuildContext context) { - final Translations t = Translations.of(context); + final Translations t = Translations.of(context); return Padding( - padding: const EdgeInsets.symmetric(vertical: 22.0), + padding: const EdgeInsets.only(bottom: 22.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Center( - child: Assets.company.unpublished.svg(height: 109.42, width: 109.55), + child: + Assets.company.unpublished.svg(height: 109.42, width: 109.55), ), const SizedBox(height: 26.0), Text( @@ -30,6 +30,7 @@ class NoScoreMessage extends StatelessWidget { ), textAlign: TextAlign.left, ), + SizedBox(height: 16), Text( t.companyScreen.thankYou, style: TextStyle( @@ -44,4 +45,4 @@ class NoScoreMessage extends StatelessWidget { ), ); } -} \ No newline at end of file +}