Skip to content

Commit 634b898

Browse files
add movable and interact background for home page
1 parent 51e0300 commit 634b898

File tree

1 file changed

+26
-20
lines changed

1 file changed

+26
-20
lines changed

lib/features/base/view/base_page.dart

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ import 'package:algorithm_visualizer/core/widgets/adaptive/text/adaptive_text.da
77
import 'package:algorithm_visualizer/core/widgets/custom_widgets/custom_rounded_elevated_button.dart';
88
import 'package:flutter/material.dart';
99

10+
import 'movable_animated_button.dart';
11+
import 'movable_pins.dart';
12+
1013
class BasePage extends StatefulWidget {
1114
const BasePage({super.key});
1215

@@ -28,26 +31,29 @@ class _BasePageState extends State<BasePage> {
2831
return Scaffold(
2932
body: SafeArea(
3033
child: Center(
31-
child: Row(
32-
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
33-
children: [
34-
CustomRoundedElevatedButton(
35-
roundedRadius: 3,
36-
backgroundColor: ThemeEnum.whiteD5Color,
37-
child: const RegularText(StringsManager.searching),
38-
onPressed: () {
39-
context.pushTo(Routes.searching);
40-
},
41-
),
42-
CustomRoundedElevatedButton(
43-
roundedRadius: 3,
44-
backgroundColor: ThemeEnum.whiteD5Color,
45-
child: const RegularText(StringsManager.sorting),
46-
onPressed: () {
47-
context.pushTo(Routes.sortingList);
48-
},
49-
),
50-
],
34+
child: MovablePinsBackground(
35+
pinColor: ThemeEnum.whiteD4Color,
36+
child: Row(
37+
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
38+
children: [
39+
FloatingAnimatedButton(
40+
child: CustomRoundedElevatedButton(
41+
roundedRadius: 3,
42+
backgroundColor: ThemeEnum.whiteD5Color,
43+
child: const RegularText(StringsManager.searching),
44+
onPressed: () => context.pushTo(Routes.searching),
45+
),
46+
),
47+
FloatingAnimatedButton(
48+
child: CustomRoundedElevatedButton(
49+
roundedRadius: 3,
50+
backgroundColor: ThemeEnum.whiteD5Color,
51+
child: const RegularText(StringsManager.sorting),
52+
onPressed: () => context.pushTo(Routes.sortingList),
53+
),
54+
),
55+
],
56+
),
5157
),
5258
),
5359
),

0 commit comments

Comments
 (0)