我设法使用图像选择器从图库中选择了图像,如下所示
/*================ Collapsible trigger ================*/
.collapsible-trigger-btn {
text-align: left !important;
@include baseTextCenter;
@include accentFontStack;
@include accentFontSmallSize;
padding-left: 0px !important;
display: block;
width: 100%;
padding: ($gutter / 1.75) 0;
@include media-query($small) {
padding: ($gutter / 2) 0;
}
}
.collapsible-trigger-btn--borders {
border: 1px solid $colorBorder;
border-top: 0;
border-right: 0;
border-left: 0;
padding: 12px;
border-color: #343434 !important;
padding-bottom: 0px !important;
font-size: 13px;
letter-spacing: normal;
font-weight: 600;
@include media-query($small) {
font-size: 12px;
}
.collapsible-trigger__icon {
right: 12px;
}
@include media-query($medium-up) {
padding: 15px;
.collapsible-trigger__icon {
right: 15px;
}
}
.collapsible-content+& {
margin-top: -1px;
}
+.collapsible-content .collapsible-content__inner {
@include baseExtraSmallFontStack;
border: 0px solid $colorBorder;
border-top: 0;
padding: 15px 0px 10px 0px;
@include media-query($medium-up) {
@include baseSmallFontStack;
font-size: 13px;
line-height: 1.5;
}
@include media-query($small) {
font-size: 12px;
line-height: 1.5;
}
}
+.collapsible-content--expanded {
margin-bottom: $gutter;
&:last-child {
margin-bottom: -1px;
}
}
}
.collapsible-trigger-btn--borders-top {
border-top: 1px solid $colorBorder;
}
<button type="button" class="label collapsible-trigger collapsible-trigger-btn collapsible-trigger-btn--borders collapsible--auto-height" aria-controls="content" aria-expanded="true">
TITLE 2 <span class="collapsible-trigger__icon collapsible-trigger__icon--open" role="presentation">
<svg aria-hidden="true" focusable="false" role="presentation" class="icon icon--wide icon-chevron-down" viewBox="0 0 28 16">
<path d="M1.57 1.59l12.76 12.77L27.1 1.59" stroke-width="2" stroke="#000" fill="none" fill-rule="evenodd"></path>
</svg>
</span>
</button>
<div id="content2" class="collapsible-content collapsible-content--all is-open" style="height: auto;">
<div class="collapsible-content__inner rte">
hello 2
</div>
</div>
<button type="button" class="label collapsible-trigger collapsible-trigger-btn collapsible-trigger-btn--borders" aria-controls="content" aria-expanded="true">
TITLE 3 <span class="collapsible-trigger__icon collapsible-trigger__icon--open" role="presentation">
<svg aria-hidden="true" focusable="false" role="presentation" class="icon icon--wide icon-chevron-down" viewBox="0 0 28 16">
<path d="M1.57 1.59l12.76 12.77L27.1 1.59" stroke-width="2" stroke="#000" fill="none" fill-rule="evenodd"></path>
</svg>
</span>
</button>
<div id="content3" class="collapsible-content collapsible-content--all is-open" style="height: auto;">
<div class="collapsible-content__inner rte">
hello 3
</div>
</div>
试图对其进行多次调试,但未显示任何错误或问题,但图像裁剪活动保持黑色(没有)从图像选择器中选择的图像。
请帮助
答案 0 :(得分:1)
只需在Image_Picker中添加maxHeight和maxWidth
File _originalImage = await ImagePicker.pickImage(source: ImageSource.camera,
imageQuality: 20,
maxHeight: 500,maxWidth: 500);