var text1 = "本小区数据"\nvar text2 = "20"\nvar text3 = "8"\nvar text4 = "相似户型"\nvar text5 = "16"\nvar text6 = "同面积"\nvar DEFAULT_IMG_URL = "https://pic3.zhimg.com/v2-77bbb941f260b90f0193ef73d3f2b9e4_1440w.jpg?source=172ae18b"\nvar img1 = DEFAULT_IMG_URL\n\nRow(Modifier.clipToBounds().width(120.0.dp)) {\n Row(Modifier.clipToBounds().fillMaxWidth()) {\n Column(Modifier.clip(RoundedCornerShape(6.0.dp)).background(Brush.linearGradient(colors = listOf(Color(0xFFFFFBF0),Color(0xFFFFF9E5)),start = Offset(0.99999999999999289f * 100, 0.5f * 100),end = Offset(0f * 100, 0.50000000000000011f * 100))).fillMaxWidth()) {\n Text(text = text1, fontWeight = FontWeight.Bold, color = Color(0xff111111), fontSize = 12.sp, modifier = Modifier.padding(12.0.dp, 16.0.dp, 0.0.dp, 0.0.dp))\n Row(Modifier.padding(19.0.dp, 16.0.dp, 19.0.dp, 0.0.dp).clipToBounds()) {\n Text(text = text2, color = Color(0xff111111), fontSize = 20.sp, modifier = Modifier.padding(0.0.dp, 0.0.dp, 0.0.dp, 17.0.dp))\n Column(Modifier.padding(21.0.dp, 0.0.dp, 0.0.dp, 0.0.dp).clipToBounds()) {\n Text(text = text3, color = Color(0xff111111), fontSize = 20.sp, modifier = Modifier.padding(24.0.dp, 0.0.dp, 0.0.dp, 0.0.dp))\n Text(text = text4, color = Color(0xff888888), fontSize = 12.sp, modifier = Modifier.padding(0.0.dp, 1.0.dp, 0.0.dp, 0.0.dp))\n }\n }\n Row(Modifier.padding(0.0.dp, 12.5.dp, 0.1.dp, 0.0.dp).clipToBounds()) {\n Column(Modifier.padding(0.0.dp, 3.5.dp, 0.0.dp, 19.0.dp).clipToBounds()) {\n Text(text = text5, color = Color(0xff111111), fontSize = 20.sp, modifier = Modifier.padding(19.0.dp, 0.0.dp, 21.0.dp, 0.0.dp))\n Text(text = text6, color = Color(0xff888888), fontSize = 12.sp, modifier = Modifier.padding(0.0.dp, 1.0.dp, 0.0.dp, 0.0.dp))\n }\n Image(painter = rememberCoilPainter(img1), contentDescription = ",", Modifier.padding(3.0.dp, 0.0.dp, 0.0.dp, 0.0.dp).background(Brush.linearGradient(colors = listOf(Color(0xFFFEDAD4),Color(0xFFFFE177)),start = Offset(0.77356971018076592f * 100, 0.12638869543813769f * 100),end = Offset(0.070520778742192647f * 100, 0.8676939072061387f * 100))).width(56.7.dp).height(63.5.dp), contentScale = ContentScale.Crop)\n }\n }\n }\n}\n翻译成Flutter内容:import 'package:flutter/material.dart';\n\nclass YourWidget extends StatelessWidget {\n final String text1 = "本小区数据";\n final String text2 = "20";\n final String text3 = "8";\n final String text4 = "相似户型";\n final String text5 = "16";\n final String text6 = "同面积";\n final String DEFAULT_IMG_URL =\n "https://pic3.zhimg.com/v2-77bbb941f260b90f0193ef73d3f2b9e4_1440w.jpg?source=172ae18b";\n final String img1 = DEFAULT_IMG_URL;\n\n @override\n Widget build(BuildContext context) {\n return Row(\n children: [\n Expanded(\n child: Container(\n width: 120.0,\n child: Column(\n crossAxisAlignment: CrossAxisAlignment.start,\n children: [\n Padding(\n padding: EdgeInsets.fromLTRB(12.0, 16.0, 0.0, 0.0),\n child: Text(\n text1,\n style: TextStyle(\n fontWeight: FontWeight.bold,\n color: Color(0xff111111),\n fontSize: 12.0,\n ),\n ),\n ),\n Padding(\n padding: EdgeInsets.fromLTRB(19.0, 16.0, 19.0, 0.0),\n child: Row(\n children: [\n Text(\n text2,\n style: TextStyle(\n color: Color(0xff111111),\n fontSize: 20.0,\n ),\n ),\n SizedBox(width: 21.0),\n Column(\n crossAxisAlignment: CrossAxisAlignment.start,\n children: [\n Text(\n text3,\n style: TextStyle(\n color: Color(0xff111111),\n fontSize: 20.0,\n ),\n ),\n Text(\n text4,\n style: TextStyle(\n color: Color(0xff888888),\n fontSize: 12.0,\n ),\n ),\n ],\n ),\n ],\n ),\n ),\n Padding(\n padding: EdgeInsets.fromLTRB(0.0, 12.5, 0.1, 0.0),\n child: Row(\n children: [\n Column(\n crossAxisAlignment: CrossAxisAlignment.start,\n children: [\n Text(\n text5,\n style: TextStyle(\n color: Color(0xff111111),\n fontSize: 20.0,\n ),\n ),\n Text(\n text6,\n style: TextStyle(\n color: Color(0xff888888),\n fontSize: 12.0,\n ),\n ),\n ],\n ),\n SizedBox(width: 3.0),\n Container(\n width: 56.7,\n height: 63.5,\n decoration: BoxDecoration(\n gradient: LinearGradient(\n colors: [\n Color(0xFFFEDAD4),\n Color(0xFFFFE177),\n ],\n begin: Alignment(0.77356971018076592, 0.12638869543813769),\n end: Alignment(0.070520778742192647, 0.8676939072061387),\n ),\n ),\n child: Image.network(\n img1,\n fit: BoxFit.cover,\n ),\n ),\n ],\n ),\n ),\n ],\n ),\n ),\n ),\n ],\n );\n }\n}\n

本小区数据 - 20套相似户型,8套同面积

原文地址: https://www.cveoy.top/t/topic/m6Pc 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录