Bloc Quiz – Flutter

下载

BLoC Quiz

图表

Dart Flutter Android Firebase

从源代码构建
  1. 在Android Studio IDE中导入(已安装Flutter插件)
  2. flutter pub get 然后运行。
身份验证 首页 测验 分数 结果 个人资料
特点
  • BLOC架构
  • Firebase
    • 认证
    • Firestore数据库:用于存储分数
    • 存储:用于存储用户个人资料图片文件
  • 从Rest API获取测验:the-trivia-api.com
  • 比较过去10个分数中每个类别和难度级别的性能

+---lib
|   |   main.dart
|   |   
|   +---bloc
|   |   +---auth
|   |   |       auth_bloc.dart
|   |   |       auth_event.dart
|   |   |       auth_state.dart
|   |   |       
|   |   +---difficulty_level
|   |   |       difficulty_level_bloc.dart
|   |   |       difficulty_level_event.dart
|   |   |       difficulty_level_state.dart
|   |   |       
|   |   +---profile
|   |   |       profile_bloc.dart
|   |   |       profile_event.dart
|   |   |       profile_state.dart
|   |   |       
|   |   +---quiz
|   |   |       quiz_bloc.dart
|   |   |       quiz_event.dart
|   |   |       quiz_state.dart
|   |   |       
|   |   +---quiz_data
|   |   |       quiz_data_bloc.dart
|   |   |       quiz_data_event.dart
|   |   |       quiz_data_state.dart
|   |   |       
|   |   \---results
|   |           results_bloc.dart
|   |           results_event.dart
|   |           results_state.dart
|   |           
|   +---data
|   |   +---model
|   |   |       category.dart
|   |   |       questions.dart
|   |   |       score.dart
|   |   |       
|   |   \---repositories
|   |           auth_repository.dart
|   |           quiz_repo.dart
|   |           result_repo.dart
|   |           storage_repo.dart
|   |           
|   +---presentation
|   |   +---auth
|   |   |   +---sign_in
|   |   |   |       sign_in.dart
|   |   |   |       
|   |   |   \---sign_up
|   |   |           sign_up.dart
|   |   |           
|   |   +---dashboard
|   |   |   |   dashboard.dart
|   |   |   |   
|   |   |   +---categories
|   |   |   |       categories_screen.dart
|   |   |   |       category_item.dart
|   |   |   |       
|   |   |   \---result
|   |   |           results_screen.dart
|   |   |           result_item.dart
|   |   |           
|   |   +---main
|   |   |       difficulty_selection_screen.dart
|   |   |       prepare_quiz_screen.dart
|   |   |       question_screen.dart
|   |   |       result_detail_screen.dart
|   |   |       
|   |   \---profile
|   |           profile.dart
|   |           
|   +---utility
|   |       category_detail_list.dart
|   |       prepare_quiz.dart
|   |       
|   \---widgets
|           close_button.dart
|           difficulty_level_widget.dart
|           option_widget.dart

GitHub

查看 Github