-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed a bit of the layout, added ellipsis as per #1
- Loading branch information
1 parent
837b104
commit 10ef4b0
Showing
4 changed files
with
58 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class Dividend { | ||
|
||
final String _fantasyName; | ||
final String _ticker; | ||
final String _type; | ||
final String _date; | ||
final String currency; | ||
final String _netIncome; | ||
final int _netIncome; | ||
|
||
final Map<String, IconData> _assetTypeIcons= { | ||
final Map<String, IconData> _assetTypeIcons = { | ||
"share": Icons.library_books, | ||
"reit": Icons.location_city | ||
}; | ||
|
||
Dividend(this._fantasyName, this._ticker, this._type, this._date, this._netIncome, {this.currency="R\$"}); | ||
Dividend( | ||
this._fantasyName, this._ticker, this._type, this._date, this._netIncome, | ||
{this.currency = "R\$"}); | ||
|
||
String get name => _fantasyName + " (" + _ticker + ")"; | ||
String get name => _fantasyName; | ||
String get ticker => _ticker; | ||
IconData get icon => _assetTypeIcons[this._type]; | ||
String get date => _date; | ||
String get income => "$currency$_netIncome"; | ||
} | ||
String get income => "$currency${(_netIncome/100.0).toStringAsFixed(2)}"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters