-
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.
Merge pull request #11 from Open-Source-Agriculture/autoSize
Auto size
- Loading branch information
Showing
8 changed files
with
153 additions
and
93 deletions.
There are no files selected for viewing
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
// Note: Text Styles are also held in this file | ||
|
||
Size displaySize(BuildContext context) { | ||
//debugPrint('Size = ' + MediaQuery.of(context).size.toString()); | ||
return MediaQuery.of(context).size; | ||
} | ||
|
||
double displayHeight(BuildContext context) { | ||
//debugPrint('Height = ' + displaySize(context).height.toString()); | ||
return displaySize(context).height; | ||
} | ||
|
||
double displayWidth(BuildContext context) { | ||
//debugPrint('Width = ' + displaySize(context).width.toString()); | ||
return displaySize(context).width; | ||
} | ||
|
||
bodyTextStyle(context) { | ||
return TextStyle( | ||
fontFamily: 'Roboto', | ||
fontWeight: FontWeight.w300, | ||
fontSize: displayWidth(context) * 0.04, | ||
); | ||
} | ||
|
||
headingTextStyle(context) { | ||
return TextStyle( | ||
fontFamily: 'Roboto', | ||
fontWeight: FontWeight.w400, | ||
fontSize: displayWidth(context) * 0.06, | ||
); | ||
} | ||
|
||
creditsButtonTextStyle(context) { | ||
return TextStyle( | ||
fontFamily: 'Roboto', | ||
fontWeight: FontWeight.w300, | ||
fontSize: displayWidth(context) * 0.06, | ||
); | ||
} | ||
|
||
textureButtonTextStyle(context) { | ||
return TextStyle( | ||
fontFamily: 'Roboto', | ||
fontWeight: FontWeight.w300, | ||
fontSize: displayWidth(context) * 0.035, | ||
); | ||
} | ||
|
||
|
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
Oops, something went wrong.