We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ConstraintLayout( children: [ Guideline( id: guideline, horizontal: true, guidelinePercent: 0.5), Text( 'aaa', style: TextStyle( color: llmType > 0 ? AppColors.textLGray : AppColors.textWhite, fontSize: 16), textDirection: TextDirection.ltr, ).applyConstraint( left: parent.left, centerVerticalTo: sId(1)), Switch( value: llmType > 0, onChanged: (value) { setState(() { value ? llmType = 1 : llmType = 0; }); }) .applyConstraint( left: sId(-1).right, bottom: parent.bottom), Text( 'bbb', style: TextStyle( color: llmType > 0 ? AppColors.textWhite : AppColors.textLGray, fontSize: 16), textDirection: TextDirection.ltr, ).applyConstraint( left: sId(-1).right, centerVerticalTo: sId(-1)), ], ) 这个好像不起作用,第一个(aaa)元素和第三个(bbb)元素高度较小,但是三个元素要求水平居中对齐,所以aaa和bbb都要要相对较大的中间元素Switch看齐(对齐)。现在这样写好像不起作用,aaa没法后一个元素Switch对齐
The text was updated successfully, but these errors were encountered:
No branches or pull requests
ConstraintLayout(
children: [
Guideline(
id: guideline,
horizontal: true,
guidelinePercent: 0.5),
Text(
'aaa',
style: TextStyle(
color: llmType > 0
? AppColors.textLGray
: AppColors.textWhite,
fontSize: 16),
textDirection: TextDirection.ltr,
).applyConstraint(
left: parent.left, centerVerticalTo: sId(1)),
Switch(
value: llmType > 0,
onChanged: (value) {
setState(() {
value ? llmType = 1 : llmType = 0;
});
})
.applyConstraint(
left: sId(-1).right, bottom: parent.bottom),
Text(
'bbb',
style: TextStyle(
color: llmType > 0
? AppColors.textWhite
: AppColors.textLGray,
fontSize: 16),
textDirection: TextDirection.ltr,
).applyConstraint(
left: sId(-1).right, centerVerticalTo: sId(-1)),
],
) 这个好像不起作用,第一个(aaa)元素和第三个(bbb)元素高度较小,但是三个元素要求水平居中对齐,所以aaa和bbb都要要相对较大的中间元素Switch看齐(对齐)。现在这样写好像不起作用,aaa没法后一个元素Switch对齐
The text was updated successfully, but these errors were encountered: