Skip to content

Commit

Permalink
온보딩 화면에 버튼 패키지로 변경 (#9)
Browse files Browse the repository at this point in the history
* add 온보딩 버튼

* fix issue
  • Loading branch information
jwson-automation authored Aug 26, 2024
1 parent c3d40eb commit 04d055d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 9 deletions.
2 changes: 1 addition & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<application
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"
android:icon="@mipmap/launcher_icon"
android:label="boyvoice"
android:enableOnBackInvokedCallback="true">
<meta-data
Expand Down
29 changes: 21 additions & 8 deletions lib/feature/onboarding/OnboardingScreen.dart
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import 'package:blueberry_flutter_template/core/TopScreen.dart';
import 'package:blueberry_flutter_template/feature/onboarding/widgets/OnboardingPageViewBuilder.dart';
import 'package:flutter/material.dart';
import 'package:flutter_custom_page_steps_indication/CustomPageStepsIndication.dart';
import 'package:go_router/go_router.dart';
import 'package:shared_preferences/shared_preferences.dart';

import 'OnboardingData.dart';
import 'widgets/OnboardingDotWidget.dart';
import 'widgets/OnboardingPageButton.dart';

class OnboardingScreen extends StatefulWidget {
static const String name = 'OnboardingScreen';
Expand Down Expand Up @@ -68,12 +67,26 @@ class _OnboardingScreenState extends State<OnboardingScreen> {
flex: 1,
child: Column(
children: [
OnboardingDotWidget(currentPage: _currentPage),
const SizedBox(height: 20),
OnboardingPageButton(
currentPage: _currentPage,
onNextPressed: _onNextPressed,
),
StepProgress(
totalSteps: OnboardingData.pageDataList.length,
currentStep: _currentPage,
continueButtonColor: Colors.black,
backButtonColor: Colors.blue,
finishButtonColor: Colors.red,
enableFinishButtonGlow: false,
onNext: (int) {
_onNextPressed();
},
onBack: (int) {
_pageController.previousPage(
duration: const Duration(milliseconds: 300),
curve: Curves.easeIn,
);
},
onFinish: () {
context.goNamed(TopScreen.name);
},
)
],
),
),
Expand Down
3 changes: 3 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ dependencies:
audioplayers: ^6.0.0
lottie: ^3.1.2

# page indicator
flutter_custom_page_steps_indication: ^1.1.1



dev_dependencies:
Expand Down

0 comments on commit 04d055d

Please sign in to comment.