Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

온보딩 화면에 버튼 패키지로 변경 #9

Merged
merged 2 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading