Я хочу создать этот тип шата в Flutter
До настоящего времени я попробовал этот два пути
Widget get stepper =>
Container(
padding: EdgeInsets.all(15),
color: Colors.white,
child: ListView.builder(
itemCount: stepperLIst.length,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, position) {
return IntrinsicHeight(
child: Container(
margin: const EdgeInsets.only(bottom: 20),
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisSize: MainAxisSize.min,
children: [
Column(
mainAxisSize: MainAxisSize.min,
verticalDirection: VerticalDirection.down,
children: [
Image.asset(stepperLIst[position].iconName),
SizedBox(height: 10),
CustomPaint(painter: LineDashedPainter(lineColor: Colors.grey))
],
),
SizedBox(width: 10),
Expanded(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
stepperLIst[position].tittle,
style: BaseStyles.textStyle.copyWith(fontFamily: BaseFonts.bold),
),
SizedBox(height: 10),
Text(
stepperLIst[position].value,
style: BaseStyles.textStyle,
)
],
),
)
]),
),
);
}));
< /code>
, а также использование стека < /p>
Widget get stepper2 =>
Container(
padding: EdgeInsets.all(15),
color: Colors.white,
child: ListView.builder(
itemCount: stepperLIst.length,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, position) {
return Stack(
children: [
Positioned(
left: 0,
top: 0,
bottom: 0,
child: Column(
mainAxisSize: MainAxisSize.min,
verticalDirection: VerticalDirection.down,
children: [
Image.asset(stepperLIst[position].iconName),
SizedBox(height: 10),
CustomPaint(painter: LineDashedPainter(lineColor: Colors.grey))
],
), // replace with your image
),
Padding(
padding: const EdgeInsets.only(left: 40),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
stepperLIst[position].tittle,
style: BaseStyles.textStyle.copyWith(fontFamily: BaseFonts.bold),
),
SizedBox(height: 10),
Text(
stepperLIst[position].value,
style: BaseStyles.textStyle,
)
],
),
)
],
);
}));
< /code>
Использование выше кода У меня нет точного вывода < /p>
Кто -нибудь может помочь мне создать этот тип Stepper < /p>
, если вам нужно больше информации, пожалуйста, дайте мне знать. Заранее спасибо. Ваши усилия будут оценены.
Подробнее здесь: https://stackoverflow.com/questions/646 ... in-flutter
Как создать пользовательский шаг в Flutter? ⇐ IOS
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение