Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
ntManhBut
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
NguyenTienManh
ntManhBut
Commits
b9fe2174
Commit
b9fe2174
authored
Feb 16, 2023
by
NguyenTienManh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 16-2
parent
c0c1c56e
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
725 additions
and
721 deletions
+725
-721
lib/app/module/comment/widgets/comment_widget.dart
lib/app/module/comment/widgets/comment_widget.dart
+121
-134
lib/app/module/course/widgets/course_widget.dart
lib/app/module/course/widgets/course_widget.dart
+99
-107
lib/app/module/coursedetail/widgets/course_detail.dart
lib/app/module/coursedetail/widgets/course_detail.dart
+115
-122
lib/app/module/lession/widgets/lession_widget.dart
lib/app/module/lession/widgets/lession_widget.dart
+16
-22
lib/app/module/login/widget/login_details.dart
lib/app/module/login/widget/login_details.dart
+4
-4
lib/app/module/login/widget/login_widget.dart
lib/app/module/login/widget/login_widget.dart
+85
-77
lib/app/module/new/widgets/new_widget.dart
lib/app/module/new/widgets/new_widget.dart
+109
-117
lib/app/module/playvideo/page/play_video.dart
lib/app/module/playvideo/page/play_video.dart
+71
-24
lib/app/module/school/widgets/school_widget.dart
lib/app/module/school/widgets/school_widget.dart
+101
-110
lib/main.dart
lib/main.dart
+4
-4
No files found.
lib/app/module/comment/widgets/comment_widget.dart
View file @
b9fe2174
...
@@ -9,20 +9,13 @@ import '../bloc/comment_bloc.dart';
...
@@ -9,20 +9,13 @@ import '../bloc/comment_bloc.dart';
import
'../model/comment_model.dart'
;
import
'../model/comment_model.dart'
;
class
CommentWidget
extends
StatelessWidget
{
class
CommentWidget
extends
StatelessWidget
{
//CommentWidget({Key? key}) : super(key: key);
CommentModel
?
commentModel
;
CommentModel
?
commentModel
;
Function
(
CommentModel
commentModel
)?
onData
;
Function
(
CommentModel
commentModel
)?
onData
;
CommentWidget
(
this
.
onData
,
{
super
.
key
});
CommentWidget
(
this
.
onData
,
{
super
.
key
});
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
BlocProvider
.
of
<
CommentBloc
>(
context
).
add
(
RequestComment
(
context:
context
));
PageController
_pageController
=
new
PageController
();
PageController
_pageController
=
new
PageController
();
return
BlocConsumer
<
CommentBloc
,
CommentState
>(
listener:
(
context
,
state
)
async
{},
builder:
(
context
,
state
)
{
return
return
Container
(
Container
(
color:
AppColors
.
background
,
color:
AppColors
.
background
,
...
@@ -36,9 +29,7 @@ class CommentWidget extends StatelessWidget {
...
@@ -36,9 +29,7 @@ class CommentWidget extends StatelessWidget {
const
Text
(
'Nhan xet cua phu huynh'
,
style:
TextStyle
(
fontWeight:
FontWeight
.
bold
,
fontSize:
15
),),
const
Text
(
'Nhan xet cua phu huynh'
,
style:
TextStyle
(
fontWeight:
FontWeight
.
bold
,
fontSize:
15
),),
TextButton
(
TextButton
(
child:
Text
(
'Xem Them >>'
),
child:
Text
(
'Xem Them >>'
),
onPressed:
()
{
onPressed:
()
{}
print
(
'Pressed'
);
}
)
)
],
],
),
),
...
@@ -49,8 +40,7 @@ class CommentWidget extends StatelessWidget {
...
@@ -49,8 +40,7 @@ class CommentWidget extends StatelessWidget {
return
const
Text
(
'CommentInitial'
);
return
const
Text
(
'CommentInitial'
);
}
}
if
(
state
is
CommentFailed
){
if
(
state
is
CommentFailed
){
//const CircularProgressIndicator();
return
const
Text
(
'CommentFailed'
);
return
Text
(
'CommentFailed'
);
}
}
if
(
state
is
CommentLoading
){
if
(
state
is
CommentLoading
){
return
const
Text
(
'CommentLoading'
);
return
const
Text
(
'CommentLoading'
);
...
@@ -133,7 +123,8 @@ class CommentWidget extends StatelessWidget {
...
@@ -133,7 +123,8 @@ class CommentWidget extends StatelessWidget {
children:
[
children:
[
Container
(
Container
(
padding:
const
EdgeInsets
.
all
(
10
),
padding:
const
EdgeInsets
.
all
(
10
),
child:
Center
(
child:
SmoothPageIndicator
(
controller:
_pageController
,
child:
Center
(
child:
SmoothPageIndicator
(
controller:
_pageController
,
count:
state
.
commentModel
.
data
!.
length
,
count:
state
.
commentModel
.
data
!.
length
,
effect:
const
WormEffect
(),
effect:
const
WormEffect
(),
onDotClicked:
(
index
)
=>
_pageController
.
animateToPage
(
index
,
duration:
const
Duration
(
milliseconds:
1
),
curve:
Curves
.
bounceOut
),
onDotClicked:
(
index
)
=>
_pageController
.
animateToPage
(
index
,
duration:
const
Duration
(
milliseconds:
1
),
curve:
Curves
.
bounceOut
),
...
@@ -142,19 +133,15 @@ class CommentWidget extends StatelessWidget {
...
@@ -142,19 +133,15 @@ class CommentWidget extends StatelessWidget {
],),
],),
],);
],);
},
},
onPageChanged:
(
int
index
)
{
onPageChanged:
(
int
index
)
{}),
}),
);
);
}
}
return
const
Text
(
'NewFailed'
);
return
const
Text
(
'NewFailed'
);
}
}
),
),
const
SizedBox
(
height:
100
,),
SizedBox
(
height:
checkLandscape
(
context
)?
getHeight
(
context
)*
0.1
:
getHeight
(
context
)*
0.1
,),
],
],
),
),
);
);
}
}
);
}
}
}
lib/app/module/course/widgets/course_widget.dart
View file @
b9fe2174
...
@@ -18,12 +18,6 @@ class CourseWidget extends StatelessWidget {
...
@@ -18,12 +18,6 @@ class CourseWidget extends StatelessWidget {
List
<
ListData
>
listData
=
[];
List
<
ListData
>
listData
=
[];
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
BlocProvider
.
of
<
CourseBloc
>(
context
).
add
(
RequestCourse
(
context:
context
));
return
BlocConsumer
<
CourseBloc
,
CourseState
>(
listener:
(
context
,
state
)
async
{},
builder:
(
context
,
state
)
{
return
Container
(
return
Container
(
color:
AppColors
.
background
,
color:
AppColors
.
background
,
child:
Column
(
child:
Column
(
...
@@ -132,6 +126,4 @@ class CourseWidget extends StatelessWidget {
...
@@ -132,6 +126,4 @@ class CourseWidget extends StatelessWidget {
),
),
);
);
}
}
);
}
}
}
lib/app/module/coursedetail/widgets/course_detail.dart
View file @
b9fe2174
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_bloc/flutter_bloc.dart'
;
import
'package:flutter_bloc/flutter_bloc.dart'
;
...
@@ -9,7 +8,6 @@ import 'package:ongbut_ntmanh/app/module/lession/widgets/lession_widget.dart';
...
@@ -9,7 +8,6 @@ import 'package:ongbut_ntmanh/app/module/lession/widgets/lession_widget.dart';
import
'package:ongbut_ntmanh/const/colors.dart'
;
import
'package:ongbut_ntmanh/const/colors.dart'
;
import
'package:ongbut_ntmanh/widgets/widgets_util.dart'
;
import
'package:ongbut_ntmanh/widgets/widgets_util.dart'
;
import
'../../../../res/images/images.dart'
;
import
'../../../../res/images/images.dart'
;
import
'../../playvideo/page/play_video.dart'
;
import
'../bloc/course_detail_bloc.dart'
;
import
'../bloc/course_detail_bloc.dart'
;
class
CourseDetailWidget
extends
StatelessWidget
{
class
CourseDetailWidget
extends
StatelessWidget
{
...
@@ -20,11 +18,11 @@ class CourseDetailWidget extends StatelessWidget {
...
@@ -20,11 +18,11 @@ class CourseDetailWidget extends StatelessWidget {
List
<
ListLesson
>
listLesion
=
[];
List
<
ListLesson
>
listLesion
=
[];
CourseDetailWidget
(
this
.
courseId
,
this
.
image
,
{
super
.
key
});
CourseDetailWidget
(
this
.
courseId
,
this
.
image
,
{
super
.
key
});
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
BlocProvider
.
of
<
CourseDetailBloc
>(
context
).
add
(
CourseDetailBloc
bloc
=
CourseDetailBloc
()..
add
(
RequestCourseDetail
(
context:
context
,
idCourse:
courseId
));
RequestCourseDetail
(
context:
context
,
idCourse:
courseId
));
// BlocProvider.of<CourseDetailBloc>(context).add(
// RequestCourseDetail(context: context,idCourse: courseId));
return
return
Scaffold
(
Scaffold
(
...
@@ -37,14 +35,12 @@ class CourseDetailWidget extends StatelessWidget {
...
@@ -37,14 +35,12 @@ class CourseDetailWidget extends StatelessWidget {
},
},
),
),
Expanded
(
Expanded
(
child:
BlocConsumer
<
CourseDetailBloc
,
CourseDetailState
>(
child:
listener:
(
context
,
state
)
async
{},
builder:
(
context
,
state
)
{
return
BlocBuilder
<
CourseDetailBloc
,
CourseDetailState
>(
BlocBuilder
<
CourseDetailBloc
,
CourseDetailState
>(
bloc:
bloc
,
builder:
(
context
,
state
)
{
builder:
(
context
,
state
)
{
if
(
state
is
CourseDetailInitial
){
if
(
state
is
CourseDetailInitial
){
return
const
Text
(
'SchoolInitial'
);
return
const
CircularProgressIndicator
(
);
}
}
if
(
state
is
CourseDetailFailed
){
if
(
state
is
CourseDetailFailed
){
return
Text
(
state
.
message
.
toString
());
return
Text
(
state
.
message
.
toString
());
...
@@ -113,8 +109,6 @@ class CourseDetailWidget extends StatelessWidget {
...
@@ -113,8 +109,6 @@ class CourseDetailWidget extends StatelessWidget {
}
}
return
const
Text
(
'Default CourseDetail!!!!!'
);
return
const
Text
(
'Default CourseDetail!!!!!'
);
}
}
);
}
),
),
),
),
],)
],)
...
@@ -138,6 +132,8 @@ class CourseDetailWidget extends StatelessWidget {
...
@@ -138,6 +132,8 @@ class CourseDetailWidget extends StatelessWidget {
},
},
child:
Row
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
mainAxisSize:
MainAxisSize
.
max
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
children:
[
Padding
(
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
30
,
3
,
0
,
3
),
padding:
const
EdgeInsets
.
fromLTRB
(
30
,
3
,
0
,
3
),
...
@@ -146,11 +142,10 @@ class CourseDetailWidget extends StatelessWidget {
...
@@ -146,11 +142,10 @@ class CourseDetailWidget extends StatelessWidget {
padding:
const
EdgeInsets
.
fromLTRB
(
0
,
0
,
0
,
0
),
padding:
const
EdgeInsets
.
fromLTRB
(
0
,
0
,
0
,
0
),
child:
child:
Container
(
Container
(
width:
checkLandscape
(
context
)?
getWidth
(
context
)*
0.8
:
getWidth
(
context
)*
0.6
,
width:
checkLandscape
(
context
)?
getWidth
(
context
)*
0.25
:
getHeight
(
context
)*
0.25
,
child:
Text
(
chapters
.
listLesson
![
index
].
name
!=
null
?
chapters
.
listLesson
![
index
].
name
!:
''
,
style:
const
TextStyle
(
fontSize:
12
),
child:
Text
(
chapters
.
listLesson
![
index
].
name
!=
null
?
chapters
.
listLesson
![
index
].
name
!:
''
,
style:
TextStyle
(
fontSize:
12
,
overflow:
TextOverflow
.
ellipsis
),
softWrap:
false
,
softWrap:
false
,
maxLines:
1
,
maxLines:
1
,),
overflow:
TextOverflow
.
ellipsis
),
),
),
),
),
Padding
(
Padding
(
...
@@ -169,5 +164,3 @@ class CourseDetailWidget extends StatelessWidget {
...
@@ -169,5 +164,3 @@ class CourseDetailWidget extends StatelessWidget {
);
);
}
}
}
}
\ No newline at end of file
lib/app/module/lession/widgets/lession_widget.dart
View file @
b9fe2174
...
@@ -13,15 +13,11 @@ String lessonID;
...
@@ -13,15 +13,11 @@ String lessonID;
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
BlocProvider
.
of
<
LessonBloc
>(
context
).
add
(
BlocProvider
.
of
<
LessonBloc
>(
context
).
add
(
RequestLesson
(
context:
context
,
lessonID:
lessonID
));
RequestLesson
(
context:
context
,
lessonID:
lessonID
));
return
BlocConsumer
<
LessonBloc
,
LessonState
>(
listener:
(
context
,
state
)
async
{},
builder:
(
context
,
state
)
{
return
return
BlocBuilder
<
LessonBloc
,
LessonState
>(
BlocBuilder
<
LessonBloc
,
LessonState
>(
builder:
(
context
,
state
)
{
builder:
(
context
,
state
)
{
if
(
state
is
LessonInitial
){
if
(
state
is
LessonInitial
){
return
const
Text
(
'LessonInitial'
);
return
const
CircularProgressIndicator
(
);
}
}
if
(
state
is
LessonFailed
){
if
(
state
is
LessonFailed
){
return
const
Text
(
'LessonFailed'
);
return
const
Text
(
'LessonFailed'
);
...
@@ -38,8 +34,6 @@ String lessonID;
...
@@ -38,8 +34,6 @@ String lessonID;
}
}
);
);
}
}
);
}
}
}
lib/app/module/login/widget/login_details.dart
View file @
b9fe2174
...
@@ -2,14 +2,14 @@ import 'package:flutter/material.dart';
...
@@ -2,14 +2,14 @@ import 'package:flutter/material.dart';
import
'../model/login_model.dart'
;
import
'../model/login_model.dart'
;
class
LoginDetail
s
Page
extends
StatelessWidget
{
class
LoginDetailPage
extends
StatelessWidget
{
LoginModel
loginModels
;
LoginDetail
sPage
(
this
.
loginModels
,
{
Key
?
key
})
:
super
(
key:
key
);
LoginDetail
Page
(
{
Key
?
key
})
:
super
(
key:
key
);
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
return
Scaffold
(
appBar:
AppBar
(
title:
const
Text
(
'Details!'
)),
appBar:
AppBar
(
title:
const
Text
(
'Details!'
)),
body:
Text
(
loginModels
.
session_state
),
body:
Text
(
"acssea"
),
);
);
}
}
}
}
lib/app/module/login/widget/login_widget.dart
View file @
b9fe2174
...
@@ -15,12 +15,23 @@ class LoginPage extends StatelessWidget {
...
@@ -15,12 +15,23 @@ class LoginPage extends StatelessWidget {
return
return
BlocConsumer
<
LoginBloc
,
LoginState
>(
BlocConsumer
<
LoginBloc
,
LoginState
>(
listener:
(
context
,
state
)
async
{
listener:
(
context
,
state
)
async
{
// if(state is LoginSuccess){
// _userController.text='';
// _passController.text='';
// }
// hàm sẽ đc gọi mỗi khi có sự thay đổi state của Bloc.ví dụ:
// hàm sẽ đc gọi mỗi khi có sự thay đổi state của Bloc.ví dụ:
// if(state is MyStateSuccess){
// if(state is MyStateSuccess){
// // Thực hiện hành động
// // Thực hiện hành động
// }
// }
},
},
builder:
(
context
,
state
)
{
builder:
(
context
,
state
)
{
return
_buildUI
(
context
);
},
);
}
}
Widget
_buildUI
(
BuildContext
context
){
return
return
Container
(
Container
(
color:
AppColors
.
background
,
color:
AppColors
.
background
,
...
@@ -100,9 +111,6 @@ class LoginPage extends StatelessWidget {
...
@@ -100,9 +111,6 @@ class LoginPage extends StatelessWidget {
],
],
),
),
);
);
},
);
}
}
}
lib/app/module/new/widgets/new_widget.dart
View file @
b9fe2174
...
@@ -14,12 +14,6 @@ class NewWidget extends StatelessWidget {
...
@@ -14,12 +14,6 @@ class NewWidget extends StatelessWidget {
NewModel
?
newModel
;
NewModel
?
newModel
;
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
BlocProvider
.
of
<
NewBloc
>(
context
).
add
(
RequestNew
(
context:
context
));
return
BlocConsumer
<
NewBloc
,
NewState
>(
listener:
(
context
,
state
)
async
{},
builder:
(
context
,
state
)
{
return
return
Container
(
Container
(
color:
AppColors
.
background
,
color:
AppColors
.
background
,
...
@@ -138,6 +132,4 @@ class NewWidget extends StatelessWidget {
...
@@ -138,6 +132,4 @@ class NewWidget extends StatelessWidget {
),
),
);
);
}
}
);
}
}
}
lib/app/module/playvideo/page/play_video.dart
View file @
b9fe2174
...
@@ -3,16 +3,33 @@ import 'package:flutter/material.dart';
...
@@ -3,16 +3,33 @@ import 'package:flutter/material.dart';
import
'package:flutter/services.dart'
;
import
'package:flutter/services.dart'
;
import
'package:youtube_player_flutter/youtube_player_flutter.dart'
;
import
'package:youtube_player_flutter/youtube_player_flutter.dart'
;
class
PlayVideoPage
extends
State
less
Widget
{
class
PlayVideoPage
extends
State
ful
Widget
{
String
link
;
String
link
;
PlayVideoPage
({
required
this
.
link
,
Key
?
key
})
:
super
(
key:
key
);
PlayVideoPage
({
required
this
.
link
,
Key
?
key
})
:
super
(
key:
key
);
@override
State
<
PlayVideoPage
>
createState
()
=>
_PlayVideoPageState
();
}
class
_PlayVideoPageState
extends
State
<
PlayVideoPage
>
{
late
YoutubePlayerController
_controller
;
late
YoutubePlayerController
_controller
;
// late TextEditingController _idController;
// late TextEditingController _seekToController;
// final List<String> _ids = [
// 'nPt8bK2gbaU',
// ];
@override
@override
Widget
build
(
BuildContext
context
)
{
void
initState
()
{
_controller
=
YoutubePlayerController
(
super
.
initState
();
initialVideoId:
YoutubePlayer
.
convertUrlToId
(
link
).
toString
(),
_controller
=
YoutubePlayerController
(
// initialVideoId: "nPt8bK2gbaU",
// initialVideoId: widget.link,
initialVideoId:
YoutubePlayer
.
convertUrlToId
(
widget
.
link
).
toString
(),
flags:
const
YoutubePlayerFlags
(
flags:
const
YoutubePlayerFlags
(
mute:
false
,
mute:
false
,
autoPlay:
true
,
autoPlay:
true
,
...
@@ -21,18 +38,48 @@ class PlayVideoPage extends StatelessWidget {
...
@@ -21,18 +38,48 @@ class PlayVideoPage extends StatelessWidget {
isLive:
false
,
isLive:
false
,
forceHD:
false
,
forceHD:
false
,
enableCaption:
true
,
enableCaption:
true
,
),
),
);
);
}
@override
void
deactivate
()
{
// Pauses video while navigating to next page.
_controller
.
pause
();
super
.
deactivate
();
}
@override
void
dispose
()
{
_controller
.
dispose
();
// _idController.dispose();
// _seekToController.dispose();
super
.
dispose
();
}
@override
Widget
build
(
BuildContext
context
)
{
return
return
YoutubePlayerBuilder
(
YoutubePlayerBuilder
(
onExitFullScreen:
()
{
SystemChrome
.
setPreferredOrientations
(
DeviceOrientation
.
values
);},
onExitFullScreen:
()
{
SystemChrome
.
setPreferredOrientations
(
DeviceOrientation
.
values
);
},
player:
YoutubePlayer
(
player:
YoutubePlayer
(
controller:
_controller
,
controller:
_controller
,
showVideoProgressIndicator:
true
,
showVideoProgressIndicator:
true
,
progressIndicatorColor:
Colors
.
blueAccent
,
progressIndicatorColor:
Colors
.
blueAccent
,
// onReady: () {
// _isPlayerReady = true;
// },
// onEnded: (data) {
// _controller
// .load(_ids[(_ids.indexOf(data.videoId) + 1) % _ids.length]);
// },
),
),
builder:
(
context
,
player
)
=>
Scaffold
(
builder:
(
context
,
player
)
=>
Scaffold
(
appBar:
AppBar
(
title:
Text
(
YoutubePlayer
.
convertUrlToId
(
link
).
toString
()),),
appBar:
AppBar
(
title:
Text
(
YoutubePlayer
.
convertUrlToId
(
widget
.
link
).
toString
()),),
body:
Container
(
child:
player
),
body:
Container
(
child:
player
),
),
),
);
);
...
...
lib/app/module/school/widgets/school_widget.dart
View file @
b9fe2174
...
@@ -22,19 +22,12 @@ class SchoolWidget extends StatelessWidget {
...
@@ -22,19 +22,12 @@ class SchoolWidget extends StatelessWidget {
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
BlocProvider
.
of
<
SchoolBloc
>(
context
).
add
(
RequestSchool
(
context:
context
));
return
BlocConsumer
<
SchoolBloc
,
SchoolState
>(
listener:
(
context
,
state
)
async
{},
builder:
(
context
,
state
)
{
return
Container
(
return
Container
(
color:
AppColors
.
background
,
color:
AppColors
.
background
,
child:
Column
(
child:
Column
(
children:
[
children:
[
Padding
(
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
20
,
0
,
0
,
0
),
padding:
const
EdgeInsets
.
fromLTRB
(
20
,
0
,
0
,
0
),
child:
Row
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
children:
[
...
@@ -140,8 +133,6 @@ class SchoolWidget extends StatelessWidget {
...
@@ -140,8 +133,6 @@ class SchoolWidget extends StatelessWidget {
),
),
);
);
}
}
);
}
}
}
lib/main.dart
View file @
b9fe2174
...
@@ -48,15 +48,15 @@ class MainBloc {
...
@@ -48,15 +48,15 @@ class MainBloc {
BlocProvider
<
CounterBloc
>(
BlocProvider
<
CounterBloc
>(
create:
(
BuildContext
context
)
=>
CounterBloc
()),
create:
(
BuildContext
context
)
=>
CounterBloc
()),
BlocProvider
<
CourseBloc
>(
BlocProvider
<
CourseBloc
>(
create:
(
BuildContext
context
)
=>
CourseBloc
()),
create:
(
BuildContext
context
)
=>
CourseBloc
()
..
add
(
RequestCourse
(
context:
context
))
),
BlocProvider
<
SchoolBloc
>(
BlocProvider
<
SchoolBloc
>(
create:
(
BuildContext
context
)
=>
SchoolBloc
()),
create:
(
BuildContext
context
)
=>
SchoolBloc
()
..
add
(
RequestSchool
(
context:
context
))
),
BlocProvider
<
LoginBloc
>(
BlocProvider
<
LoginBloc
>(
create:
(
BuildContext
context
)
=>
LoginBloc
()),
create:
(
BuildContext
context
)
=>
LoginBloc
()),
BlocProvider
<
NewBloc
>(
BlocProvider
<
NewBloc
>(
create:
(
BuildContext
context
)
=>
NewBloc
()),
create:
(
BuildContext
context
)
=>
NewBloc
()
..
add
(
RequestNew
(
context:
context
))
),
BlocProvider
<
CommentBloc
>(
BlocProvider
<
CommentBloc
>(
create:
(
BuildContext
context
)
=>
CommentBloc
()),
create:
(
BuildContext
context
)
=>
CommentBloc
()
..
add
(
RequestComment
(
context:
context
))
),
BlocProvider
<
CourseDetailBloc
>(
BlocProvider
<
CourseDetailBloc
>(
create:
(
BuildContext
context
)
=>
CourseDetailBloc
()),
create:
(
BuildContext
context
)
=>
CourseDetailBloc
()),
BlocProvider
<
LessonBloc
>(
BlocProvider
<
LessonBloc
>(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment