Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Id-Care
Idcare-frontend-mobile
Commits
0bd5b53f
Unverified
Commit
0bd5b53f
authored
3 years ago
by
guidraghetti
Browse files
Options
Download
Email Patches
Plain Diff
Overflow correct
parent
0351c30c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/views/app/home/home_opportunity_cell.dart
+11
-6
lib/views/app/home/home_opportunity_cell.dart
with
11 additions
and
6 deletions
+11
-6
lib/views/app/home/home_opportunity_cell.dart
View file @
0bd5b53f
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/widgets.dart'
;
import
'package:project_id_care/model/entity/opportunity.dart'
;
import
'package:project_id_care/resources/application.dart'
;
...
...
@@ -14,6 +15,13 @@ class HomeOpportunityCell extends StatefulWidget {
}
class
_HomeOpportunityCellState
extends
State
<
HomeOpportunityCell
>
{
String
combatOverflow
(
String
text
)
{
if
(
text
.
length
>
30
)
{
return
text
.
substring
(
0
,
30
)
+
'...'
;
}
else
{
return
text
;
}
}
Widget
getImage
()
{
if
(
widget
.
opportunity
.
imageUrl
.
isNotEmpty
)
{
return
Container
(
...
...
@@ -62,7 +70,7 @@ class _HomeOpportunityCellState extends State<HomeOpportunityCell> {
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
<
Widget
>[
Text
(
widget
.
opportunity
.
title
,
combatOverflow
(
widget
.
opportunity
.
title
)
,
style:
const
TextStyle
(
fontWeight:
FontWeight
.
w700
,
fontSize:
24
,
...
...
@@ -71,10 +79,7 @@ class _HomeOpportunityCellState extends State<HomeOpportunityCell> {
),
const
SizedBox
(
height:
3
),
Text
(
widget
.
opportunity
.
description
,
overflow:
TextOverflow
.
fade
,
maxLines:
1
,
softWrap:
false
,
combatOverflow
(
widget
.
opportunity
.
description
),
style:
const
TextStyle
(
fontWeight:
FontWeight
.
w400
,
fontSize:
18
,
...
...
@@ -83,7 +88,7 @@ class _HomeOpportunityCellState extends State<HomeOpportunityCell> {
),
const
SizedBox
(
height:
3
),
Text
(
widget
.
opportunity
.
jobType
,
combatOverflow
(
widget
.
opportunity
.
jobType
)
,
style:
const
TextStyle
(
fontWeight:
FontWeight
.
w700
,
fontSize:
18
,
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help