-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from ia-toki/quiz-registration
create quiz registration page
- Loading branch information
Showing
10 changed files
with
359 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
env | ||
.env | ||
google-service.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
app/lib/features/quiz_registration/bloc/quiz_registration_cubit.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import 'package:equatable/equatable.dart'; | ||
import 'package:flutter_bloc/flutter_bloc.dart'; | ||
|
||
part 'quiz_registration_state.dart'; | ||
part 'quiz_registration_event.dart'; | ||
|
||
class QuizRegistrationCubit extends Cubit<QuizRegistrationState> { | ||
QuizRegistrationCubit() : super(QuizRegistrationInitialState()); | ||
|
||
void selectWeek(String selectedWeek) { | ||
emit(QuizRegistrationLoading()); | ||
|
||
emit(QuizRegistrationWeekSelected(selectedWeek)); | ||
} | ||
|
||
void selectLevel(String selectedLevel) { | ||
emit(QuizRegistrationLoading()); | ||
|
||
emit(QuizRegistrationLevelSelected(selectedLevel)); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
app/lib/features/quiz_registration/bloc/quiz_registration_event.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
part of 'quiz_registration_cubit.dart'; | ||
|
||
abstract class QuizRegistrationEvent extends Equatable { | ||
const QuizRegistrationEvent(); | ||
|
||
@override | ||
List<Object?> get props => []; | ||
} |
30 changes: 30 additions & 0 deletions
30
app/lib/features/quiz_registration/bloc/quiz_registration_state.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
part of 'quiz_registration_cubit.dart'; | ||
|
||
abstract class QuizRegistrationState extends Equatable { | ||
const QuizRegistrationState(); | ||
|
||
@override | ||
List<Object> get props => []; | ||
} | ||
|
||
class QuizRegistrationInitialState extends QuizRegistrationState {} | ||
|
||
class QuizRegistrationLoading extends QuizRegistrationState {} | ||
|
||
class QuizRegistrationWeekSelected extends QuizRegistrationState { | ||
final String selectedWeek; | ||
|
||
const QuizRegistrationWeekSelected(this.selectedWeek); | ||
|
||
@override | ||
List<Object> get props => [selectedWeek]; | ||
} | ||
|
||
class QuizRegistrationLevelSelected extends QuizRegistrationState { | ||
final String selectedLevel; | ||
|
||
const QuizRegistrationLevelSelected(this.selectedLevel); | ||
|
||
@override | ||
List<Object> get props => [selectedLevel]; | ||
} |
10 changes: 10 additions & 0 deletions
10
app/lib/features/quiz_registration/presentation/pages/_pages.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_bloc/flutter_bloc.dart'; | ||
|
||
import '../../../../core/bases/enum/button_type.dart'; | ||
import '../../../../core/bases/widgets/atoms/button.dart'; | ||
import '../../../../core/bases/widgets/layout/bebras_scaffold.dart'; | ||
import '../../../../core/constants/assets.dart'; | ||
import '../../bloc/quiz_registration_cubit.dart'; | ||
|
||
part 'quiz_registration_page.dart'; |
Oops, something went wrong.