Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
fluttertpc_get
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
kauemurakami
2021-04-16 20:52:36 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
617372605043d51634f4079c710f918bc3330c25
61737260
1 parent
8e2162ed
feat: extensions methods convert value in percent value
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
lib/src/responsive/size_percent_extension.dart
lib/src/responsive/size_percent_extension.dart
0 → 100644
View file @
6173726
import
'../get_main.dart'
;
//Converts a double value to a percentage
extension
PercentSized
on
double
{
// height: 50.0.hp = 50%
double
get
hp
=>
(
Get
.
height
*
(
this
/
100
));
// width: 30.0.hp = 30%
double
get
wp
=>
(
Get
.
width
*
(
this
/
100
));
}
...
...
Please
register
or
login
to post a comment