@@ -16,46 +16,77 @@ class _HomeState extends State<Home> {
1616
1717 @override
1818 Component build (BuildContext context) {
19+ final textareaStyle = Styles (
20+ width: Unit .percent (100 ),
21+ height: Unit .pixels (300 ),
22+ padding: Spacing .all (Unit .pixels (16 )),
23+ boxSizing: BoxSizing .borderBox,
24+ border: Border .all (color: Color ('#d1d5db' )),
25+ radius: BorderRadius .circular (Unit .pixels (25 )),
26+ outline: Outline .unset,
27+ // fontFamily: FontFamily.monospace,
28+ shadow: BoxShadow (
29+ color: Color .rgba (0 , 0 , 0 , 0.05 ),
30+ blur: Unit .pixels (2 ),
31+ offsetX: Unit .zero,
32+ offsetY: Unit .pixels (1 ),
33+ ),
34+ // resize: Resize.none,
35+ fontSize: Unit .rem (1 ),
36+ backgroundColor: Colors .white,
37+ raw: {
38+ 'resize' : 'none' ,
39+ },
40+ );
41+
42+ final sectionStyle = Styles (
43+ display: Display .flex,
44+ // flexBasis: FlexBasis(Unit.pixels(400)),
45+ flexDirection: FlexDirection .column,
46+ gap: Gap .all (Unit .pixels (12 )),
47+ flex: Flex .grow (1 ),
48+ );
49+
50+ final labelStyle = Styles (
51+ margin: Spacing .zero,
52+ color: Color ('#374151' ),
53+ fontSize: Unit .rem (1.125 ),
54+ fontWeight: FontWeight .w600,
55+ );
56+
1957 return div (
2058 styles: Styles (
2159 display: Display .flex,
22- padding: Spacing .all (Unit .pixels (20 )),
23- flexDirection: FlexDirection .row,
24- alignItems: AlignItems .start,
25- gap: Gap (row: Unit .pixels (60 ), column: Unit .pixels (60 )),
60+ width: Unit .percent (100 ),
61+ flexWrap: FlexWrap .wrap,
62+ gap: Gap .all (Unit .pixels (32 )),
2663 ),
2764 [
28- div (styles: Styles (flex : Flex . basis ( Unit . percent ( 50 ))) , [
29- h3 ([.text ('Input' )]),
65+ div (styles: sectionStyle , [
66+ h3 (styles : labelStyle, [.text ('Input' )]),
3067 textarea (
3168 placeholder: 'Type your text here...' ,
3269 onInput: (text) => setState (() => _text = text),
3370 rows: 15 ,
3471 required : true ,
3572 spellCheck: SpellCheck .isFalse,
36- styles: Styles (
37- width: Unit .percent (100 ),
38- height: Unit .percent (100 ),
39- flex: Flex .grow (1 ),
40- raw: {'resize' : 'none' },
41- ),
73+ styles: textareaStyle,
4274 [.text (_text)],
4375 ),
4476 ]),
45- div (styles: Styles (flex : Flex . basis ( Unit . percent ( 50 ))) , [
46- h3 (styles: Styles (textAlign : TextAlign .left) , [.text ('Output' )]),
77+ div (styles: sectionStyle , [
78+ h3 (styles: labelStyle , [.text ('Output' )]),
4779 textarea (
4880 placeholder: 'Type your text here...' ,
49- onInput: (text) => setState (() => _text = text),
81+ // onInput: (text) => setState(() => _text = text), // Readonly, no input needed
5082 rows: 15 ,
5183 readonly: true ,
52- required : true ,
5384 spellCheck: SpellCheck .isFalse,
54- styles: Styles (
55- width : Unit . percent ( 100 ),
56- height : Unit . percent ( 100 ),
57- flex : Flex . grow ( 1 ),
58- raw : { 'resize' : 'none' } ,
85+ styles: textareaStyle. combine (
86+ Styles (
87+ color : Color ( '#4b5563' ),
88+ backgroundColor : Color ( '#f9fafb' ),
89+ ) ,
5990 ),
6091 [.text (_romanized)],
6192 ),
0 commit comments