Skip to content

Commit f5edca9

Browse files
create _ControlButtons
1 parent 43f3ebf commit f5edca9

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
part of '../view/sorting_page.dart';
2+
3+
class _ControlButtons extends ConsumerWidget {
4+
const _ControlButtons();
5+
6+
@override
7+
Widget build(BuildContext context, ref) {
8+
return Row(
9+
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
10+
children: [
11+
CustomRoundedElevatedButton(
12+
roundedRadius: 3,
13+
backgroundColor: ThemeEnum.blackOp10,
14+
child: const RegularText(
15+
StringsManager.play,
16+
fontSize: 14,
17+
),
18+
onPressed: () {
19+
ref.read(_notifierProvider.notifier).playSorting();
20+
},
21+
),
22+
CustomRoundedElevatedButton(
23+
roundedRadius: 3,
24+
backgroundColor: ThemeEnum.blackOp10,
25+
child: const RegularText(
26+
StringsManager.stop,
27+
fontSize: 14,
28+
),
29+
onPressed: () {
30+
ref.read(_notifierProvider.notifier).stopSorting();
31+
},
32+
),
33+
CustomRoundedElevatedButton(
34+
roundedRadius: 3,
35+
backgroundColor: ThemeEnum.redColor,
36+
child: const RegularText(
37+
StringsManager.reset,
38+
color: ThemeEnum.whiteColor,
39+
fontSize: 14,
40+
),
41+
onPressed: () {
42+
ref.read(_notifierProvider.notifier).generateAgain();
43+
},
44+
),
45+
],
46+
);
47+
}
48+
}

0 commit comments

Comments
 (0)