Skip to content

Commit 65bade1

Browse files
committed
Riverpod version : Remove unused willPopScope widget
1 parent 74ef5ab commit 65bade1

File tree

1 file changed

+54
-59
lines changed

1 file changed

+54
-59
lines changed

lib/src/presentation/screen/office_furniture_detail_screen.dart

Lines changed: 54 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -140,68 +140,63 @@ class OfficeFurnitureDetailScreen extends HookConsumerWidget {
140140
).fadeAnimation(1.3);
141141
}
142142

143-
return WillPopScope(
144-
onWillPop: () async {
145-
return Future.value(true);
146-
},
147-
child: Scaffold(
148-
bottomNavigationBar: bottomBar(),
149-
appBar: appBar(context),
150-
body: SingleChildScrollView(
151-
child: Padding(
152-
padding: const EdgeInsets.all(15),
153-
child: Column(
154-
crossAxisAlignment: CrossAxisAlignment.start,
155-
children: [
156-
furnitureImageSlider(height),
157-
Center(
158-
child: StarRatingBar(
159-
score: furniture.score,
160-
itemSize: 25,
161-
).fadeAnimation(0.4),
162-
),
163-
Padding(
164-
padding: const EdgeInsets.only(top: 20, bottom: 10),
165-
child: const Text(
166-
"Synopsis",
143+
return Scaffold(
144+
bottomNavigationBar: bottomBar(),
145+
appBar: appBar(context),
146+
body: SingleChildScrollView(
147+
child: Padding(
148+
padding: const EdgeInsets.all(15),
149+
child: Column(
150+
crossAxisAlignment: CrossAxisAlignment.start,
151+
children: [
152+
furnitureImageSlider(height),
153+
Center(
154+
child: StarRatingBar(
155+
score: furniture.score,
156+
itemSize: 25,
157+
).fadeAnimation(0.4),
158+
),
159+
Padding(
160+
padding: const EdgeInsets.only(top: 20, bottom: 10),
161+
child: const Text(
162+
"Synopsis",
163+
style: h2Style,
164+
textAlign: TextAlign.end,
165+
).fadeAnimation(0.6),
166+
),
167+
Text(
168+
furniture.description,
169+
maxLines: 5,
170+
overflow: TextOverflow.ellipsis,
171+
style: const TextStyle(color: Colors.black45),
172+
).fadeAnimation(0.8),
173+
const SizedBox(height: 20),
174+
Row(
175+
children: [
176+
const Text(
177+
"Color :",
167178
style: h2Style,
168179
textAlign: TextAlign.end,
169-
).fadeAnimation(0.6),
170-
),
171-
Text(
172-
furniture.description,
173-
maxLines: 5,
174-
overflow: TextOverflow.ellipsis,
175-
style: const TextStyle(color: Colors.black45),
176-
).fadeAnimation(0.8),
177-
const SizedBox(height: 20),
178-
Row(
179-
children: [
180-
const Text(
181-
"Color :",
182-
style: h2Style,
183-
textAlign: TextAlign.end,
180+
),
181+
Expanded(child: ColorPicker(colors: furniture.colors)),
182+
Expanded(
183+
child: CounterButton(
184+
label: items[index].quantity,
185+
onIncrementSelected: () {
186+
ref
187+
.read(furnitureStateNotifierProvider.notifier)
188+
.increaseQuantity(items[index]);
189+
},
190+
onDecrementSelected: () {
191+
ref
192+
.read(furnitureStateNotifierProvider.notifier)
193+
.decreaseQuantity(items[index]);
194+
},
184195
),
185-
Expanded(child: ColorPicker(colors: furniture.colors)),
186-
Expanded(
187-
child: CounterButton(
188-
label: items[index].quantity,
189-
onIncrementSelected: () {
190-
ref
191-
.read(furnitureStateNotifierProvider.notifier)
192-
.increaseQuantity(items[index]);
193-
},
194-
onDecrementSelected: () {
195-
ref
196-
.read(furnitureStateNotifierProvider.notifier)
197-
.decreaseQuantity(items[index]);
198-
},
199-
),
200-
)
201-
],
202-
).fadeAnimation(1.0)
203-
],
204-
),
196+
)
197+
],
198+
).fadeAnimation(1.0)
199+
],
205200
),
206201
),
207202
),

0 commit comments

Comments
 (0)