You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.1 KiB
38 lines
1.1 KiB
import 'dart:async';
|
|
|
|
import 'package:bloc/bloc.dart';
|
|
import 'package:flutter/cupertino.dart';
|
|
import 'package:go_router/go_router.dart';
|
|
import 'package:hadi_hoda_flutter/core/routers/my_routes.dart';
|
|
import 'package:hadi_hoda_flutter/core/widgets/about_us_dialog/about_us_dialog.dart';
|
|
import 'package:hadi_hoda_flutter/features/home/presentation/bloc/home_event.dart';
|
|
import 'package:hadi_hoda_flutter/features/home/presentation/bloc/home_state.dart';
|
|
|
|
class HomeBloc extends Bloc<HomeEvent, HomeState> {
|
|
/// ------------constructor------------
|
|
HomeBloc() : super(const HomeState()) {
|
|
on<GetHomeEvent>(_getHomeEvent);
|
|
}
|
|
|
|
/// ------------UseCases------------
|
|
|
|
/// ------------Variables------------
|
|
|
|
/// ------------Controllers------------
|
|
|
|
/// ------------Functions------------
|
|
void goToLevelPage(BuildContext context){
|
|
context.pushNamed(Routes.levelPage);
|
|
}
|
|
|
|
void goToLanguagePage(BuildContext context){
|
|
context.pushNamed(Routes.languagePage);
|
|
}
|
|
|
|
void showAboutUs(BuildContext context){
|
|
showAboutUsDialog(context: context);
|
|
}
|
|
|
|
/// ------------Api Calls------------
|
|
FutureOr<void> _getHomeEvent(event, emit) async {}
|
|
}
|