Skip to content

Commit 1cfe85b

Browse files
committed
chore: dart format
1 parent 969e8e5 commit 1cfe85b

2 files changed

Lines changed: 99 additions & 103 deletions

File tree

lib/pages/exchange_view/edit_trade_note_view.dart

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ class _EditNoteViewState extends ConsumerState<EditTradeNoteView> {
6262
child: Scaffold(
6363
backgroundColor: Theme.of(context).extension<StackColors>()!.background,
6464
appBar: AppBar(
65-
backgroundColor:
66-
Theme.of(context).extension<StackColors>()!.background,
65+
backgroundColor: Theme.of(
66+
context,
67+
).extension<StackColors>()!.background,
6768
leading: AppBarBackButton(
6869
onPressed: () async {
6970
if (FocusScope.of(context).hasFocus) {
@@ -102,8 +103,9 @@ class _EditNoteViewState extends ConsumerState<EditTradeNoteView> {
102103
),
103104
child: TextField(
104105
autocorrect: Util.isDesktop ? false : true,
105-
enableSuggestions:
106-
Util.isDesktop ? false : true,
106+
enableSuggestions: Util.isDesktop
107+
? false
108+
: true,
107109
minLines: 3,
108110
maxLines: 6,
109111
keyboardType: TextInputType.multiline,
@@ -112,35 +114,36 @@ class _EditNoteViewState extends ConsumerState<EditTradeNoteView> {
112114
style: STextStyles.field(context),
113115
focusNode: noteFieldFocusNode,
114116
onChanged: (_) => setState(() {}),
115-
decoration: standardInputDecoration(
116-
"Note",
117-
noteFieldFocusNode,
118-
context,
119-
).copyWith(
120-
suffixIcon:
121-
_noteController.text.isNotEmpty
117+
decoration:
118+
standardInputDecoration(
119+
"Note",
120+
noteFieldFocusNode,
121+
context,
122+
).copyWith(
123+
suffixIcon:
124+
_noteController.text.isNotEmpty
122125
? Padding(
123-
padding: const EdgeInsets.only(
124-
right: 0,
125-
),
126-
child: UnconstrainedBox(
127-
child: Row(
128-
children: [
129-
TextFieldIconButton(
130-
child: const XIcon(),
131-
onTap: () async {
132-
setState(() {
133-
_noteController.text =
134-
"";
135-
});
136-
},
137-
),
138-
],
126+
padding: const EdgeInsets.only(
127+
right: 0,
139128
),
140-
),
141-
)
129+
child: UnconstrainedBox(
130+
child: Row(
131+
children: [
132+
TextFieldIconButton(
133+
child: const XIcon(),
134+
onTap: () async {
135+
setState(() {
136+
_noteController.text =
137+
"";
138+
});
139+
},
140+
),
141+
],
142+
),
143+
),
144+
)
142145
: null,
143-
),
146+
),
144147
),
145148
),
146149
const Spacer(),

lib/pages/wallet_view/transaction_views/edit_note_view.dart

Lines changed: 66 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -71,34 +71,33 @@ class _EditNoteViewState extends ConsumerState<EditNoteView> {
7171
condition: !isDesktop,
7272
builder: (child) => Background(child: child),
7373
child: Scaffold(
74-
backgroundColor:
75-
isDesktop
76-
? Colors.transparent
77-
: Theme.of(context).extension<StackColors>()!.background,
78-
appBar:
79-
isDesktop
80-
? null
81-
: AppBar(
82-
backgroundColor:
83-
Theme.of(context).extension<StackColors>()!.background,
84-
leading: AppBarBackButton(
85-
onPressed: () async {
86-
if (FocusScope.of(context).hasFocus) {
87-
FocusScope.of(context).unfocus();
88-
await Future<void>.delayed(
89-
const Duration(milliseconds: 75),
90-
);
91-
}
92-
if (mounted) {
93-
Navigator.of(context).pop();
94-
}
95-
},
96-
),
97-
title: Text(
98-
"Edit note",
99-
style: STextStyles.navBarTitle(context),
100-
),
74+
backgroundColor: isDesktop
75+
? Colors.transparent
76+
: Theme.of(context).extension<StackColors>()!.background,
77+
appBar: isDesktop
78+
? null
79+
: AppBar(
80+
backgroundColor: Theme.of(
81+
context,
82+
).extension<StackColors>()!.background,
83+
leading: AppBarBackButton(
84+
onPressed: () async {
85+
if (FocusScope.of(context).hasFocus) {
86+
FocusScope.of(context).unfocus();
87+
await Future<void>.delayed(
88+
const Duration(milliseconds: 75),
89+
);
90+
}
91+
if (mounted) {
92+
Navigator.of(context).pop();
93+
}
94+
},
10195
),
96+
title: Text(
97+
"Edit note",
98+
style: STextStyles.navBarTitle(context),
99+
),
100+
),
102101
body: MobileEditNoteScaffold(
103102
child: Column(
104103
crossAxisAlignment: CrossAxisAlignment.stretch,
@@ -115,10 +114,9 @@ class _EditNoteViewState extends ConsumerState<EditNoteView> {
115114
),
116115
),
117116
Padding(
118-
padding:
119-
isDesktop
120-
? const EdgeInsets.symmetric(horizontal: 32)
121-
: const EdgeInsets.all(0),
117+
padding: isDesktop
118+
? const EdgeInsets.symmetric(horizontal: 32)
119+
: const EdgeInsets.all(0),
122120
child: ClipRRect(
123121
borderRadius: BorderRadius.circular(
124122
Constants.size.circularBorderRadius,
@@ -131,55 +129,50 @@ class _EditNoteViewState extends ConsumerState<EditNoteView> {
131129
keyboardType: TextInputType.multiline,
132130
textInputAction: TextInputAction.newline,
133131
controller: _noteController,
134-
style:
135-
isDesktop
136-
? STextStyles.desktopTextExtraSmall(
132+
style: isDesktop
133+
? STextStyles.desktopTextExtraSmall(context).copyWith(
134+
color: Theme.of(
137135
context,
138-
).copyWith(
139-
color:
140-
Theme.of(context)
141-
.extension<StackColors>()!
142-
.textFieldActiveText,
143-
height: 1.8,
144-
)
145-
: STextStyles.field(context),
136+
).extension<StackColors>()!.textFieldActiveText,
137+
height: 1.8,
138+
)
139+
: STextStyles.field(context),
146140
focusNode: noteFieldFocusNode,
147-
decoration: standardInputDecoration(
148-
"Note",
149-
noteFieldFocusNode,
150-
context,
151-
desktopMed: isDesktop,
152-
).copyWith(
153-
contentPadding:
154-
isDesktop
141+
decoration:
142+
standardInputDecoration(
143+
"Note",
144+
noteFieldFocusNode,
145+
context,
146+
desktopMed: isDesktop,
147+
).copyWith(
148+
contentPadding: isDesktop
155149
? const EdgeInsets.only(
156-
left: 16,
157-
top: 11,
158-
bottom: 12,
159-
right: 5,
160-
)
150+
left: 16,
151+
top: 11,
152+
bottom: 12,
153+
right: 5,
154+
)
161155
: null,
162-
suffixIcon:
163-
_noteController.text.isNotEmpty
156+
suffixIcon: _noteController.text.isNotEmpty
164157
? Padding(
165-
padding: const EdgeInsets.only(right: 0),
166-
child: UnconstrainedBox(
167-
child: Row(
168-
children: [
169-
TextFieldIconButton(
170-
child: const XIcon(),
171-
onTap: () async {
172-
setState(() {
173-
_noteController.text = "";
174-
});
175-
},
176-
),
177-
],
158+
padding: const EdgeInsets.only(right: 0),
159+
child: UnconstrainedBox(
160+
child: Row(
161+
children: [
162+
TextFieldIconButton(
163+
child: const XIcon(),
164+
onTap: () async {
165+
setState(() {
166+
_noteController.text = "";
167+
});
168+
},
169+
),
170+
],
171+
),
178172
),
179-
),
180-
)
173+
)
181174
: null,
182-
),
175+
),
183176
),
184177
),
185178
),

0 commit comments

Comments
 (0)