-
-
Notifications
You must be signed in to change notification settings - Fork 88
Upstream/2023 48 fix UI #102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tajjacob
wants to merge
6
commits into
apgapg:master
Choose a base branch
from
tajjacob:upstream/2023-48-fix-ui
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c5a9433
π ui: fix legend label overflow issue in LegendPosition left and right
tajjacob 10a1d37
π ui: fix legend label text lines in Legend
tajjacob 2d54419
β¨ parameter: add legendWidth parameter in LegendOptions
tajjacob f20337a
π fix: legendWidth parameter in legend.dart
tajjacob 7692bf9
π ui: add separator in chartValue
tajjacob a6e48cd
β¬οΈ plugin: downgrade intl to 0.18.1 due to conflict with other plugin
tajjacob File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,3 +1,4 @@ | ||
| org.gradle.jvmargs=-Xmx1536M | ||
| android.useAndroidX=true | ||
| android.enableJetifier=true | ||
| android.enableR8=true |
This file contains hidden or 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 hidden or 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
2 changes: 1 addition & 1 deletion
2
example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,49 +1,64 @@ | ||
| import 'package:flutter/material.dart'; | ||
|
|
||
| import '../pie_chart.dart'; | ||
|
|
||
| class Legend extends StatelessWidget { | ||
| const Legend({ | ||
| required this.title, | ||
| required this.color, | ||
| required this.style, | ||
| required this.legendShape, | ||
| required this.position, | ||
| this.width, | ||
| Key? key, | ||
| }) : super(key: key); | ||
|
|
||
| final String title; | ||
| final Color color; | ||
| final TextStyle style; | ||
| final BoxShape legendShape; | ||
| final LegendPosition position; | ||
| final double? width; | ||
|
|
||
| @override | ||
| Widget build(BuildContext context) { | ||
| return Row( | ||
| mainAxisAlignment: MainAxisAlignment.start, | ||
| mainAxisSize: MainAxisSize.min, | ||
| children: <Widget>[ | ||
| Container( | ||
| margin: const EdgeInsets.symmetric(vertical: 2.0), | ||
| height: 20.0, | ||
| width: 18.0, | ||
| decoration: BoxDecoration( | ||
| shape: legendShape, | ||
| color: color, | ||
| double sw = MediaQuery.of(context).size.width; | ||
| return SizedBox( | ||
| width: (width != null) | ||
| ? width | ||
| : ((position == LegendPosition.right || | ||
| position == LegendPosition.left) | ||
| ? sw * 0.5 | ||
| : sw), | ||
| child: Row( | ||
| mainAxisAlignment: MainAxisAlignment.start, | ||
| mainAxisSize: MainAxisSize.min, | ||
| children: <Widget>[ | ||
| Container( | ||
| margin: const EdgeInsets.symmetric(vertical: 2.0), | ||
| height: 20.0, | ||
| width: 18.0, | ||
| decoration: BoxDecoration( | ||
| shape: legendShape, | ||
| color: color, | ||
| ), | ||
| ), | ||
| const SizedBox( | ||
| width: 8.0, | ||
| ), | ||
| Flexible( | ||
| fit: FlexFit.loose, | ||
| child: Text( | ||
| title, | ||
| style: style, | ||
| softWrap: true, | ||
| ), | ||
| ), | ||
| ), | ||
| const SizedBox( | ||
| width: 8.0, | ||
| ), | ||
| Flexible( | ||
| fit: FlexFit.loose, | ||
| child: Text( | ||
| title, | ||
| style: style, | ||
| softWrap: true, | ||
| const SizedBox( | ||
| width: 8.0, | ||
| ), | ||
| ), | ||
| const SizedBox( | ||
| width: 8.0, | ||
| ), | ||
| ], | ||
| ], | ||
| ), | ||
| ); | ||
| } | ||
| } |
This file contains hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure we need to hardcode here?
@singhtaranjeet any insights?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it's fine to have it as hardcoded and it totally depends upon the requirements of the project but do we actually need to set it at 28 which is android 9?
Default of flutter 3.16 minSdkVersion is 19.
And Default of previous flutter version was android 16.
IMO we can go with flutter default as of now but in future if project requires then we can make the values hardcoded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tajjacob any specific reason we changed this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@apgapg this one for my project. I can change it to default back