Skip to content

Commit

Permalink
fixes review
Browse files Browse the repository at this point in the history
  • Loading branch information
karolgeneral committed Oct 1, 2024
1 parent d7e78ff commit 1da2f5a
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 48 deletions.
8 changes: 2 additions & 6 deletions lib/pages/detail/detail_content.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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;
Expand All @@ -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(
Expand Down Expand Up @@ -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();
}
}
}
70 changes: 34 additions & 36 deletions lib/pages/detail/friends_bar.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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()),
],
),
],
),
),
);
),
));
}
}
13 changes: 7 additions & 6 deletions lib/pages/detail/no_score_message.dart
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
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';
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(
Expand All @@ -30,6 +30,7 @@ class NoScoreMessage extends StatelessWidget {
),
textAlign: TextAlign.left,
),
SizedBox(height: 16),
Text(
t.companyScreen.thankYou,
style: TextStyle(
Expand All @@ -44,4 +45,4 @@ class NoScoreMessage extends StatelessWidget {
),
);
}
}
}

0 comments on commit 1da2f5a

Please sign in to comment.